[Stackless] Santa concurrency problem

Brian Zimmer bzimmer at ziclix.com
Mon Mar 26 21:34:29 CEST 2007


Hi,

I wrote it with objects the first pass around but chose to use the 
functions to keep the LOC down :)

You have permission to do whatever you want with the code.  I'd be 
honored if it was a stackless example.

thanks, brian

On Mar 26, 2007, at 11:46 AM, Carlos Eduardo de Paula wrote:

> Hello Brian,
>
> Based on your code, I adapted it to an object oriented approach.. the
> functionality is the same but it looks "cleaner" for me... :)
>
> Its a great example and if you would permit, I can add it to the
> stackless examples project. (Both approaches if you want).
>
> The code is here:        http://dpaste.com/hold/7433/
>
> Best regards,
>
> Carlos
>
> On 3/25/07, Brian Zimmer <bzimmer at ziclix.com> wrote:
>> Hello,
>>
>> I've been using Python for years but only recently started using
>> Stackless.  One of the current concurrency topics is the paper written
>> by Simon Peyton-Jones about STM in which he presents a concurrency
>> problem and provides Haskell code to solve it.  The Erlang list then
>> included a version in Erlang demonstrating a shorter, and perhaps more
>> readable, solution to the problem.  I'm including my Stackless version
>> as a comparison and also wish feedback on my use of Stackless since it
>> was my first stab at it.  I was thrilled to see I could schedule 10K
>> elves without a problem.
>>
>> The top of the Erlang code has a good description of the problem.
>>
>> Haskell:
>> http://research.microsoft.com/%7Esimonpj/papers/stm/#beautiful
>> Erlang:    http://www.cs.otago.ac.nz/staffpriv/ok/santa/santa.erl
>> Stackless: http://www.ziclix.com/software/santa.txt
>>
>> thanks, brian
>>
>>
>> _______________________________________________
>> Stackless mailing list
>> Stackless at stackless.com
>> http://www.stackless.com/mailman/listinfo/stackless
>>
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>


_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list