Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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
>thoughts?

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
considerations.

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
server.

>>> 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:

http://www.cs.chalmers.se/~rjmh/TypedPE/README.html

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

--FC