[nem-en] Re: Re: Re: language shootout: cheap-concurrency (Dmitry Ivankov)

Kamil Skalski kamil.skalski at gmail.com
Tue May 8 09:21:56 CEST 2007


Nice :)
The only thing I could suggest would be to use single matching on pair
of colors instead of double nested one:

                me = match (me)
                    | Blue => match (other) { | Red=>Color.Yellow |
_=>Color.Red }
                    | Red => match (other) { | Blue=>Color.Yellow |
_=>Color.Blue }
                    | Yellow => match (other) { | Blue=>Color.Red |
_=>Color.Blue }

---->

                me = match ((me, other))
                    | (Blue, Red) => Color.Yellow
                    | (Blue, _) =>Color.Red
                    | (Red, Blue) =>Color.Yellow
                    | (Red, _) =>Color.Blue
                   ...


2007/5/8, Micky Latowicki <biosap at gmail.com>:
> On 5/7/07, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> > ...
> > You did an implementation of a little operating system for concurrent
> > execution, which does the work well. I guess it is up to the
> > benchmark's creators whether to allow such design or not.
>
> I'm attaching another version that I ported from the python
> implementation, which uses yield. Since python uses yield, there's no
> reason that the new version should not be accepted. I'm also attaching
> a chameneos implementation, also ported from python, along the same
> lines.
>
> Again, comments are invited.
>
> > ... Anyways, it is quite nice code and I would like to include it in snippets as an
> > example of language usage and as test for compiler.
> >
>
> You are most welcome to do so.
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list