caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: artboreb@netscape.net (Arturo Borquez)
To: oleg_inconnu@myrealbox.com (Oleg),
	alex@baretta.com (Alessandro Baretta), caml-list@inria.fr (Ocaml)
Subject: Re: [Caml-list] Rule based language [was: productivity improvement]
Date: Wed, 24 Jul 2002 09:39:28 -0400	[thread overview]
Message-ID: <7346EFD6.6BBDCC08.00958B05@netscape.net> (raw)

Oleg <oleg_inconnu@myrealbox.com> wrote:

>On Sunday 21 July 2002 09:00 am, Alessandro Baretta wrote:
>> 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.
>
>
>109 LOC in C++ counting blank lines and lines containing a single '}'. See 
>atttached files.
>
>A few notes about the differences between your O'Caml program and my C++ 
>program: 
>
>1) I'm not using Yacc or Lex for parsing, because I'm not familiar with these 
>tools, so ugly parsing takes up most of those 109 LOC (Parsing things is 
>peripheral to my professional interests right now. I don't write compilers)
>
>2) I decided not to implement the "simple" keyword, because I did not 
>understand what it was supposed to mean (a depth limit on deduction, I'm 
>guessing, but what for?)
>
>3) Your program fails to imlement multi-token post-conditions in rules and 
>mutli-token goals (as described in your formal language specification)
>
>4) The algorithms are different I think, resulting in, for example, about 
>200x speed improvement for the attached test.input file on my P3-800MHz 
>(g++-3.0 vs ocamlopt) (The output is identical).  The O'Caml program 
>convergence seems to be quite unstable.  Sometimes it is as fast or even 
>faster than the C++ program. 
>
>I can see how the same algorithm can be implemented in ~100 LOC of O'Caml 
>too. However, IMO as this and the previous examples show, reports about 
>extreme LOC ratios are premature.
>
>Cheers,
>Oleg
>

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


             reply	other threads:[~2002-07-24 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-24 13:39 Arturo Borquez [this message]
2002-07-24 20:03 ` Oleg
  -- strict thread matches above, loose matches on Subject: below --
2002-07-24 22:31 sajuma
2002-07-25  6:26 ` Oleg
     [not found] <20020716172916.4903.qmail@web10702.mail.yahoo.com>
2002-07-18 23:14 ` [Caml-list] productivity improvement Oleg
2002-07-19  1:25   ` Alessandro Baretta
2002-07-19  4:04     ` Oleg
2002-07-19 15:46       ` [Caml-list] Rule based language [was: productivity improvement] Alessandro Baretta
     [not found] ` <200207200640.CAA11477@dewberry.cc.columbia.edu>
     [not found]   ` <3D391B41.50900@baretta.com>
     [not found]     ` <200207210059.UAA17003@dewberry.cc.columbia.edu>
2002-07-21 13:00       ` Alessandro Baretta
2002-07-23  9:53         ` Oleg
2002-07-24  8:07           ` Alessandro Baretta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7346EFD6.6BBDCC08.00958B05@netscape.net \
    --to=artboreb@netscape.net \
    --cc=alex@baretta.com \
    --cc=caml-list@inria.fr \
    --cc=oleg_inconnu@myrealbox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).