[Gllug] trashman - a trash management utility for Linux filesystem

Richard Jones rich at annexia.org
Sat Feb 4 09:59:45 UTC 2006


On Fri, Feb 03, 2006 at 09:32:11PM +0000, Nix wrote:
> ... although quite why one would use ML and then write C in it
> is... unclear to me. ;)

Well, coz you can use the high level stuff throughout your code, then
profile it to find out where the "hot spots" are, which you then
rewrite in a C/imperative style.  Also because it's got a very good
garbage collector.

> One of the reasons I'm using a lesser language is actually to encourage
> me to use *no* non-transient in-memory data structures, so the stupider
> the language's type system the happier I am, to a certain degree. If I
> ensure that all storage is on the disk, then making Recant a distributed
> filesystem is dog simple: just start up Recant daemons on other machines
> and connect them to the same database. (No distributed locking, though;
> FUSE doesn't pass the POSIX locking stuff down to userspace.)

Something similar to this has been written in OCaml before
... [[Googles ...]]  Horus / Ensemble[1].  Horus was the original,
written in C.  They rewrote it in a subset of OCaml, and the result
was[2]:

  By moving to ML, we have made it possible to use formal verification
  tools to prove the correctness of critical Horus protocols and
  algorithms. The ML version of the system is also amenable to
  semi-automated protocol optimizations, which have slashed overhead and
  latency for heavily used protocols: latency is as low as 75us on ATM,
  and throughput as high as 80,000 multicasts per second.

I think I read somewhere else that the code was 10 times shorter too.

Rich.

[1] http://dsl.cs.technion.ac.il/projects/Ensemble/
[2] http://wagerlabs.com/articles/2005/08/22/a-rose-by-any-other-name

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list