From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA01779 for caml-redistribution; Fri, 11 Sep 1998 08:45:19 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA19175 for ; Fri, 11 Sep 1998 05:29:38 +0200 (MET DST) Received: from www.nextsolution.co.jp (www.nextsolution.co.jp [202.33.245.114]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id FAA22741 for ; Fri, 11 Sep 1998 05:29:31 +0200 (MET DST) Received: from sparc1.nextsolution.co.jp (sparc1 [202.235.80.1]) by www.nextsolution.co.jp (8.8.7/3.7W) with SMTP id MAA03594 for ; Fri, 11 Sep 1998 12:29:55 +0900 (JST) Received: from compq4 by sparc1.nextsolution.co.jp (SMI-8.6/SMI-SVR4) id MAA03930; Fri, 11 Sep 1998 12:29:16 +0900 Message-ID: <003201bddd35$ee1439b0$6f50ebca@compq4.newton> Reply-To: "Frank A. Christoph" From: "Frank A. Christoph" To: Subject: RE: Caml toplevel thru Web (HTTP or CGI)? Date: Fri, 11 Sep 1998 12:40:31 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: weis >>> 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