Take care!
There is a bug in the compiler causing
test/regress/rt/generators-01.flx
to fail. When I looked at the test I saw the problem instantly.
Here's the code:
///
//Check generators
var cheat : int = 0;
gen f():int = {
++ch
On Fri, 2006-09-08 at 10:25 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > The result: Felix fibres can't deadlock. Finite streams
> > are perfectly represented: if a thread tries to read
> > past the end of a stream it just disappears, so the
> > very question cannot arise.
> >
>
> fyi, I
skaller wrote:
> The result: Felix fibres can't deadlock. Finite streams
> are perfectly represented: if a thread tries to read
> past the end of a stream it just disappears, so the
> very question cannot arise.
>
fyi, I had a case where I think I deadlocked the main thread
unexpectedly trying
On Sat, 2006-09-09 at 00:15 +1000, skaller wrote:
> I didn't *design* 'generators'. Felix designed them.
> I just followed his instructions, and implemented them:
> he spoke in a dream one night, around the 5th cup
> of coffee .. :)
To give an idea of how Felix works.. in Stephen M Watt's
superb
On Fri, 2006-09-08 at 00:21 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > Felix now supports first class iterators, as a special
> > case of generators. Here is an example:
>
> Thats so awesome. Much better than my streams :) A couple comments on
> the syntax.
Just to try to explain this ag
On Fri, 2006-09-08 at 00:48 -0700, Erick Tryzelaar wrote:
> Erick Tryzelaar wrote:
> > Of course, what would it mean to have "gen f(init:int):int" (assuming
> > anonymous function return)? If this is allowed, and actually does just
> > return a single value, then gen doesn't seem all that differe
On Fri, 2006-09-08 at 00:21 -0700, Erick Tryzelaar wrote:
> skaller wrote:
> > Felix now supports first class iterators, as a special
> > case of generators. Here is an example:
>
> Thats so awesome. Much better than my streams :)
Don't be so sure. The fibres/channels subsume everything
that can
Erick Tryzelaar wrote:
> Of course, what would it mean to have "gen f(init:int):int" (assuming
> anonymous function return)? If this is allowed, and actually does just return
> a single value, then gen doesn't seem all that different from procedures.
> Your later comments on this suggest that ce
skaller wrote:
> Felix now supports first class iterators, as a special
> case of generators. Here is an example:
Thats so awesome. Much better than my streams :) A couple comments on
the syntax. First off, python is just about to add sending data back to
their generators, but they're using a sl
On Fri, 2006-09-08 at 11:54 +1000, skaller wrote:
> On Thu, 2006-09-07 at 21:24 -0400, Jacques Carette wrote:
> > THE paper to read regarding the efficient compilation of generators and
> > iterators is
> > http://www.csd.uwo.ca/~watt/pub/reprints/2006-wgp-jflow.pdf
> >
>
> Will do, thanks! Look
On Fri, 2006-09-08 at 10:40 +1000, skaller wrote:
> Felix now supports first class iterators, as a special
> case of generators. Here is an example:
Here's more elaborate example:
#import
union tree = TEmpty | Leaf of int | Node of tree * tree;
var examp
On Thu, 2006-09-07 at 21:24 -0400, Jacques Carette wrote:
> THE paper to read regarding the efficient compilation of generators and
> iterators is
> http://www.csd.uwo.ca/~watt/pub/reprints/2006-wgp-jflow.pdf
>
Will do, thanks! Looks good too!
--
John Skaller
Felix, successor to C++: http://f
THE paper to read regarding the efficient compilation of generators and
iterators is
http://www.csd.uwo.ca/~watt/pub/reprints/2006-wgp-jflow.pdf
Jacques
-
Using Tomcat but need to do more? Need to support web services, secur
Felix now supports first class iterators, as a special
case of generators. Here is an example:
#import
gen f(init:int)(inc:int):int = {
var counter = init;
again:>
counter += inc;
yield counter;
goto again;
}
var x = f(40);
print$ x(2); endl; // 42
p
14 matches
Mail list logo