From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA28821 for caml-redistribution; Mon, 3 Mar 1997 09:04:36 +0100 (MET) 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 VAA21264 for ; Fri, 28 Feb 1997 21:46:30 +0100 (MET) Received: from tequila.systemsz.cs.yale.edu (TEQUILA.SYSTEMSZ.CS.YALE.EDU [128.36.11.106]) by nez-perce.inria.fr (8.7.6/8.7.3) with ESMTP id VAA18668 for ; Fri, 28 Feb 1997 21:46:28 +0100 (MET) Received: (from news@localhost) by tequila.systemsz.cs.yale.edu (8.8.5/8.8.5) id PAA11533 for caml-list@inria.fr; Fri, 28 Feb 1997 15:46:23 -0500 To: caml-list@inria.fr Newsgroups: lists.caml Subject: Re: ML extension language References: <199702272314.RAA18638@kimbark.uchicago.edu> From: Stefan Monnier Date: 28 Feb 1997 15:46:21 -0500 Message-ID: <5l67zcveua.fsf@tequila.systemsz.cs.yale.edu> X-Newsreader: Gnus v5.3/Emacs 19.34 Path: tequila.systemsz.cs.yale.edu NNTP-Posting-Host: tequila.systemsz.cs.yale.edu Sender: weis Lyn A Headley writes: > Do people see this as worthwhile project, and one that is fairly > different from existing facilities? It is interesting that *all* > existing extension languages are weakly typed, and it would be neat to > see what a polymorphically typed one could offer. Thus far, I plan > to use almost the entire caml-light runtime system, and write a different > compiler (in C) for a simpler, but (hopefully!) still powerful language. I recently considered adding an extension language to the ctwm window-manager in order to replace its clunky and limited .ctwmrc configuration facility. I gave up because the only convincing (implementation) language available was O'Caml, but it would have required to start by rewriting the event loop in O'Caml so as to have O'Caml call C rather than the opposite. I'd love to see an "embedded O'Caml". Rather than write a new language, it seems that it would be easier/better to hack O'Caml directly so as to keep the whole language and even hopefully get the changes folded in the official distribution. From the little I know of the working of the run-time system, it looks like the main problem with calling O'Caml from C has to do with GC, but it seems doable. The easiest path might be to have "main" call O'Caml (just as it already is) and then have O'Caml's main function do just the basic initialization and then immedialtely call the main C function (so that the C code actually runs within O'Caml). Stefan