<cfbolz>
mgorny: yes, there can be weird ordering effects
<cfbolz>
mgorny: iirc, weakref proxies have finalizers, and that makes things even more complex
<cfbolz>
I'll try to find some time to look into all these problems, also the original OrderedDict bug
<mgorny>
cfbolz: hmm, do you think replacing the proxy with ref() could make things work (if only as a temporary solution)?
<cfbolz>
it might, but not completely sure
<cfbolz>
I'd rather just fix the OrderedDict problem :-(
Dejan has joined #pypy
derpydoo has quit [Quit: derpydoo]
otisolsen70 has joined #pypy
jcea has joined #pypy
otisolsen70 has quit [Quit: Leaving]
jcea has quit [Quit: jcea]
jcea1 has joined #pypy
jcea1 is now known as jcea
Dejan has quit [Quit: Leaving]
jcea has quit [Ping timeout: 268 seconds]
<korvo>
I forked an old metacompiler called META II and got it to emit RPython. The resulting program can compile itself, and also it can do some other stuff like parse S-expressions or JSON, or compile Brainfuck to C.
<korvo>
I'm still hammering out the underlying design principles, but I noticed something curious: I can add Hoare logic to the metacompiler, and as long as my annotations are correct, I can conditionally emit code based on the logical values of the underlying flags.
<korvo>
This sounds like a binding-time improvement, so I went back to The Book for insights, and I saw something new to me. A packrat parser for PEGs has the same underlying recursive work-list structure as The Book's mixer for a basic flow-chart language.
<korvo>
Has this been studied before? I haven't found any information on this specifically, but I see that there's two-and-a-half PEG parsers checked in already and I know many folks here are fans of The Book.
<korvo>
Chapter 4's flow-chart language is a lot like the RPython that my tool emits. Going the other direction, I want to convert my tool to do packrat parsing, and that means that I need to build these (state, position) pairs which will be cached at runtime.