caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re: newbie ocaml and delimited continuations
@ 2008-07-23  3:51 oleg
  0 siblings, 0 replies; 2+ messages in thread
From: oleg @ 2008-07-23  3:51 UTC (permalink / raw)
  To: julian.atkinson71; +Cc: caml-list


Sorry for the late reply: I was out of town. 

> Is it likely that this package may be incorporated into a later official
> relase of ocaml (ie receive first class support ) ?. continuations would
> appear to offer considerable programming expressiveness even if not widely
> supported in other languages (cf scheme).

The library delimcc is a pure library in the sense it does not patch
OCaml in any way. Therefore, it does not have to be incorporated into
the official release of OCaml. There are many very useful OCaml
libraries (Core or Extlib to name a few) that will never be part of
the official release. Since Inria does not have many resources to
devote to OCaml, they rather concentrate on the compiler and the basic
run-time system, and leave the libraries to the
community. Incidentally, GHC Haskell system is being developed in a
similar fashion.

> And a very basic tech question - It is obviously necessary that the package
> runs as interpreted bytecode - so that the activation record of the
> function/closure may be saved/serialized off.

Although the current delimcc library does support bytecode only, that
is not the fundamental limitation. It is possible in principle to
capture and resume continuations in ocamlopt-compiled programs. That
is, however, quite more involved, requires the use of frame tables,
etc. There has not been much interest in ocamlopt-delimited
continuations to justify the development. 

	Incidentally, a new version of the library
	http://okmij.org/ftp/packages/caml-shift.tar.gz
just has been released, with many optimizations reducing the size of
captured continuations. The original library was not optimized at all.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* newbie ocaml and delimited continuations
@ 2008-07-11 22:15 atkinson julian
  0 siblings, 0 replies; 2+ messages in thread
From: atkinson julian @ 2008-07-11 22:15 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 1514 bytes --]

hello all,

I am a newbie currently learning ocaml and am particularly interested in the
new continuations package.

there is announcement here - which include a tarball source patch.
(Persistent twice-delimited continuations and CGI programming)
http://groups.google.co.uk/group/fa.caml/browse_thread/thread/cac8628ae8ef191d

The value of continuations and coroutines are that they make it trivial to
map asynchronous operations to synchronous programming models , they have
general application in network stacks/ generators and simulation models. (ie
the benefit of threads without the locking and context switching cost). My
questions are as follows.

Is it likely that this package may be incorporated into a later official
relase of ocaml (ie receive first class support ) ?. continuations would
appear to offer considerable programming expressiveness even if not widely
supported in other languages (cf scheme).

And a very basic tech question - It is obviously necessary that the package
runs as interpreted bytecode - so that the activation record of the
function/closure may be saved/serialized off. However, in general is it
possible to mix and match ocaml code compiled with the native opt compiler,
with compiled bytecode ? Additionally would there be any caveats in trying
to do this using this continuations package. Note that i have not yet got to
functor/modules in my self-learning where i suspect the general aspect of
this question would be explained but am trying to ancipate a bit in advance.

[-- Attachment #2: Type: text/html, Size: 1663 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-23  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-23  3:51 newbie ocaml and delimited continuations oleg
  -- strict thread matches above, loose matches on Subject: below --
2008-07-11 22:15 atkinson julian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).