itamarst has quit [Quit: Connection closed for inactivity]
<LarstiQ>
korvo: hmm I thought I've seen tekknolagi around here
<korvo>
LarstiQ: Maybe they changed their nick.
<LarstiQ>
or my memory is confusing it with Mastodon
<LarstiQ>
korvo: in any case, I'm enjoying reading that post so thank you for thanking so I saw it too ;)
<korvo>
Yeah! No worries. And somebody else has now commented too. I'm glad that we're demystifying e-graphs.
<korvo>
I'm still thinking about intrusive union-find. I hadn't seen it described that way and it's still tickling my brain.
<nimaje>
as it is related to union-find, do you know any good equivalence relation having a good meet function (for a split & meet use case)? currently I additionally store versions with the union-find and copy it once, so I can figure out what changed since the split and only be quadratic in those modifications (I guess I will have a quadratic factor somewhere as long as I use union-find)
<nimaje>
finally reading that post "How might we find it again?" wouldn't it be better to have the expressions as plain data and the union-find as extra data structure, so that querying mul(a, b) always gives the same representant, independent how one created that mul(a, b), if you don't have a SSA-form your variables would additionally need their location stored (which basically is something SSA-like then?),
<nimaje>
hm, that still wouldn't solve div(mul(a, b), b) as you can't guess a from div(e, b)
<nimaje>
hm, forgot the ? somewhere in there
slav0nic has joined #pypy
ruth2345345 has quit [Remote host closed the connection]
<korvo>
nimaje: That's a fair question. Honestly, I'd suggest hash-consing each hunk of data, so that you will get the same representative *and* the same pointer to it.
<korvo>
You're right about variables and scoping. SSA is one way to do it. Another way is to go tacit/point-free and not have variables, which is what I did in Cammy; you can see how Cammy is encoded into egg rules here: https://osdn.net/users/corbin/pf/cammy/scm/blobs/master/jelly/src/main.rs
<nimaje>
yeah, just not having variables would also work
itamarst has joined #pypy
slav0nic has quit [Ping timeout: 245 seconds]
slav0nic has joined #pypy
slav0nic has quit [Ping timeout: 265 seconds]
<korvo>
Hm. Just to avoid actually building an interpreter to test: we know that naive graph reduction doesn't work well on RPython, right? Like, building the graph in memory is not something the JIT can improve upon.