* [announce] ocamlscript 1.0
@ 2005-08-22 22:51 David MENTRE
2005-08-23 4:14 ` Geoffrey Alan Washburn
0 siblings, 1 reply; 3+ messages in thread
From: David MENTRE @ 2005-08-22 22:51 UTC (permalink / raw)
To: caml-list
Hello,
I've just released ocamlscript 1.0. ocamlscript is the very very small
implementation of a simple idea: write shell-like scripts on a Unix
system but in OCaml and optimized for speed.
For example, you can have a file with following content:
--start execute-n-times--
#!./ocamlscript unix.cmxa
let times = int_of_string (Sys.argv.(1))
let program = Sys.argv.(2)
let _ =
for i = 1 to times do
ignore(Unix.system program)
done;
exit 0
--end execute-n-times--
And execute this script as:
./execute-n-times 10 'echo Hello world!'
When this script is executed ("./execute-n-times"), the first time it is
compiled into native code ("./execute-n-times.opt") and then
executed. At second execution, the native code is executed
immediately. Of course, if the original script is modified, the native
code version is automatically recompiled.
A nice project (and from where the original idea of ocamlscript comes
from) would be to do a Linux distribution where all usual shell scripts
are replaced by ocamlscript scripts. I probably won't do it. ;)
Source: http://www.linux-france.org/~dmentre/code/ocamlscript-1.0.tar.gz
License: Public Domain
Have fun! ;)
d.
--
pub 1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [announce] ocamlscript 1.0
2005-08-22 22:51 [announce] ocamlscript 1.0 David MENTRE
@ 2005-08-23 4:14 ` Geoffrey Alan Washburn
2005-08-23 9:52 ` David MENTRE
0 siblings, 1 reply; 3+ messages in thread
From: Geoffrey Alan Washburn @ 2005-08-23 4:14 UTC (permalink / raw)
To: caml-list
David MENTRE wrote:
> I've just released ocamlscript 1.0. ocamlscript is the very very small
> implementation of a simple idea: write shell-like scripts on a Unix
> system but in OCaml and optimized for speed.
How does this differ from CasH (http://pauillac.inria.fr/cash/)? I've
actually been writing a number of my shell scripts with it recently.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [announce] ocamlscript 1.0
2005-08-23 4:14 ` Geoffrey Alan Washburn
@ 2005-08-23 9:52 ` David MENTRE
0 siblings, 0 replies; 3+ messages in thread
From: David MENTRE @ 2005-08-23 9:52 UTC (permalink / raw)
To: caml-list
Hello,
2005/8/23, Geoffrey Alan Washburn <geoffw@cis.upenn.edu>:
> How does this differ from CasH (http://pauillac.inria.fr/cash/)? I've
> actually been writing a number of my shell scripts with it recently.
It's been a long time that I haven't looked at Bruno's work but as far
as I remember, cash tries to provide all the facilities of a shell,
like program control, redirections, etc.
My program is much more simple: it only takes as input regular OCaml programs.
Yours,
david
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-23 9:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-22 22:51 [announce] ocamlscript 1.0 David MENTRE
2005-08-23 4:14 ` Geoffrey Alan Washburn
2005-08-23 9:52 ` David MENTRE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox