From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA13245 for caml-red; Tue, 8 Aug 2000 15:42:36 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA12921 for ; Tue, 8 Aug 2000 15:42:02 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e78DfuP16062; Tue, 8 Aug 2000 15:41:56 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA13260; Tue, 8 Aug 2000 15:41:56 +0200 (MET DST) From: Pierre Weis Message-Id: <200008081341.PAA13260@pauillac.inria.fr> Subject: Re: tiny toplevel In-Reply-To: <39901098.42459B42@inrets.fr> from Georges Mariano at "Aug 8, 100 01:52:24 pm" To: georges.mariano@inrets.fr (Georges Mariano) Date: Tue, 8 Aug 2000 15:41:56 +0200 (MET DST) Cc: caml-list@inria.fr X-Mailer: ELM [version 2.4ME+ PL28 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis@pauillac.inria.fr > Hello, > > I know it is possible to create (specific) toplevels > by adding some stuff to the original toplevel but... > is it possible to do the reverse, i.e creating toplevels > by removing some (supposed) unnecessary libraries/components ?? > > By the way, what's the size of the "smallest" possible toplevel > (if 'smallest' make sense...) ?? > > (why this question ??? well, no particular point but > think > - about comparing "scripting language" interpreters (size) > - about "tiny ocaml" or "embedded ocaml" ... > ) > > [I have no idea about what can be removed from the original toplevel :-) > just a question > ] > Thanks > -- > > Georges MARIANO tel: (33) 03 20 43 84 06 > > INRETS, 20 rue Elisee Reclus fax: (33) 03 20 43 83 59 It is not easy to remove ``unnecessary libraries/components'' from the toplevel executable program, since you need all the compiler anyway, in order to ``interpret'' the language. If you want to remove something, you should probably remove features from the language (for instance use Caml Light instead of Objective Caml!). However, a very simple experiment shows that the Caml toplevels are not extremely big, compared to usual command interpreters: mouton:/$ ps ug USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND weis 7506 0.1 0.7 1564 904 pts/5 S 14:15 0:00 /bin/bash -i weis 7546 0.1 1.2 2840 1652 pts/5 T 14:16 0:00 ocamlrun /usr/bin weis 7656 1.6 0.5 1484 660 pts/5 T 14:17 0:00 camlrun /usr/loca weis 7665 0.0 0.6 2252 844 pts/5 T 14:18 0:00 perl weis 7657 0.0 0.6 2500 876 pts/5 R 14:18 0:00 ps ug Hope this helps, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/