Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
RE: Caml toplevel thru Web (HTTP or CGI)?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1998-09-11 (06:45)
From: Frank A. Christoph <christo@n...>
Subject: RE: Caml toplevel thru Web (HTTP or CGI)?
>>> I would like to set a demo (available thru our intranet) usable
>> by anyone (people have Win95 PCs and Unix workstation). The most
>>> sexy approach would be a Ocaml (or even a tiny CAML subset)
>>> interactive toplevel interpreter thru Web (HTML forms).
>Great idea!!  I'd love to see such a product...however, wouldn't this
>take lots of research into building a CGI / HTML front-end (or something
>similiar) then implementing the OCaml back-end?  Could this turn into an
>open-source project?  I'd say "yes" for both questions.  Any other

Open source project?  I don't think it's that big a project.  There are tons
of such front-ends on the web.  I don't know anything about CGI, but I
imagine all you need to do, if you use a forms-based interface, is to send
the input to ocamlc, compile it, redirect the error messages back if it
fails, or the output, if it typechecks.  Of course there are security

Also, I have heard that there is an Ocaml plug-in for Netscape.  So another
option is to require people to use Netscape, have them install the plug-in,
and after a request is processed, send back the bytecode instead of the
output and execute it locally.  This would obviate security problems on the

>>> Did anyone (ever) code such a thing?
>I've never heard of anything like this being out there -- but, then
>again, I'm fairly new to the OCaml world.

If you need an example, check out John Hughes' demonstration page for his
type-specializing partial evaluator:

I'm sure John would give you the relevant CGI code.  (It's probably written
in Haskell, though.)