<cfbolz>
korvo: sorry, set of ints? or set of lists of ints?
<cfbolz>
why not use a set of tuples of ints?
<korvo>
cfbolz: The lists have varying length. And yeah, set of lists.
<korvo>
I want an infinite union of tuples of ints; I don't know what the lengths will be at compile time.
<cfbolz>
ah, it's an rpython question
<cfbolz>
then it's easy 😅
<cfbolz>
you use an objectmodel.r_dict
<cfbolz>
you can use the actual list of ints as keys then
<cfbolz>
just be careful not to mutate them
<cfbolz>
the r_dict constructor takes two functions, eq and hash
[Arfrever] has quit [Ping timeout: 276 seconds]
[Arfrever] has joined #pypy
shodan45 has quit [Ping timeout: 248 seconds]
jcea has joined #pypy
shodan45 has joined #pypy
BarrensZeppelin has quit [Quit: BarrensZeppelin]
[Arfrever] has quit [Ping timeout: 248 seconds]
[Arfrever] has joined #pypy
<korvo>
cfbolz: Oh, that's quite direct. That's a great option, thanks.
<korvo>
cfbolz: Oh, hm. I probably should have read the second part of the paper, which considers indices as an optimization. I could do this with rbisect and *two* outer lists; one outer list is sorted lexicographically (shorter lists first) and the other is sorted by index on the zeroth column.
<korvo>
The paper in question this time is https://dl.acm.org/doi/10.1145/3498696 "relational e-matching", which frames e-graphs and e-matching as database problems.
<korvo>
...Does StopIteration exist after translation? It's okay if not, since it's kind of an obscure mechanism. But I'd sworn that I'd used it previously.
<korvo>
I just want to next() over iterators and raise if they are empty, to get an iterator-chaining effect. I know itertools isn't available.