<arigato>
_continuation is related to stackless python; I definitely forgot everything about the actual order in which things execute (despite writing this code long ago)
<arigato>
unsure why there is (or was) this logic to pop the stack here; it looks like part of the regular bytecode implementation was never run at all?
slav0nic has joined #pypy
<arigato>
ah yes, it's *picking* the _continuations, which is part of the code I definitely deny all knowledge about
<arigato>
the assumption is that all the frames that were pickled where in the middle of some call (e.g. to the next inner frame, or to some function to switch the execution flow away)
<arigato>
but when resuming we only see the Python frames themselves, as they were in the middle of calls
<arigato>
but the hack was needed because we restart the Python frames at the next bytecode
<arigato>
my feeling is that pickling continuations has always been an obscure pypy-only feature that (I hope) nobody really uses, and which can easily trigger one of the asserts in the code, so it's completely experimental
MiguelX413 has quit [Read error: Connection reset by peer]
jcea has joined #pypy
slav0nic has quit [Remote host closed the connection]
<korvo>
Whoa. FWIW being able to unpickle continuations would be enough to implement orthogonal persistence, which is normally a runtime-defining feature. Wild that it's just a part of a part of a library.
<cfbolz>
no, it's in rpython, so part of the language implementation
<cfbolz>
it's also py2 only
<korvo>
Huh, okay. So like, if I wanted to compile some sort of image-based language stored as pickles, I could unpickle the image at the beginning of translation?
<korvo>
As opposed to e.g. PySOM's fun hack where an image can be stored as literal bytes in the executable.
<cfbolz>
pickle is a python feature, not an rpython feature
<cfbolz>
korvo: there were image based rpython vms at some point though, mainly (only?) the squeak port
<korvo>
cfbolz: Sure. I mean, like, compiling the high-level code to RPython itself. Like, first Futamura instead of second Futamura.
<korvo>
Sorry, I don't think I'm helping.
<cfbolz>
if you "just" want to fuse some code into the binary that's not so hard
<cfbolz>
that's how importlib works in py3
<korvo>
What I want is nebulous and unreasonable, usually. Like, this week I was thinking it'd be nice to access git repositories from RPython binaries.
<korvo>
I'm gonna subprocess a wrapper in Python 3 which uses Dulwich, because I need to monkey-patch Dulwich to allow git repos with certain invalid characters.
<korvo>
The hope was that I could load code from git repositories instead of loading it from documents. Nebulous and unreasonable.