caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Favorite OCaml editor?
@ 2010-01-05  6:03 Grant Rettke
  2010-01-05  6:08 ` [Caml-list] " Mihamina Rakotomandimby
                   ` (8 more replies)
  0 siblings, 9 replies; 24+ messages in thread
From: Grant Rettke @ 2010-01-05  6:03 UTC (permalink / raw)
  To: caml-list

Hi,

What is your favorite editor for hacking with OCaml?

"Your favorite" is key here here; I appreciate you human input as I
can use a search engine to find any old OCaml editor easily.

Best wishes,

Grant

-- 
http://www.wisdomandwonder.com/


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
@ 2010-01-05  6:08 ` Mihamina Rakotomandimby
  2010-01-05  6:22 ` Mike Lin
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 24+ messages in thread
From: Mihamina Rakotomandimby @ 2010-01-05  6:08 UTC (permalink / raw)
  To: caml-list

> Grant Rettke <grettke@acm.org> :
> What is your favorite editor for hacking with OCaml?

Emacs + tuareg-mode

-- 
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                +261 34 29 155 34 / +261 33 11 207 36


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
  2010-01-05  6:08 ` [Caml-list] " Mihamina Rakotomandimby
@ 2010-01-05  6:22 ` Mike Lin
  2010-01-05  6:36   ` Alexander Voinov
  2010-01-05  7:01   ` Erik de Castro Lopo
  2010-01-05  7:31 ` Daniel Bünzli
                   ` (6 subsequent siblings)
  8 siblings, 2 replies; 24+ messages in thread
From: Mike Lin @ 2010-01-05  6:22 UTC (permalink / raw)
  To: caml-list

I use NEdit with the syntax highlighting patterns available from
n8gray.org. A bonus is that for some reason this works perfectly with
ocaml+twt with no changes.

On Tue, Jan 5, 2010 at 1:03 AM, Grant Rettke <grettke@acm.org> wrote:
> Hi,
>
> What is your favorite editor for hacking with OCaml?
>
> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.
>
> Best wishes,
>
> Grant
>
> --
> http://www.wisdomandwonder.com/
>
> _______________________________________________
> 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
>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* RE: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:22 ` Mike Lin
@ 2010-01-05  6:36   ` Alexander Voinov
  2010-01-05  7:01   ` Erik de Castro Lopo
  1 sibling, 0 replies; 24+ messages in thread
From: Alexander Voinov @ 2010-01-05  6:36 UTC (permalink / raw)
  To: 'Mike Lin', caml-list

Hi All,

I recommend SciTE to my students for whom emacs is too harsh.

Alexander

-----Original Message-----
From: caml-list-bounces@yquem.inria.fr
[mailto:caml-list-bounces@yquem.inria.fr] On Behalf Of Mike Lin
Sent: Monday, January 04, 2010 10:23 PM
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Favorite OCaml editor?

I use NEdit with the syntax highlighting patterns available from
n8gray.org. A bonus is that for some reason this works perfectly with
ocaml+twt with no changes.

On Tue, Jan 5, 2010 at 1:03 AM, Grant Rettke <grettke@acm.org> wrote:
> Hi,
>
> What is your favorite editor for hacking with OCaml?
>
> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.
>
> Best wishes,
>
> Grant
>
> --
> http://www.wisdomandwonder.com/
>
> _______________________________________________
> 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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:22 ` Mike Lin
  2010-01-05  6:36   ` Alexander Voinov
@ 2010-01-05  7:01   ` Erik de Castro Lopo
  1 sibling, 0 replies; 24+ messages in thread
From: Erik de Castro Lopo @ 2010-01-05  7:01 UTC (permalink / raw)
  To: caml-list

Mike Lin wrote:

> I use NEdit with the syntax highlighting patterns available from
> n8gray.org. A bonus is that for some reason this works perfectly with
> ocaml+twt with no changes.

I've been using Nedit since about 1995 (when it was a binary only 
download) and I agree, Nedit is an amazingly capable editor which is
really easy to use (cw say vi and emacs) with great syntax highlighting,
configurability, macros and scriptability.

I do however have two problems with Nedit; it lacks utf-8 support and
it requires  the Motif toolkit. On Linux Motif is a PITA because 
OpenMotif is buggy (and its license is not and cannot OSI approved)
and Lesstif is buggy and unmaintained.

Nedit is a fantastic editor, but I really can't recommend it. I've been
looking closely at Gedit and its getting close the Nedit in features
and capabilities but it isn't quite there yet.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
  2010-01-05  6:08 ` [Caml-list] " Mihamina Rakotomandimby
  2010-01-05  6:22 ` Mike Lin
@ 2010-01-05  7:31 ` Daniel Bünzli
  2010-01-05 11:28   ` Jon Harrop
  2010-01-05  8:13 ` Jon Harrop
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Daniel Bünzli @ 2010-01-05  7:31 UTC (permalink / raw)
  To: Grant Rettke; +Cc: caml-list

> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.

Then I think a more interesting question is, what features do you
absolutely need to be productive ?

I'm rather low tech and not the "power user" type but still I couldn't
do it without (keyboard access to) :

1) Syntax highlighting and reasonably automatic identation following
ocaml's programming guidelines [1]

2) Ability to invoke a build tool so that reported errors allow me to
automatically jump to the offending lines.

3) Ability to invoke built programs so that reported stack traces
allow me to automatically jump to the offending lines.

4) Ability to read annot files so that I can query the type of the
symbol under my cursor.

5) Ability to switch rapidly between an ml file and its corresponding mli.

6) Ability to edit C sources.

I guess many people would add

7) Ability to access the documentation of the symbol under my cursor.

Now for 1-6, emacs and the distribution's ocaml mode work perfectly
for me (the latter doesn't support one or two of my identation
patterns but it's ok) and is the only sophisitication I need.

Regarding 7) I have a low tech approach which is to use gnome do (on
linux) or quicksilver (on osx) to index
the documentation generated by ocamldoc. Since the latter
intelligently produces an html file "Module.html" for a module named
"Module" I can quickly access its documentation by invoking gnome do
with its hot key, type an abbreviation of "Module" and hit return.
This opens the document in my browser where I scroll or search in the
page to get to the symbol.

Best,

Daniel

[1] http://caml.inria.fr/resources/doc/guides/guidelines.en.html


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (2 preceding siblings ...)
  2010-01-05  7:31 ` Daniel Bünzli
@ 2010-01-05  8:13 ` Jon Harrop
  2010-01-05 10:27   ` Alain Frisch
  2010-01-05  8:45 ` Maxence Guesdon
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Jon Harrop @ 2010-01-05  8:13 UTC (permalink / raw)
  To: caml-list

On Tuesday 05 January 2010 06:03:39 Grant Rettke wrote:
> Hi,
>
> What is your favorite editor for hacking with OCaml?

I use Emacs+Tuareg but I wouldn't call it my "favorite" because I loathe it. 
Two good reasons to use it are autoindentation of OCaml code with ALT+Q and 
type throwback on the currently selected expression with CTRL+C CTRL+T.

OCaIDE looked good for something Eclipse-based when I tried it:

  http://www.algo-prog.info/ocaide/

Eclipse is grindingly slow, cumbersome and remarkably confusing for a GUI app 
but at least OCaIDE is still under active development.

There is also the OCaml Development Tools (ODT) project:

  http://ocamldt.free.fr/

but it hasn't seen an update in 11 months.

> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.

I think the best way to write a decent editor for OCaml would be to write one 
using LablGTK for the GUI and camlp4 to parse OCaml code.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (3 preceding siblings ...)
  2010-01-05  8:13 ` Jon Harrop
@ 2010-01-05  8:45 ` Maxence Guesdon
  2010-01-05 11:23   ` Jon Harrop
  2010-01-05 10:24 ` Vincent Aravantinos
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Maxence Guesdon @ 2010-01-05  8:45 UTC (permalink / raw)
  To: caml-list

Le Tue, 5 Jan 2010 00:03:39 -0600,
Grant Rettke <grettke@acm.org> a écrit :

> Hi,

Hello,

> What is your favorite editor for hacking with OCaml?
> 
> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.

My favorite editor is Chamo:
  http://home.gna.org/cameleon/chamo.en.html

Regards,

-- 
Maxence Guesdon



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (4 preceding siblings ...)
  2010-01-05  8:45 ` Maxence Guesdon
@ 2010-01-05 10:24 ` Vincent Aravantinos
  2010-01-05 11:02   ` Richard Jones
  2010-01-05 10:58 ` Richard Jones
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 24+ messages in thread
From: Vincent Aravantinos @ 2010-01-05 10:24 UTC (permalink / raw)
  To: Grant Rettke; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]


Le 5 janv. 10 à 07:03, Grant Rettke a écrit :

> What is your favorite editor for hacking with OCaml?
>
> "Your favorite" is key here here; I appreciate you human input as I
> can use a search engine to find any old OCaml editor easily.

Hi,

I'm surprised no one mentions vim:
You get 1,2,4,5,6 in Daniel's mail + all vim plugins and usual editing  
and scripting facilities.
3 would easily be scriptable.
Furthermore vim is probably among the lightweightest.
You also have tags.

All the above shall be true of emacs too.
--
Vincent Aravantinos - PhD Student - Laboratory of Informatics of  
Grenoble
http://membres-lig.imag.fr/aravantinos/





[-- Attachment #2: Type: text/html, Size: 5145 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  8:13 ` Jon Harrop
@ 2010-01-05 10:27   ` Alain Frisch
  2010-01-05 10:44     ` Nicolas Pouillard
  2010-01-05 14:14     ` Hugo Ferreira
  0 siblings, 2 replies; 24+ messages in thread
From: Alain Frisch @ 2010-01-05 10:27 UTC (permalink / raw)
  To: Jon Harrop; +Cc: caml-list

On 05/01/2010 09:13, Jon Harrop wrote:
> I think the best way to write a decent editor for OCaml would be to write one
> using LablGTK for the GUI and camlp4 to parse OCaml code.

It is indeed very tempting to reuse an existing OCaml parser in order to 
support syntax-related features (indentation, coloring, and whatnot); 
especially if you can then support syntax extension properly.

The problem is that the editor is supposed to work even with partial or 
syntactically invalid code, which is not the case for the OCaml parsers 
(built-in or Camlp4-based). It would be great to have a parser for OCaml 
syntax, with robust error recovery. Has anyone worked on such a project?


Alain



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 10:27   ` Alain Frisch
@ 2010-01-05 10:44     ` Nicolas Pouillard
  2010-01-05 13:00       ` Alain Frisch
  2010-01-05 14:14     ` Hugo Ferreira
  1 sibling, 1 reply; 24+ messages in thread
From: Nicolas Pouillard @ 2010-01-05 10:44 UTC (permalink / raw)
  To: Alain Frisch; +Cc: Jon Harrop, caml-list

Excerpts from Alain Frisch's message of Tue Jan 05 11:27:07 +0100 2010:
> On 05/01/2010 09:13, Jon Harrop wrote:
> > I think the best way to write a decent editor for OCaml would be to write one
> > using LablGTK for the GUI and camlp4 to parse OCaml code.
> 
> It is indeed very tempting to reuse an existing OCaml parser in order to 
> support syntax-related features (indentation, coloring, and whatnot); 
> especially if you can then support syntax extension properly.
> 
> The problem is that the editor is supposed to work even with partial or 
> syntactically invalid code, which is not the case for the OCaml parsers 
> (built-in or Camlp4-based). It would be great to have a parser for OCaml 
> syntax, with robust error recovery. Has anyone worked on such a project?

Reusing the work done in the Yi [1][2] editor for the Haskell syntax should
be pretty straightforward. Very long and painful however due to the complexity
of the grammar of a real language.

[1]: http://www.haskell.org/haskellwiki/Yi
[2]: http://www.cse.chalmers.se/~bernardy/FunctionalIncrementalParsing.pdf

-- 
Nicolas Pouillard
http://nicolaspouillard.fr


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 11:23   ` Jon Harrop
@ 2010-01-05 10:50     ` Maxence Guesdon
  0 siblings, 0 replies; 24+ messages in thread
From: Maxence Guesdon @ 2010-01-05 10:50 UTC (permalink / raw)
  To: caml-list

Le Tue, 5 Jan 2010 11:23:53 +0000,
Jon Harrop <jon@ffconsultancy.com> a écrit :

> On Tuesday 05 January 2010 08:45:04 Maxence Guesdon wrote:
> > My favorite editor is Chamo:
> >   http://home.gna.org/cameleon/chamo.en.html
> 
> Nice! Why do you prefer it?
> 

1. It is written in OCaml and I can extend it with OCaml code to fit my
needs :-)

2. It already provides:
 - syntax highlighting (based on the underlying gtksourceview widget,
   which is quite limited but is simple to use)
 - standard edition features (search, query-replace, transpose
   words, ...)
 - powerful layout: horizontal or vertical split, tabs, "recursively"
 - a system of views to edit each file with specific view
   (for example, there is a view to browse ocamldoc dumps)
 - an ocaml mode with:
   + some automatic indentation, even if it stops on syntax errors
     and sometimes get confused (it is based on a lexer and a stack,
     not a parser)
   + launching compilation process and jumping to error and/or warning
     locations,
   + analyze of stack traces output to allow me to jump at each point
     of the trace (see http://home.gna.org/cameleon/snippets.en.html)
   + using .annot files to display types of expressions,
   + a predefined command to switch between .ml and .mli file,
 - some other modes (latex, R, ChangeLog, Makefile)

3. Additional plugins can be easily defined, like the oug plugin:
  http://home.gna.org/oug/gettingstarted.en.html#gs:cameleon

4. One can improve the display of a source file to get advantage of
  UTF8 characters, like in the Greek-ocaml extension:
  http://home.gna.org/cameleon/snippets.en.html
  
It seems to fit points 1-7 of Daniel's list :)

Maxence



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (5 preceding siblings ...)
  2010-01-05 10:24 ` Vincent Aravantinos
@ 2010-01-05 10:58 ` Richard Jones
  2010-01-05 12:21 ` Florent Ouchet
  2010-01-05 13:09 ` Martin DeMello
  8 siblings, 0 replies; 24+ messages in thread
From: Richard Jones @ 2010-01-05 10:58 UTC (permalink / raw)
  To: Grant Rettke; +Cc: caml-list

On Tue, Jan 05, 2010 at 12:03:39AM -0600, Grant Rettke wrote:
> What is your favorite editor for hacking with OCaml?

emacs + tuareg-mode

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 10:24 ` Vincent Aravantinos
@ 2010-01-05 11:02   ` Richard Jones
  0 siblings, 0 replies; 24+ messages in thread
From: Richard Jones @ 2010-01-05 11:02 UTC (permalink / raw)
  To: Vincent Aravantinos; +Cc: Grant Rettke, caml-list

On Tue, Jan 05, 2010 at 11:24:29AM +0100, Vincent Aravantinos wrote:
> 
> Le 5 janv. 10 à 07:03, Grant Rettke a écrit :
> 
> >What is your favorite editor for hacking with OCaml?
> >
> >"Your favorite" is key here here; I appreciate you human input as I
> >can use a search engine to find any old OCaml editor easily.
> 
> Hi,
> 
> I'm surprised no one mentions vim:
> You get 1,2,4,5,6 in Daniel's mail + all vim plugins and usual editing  
> and scripting facilities.
> 3 would easily be scriptable.
> Furthermore vim is probably among the lightweightest.
> You also have tags.

My colleague edits OCaml code with vim (in fact we share it -- I edit
the same code with emacs) and he seems to like it.

One advantage of vim is that it comes with a good OCaml mode built in.
The OCaml mode that ships with emacs is pretty horrible compared to
tuareg-mode, which you have to install separately (albeit just a
apt-get/yum install away).

Rich.

-- 
Richard Jones
Red Hat


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  8:45 ` Maxence Guesdon
@ 2010-01-05 11:23   ` Jon Harrop
  2010-01-05 10:50     ` Maxence Guesdon
  0 siblings, 1 reply; 24+ messages in thread
From: Jon Harrop @ 2010-01-05 11:23 UTC (permalink / raw)
  To: caml-list

On Tuesday 05 January 2010 08:45:04 Maxence Guesdon wrote:
> My favorite editor is Chamo:
>   http://home.gna.org/cameleon/chamo.en.html

Nice! Why do you prefer it?

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  7:31 ` Daniel Bünzli
@ 2010-01-05 11:28   ` Jon Harrop
  2010-01-05 16:55     ` Laurent Le Brun
  0 siblings, 1 reply; 24+ messages in thread
From: Jon Harrop @ 2010-01-05 11:28 UTC (permalink / raw)
  To: caml-list

On Tuesday 05 January 2010 07:31:45 Daniel Bünzli wrote:
> > "Your favorite" is key here here; I appreciate you human input as I
> > can use a search engine to find any old OCaml editor easily.
>
> Then I think a more interesting question is, what features do you
> absolutely need to be productive ?
>
> I'm rather low tech and not the "power user" type but still I couldn't
> do it without (keyboard access to) :
>
> 1) Syntax highlighting and reasonably automatic identation following
> ocaml's programming guidelines [1]

Yes.

> 2) Ability to invoke a build tool so that reported errors allow me to
> automatically jump to the offending lines.

Yes but I'd rather have an IDE constantly recompiling and automatically 
flagging errors such that I can jump directly to them using the GUI.

> 3) Ability to invoke built programs so that reported stack traces
> allow me to automatically jump to the offending lines.

I don't use that so often, but yes.

> 4) Ability to read annot files so that I can query the type of the
> symbol under my cursor.

Absolutely essential.

> 5) Ability to switch rapidly between an ml file and its corresponding mli.

Interesting.

> 6) Ability to edit C sources.

Bah. Real men use LLVM.

> I guess many people would add
>
> 7) Ability to access the documentation of the symbol under my cursor.

That should go in with the type throwback. Also, it should support typeset 
math and vector graphics. And the source should be unicode with easy access 
to common alphabets and symbols.

> Regarding 7) I have a low tech approach which is to use gnome do (on
> linux) or quicksilver (on osx) to index
> the documentation generated by ocamldoc. Since the latter
> intelligently produces an html file "Module.html" for a module named
> "Module" I can quickly access its documentation by invoking gnome do
> with its hot key, type an abbreviation of "Module" and hit return.
> This opens the document in my browser where I scroll or search in the
> page to get to the symbol.

I tend to use ocamlbrowser.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (6 preceding siblings ...)
  2010-01-05 10:58 ` Richard Jones
@ 2010-01-05 12:21 ` Florent Ouchet
  2010-01-05 17:32   ` Tim Hanson
  2010-01-05 13:09 ` Martin DeMello
  8 siblings, 1 reply; 24+ messages in thread
From: Florent Ouchet @ 2010-01-05 12:21 UTC (permalink / raw)
  Cc: caml-list

Hi,

I've used emacs+touareg for a while but as soon as the projects become 
big, I switched to kate. No way back...

- Florent


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 10:44     ` Nicolas Pouillard
@ 2010-01-05 13:00       ` Alain Frisch
  2010-01-05 13:11         ` Nicolas Pouillard
  0 siblings, 1 reply; 24+ messages in thread
From: Alain Frisch @ 2010-01-05 13:00 UTC (permalink / raw)
  To: Nicolas Pouillard; +Cc: Jon Harrop, caml-list

On 05/01/2010 11:44, Nicolas Pouillard wrote:
> Reusing the work done in the Yi [1][2] editor for the Haskell syntax should
> be pretty straightforward. Very long and painful however due to the complexity
> of the grammar of a real language.
>
> [1]: http://www.haskell.org/haskellwiki/Yi
> [2]: http://www.cse.chalmers.se/~bernardy/FunctionalIncrementalParsing.pdf

Thanks for the links. The paper is a very interesting reading indeed. 
Its main focus is on incrementality (not reparsing the whole buffer at 
every keystroke). I'm not so sure how important it is in the context of 
the current discussion though: I guess that with an efficient parsing 
technology and modern computers, parsing even a big buffer at every 
keystroke should be fast enough. Trivial optimizations like storing the 
internal state of the parser at some point could also be used if needed.

I'm more concerned about the error recovery aspect; the paper suggests 
the use of annotated error recovery rules, but writing them for a 
grammar like OCaml's does not seem an easy task at all.


Alain



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
                   ` (7 preceding siblings ...)
  2010-01-05 12:21 ` Florent Ouchet
@ 2010-01-05 13:09 ` Martin DeMello
  8 siblings, 0 replies; 24+ messages in thread
From: Martin DeMello @ 2010-01-05 13:09 UTC (permalink / raw)
  To: Grant Rettke; +Cc: caml-list

On Tue, Jan 5, 2010 at 11:33 AM, Grant Rettke <grettke@acm.org> wrote:
> Hi,
>
> What is your favorite editor for hacking with OCaml?

Vim. I have some issues with the indentation, but otherwise it's excellent.

martin


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 13:00       ` Alain Frisch
@ 2010-01-05 13:11         ` Nicolas Pouillard
  0 siblings, 0 replies; 24+ messages in thread
From: Nicolas Pouillard @ 2010-01-05 13:11 UTC (permalink / raw)
  To: Alain Frisch; +Cc: Jon Harrop, caml-list

Excerpts from Alain Frisch's message of Tue Jan 05 14:00:36 +0100 2010:
> On 05/01/2010 11:44, Nicolas Pouillard wrote:
> > Reusing the work done in the Yi [1][2] editor for the Haskell syntax should
> > be pretty straightforward. Very long and painful however due to the complexity
> > of the grammar of a real language.
> >
> > [1]: http://www.haskell.org/haskellwiki/Yi
> > [2]: http://www.cse.chalmers.se/~bernardy/FunctionalIncrementalParsing.pdf
> 
> Thanks for the links. The paper is a very interesting reading indeed. 
> Its main focus is on incrementality (not reparsing the whole buffer at 
> every keystroke). I'm not so sure how important it is in the context of 
> the current discussion though: I guess that with an efficient parsing 
> technology and modern computers, parsing even a big buffer at every 
> keystroke should be fast enough. Trivial optimizations like storing the 
> internal state of the parser at some point could also be used if needed.

Hum I doubt, or maybe you are prepared to accept more penalty than I do
(I consider Emacs to be noticeably slower than Vim on keystrokes, but
please don't feed the troll).

> I'm more concerned about the error recovery aspect; the paper suggests 
> the use of annotated error recovery rules, but writing them for a 
> grammar like OCaml's does not seem an easy task at all.

Indeed this is really a manual process but incrementally adding the rules
seemed to work. Actually this is a really visual process.

-- 
Nicolas Pouillard
http://nicolaspouillard.fr


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 10:27   ` Alain Frisch
  2010-01-05 10:44     ` Nicolas Pouillard
@ 2010-01-05 14:14     ` Hugo Ferreira
  1 sibling, 0 replies; 24+ messages in thread
From: Hugo Ferreira @ 2010-01-05 14:14 UTC (permalink / raw)
  To: Alain Frisch; +Cc: Jon Harrop, caml-list


To the OP:

Eclipse + OcalIDE

Alain Frisch wrote:
> On 05/01/2010 09:13, Jon Harrop wrote:
>> I think the best way to write a decent editor for OCaml would be to 
>> write one
>> using LablGTK for the GUI and camlp4 to parse OCaml code.
> 
> It is indeed very tempting to reuse an existing OCaml parser in order to 
> support syntax-related features (indentation, coloring, and whatnot); 
> especially if you can then support syntax extension properly.
> 
> The problem is that the editor is supposed to work even with partial or 
> syntactically invalid code, which is not the case for the OCaml parsers 
> (built-in or Camlp4-based). It would be great to have a parser for OCaml 
> syntax, with robust error recovery. Has anyone worked on such a project?
> 
> 

This is indeed a thorny issue. The developer of OcalIDE is taking
another stab at this but this time using Camlp4 [1].

BTW the way the Haskell eclipse plug-in [2] also has to deal with such
issues. In their case they use a generic library and API [3] that should
be usable by any number of IDEs and editors (already used by emacs). May
be of interest to you also.

[1] http://ocaml.eclipse.free.fr/forum/viewtopic.php?f=1&t=226
[2] http://eclipsefp.sourceforge.net/
[3] http://code.google.com/p/scion-lib/


Hugo F.


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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 11:28   ` Jon Harrop
@ 2010-01-05 16:55     ` Laurent Le Brun
  0 siblings, 0 replies; 24+ messages in thread
From: Laurent Le Brun @ 2010-01-05 16:55 UTC (permalink / raw)
  To: caml-list

On Tue, Jan 5, 2010 at 12:28 PM, Jon Harrop <jon@ffconsultancy.com> wrote:
>> 2) Ability to invoke a build tool so that reported errors allow me to
>> automatically jump to the offending lines.
>
> Yes but I'd rather have an IDE constantly recompiling and automatically
> flagging errors such that I can jump directly to them using the GUI.

Yes, Emacs can do that. This is called the flymake-mode. I've used it
a few times with OCaml (it required a few hacks, but it might be
easier to use now).

>> 5) Ability to switch rapidly between an ml file and its corresponding mli.
>
> Interesting.

Shortcut in Emacs : C-c C-a (works with both caml-mode and tuareg-mode).

-- 
  Laurent


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
  2010-01-05 12:21 ` Florent Ouchet
@ 2010-01-05 17:32   ` Tim Hanson
  0 siblings, 0 replies; 24+ messages in thread
From: Tim Hanson @ 2010-01-05 17:32 UTC (permalink / raw)
  To: caml-list; +Cc: florent.ouchet

Hey All -

Yea, I used Emacs for a while, then Scite, now use Kate.  Not going
back either.  Love the code folding & ability to have many views of
the same file (like emacs), which is needed since you can't so easily
split modules across multiple files like C/C++.

Usually I open a gnu 'screen' session in the terminal, and split that
a few times for compiling and such.  I almost never use the debugger
.. maybe that's dumb, but it's less frustrating to use printfs.

While programming the limitation for me is brain-power and
understanding of the problem ...  clear thinking is so much better
than a high-powered editor that requires thought itself (cough..
emacs)

Tim

On Tue, Jan 5, 2010 at 7:21 AM, Florent Ouchet <florent.ouchet@imag.fr> wrote:
> Hi,
>
> I've used emacs+touareg for a while but as soon as the projects become big,
> I switched to kate. No way back...
>
> - Florent
>
> _______________________________________________
> 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
>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [Caml-list] Favorite OCaml editor?
@ 2010-01-05  6:21 Gaius Hammond
  0 siblings, 0 replies; 24+ messages in thread
From: Gaius Hammond @ 2010-01-05  6:21 UTC (permalink / raw)
  To: Grant Rettke, caml-list-bounces, caml-list

Eclipse + OcaIDE


Cheers,


G



------Original Message------
From: Grant Rettke
Sender: caml-list-bounces@yquem.inria.fr
To: caml-list@yquem.inria.fr
Subject: [Caml-list] Favorite OCaml editor?
Sent: 5 Jan 2010 06:03

Hi,

What is your favorite editor for hacking with OCaml?

"Your favorite" is key here here; I appreciate you human input as I
can use a search engine to find any old OCaml editor easily.

Best wishes,

Grant

-- 
http://www.wisdomandwonder.com/

_______________________________________________
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


------------------


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-01-05 17:32 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-05  6:03 Favorite OCaml editor? Grant Rettke
2010-01-05  6:08 ` [Caml-list] " Mihamina Rakotomandimby
2010-01-05  6:22 ` Mike Lin
2010-01-05  6:36   ` Alexander Voinov
2010-01-05  7:01   ` Erik de Castro Lopo
2010-01-05  7:31 ` Daniel Bünzli
2010-01-05 11:28   ` Jon Harrop
2010-01-05 16:55     ` Laurent Le Brun
2010-01-05  8:13 ` Jon Harrop
2010-01-05 10:27   ` Alain Frisch
2010-01-05 10:44     ` Nicolas Pouillard
2010-01-05 13:00       ` Alain Frisch
2010-01-05 13:11         ` Nicolas Pouillard
2010-01-05 14:14     ` Hugo Ferreira
2010-01-05  8:45 ` Maxence Guesdon
2010-01-05 11:23   ` Jon Harrop
2010-01-05 10:50     ` Maxence Guesdon
2010-01-05 10:24 ` Vincent Aravantinos
2010-01-05 11:02   ` Richard Jones
2010-01-05 10:58 ` Richard Jones
2010-01-05 12:21 ` Florent Ouchet
2010-01-05 17:32   ` Tim Hanson
2010-01-05 13:09 ` Martin DeMello
2010-01-05  6:21 Gaius Hammond

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