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 OAA32061; Sun, 21 Jul 2002 14:53:33 +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 OAA32080 for ; Sun, 21 Jul 2002 14:53:32 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a80.tin.it [62.211.4.80]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g6LCrVv03793 for ; Sun, 21 Jul 2002 14:53:31 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id DDDBE2724B; Sun, 21 Jul 2002 15:00:50 +0200 (CEST) Message-ID: <3D3AB082.2080503@baretta.com> Date: Sun, 21 Jul 2002 15:00:50 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: it, en MIME-Version: 1.0 To: Oleg , Ocaml Subject: Re: [Caml-list] Rule based language [was: productivity improvement] References: <20020716172916.4903.qmail@web10702.mail.yahoo.com> <200207200640.CAA11477@dewberry.cc.columbia.edu> <3D391B41.50900@baretta.com> <200207210059.UAA17003@dewberry.cc.columbia.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Oleg wrote: > Alex, > > This looks pretty simple. What makes you think the program is a compelling > evidence of O'Caml superior productivity? 197 lines of code, including whitespace and commments. I think it is a pretty clear example of how you can write cool software in O'Caml in a very short time. If you had not been "lazy", as you said, and had tried implementing the same language in C++, I strongly doubt you could have written a more compact source. > Is the idea to make a maximally efficient program? In that case, what kind of > a) number of different tokens > b) dataset size > c) ruleset size > d) rules size > are we looking at? > > Regards > Oleg From the standpoint of benchmarking, we'll need to write several test cases to see how the execution times scale with program size. We might actually want to write an automatic testcase generator. I do no expect a C++ compiler to be able to beat ocamlopt by a significant amount, unless you use an optimized algorithm, different form the one I implemented. Anyhow, we shall take up the quest for benchmarking after your C++ clone of my "rules" program will be available. BTW, if you wish to extend the language with other constructs, such as pattern matching rules, I'm willing to do this. Such constructs would probably increase the "lines-of-code" ratio of the C++ vs. O'Caml versions. Alex ------------------- 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