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 LAA28920; Mon, 22 Mar 2004 11:24:18 +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 LAA13457 for ; Mon, 22 Mar 2004 11:24:16 +0100 (MET) Received: from oxy.exomi.com (fa-3-0-0.fw.exomi.com [217.169.64.99]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i2MAOFHd013165 for ; Mon, 22 Mar 2004 11:24:16 +0100 Received: from [127.0.0.1] (localhost [127.0.0.1]) by oxy.exomi.com (Postfix) with ESMTP id E2FA5184FD6; Mon, 22 Mar 2004 12:25:01 +0200 (EET) In-Reply-To: <405EB2C6.8020507@columbia.edu> References: <20040321062143.BE7D29BBA2@orchestra.cs.caltech.edu> <405D4D77.2030403@columbia.edu> <20040321084008.429279BBA2@orchestra.cs.caltech.edu> <405DBE78.5020609@columbia.edu> <1079888775.3165.11.camel@pelican.wigram> <405DD298.109@columbia.edu> <819CA932-7BD5-11D8-9C9B-000393863F70@exomi.com> <405EB2C6.8020507@columbia.edu> Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <2D33B972-7BEB-11D8-BBAA-000393863F70@exomi.com> Content-Transfer-Encoding: 7bit Cc: Michael Vanier , skaller@users.sourceforge.net, caml-list From: Ville-Pertti Keinonen Subject: Re: [Caml-list] extensible records again Date: Mon, 22 Mar 2004 12:25:01 +0200 To: Oleg Trott X-Mailer: Apple Mail (2.613) X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 extensible:01 oleg:01 fwiw:01 implemented:01 embedding:01 guile:01 compiler:01 compiler:01 tagged:01 ints:01 ocaml:01 ocaml:01 bytecode:01 trivial:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Status: X-Keywords: X-UID: 305 On Mar 22, 2004, at 11:32 AM, Oleg Trott wrote: > Ville-Pertti Keinonen wrote: >> How would you handle interactive sessions? ...after writing this, I realized that the obvious - if the compiler isn't a crippled implementation, you can implement a read-eval-print loop in a few lines of Scheme. ;-) > It would have the same limitations as OCaml, obviously: interactive in > bytecode only (this has long been one of my biggest gripes about > OCaml, actually). FWIW, I don't think writing a Scheme-to-OCaml > compiler is a very useful waste of one's time, just that it should be > about as easy as writing an interpreter for Scheme in OCaml. You still need eval. For a straightforward implementation, the code difference between an interpreter and a compiler would be small enough that you could have both and use the interpreter for the interactive top-level and eval. But still, I think any trivial implementation of Scheme in OCaml is going to be far from optimal (e.g. you'd have to do something nasty to avoid having ints both tagged and boxed), which is part of the reason why I implemented an interpreter (which could probably be turned into a simple compiler in a day or two), along with the fact that the main use is embedding in native compiled OCaml programs to make them scriptable (and since it ended up being considerably faster than e.g. guile, it's definitely not bad for that purpose). ------------------- 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/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners