caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Till Varoquaux" <tvaroquaux@janestcapital.com>
To: "Edgar Friendly" <thelema314@gmail.com>
Cc: "Caml List" <caml-list@inria.fr>
Subject: Re: [Caml-list] Patch to 3.10.0 compiler enabling simple spell-checking
Date: Mon, 29 Oct 2007 17:34:17 -0400	[thread overview]
Message-ID: <9d3ec8300710291434v42fc071aj64e97d89d9129948@mail.gmail.com> (raw)
In-Reply-To: <47264C70.5050100@gmail.com>

Cool!

Haven't looked at the patch yet but this seems like a neat feature
(might be a little too much of a gadget but,hey I love gadgets).

I am curious. Why is this dedicated to Jane Street? Since I am
probably the worst at typing out here (and even though they bought me
a shiny shiny keyboard) I will take this patch as a personnal
intention ;-).

Till

On 10/29/07, Edgar Friendly <thelema314@gmail.com> wrote:
> One random little feature of GNAT that comes in handy for me is its
> habit of, when I misspell an identifier, giving me a possible correction
> in its compile error message.  Spending some time with the 3.10.0
> sources, I have created a "second draft" patch creating this
> functionality in my favored language.
>
> Example:
> ========
>
> # /home/thelema/Projects/ocaml-custom/bin/ocamlc -o coml -I +lablgtk2
> lablgtk.cma gtkInit.cmo coml.ml
> File "coml.ml", line 61, characters 16-25:
> Unbound value is_arcive, possible misspelling of is_archive
>
> Impacts:
> ========
>
> Efficiency in the case of finding a mistake should be quite good,
> although this shouldn't matter too much since the compiler quits pretty
> early in compilation when it finds an unbound identifier.
>
> In the case of no unbound identifiers, the cost is an extra try/with
> block around the standard lookup.  I haven't made any benchmarks, though.
>
> I expect this code to have little long term maintenance issues - the
> major source of code changes was adding a "* string list" to a number of
> exceptions to carry the list of possible correct spellings to the point
> they get output by the compiler.  These exceptions are still usable as
> before with an empty list in this spot.
>
> It's possible the code has created opportunities for uncaught exceptions
> in the compiler as I only checked for instances of "Not_found" in a few
> files -- those which dealt with the Unbound_* exceptions.  Someone who
> knows the internals better might find places the "Found_nearly"
> exception that carries possible corrections might escape into.
>
>
> Dedicated to:
> Yaron Minsky and the team at Jane Street
>
> E.
>
> _______________________________________________
> 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
>
>
>


-- 
http://till-varoquaux.blogspot.com/


  reply	other threads:[~2007-10-29 21:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-29 21:11 Edgar Friendly
2007-10-29 21:34 ` Till Varoquaux [this message]
2007-10-29 23:32 ` [Caml-list] " Julien Moutinho
2007-10-30  5:51   ` Edgar Friendly
2007-10-30  0:13 ` Yitzhak Mandelbaum
2007-10-30  0:17 ` Yitzhak Mandelbaum
2007-10-30  5:53   ` Edgar Friendly
2007-10-30  8:15 ` Sébastien Hinderer
2007-10-30 15:50   ` [Caml-list] " Edgar Friendly
2007-10-30 15:58     ` Sébastien Hinderer

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=9d3ec8300710291434v42fc071aj64e97d89d9129948@mail.gmail.com \
    --to=tvaroquaux@janestcapital.com \
    --cc=caml-list@inria.fr \
    --cc=thelema314@gmail.com \
    --cc=till.varoquaux@gmail.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).