<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/d2430a228176c32b53caed6da8161d5d"
  from="artboreb@n..."
  author="artboreb@n..."
  date="2002-07-24T13:38:32"
  subject="Re: [Caml-list] Rule based language [was: productivity improvement]"
  prev="2002/07/095701163ff8b17bd2d4fbc8736aac69"
  next="2002/07/c7b19622fa8d83e32adb0e632a0eb2ae"
  next-in-thread="2002/07/6a91c94f03a10c8271cbca463e9cffb5"
  prev-thread="2002/07/a2eea2ec85eb7690de7274a72302113e"
  next-thread="2002/07/161d12279d18418d447f03ad684f32f9"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="Re: [Caml-list] Rule based language [was: productivity improvement]">
<msg 
  url="2002/07/d2430a228176c32b53caed6da8161d5d"
  from="artboreb@n..."
  author="artboreb@n..."
  date="2002-07-24T13:38:32"
  subject="Re: [Caml-list] Rule based language [was: productivity improvement]">
<msg 
  url="2002/07/6a91c94f03a10c8271cbca463e9cffb5"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-24T20:03:46"
  subject="Re: [Caml-list] Rule based language [was: productivity improvement]">
</msg>
</msg>
</thread>

<contents>
Oleg &lt;oleg_inconnu@myrealbox.com&gt; wrote:

&gt;On Sunday 21 July 2002 09:00 am, Alessandro Baretta wrote:
&gt;&gt; Oleg wrote:
&gt;&gt; &gt; Alex,
&gt;&gt; &gt;
&gt;&gt; &gt; This looks pretty simple. What makes you think the program is a
&gt;&gt; &gt; compelling evidence of O'Caml superior productivity?
&gt;&gt;
&gt;&gt; 197 lines of code, including whitespace and commments. I
&gt;&gt; think it is a pretty clear example of how you can write cool
&gt;&gt; software in O'Caml in a very short time. If you had not been
&gt;&gt; "lazy", as you said, and had tried implementing the same
&gt;&gt; language in C++, I strongly doubt you could have written a
&gt;&gt; more compact source.
&gt;
&gt;
&gt;109 LOC in C++ counting blank lines and lines containing a single '}'. See 
&gt;atttached files.
&gt;
&gt;A few notes about the differences between your O'Caml program and my C++ 
&gt;program: 
&gt;
&gt;1) I'm not using Yacc or Lex for parsing, because I'm not familiar with these 
&gt;tools, so ugly parsing takes up most of those 109 LOC (Parsing things is 
&gt;peripheral to my professional interests right now. I don't write compilers)
&gt;
&gt;2) I decided not to implement the "simple" keyword, because I did not 
&gt;understand what it was supposed to mean (a depth limit on deduction, I'm 
&gt;guessing, but what for?)
&gt;
&gt;3) Your program fails to imlement multi-token post-conditions in rules and 
&gt;mutli-token goals (as described in your formal language specification)
&gt;
&gt;4) The algorithms are different I think, resulting in, for example, about 
&gt;200x speed improvement for the attached test.input file on my P3-800MHz 
&gt;(g++-3.0 vs ocamlopt) (The output is identical).  The O'Caml program 
&gt;convergence seems to be quite unstable.  Sometimes it is as fast or even 
&gt;faster than the C++ program. 
&gt;
&gt;I can see how the same algorithm can be implemented in ~100 LOC of O'Caml 
&gt;too. However, IMO as this and the previous examples show, reports about 
&gt;extreme LOC ratios are premature.
&gt;
&gt;Cheers,
&gt;Oleg
&gt;

Nice Oleg!.

Can I participate in this challenge?

I have yet build your parser in 25 lines of OCaml
and seems to run as fast as yours. Perhaps in a
couple of days I'll post my solution as I have
very few spare time.

-- 
Arturo Borquez



__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

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

</contents>

</message>

