From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA10288; Thu, 17 Oct 2002 20:32:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA10045 for ; Thu, 17 Oct 2002 20:32:16 +0200 (MET DST) Received: from relay.pair.com (relay1.pair.com [209.68.1.20]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id g9HIWF518039 for ; Thu, 17 Oct 2002 20:32:16 +0200 (MET DST) Received: (qmail 81825 invoked from network); 17 Oct 2002 18:32:13 -0000 Received: from adsl-host-sf-228.apexworld.net (HELO checkerlap.d6.com) (66.114.212.228) by relay1.pair.com with SMTP; 17 Oct 2002 18:32:13 -0000 X-pair-Authenticated: 66.114.212.228 Message-Id: <4.3.2.7.2.20021017112600.0318b410@mail.d6.com> X-Sender: checker@mail.d6.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 17 Oct 2002 11:32:31 -0700 To: Christophe TROESTLER , jeffrey.palmer@acm.org From: Chris Hecker Subject: Re: [Caml-list] Re: Camlp4 optimizations (was: productivity improvement) Cc: Caml-list@inria.fr In-Reply-To: <20021017.202106.99065335.debian00@tiscalinet.be> References: <200210171055.05646.jeffrey.palmer@acm.org> <200210171055.05646.jeffrey.palmer@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >I was thinking: could camlp4 help in such endavours? One could even >imagine that for numerical intensive applications, some Camplp4 >routines produce C (say) code that is (transparently for the user) >callable from the main program... All that in a safe way... Am I >dreaming here about the possibilities of camlp4 or is it possible? camlp4 can generate C with no problem (although I don't know if it can create another file, but I don't see why not, it can run arbitrary caml code during parsing). The biggest problem with making ocaml look nice and pretty for numerical code is that there is no overloading (of functions or operators), and camlp4 doesn't have access to types, so you can't have both: s*a (scalar times matrix) a*b (matrix times matrix) What code would the * operator generate in camlp4? This needs to be fixed at a deeper level than syntax (which is where camlp4 operates...and operates well! :). Althought hopefully it's fixed in a way that doesn't require a runtime type-check if the information is available at compile time. Or, maybe I'm missing something...it would be awesome if I was and this was possible! Chris ------------------- 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