caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Ville-Pertti Keinonen <will@exomi.com>
To: Oleg Trott <oleg_trott@columbia.edu>
Cc: Michael Vanier <mvanier@cs.caltech.edu>,
	skaller@users.sourceforge.net, caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] extensible records again
Date: Mon, 22 Mar 2004 12:25:01 +0200	[thread overview]
Message-ID: <2D33B972-7BEB-11D8-BBAA-000393863F70@exomi.com> (raw)
In-Reply-To: <405EB2C6.8020507@columbia.edu>


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


  reply	other threads:[~2004-03-22 10:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-21  6:21 Michael Vanier
2004-03-21  8:08 ` Oleg Trott
2004-03-21  8:40   ` Michael Vanier
2004-03-21 16:10     ` Oleg Trott
2004-03-21 17:06       ` skaller
2004-03-21 17:36         ` Oleg Trott
2004-03-22  3:19           ` skaller
2004-03-22  7:49           ` Ville-Pertti Keinonen
2004-03-22  9:32             ` Oleg Trott
2004-03-22 10:25               ` Ville-Pertti Keinonen [this message]
2004-03-21 22:35         ` Michael Vanier
2004-03-22  3:39           ` skaller
2004-03-21 22:34       ` Michael Vanier
2004-03-22  3:31         ` skaller
2004-03-22  5:54           ` Michael Vanier
2004-03-23 19:14             ` skaller
2004-03-24  1:41               ` Jacques Garrigue
2004-03-24  8:44                 ` Julien Signoles
2004-03-24 10:04                   ` Jacques Garrigue
2004-03-21  8:53 ` Martin Jambon
2004-03-21  9:22   ` Michael Vanier
2004-03-21 17:00 ` skaller
2004-03-22  8:13 ` Achim Blumensath
2004-03-23  2:14   ` Michael Vanier
2004-03-23  7:25     ` Achim Blumensath
2004-03-31 10:05 ` Marcin 'Qrczak' Kowalczyk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2D33B972-7BEB-11D8-BBAA-000393863F70@exomi.com \
    --to=will@exomi.com \
    --cc=caml-list@inria.fr \
    --cc=mvanier@cs.caltech.edu \
    --cc=oleg_trott@columbia.edu \
    --cc=skaller@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).