[Haskell-cafe] Make a DSL serializable

Corentin Dupont corentin.dupont at gmail.com
Sun Mar 24 22:44:41 CET 2013


Hi Brandon,
in fact, that's what I'm doing. I record the list of actions performed by
the players, including the submission of the code. I serialize this list of
actions instead of the state of the game. When deserializing, I replay all
the players actions from scratch to get back to the same state than before.
This is the only way to do it (replaying from scratch), since the pieces of
code submitted can interact with other pieces of code submitted earlier:
they are not independant.
But I always bothered me that this state is not serializable...

On Sun, Mar 24, 2013 at 10:02 PM, Brandon Allbery <allbery.b at gmail.com>wrote:

> On Sun, Mar 24, 2013 at 4:16 PM, Corentin Dupont <
> corentin.dupont at gmail.com> wrote:
>
>> Hi Daniel,
>> in my game the handlers are supplied by the players as part of little
>> programs that they submit. An haskell interpreter is reading the program
>> code submitted and inserts it in the game.
>> So there is an infinite number of handlers...
>>
>
> You might store both the compiled code and the originally submitted code,
> and serialize the latter in a form that restart can recompile. I don't
> think that can be any less safe than the original
> submission/compilation/insertion.
>
> --
> brandon s allbery kf8nh                               sine nomine
> associates
> allbery.b at gmail.com
> ballbery at sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130324/1866e7a1/attachment-0001.htm>


More information about the Haskell-Cafe mailing list