From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA30870; Tue, 13 Nov 2001 21:29:46 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 VAA30584 for ; Tue, 13 Nov 2001 21:29:45 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fADKQIj26320; Tue, 13 Nov 2001 21:26:19 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA30627; Tue, 13 Nov 2001 21:26:18 +0100 (MET) Date: Tue, 13 Nov 2001 21:26:18 +0100 From: Xavier Leroy To: Alwyn Goodloe Cc: A Joseph Koshy , caml-list@inria.fr Subject: Re: [Caml-list] embedded caml? Message-ID: <20011113212618.A24821@pauillac.inria.fr> References: <20011111182055.E16307@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: ; from agoodloe@gradient.cis.upenn.edu on Sun, Nov 11, 2001 at 12:43:09PM -0500 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > You are probably right BUT many embedded environments are approaching > what you describe. J2ME for example is intended to run in such an > environment. I've always said anything that Java can do OCAML > can do faster with less resources. Also note that OHaskell also > seems intended for similar apps. Seems like OCAML would work > just as well. This is probably getting off-topic for this list. At any rate, I have some experience working with smart cards, which are fairly small embedded systems (a state-of-the-art smart card has an 8-bit processor, 5 Mhz clock, 2K RAM, 16K EEPROM, 64K ROM), and I can say with some confidence that all the system you mention (J2ME, etc) definitely do not fit in such a small embedded system. Like OCaml, J2ME won't work well unless you have a 32-bit processor and a few hundred K of RAM. For Java, it's a big improvement over the regular JDK implementation, which requires a few megabytes of RAM just to start up. But viewed from a Caml standpoint, it basically took Sun 5 years to shrink their JVM to the point where Caml Light and OCaml have been since the beginning. Don't be fooled by their marketing. For smaller systems such as smart cards, Sun had to develop Java Card, which is a much smaller subset of the JVM, where they throw out garbage collection, threads, floating-point arithmetic, long integers, and about 95% of the Java standard library. With these drastic cuts, it fits on a smart card, but programming in Java Card is definitely much lower-level than in full Java, and the benefits of using Java in this context, as opposed to (say) UCSD Pascal, are not obvious. So, I stand with my claim that if the original poster is interested in embedded systems that do not have a 32-bit processor and at least a few hundred K of RAM, then Caml is not appropriate, and C might remain his best bet. This said, there are plenty of bigger embedded systems where OCaml could make sense. PDAs are a well-known example; network routers are another. Heck, even the electronic ignition system in your car probably consists in a PowerPC with a few megabytes of RAM. - Xavier Leroy ------------------- 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