Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[ANN] camlish: a simple module for shell scripting in OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-10-27 (14:35)
From: Zheng Li <zheng_li@u...>
Subject: Re: [ANN] camlish: a simple module for shell scripting in OCaml
Mikkel Fahnøe Jørgensen wrote:
>>  * The interaction between external commands and OCaml values are
>>    implemented asynchronously inside (but with a synchronous
>>    interface). So it won't get stuck unnecessarily when dealing with
>>    large chunk of input/output.
> Would it be possible to combine this with the LWT thread library?

I'm not clear what kind of "combine" you had in mind.

   * If you meant to use them together, I think that's fine. They
are both user level libraries, Lwt has an asynchronous interface,
camlish has a synchronous one, so you can just use camlish API as
common functions application everywhere.

  * If you meant to implement the inside asynchronous mechanics of
camlish on top of Lwt, I did thought of that. Actually, I have
another library called Async does similar thing as Lwt. It's
possible, but not necessary. Besides, the CPS-based approach
always brings some syntactic burdens, which I prefer to avoid.
So finally, the inside implementation of camlish is asynchronous,
while we only expose the synchronous interface to the outside world.

  * Maybe you were though about parallel execution? Pipeline is
parallel already, plus there are two parallel combinators have
been planed (opposite to "&&&", the sequential combinator). I
haven't seen this kind of stuff in other shells, but I think that's