[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Protocol Buffers for CHICKEN
From: |
Thomas Chust |
Subject: |
Re: [Chicken-users] Protocol Buffers for CHICKEN |
Date: |
Wed, 29 May 2013 16:10:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 |
On 2013-05-29 14:36, Felix wrote:
>> [...]
>> Continuations should work, too, but it is non-trivial to construct a
>> continuation that doesn't close over all sorts of crazy stuff like the
>> input ports from which the interpreter reads library files etc. Fiddling
>> around with green threads to delimit the continuations and using the
>> facilities to inject "external dependencies" into the serialization
>> context of protobuf should do the job, though.
>
> Well, ports for example will never be fully serializable (with the
> exception of "standard" ports). Have you seen "suspensions"?
>
> https://wiki.call-cc.org/eggref/4/suspension
>
> They currently use "s11n" but "protobuf" would be the better
> mechanism.
> [...]
Hello Felix,
yes, I'm aware of suspension and the magic going on inside that egg is
precisely what I referred to by "fiddling around with green threads".
In fact, protobuf can easily act as a drop-in replacement for s11n and I
just verified that it does work just fine with suspensions! So I can say
with more confidence now that continuation serialization through
protobuf is functional.
Apply the attached patch to the the suspension egg, install it and see
for yourself :-)
Ciao,
Thomas
--
When C++ is your hammer, every problem looks like your thumb.
suspension-protobuf.patch
Description: Text Data
Re: [Chicken-users] Protocol Buffers for CHICKEN, Andy Bennett, 2013/05/29