caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml for system programming?
@ 2001-09-11 16:33 emil artin
  2001-09-11 17:10 ` Benjamin C. Pierce
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: emil artin @ 2001-09-11 16:33 UTC (permalink / raw)
  To: caml-list

Hello OCaml Community!

Is it reasonable to use OCaml for (low-level) system programming?
I have implemented some tools for filesystem maintenance
(things like resizing, ...) in C. As a challenging exercise
(for an OCaml newbie) I planned to reimplement my tools in
OCaml. But I don't know if it is managable at all!!

It would be interesting (at least for me) to know if one can
do things like file system implementation in OCaml?


Best regards,
e.a.
_______________________________________________________________________
1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] OCaml for system programming?
  2001-09-11 16:33 [Caml-list] OCaml for system programming? emil artin
@ 2001-09-11 17:10 ` Benjamin C. Pierce
  2001-09-11 23:02 ` SooHyoung Oh
  2001-09-12  8:30 ` David Mentre
  2 siblings, 0 replies; 4+ messages in thread
From: Benjamin C. Pierce @ 2001-09-11 17:10 UTC (permalink / raw)
  To: emil artin; +Cc: caml-list

> Is it reasonable to use OCaml for (low-level) system programming?
> I have implemented some tools for filesystem maintenance
> (things like resizing, ...) in C. As a challenging exercise
> (for an OCaml newbie) I planned to reimplement my tools in
> OCaml. But I don't know if it is managable at all!!

For at least certain sorts of systems programming, OCaml is wonderful.
For example, we've been very happy with it for implementing Unison (a
pretty serious file synchronizer, including a home-grown RPC
implementation and lots of low-level system call twiddling).  It's also
been used by projects like Ensemble, with good results.  I wouldn't be at
all surprised if you could implement most or all of an industrial
strength filesystem in OCaml.  (The foxnet project at CMU, though, raises
a few caveats -- they had quite a bit of trouble with things like the
need to have multiple views of packet headers.  The Cyclone project [Jim
and Morrisett] is an interesting alternative approach that tries to
address some of these head on.)

        Benjamin

-----------------------------------------------------------------------------
BENJAMIN C. PIERCE
Associate Prof., Computer & Information Science        bcpierce@cis.upenn.edu
University of Pennsylvania                                    +1 215 898-2012
200 South 33rd St.                                       Fax: +1 215 898-0587
Philadelphia, PA 19104, USA                http://www.cis.upenn.edu/~bcpierce
-----------------------------------------------------------------------------





-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] OCaml for system programming?
  2001-09-11 16:33 [Caml-list] OCaml for system programming? emil artin
  2001-09-11 17:10 ` Benjamin C. Pierce
@ 2001-09-11 23:02 ` SooHyoung Oh
  2001-09-12  8:30 ` David Mentre
  2 siblings, 0 replies; 4+ messages in thread
From: SooHyoung Oh @ 2001-09-11 23:02 UTC (permalink / raw)
  To: emil artin, caml-list


I'd like to recomend the following:

Xavier Leroy. Programmation du système Unix en Caml Light.
Technical report 147, INRIA, 1992. (Available by anonymous FTP on
ftp.inria.fr.)
A Unix systems programming course, demonstrating the use of the Caml Light
library
that gives access to Unix system calls.

You will find very good Caml Light source about Files, Processes, IPC,
Sockets.

Unfortunatily for me, it's not written by English.
Any news about English version?

--- SooHyoung Oh
----- Original Message -----
From: "emil artin" <emil.artin@web.de>
To: <caml-list@inria.fr>
Sent: Wednesday, September 12, 2001 1:33 AM
Subject: [Caml-list] OCaml for system programming?


> Hello OCaml Community!
>
> Is it reasonable to use OCaml for (low-level) system programming?
> I have implemented some tools for filesystem maintenance
> (things like resizing, ...) in C. As a challenging exercise
> (for an OCaml newbie) I planned to reimplement my tools in
> OCaml. But I don't know if it is managable at all!!
>
> It would be interesting (at least for me) to know if one can
> do things like file system implementation in OCaml?
>
>
> Best regards,
> e.a.
> _______________________________________________________________________
> 1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de
> IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de
>
>
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ:
http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives:
http://caml.inria.fr

-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

* Re: [Caml-list] OCaml for system programming?
  2001-09-11 16:33 [Caml-list] OCaml for system programming? emil artin
  2001-09-11 17:10 ` Benjamin C. Pierce
  2001-09-11 23:02 ` SooHyoung Oh
@ 2001-09-12  8:30 ` David Mentre
  2 siblings, 0 replies; 4+ messages in thread
From: David Mentre @ 2001-09-12  8:30 UTC (permalink / raw)
  To: emil artin; +Cc: caml-list

"emil artin" <emil.artin@web.de> writes:

>  But I don't know if it is managable at all!!

OCaml is able to read and write bytes on a Unix file descriptor, it is
also able to handle bit operations and you have both Int32 and Int64
data types. So it should be doable. The only lacking C feature is C
struct. 

However, I'm not sure it will be easier to do those low level
manipulations in OCaml than in C.

> It would be interesting (at least for me) to know if one can do things
> like file system implementation in OCaml?

If you are thinking of doing an OCaml linux kernel module to implement a
filesystem, clearly you can't do it (mainly due to the GC that needs the
glibc malloc() and/or sbrk() and would have to work in the kernel
address space).

Now, if you are speaking of doing a pure userland filesystem tool, it
should be doable, as said above.

If you progress in this direction, I would be personnaly interested to
have your feedback on the point.

Best regards,
d.
-- 
 David.Mentre@inria.fr
 Opinions expressed here are only mine.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


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

end of thread, other threads:[~2001-09-12  8:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-11 16:33 [Caml-list] OCaml for system programming? emil artin
2001-09-11 17:10 ` Benjamin C. Pierce
2001-09-11 23:02 ` SooHyoung Oh
2001-09-12  8:30 ` David Mentre

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).