From: David MENTRE <dmentre@linux-france.org>
To: caml-list@inria.fr
Subject: [announce] ocamlscript 1.0
Date: Tue, 23 Aug 2005 00:51:38 +0200 [thread overview]
Message-ID: <87zmr9poud.fsf@linux-france.org> (raw)
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
next reply other threads:[~2005-08-22 22:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-22 22:51 David MENTRE [this message]
2005-08-23 4:14 ` Geoffrey Alan Washburn
2005-08-23 9:52 ` David MENTRE
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zmr9poud.fsf@linux-france.org \
--to=dmentre@linux-france.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox