The byte-code part of the previous versions of delimcc could
already be used with OCaml 3.12 (although I didn't know that). Since
OCaml byte-code is portable, the byte-code delimcc should work on
any supported architecture. In this version, some adjustments have
been made to scAPI to make in more portable. It should be stressed
that there are _no_ distinct versions of the native-code delimcc, for
32- and 64-bit architectures. Rather, the same code (without any
64-bit--specific ifdefs) works on x86_32 and x86_64. Only
C code differs between byte-code and native-code versions of the
library; the OCaml code is shared, across the versions and the
architectures. The current version of delimcc probably works on other
architectures like arm, although I have no means of testing that.
The byte- and native-code versions of library has been tested on i386
Linux and FreeBSD platform and on amd64 Linux platform. The code is at
http://okmij.org/ftp/continuations/caml-shift.tar.gz
I thank Jim Pryor for help with testing.
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
The only reference mentioned in the source is a technical report that
does not look very easy to read.
Here is an example of a particular use of Delimcc to implement fibers for Lwt:
http://ambassadortothecomputers.blogspot.com/2010/08/mixing-monadic-and-direct-style-code.html
I don't know exactly how python generators work but I would imagine
that you can implement them with Delimcc.
Jake
Thank you for the question! I think you may find many examples
of delimited continuations on the following web site:
http://okmij.org/ftp/Computation/Continuations.html
Notable examples are the probabilistic programming language HANSEI,
normalization of MapReduce bodies by evaluation, and a framework to
program CGI applications in `direct style' (as if they were regular
console applications). Delimited continuations proved quite useful for
writing code generators: to perform let- or if-insertions in the
generated code, one has two choices: write the generator in a monadic
style or CPS, or use a `direct style' relying on delimited
control. Experience seems to show that direct-style generators are
more perspicuous.
> For instance can you implement python generators and its yield stuff
> by using this library ?
Yes! Here is the complete code
http://okmij.org/ftp/ML/generator.ml