Skip to content

Instantly share code, notes, and snippets.

@FROGGS
Last active October 8, 2015 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FROGGS/cf2a24d89361e760e7bc to your computer and use it in GitHub Desktop.
Save FROGGS/cf2a24d89361e760e7bc to your computer and use it in GitHub Desktop.

What I wanna use serialization for

The most pressing use case is loading modules databases Really Fast™. There we we need to be able to deserialize a .moarvm file, which most likely is a structure of hashes and arrays, besides strings representing identifiers and file names. (I would like to serialize CompUnits and IO::Paths directly, but that would not survive a rakudo rebuild. A json backup on the otherhand could serve as a fallback, but that also means we are limited to what json can. Not much.)

Thing is, serialization of our module database happens when we're installing a dist. That is usually invoked by panda (or zef), which means that their SCs are alive at the time we're doing it. That also means that our serialized database most likely will reference Panda.pm (of stuff from zef).

When we then try to just use rakudo, and load a comp unit, we will be unlucky because these dependencies are not around.

What could be a solution? Enforcing only core dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment