caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Nathaniel Gray" <n8gray@gmail.com>
To: "Mike Lin" <mikelin@mit.edu>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Another great advantage for OCaml language due to Markus Mottl
Date: Fri, 24 Mar 2006 14:30:43 -0800	[thread overview]
Message-ID: <aee06c9e0603241430u58564d2bi1d1c7be1b93b0ebe@mail.gmail.com> (raw)
In-Reply-To: <2a1a1a0c0603210823k6833a073k753bffe306b2430c@mail.gmail.com>

Yes, please!

On 3/21/06, Mike Lin <mikelin@mit.edu> wrote:
> Now that it exists, I strongly second incorporating it (as a compiler
> switch) into the official release. ASAP. IMHO untraceable exceptions
> have been one of the worst things about native code OCaml for a very
> long time.
>
> On 3/21/06, Andries Hekstra <andries.hekstra@philips.com> wrote:
> >
> > Dear Member of the OCaml mailing list,
> >
> > The problem about which I reported on this reflector around two weeks ago
> > (array index violation after around 4 days) has in the mean time been solved
> > thanks to the great native function call backtrace for the ocamlopt compiler
> > due to Markus Mottl. Given that my program crashed after 3.7 days, and my
> > program ran around 30x slower in byte code, debugging using byte code was
> > not an option (this slowdown had been similar if I had used _DEBUG mode of a
> > C++ program instead of _RELEASE version). Also, as reported earlier, putting
> > "try ... with " around all attempts to index an array is not feasbile in
> > standard OCaml for array elements in the left hand sides of assignments. A
> > static unhandled exception checker provided on a web page, ran into dead
> > HTML links.
> >
> > Hence, the native function call, which comes at minimal runtime overhead
> > cost, mainly the cost of -inline 0, is a great new feature that would give
> > OCaml another advantage over C++ when added to the OCaml language in a next
> > release. Below I give a toy example :
> >
> > --- nlv13512/TestProgram ---> ls
> > attempt.ml*
> > --- nlv13512/TestProgram ---> cat att*
> > let a = Array.make 2 0;;
> > let f i = i*i;;
> > let g i = a.(i);;
> > let b = f 2;;
> > let c = g 2;;
> > --- nlv13512/TestProgram ---> ocamlopt -inline 0 -gb attempt.ml
> > --- nlv13512/TestProgram ---> a.out
> > Fatal error: exception Invalid_argument("index out of bounds")
> > Native function backtrace:
> >
> >   camlAttempt__g_60
> >   camlAttempt__f_58
> > --- nlv13512/TestProgram --->
> >
> > =Andries
> >
> > PS The attached patch was provided to me by Markus Mottl for the 3.09.1.
> > release.
> >
> >
> >
> >
> > ------------------------------------------------------------------------
> >  Dr. Ir. Andries P. Hekstra
> >  Philips Research
> >  High Tech Campus 27  (WL-1-4.15)
> >  5656 AG Eindhoven
> >  Tel./Fax/Secr. +31 40 27 42048/42566/44051
> >    *  Good open source anti-RSI software : http://www.workrave.org
> > _______________________________________________
> > Caml-list mailing list. Subscription management:
> > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> > Archives: http://caml.inria.fr
> > Beginner's list:
> > http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
> >
> >
> >
> >
>
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>


--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->


      reply	other threads:[~2006-03-24 22:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-21 13:44 Andries Hekstra
2006-03-21 14:45 ` Markus Mottl
2006-03-21 16:23 ` [Caml-list] " Mike Lin
2006-03-24 22:30   ` Nathaniel Gray [this message]

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=aee06c9e0603241430u58564d2bi1d1c7be1b93b0ebe@mail.gmail.com \
    --to=n8gray@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=mikelin@mit.edu \
    /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).