caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Re : [Caml-list] OCalDE
@ 2007-07-25 12:30 Matthieu Wipliez
  2007-07-26 16:47 ` Jon Harrop
  0 siblings, 1 reply; 9+ messages in thread
From: Matthieu Wipliez @ 2007-07-25 12:30 UTC (permalink / raw)
  To: caml-list

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

In my experience (development of a plug-in using the GEF framework),
Eclipse plug-ins are written in Java. However, nothing prevents you to write it in another language that allows C bindings, and make it available as a shared library (.so or .dll); calling functions is then done using JNI (Java - C bindings). Which is possible with OCaml since it allows callbacks from C.

As for developing an IDE from scratch rather than use Eclipse, being given the number of features provided by Eclipse, IMHO it is not only like reinventing the wheel, but more like reinventing the car itself...

----- Message d'origine ----
De : Jon Harrop <jon@ffconsultancy.com>
À : caml-list@yquem.inria.fr
Envoyé le : Mercredi, 25 Juillet 2007, 11h33mn 53s
Objet : Re: [Caml-list] OCalDE

On Wednesday 25 July 2007 08:27:58 Nicolas Bros wrote:
> For now, you can't. OcaIDE uses a custom parser written in Java,
> ...

I was wondering how the Eclipse plug-in was written given that the underlying 
infrastructure is written in Java. Would it not be much easier to develop an 
IDE in OCaml using something like LablGTK?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?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







      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

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

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

* Re: [Caml-list] OCalDE
  2007-07-25 12:30 Re : [Caml-list] OCalDE Matthieu Wipliez
@ 2007-07-26 16:47 ` Jon Harrop
  2007-07-27  7:18   ` Nicolas Bros
  0 siblings, 1 reply; 9+ messages in thread
From: Jon Harrop @ 2007-07-26 16:47 UTC (permalink / raw)
  To: caml-list

On Wednesday 25 July 2007 13:30:12 Matthieu Wipliez wrote:
> As for developing an IDE from scratch rather than use Eclipse, being given
> the number of features provided by Eclipse,

What exactly does Eclipse provide for IDE developers?

> IMHO it is not only like reinventing the wheel, but more like reinventing
> the car itself... 

And what is rewriting camlp4 in Java like?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


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

* Re: [Caml-list] OCalDE
  2007-07-26 16:47 ` Jon Harrop
@ 2007-07-27  7:18   ` Nicolas Bros
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Bros @ 2007-07-27  7:18 UTC (permalink / raw)
  To: Jon Harrop; +Cc: caml-list

> What exactly does Eclipse provide for IDE developers?

Eclipse provides a gigantic framework for application and plug-in developers.
A lot of features come for free, like:
- Text editors, which support syntax-coloring (with content
partitioning), completion, hyperlinks, code folding, hooking up with
an outline, ...
- Local history, which allow you to restore a previous version of a file
- Content versioning system
- Views, which can be moved, minimized, closed, restored, ...
- A building framework
- A debugging framework
- Progress monitors (which show a progress indicator and allow
interrupting the task)
- Perspectives (a way of organizing views by tasks)
- Preferences, which are automatically saved and restored
- Property pages
- Wizards, for creating new projects, etc.
The list goes on and on...

> And what is rewriting camlp4 in Java like?

There is no need to, camlp4 (like any other command-line tool) can be
called from Eclipse, and its output used in OcaIDE.


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

* Re: [Caml-list] OCalDE
  2007-07-23 16:21 OCalDE Christophe Raffalli
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
@ 2007-07-31 11:22 ` Nicolas Bros
  1 sibling, 0 replies; 9+ messages in thread
From: Nicolas Bros @ 2007-07-31 11:22 UTC (permalink / raw)
  To: Christophe Raffalli; +Cc: caml-list

> How can I configure some "Run script" (typically a "make check" launched from
> eclipse), to test and debug my code ?

I just remembered this:
You can use the "External tools" in Eclipse in "Run > External Tools >
Open External Tools Dialog...". Here, you can create a program launch
configuration, define what executable to launch ("make"), in which
directory to start it ("${project_loc}"), and give it "check" as
argument to follow your example. You can also add it as a favorite to
access it faster.

Then, you will be able to start it by clicking on the "External tools"
button on the tools bar.


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

* Re: [Caml-list] OCalDE
  2007-07-25  9:24   ` Alain Frisch
@ 2007-07-25 15:32     ` Nicolas Bros
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Bros @ 2007-07-25 15:32 UTC (permalink / raw)
  To: Alain Frisch; +Cc: caml-list

> Camlp4 makes this information available when it dumps a binary version
> of the Caml AST. If the problem is to read this marshaled value, it
> should not be too difficult to write another printer for Camlp4 (e.g.
> xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in
> OcaIDE).

That is a good idea, but how do you write a camlp4 printer? I have
never used camlp4, and I couldn't find documentation on this point.


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

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
  2007-07-25  9:24   ` Alain Frisch
@ 2007-07-25  9:33   ` Jon Harrop
  2 siblings, 0 replies; 9+ messages in thread
From: Jon Harrop @ 2007-07-25  9:33 UTC (permalink / raw)
  To: caml-list

On Wednesday 25 July 2007 08:27:58 Nicolas Bros wrote:
> For now, you can't. OcaIDE uses a custom parser written in Java,
> ...

I was wondering how the Eclipse plug-in was written given that the underlying 
infrastructure is written in Java. Would it not be much easier to develop an 
IDE in OCaml using something like LablGTK?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
OCaml for Scientists
http://www.ffconsultancy.com/products/ocaml_for_scientists/?e


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

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
@ 2007-07-25  9:24   ` Alain Frisch
  2007-07-25 15:32     ` Nicolas Bros
  2007-07-25  9:33   ` Jon Harrop
  2 siblings, 1 reply; 9+ messages in thread
From: Alain Frisch @ 2007-07-25  9:24 UTC (permalink / raw)
  To: Nicolas Bros, caml-list

Nicolas Bros wrote:
>> How can I tell eclipse parser about my own camlp4 extension ?
> 
> For now, you can't. OcaIDE uses a custom parser written in Java,
> copied from the rules of the original Ocaml parser. So, it only parses
> standard syntax.
> To parse a modified syntax, the file would first have to be processed
> by camlp4.
> But then, how would OcaIDE get the positions of the elements in the
> original unprocessed file?

Camlp4 makes this information available when it dumps a binary version 
of the Caml AST. If the problem is to read this marshaled value, it 
should not be too difficult to write another printer for Camlp4 (e.g. 
xml-ish, json-ish or lisp-ish, dependening on what is easier to parse in 
OcaIDE).


-- Alain


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

* Re: [Caml-list] OCalDE
  2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
@ 2007-07-25  7:41   ` Christophe Raffalli
  2007-07-25  9:24   ` Alain Frisch
  2007-07-25  9:33   ` Jon Harrop
  2 siblings, 0 replies; 9+ messages in thread
From: Christophe Raffalli @ 2007-07-25  7:41 UTC (permalink / raw)
  To: Nicolas Bros; +Cc: caml-list

Nicolas Bros a écrit :
>> How can I tell eclipse parser about my own camlp4 extension ?
>
> For now, you can't. OcaIDE uses a custom parser written in Java,
> copied from the rules of the original Ocaml parser. So, it only parses
> standard syntax.
> To parse a modified syntax, the file would first have to be processed
> by camlp4.
> But then, how would OcaIDE get the positions of the elements in the
> original unprocessed file?
>
>
You could take the same approach than proof general for eclipse, writte 
a parser with anything (this includes camlp4)
whose output is a copy of the original file with xml annotation. Such a 
parser should allow camlp4 extension ...

The main problem, is that appart from the xml annotation the text should 
not be changed, so a camlp4 pretty-printer will not workd. However, the 
parser could simply produce the position where to add xml annotation 
that are inserter in a second phase into the original
input ...

So what needs to be written is a camlp4 parser that produce pairs with 
positions and xml annotation ... and that also perform a little error 
recovery ...
>> No progress about the darcs incompatibility related to "linked URLs" 
>> used by OCaIDE
>> and not supported by darcs eclipse.
>
> I think this is more of a problem with darcs than with OcaIDE.
>
Yes, probably, but what is a "linked URL" and what is their use in 
OCaIDE ? If it is the link to the ocaml library, then
it is strange that darcs think linked URL matters ?


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

* Re: [Caml-list] OCalDE
  2007-07-23 16:21 OCalDE Christophe Raffalli
@ 2007-07-25  7:27 ` Nicolas Bros
  2007-07-25  7:41   ` Christophe Raffalli
                     ` (2 more replies)
  2007-07-31 11:22 ` Nicolas Bros
  1 sibling, 3 replies; 9+ messages in thread
From: Nicolas Bros @ 2007-07-25  7:27 UTC (permalink / raw)
  To: Christophe Raffalli; +Cc: caml-list

> How can I tell eclipse parser about my own camlp4 extension ?

For now, you can't. OcaIDE uses a custom parser written in Java,
copied from the rules of the original Ocaml parser. So, it only parses
standard syntax.
To parse a modified syntax, the file would first have to be processed
by camlp4.
But then, how would OcaIDE get the positions of the elements in the
original unprocessed file?

> How can I configure some "Run script" (typically a "make check" launched from
> eclipse), to test and debug my code ?

Custom makefile targets will be supported in a future version.

> I find that "format using camlp4" adds to much parenthesis, is it possible to do
> something about it (it is probably necessary to fine tune the camlp4 pretty printer ?)

I think you know a lot more about camlp4 than I, so I guess you're right.

> what is the correct way to use unison together with eclipse

I don't use unison, so I can't help you.

> No progress about the darcs incompatibility related to "linked URLs" used by OCaIDE
> and not supported by darcs eclipse.

I think this is more of a problem with darcs than with OcaIDE.


> I had two or three time a file opened where all modifications where in fact not
> performed on the filesystem (closing and reopening the file solved the problem).
> Is this a known bug with eclipse (I can not reproduce it yet) ?

Usually, this happens the other way around: the Eclipse workspace does
not reflect changes on the file system until you refresh your
workspace in Eclipse.


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

end of thread, other threads:[~2007-07-31 11:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 12:30 Re : [Caml-list] OCalDE Matthieu Wipliez
2007-07-26 16:47 ` Jon Harrop
2007-07-27  7:18   ` Nicolas Bros
  -- strict thread matches above, loose matches on Subject: below --
2007-07-23 16:21 OCalDE Christophe Raffalli
2007-07-25  7:27 ` [Caml-list] OCalDE Nicolas Bros
2007-07-25  7:41   ` Christophe Raffalli
2007-07-25  9:24   ` Alain Frisch
2007-07-25 15:32     ` Nicolas Bros
2007-07-25  9:33   ` Jon Harrop
2007-07-31 11:22 ` Nicolas Bros

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