glyph has quit [Remote host closed the connection]
glyph has joined #pypy
itamarst has quit [Quit: Connection closed for inactivity]
<cfbolz>
korvo: you can do that
<cfbolz>
it needs some slightly weird techniques using @specialize.argtype
<cfbolz>
and recursion on the tuples
<korvo>
cfbolz: It got real mad at `tuple([d.whatever([arr[i] for arr in arrs]) for i, d in unrolling_iterable(enumerate(self.ds)])` and similar attempts to map across rows of arguments. I gave up and hardcoded a version for pairs only, since that's what I actually needed.
<korvo>
I'm willing to admit that RPython defeated me today. It happens.
<cfbolz>
korvo: write it recursively
<cfbolz>
I can try to find an example, but not right this minute
<korvo>
It's not a big deal at all. I can't really explain why I'm fighting so much against RPython. Maybe I'm just looking for an artistic outlet.
<cfbolz>
korvo: it's a neat puzzle ;-)
<cfbolz>
korvo: basically your line needs two changes to work:
<cfbolz>
1) you can't do the list comprehension, because the list elements would be of different types. instead, build the tuple in a regular for loop with `resulttup = resulttup + (d.whatever(...), )`
<cfbolz>
korvo: the `unrolling_iterable` function cannot be used at runtime. instead you need to build it at translation time somehow (either via a closure, or an @specialize.memo or something)
<cfbolz>
if you show me some more context of your code, I can give it a go
jcea has joined #pypy
itamarst has joined #pypy
jcea has quit [Remote host closed the connection]
slav0nic has joined #pypy
jcea has joined #pypy
mjacob has quit [Ping timeout: 248 seconds]
mjacob has joined #pypy
mjacob has quit [Ping timeout: 252 seconds]
<korvo>
cfbolz: I see, thanks. You're welcome to look at my solution; OSDN's not loading, but the module is standalone: https://bpa.st/NNNQ Honestly, I don't feel like working on this more right now and I feel bad asking anybody else to care about it.
mjacob has joined #pypy
<korvo>
cfbolz: Oh, I understand my emotions now. This is like a quarter of a Zephyr ASDL compiler and I'm reminded of how much effort it was for so little payout. Beautiful generic code that was only used maybe two or three times.