caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release)
@ 2011-11-04 12:39 Gabriel Scherer
  2011-11-04 13:21 ` [Caml-list] " Daniel Bünzli
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel Scherer @ 2011-11-04 12:39 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: Thomas Gazagnaire, caml-list

> But having been recently forced out of emacs into a proprietary IDE to
> be *able* to work on a project written in a
> programmingLanguageWithAbsurdlyLongNamingConventions, one thing I
> actually became very fond of is type aware autocompletion and the
> ability to browse from a symbol in my code directly to the page where
> its documented. The former may be complex to implement without
> compiler support but I'm sure the latter is not. My elisp skills are
> however too limited for me to implement that myself but I'd love to
> have that in ocaml's emacs mode.

There are various external projects/patches to do this kind of things:
- Jun Furuse's [Ocamlspotter] is a patch to the compiler to enrich
.annot files with where-defined information on symbols. It has some
emacs integration code.
- Peng Zang's Enhtop+ (an incremental update of Zeng Li's Enhtop
enhanced toplevel) provides enviroment lookup capacities in the
toplevel. He uses it to build [tuareg-plus], an emacs glue providing
context-aware completion (I'm not sure how good it works though, never
tried myself)

[Ocamlspotter] http://jun.furuse.info/hacks/ocamlspotter
[Enhtop+] http://www.cc.gatech.edu/~pengzang/enhtop+.html
[Enhtop] http://www.pps.jussieu.fr/~li/software/index.html#enhtop
[tuareg-plus] http://www.cc.gatech.edu/~pengzang/tuareg-plus.html

Beware that all those projects tend to be built as patches to the
ocaml distribution, which means difficult deployment (which means few
users, which means few maintenance, which means bitrot). I'm not
saying life is *easy* if you wish to use IDE tools for OCaml, only
that it is possible.

There are surely other alternatives I forgot about (please feel free
to add something) and related projects that are interesting as well
(eg. Jérémie Dimino 'utop' toplevel). You may also have a look at the
various attempts at integrating OCaml with Java IDEs (Oca'IDE, Ocaml
Development Tools, etc.). I'm various people are also developing new
exciting tools. For example, Ocamlpro has announced that it
could/would develop IDE tooling, for example; incidentally, they also
work on internal passes dumping techniques that might make development
and deployment of such tools easier in the future.


On Fri, Nov 4, 2011 at 12:25 PM, Daniel Bünzli
<daniel.buenzli@erratique.ch> wrote:
> Hello,
>
> A few comments on the design. Overall much better than ocaml's current
> stylesheet and completely web 2.0 correct. But.
>
> One problem of web 2.0 correct interfaces is that they are a little
> bit patronizing, and don't show enough data. The information density
> is too low. Do you really half of my screen to communicate me the name
> of the module I'm currently looking at ? Overall I find the spacing to
> be too loose. I want to see more information on a screenful. Much more
> can be shown, while retaining the ability to rapidly skim from one
> definition to the other and without cramping the design.
>
> Another thing is the fixed-width layout. The width of the page is too
> wide. First the lines are too long which causes a readability issue:
> it makes it hard to read from one line to the other --- depends on the
> font but beyond approx. 80 chars per line it becomes hard for
> continuous reading. Second I personally never work on 27-inch
> displays. With the current design I cannot put my browser window next
> to emacs and read the doc without a horizontal scroll bar. The design
> grid should be fluid, within reasonable limits (cf. css's min-width,
> max-width and if you want to go wild, media queries to use different
> style sheets for different devices widths, a few techniques and
> pointers here [1]).
>
> Finally do something with css' *:target selector it's useful when you
> link to anchors that are at the bottom of a page or on a page that is
> too small to scroll. E.g. :
>
> http://erratique.ch/software/cmdliner/doc/Cmdliner.Arg.html#VALpair
>
>> The goal is to be able to browse it locally (it's a bit awkward to have to run a webserver to read documentation).
>
> Yes.
>
>> The searching tools are quite limited currently,
>
> To me the search tools are not so useful. Usually I know in which
> module I want to lookup a function. To get there quickly I use my OS
> file search --- thanks to ocamldoc generating one file per module ---
> and then the incremental search of my browser. Of course this is quite
> different of indexing e.g. the symbols directly but it works well in
> practice.
>
> But having been recently forced out of emacs into a proprietary IDE to
> be *able* to work on a project written in a
> programmingLanguageWithAbsurdlyLongNamingConventions, one thing I
> actually became very fond of is type aware autocompletion and the
> ability to browse from a symbol in my code directly to the page where
> its documented. The former may be complex to implement without
> compiler support but I'm sure the latter is not. My elisp skills are
> however too limited for me to implement that myself but I'd love to
> have that in ocaml's emacs mode.
>
> Regarding search by type, I wonder if people actually use this for
> useful reasons or if it's just out of curiosity or for the cool hack
> factor -- and sure it's cool. I mean there's not enough semantics in
> types to tell you what a function will do, and since we curry it is
> not always clear in which order we will argument.
>
> Best,
>
> Daniel
>
> [1] http://www.alistapart.com/articles/responsive-web-design/
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>


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

* [Caml-list] Re: Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release)
  2011-11-04 12:39 [Caml-list] Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release) Gabriel Scherer
@ 2011-11-04 13:21 ` Daniel Bünzli
  2011-11-04 16:53   ` Yaron Minsky
  2011-11-04 18:37   ` Jun Furuse
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Bünzli @ 2011-11-04 13:21 UTC (permalink / raw)
  To: Gabriel Scherer; +Cc: caml-list

Thanks for all the links.

> Beware that all those projects tend to be built as patches to the
> ocaml distribution, which means difficult deployment (which means few
> users, which means few maintenance, which means bitrot).

That's the problem. I tend not to rely too much beyond what is
provided by the standard distribution.

> You may also have a look at the various attempts at integrating OCaml with Java IDEs (Oca'IDE, Ocaml Development Tools, etc.).

Well I'm really not fond of IDEs. I usually find them very invasive
and bureaucratic and I'm not productive in them. So far emacs is the
only system that works really well for me (it's also an "IDE" that
works everywhere, even in the terminal). But I have to admit that some
IDEs provide features that I would like to have in the emacs modes I
use.

Best,

Daniel

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

* Re: [Caml-list] Re: Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release)
  2011-11-04 13:21 ` [Caml-list] " Daniel Bünzli
@ 2011-11-04 16:53   ` Yaron Minsky
  2011-11-04 18:37   ` Jun Furuse
  1 sibling, 0 replies; 5+ messages in thread
From: Yaron Minsky @ 2011-11-04 16:53 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: Gabriel Scherer, caml-list

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

On Fri, Nov 4, 2011 at 9:21 AM, Daniel Bünzli
<daniel.buenzli@erratique.ch>wrote:

> Thanks for all the links.
>
> > Beware that all those projects tend to be built as patches to the
> > ocaml distribution, which means difficult deployment (which means few
> > users, which means few maintenance, which means bitrot).
>
> That's the problem. I tend not to rely too much beyond what is
> provided by the standard distribution.
>
> > You may also have a look at the various attempts at integrating OCaml
> with Java IDEs (Oca'IDE, Ocaml Development Tools, etc.).
>
> Well I'm really not fond of IDEs. I usually find them very invasive
> and bureaucratic and I'm not productive in them. So far emacs is the
> only system that works really well for me (it's also an "IDE" that
> works everywhere, even in the terminal). But I have to admit that some
> IDEs provide features that I would like to have in the emacs modes I
> use.
>

OCamlspotter as well as the tools that OCamlPro is working on should work
fine from within vim and emacs.

y

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

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

* Re: [Caml-list] Re: Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release)
  2011-11-04 13:21 ` [Caml-list] " Daniel Bünzli
  2011-11-04 16:53   ` Yaron Minsky
@ 2011-11-04 18:37   ` Jun Furuse
  2011-11-04 19:49     ` Daniel Bünzli
  1 sibling, 1 reply; 5+ messages in thread
From: Jun Furuse @ 2011-11-04 18:37 UTC (permalink / raw)
  To: caml-list

On Fri, Nov 4, 2011 at 10:21 PM, Daniel Bünzli
<daniel.buenzli@erratique.ch> wrote:

> That's the problem. I tend not to rely too much beyond what is
> provided by the standard distribution.

Spotter patch does not affect the object files at all, so I am sure
that it is compatible with the original compiler. I test this
compatibility by compiling the original ocamlc by the patched one.

If you do not trust me (and you should not :-) ), you can always use
the patched compiler at the development stage, then recompile your
program/library by the original compiler just before the installation.

Jun


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

* Re: [Caml-list] Re: Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release)
  2011-11-04 18:37   ` Jun Furuse
@ 2011-11-04 19:49     ` Daniel Bünzli
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Bünzli @ 2011-11-04 19:49 UTC (permalink / raw)
  To: Jun Furuse; +Cc: caml-list

> If you do not trust me (and you should not :-) )

I trust no one anyway... The problem is more what Gabriel perfectly
captured by :

> Beware that all those projects tend to be built as patches to the
> ocaml distribution, which means difficult deployment (which means few
> users, which means few maintenance, which means bitrot).

Best,

Daniel

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

end of thread, other threads:[~2011-11-04 19:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-04 12:39 [Caml-list] Jump-to-definition and type-aware completion for Caml (was : Argot 1.0 release) Gabriel Scherer
2011-11-04 13:21 ` [Caml-list] " Daniel Bünzli
2011-11-04 16:53   ` Yaron Minsky
2011-11-04 18:37   ` Jun Furuse
2011-11-04 19:49     ` Daniel Bünzli

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