caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Readline support in the toplevel loop
@ 2002-05-29  1:18 Vincent Foley
  2002-05-29  2:30 ` Daniel de Rauglaudre
  2002-05-29  9:41 ` Xavier Leroy
  0 siblings, 2 replies; 12+ messages in thread
From: Vincent Foley @ 2002-05-29  1:18 UTC (permalink / raw)
  To: OCaml Mailing list

Is it possible to have readline support in the toplevel loop of O'Caml
so that you can press the up key to recall something you already wrote,
and go back to edit other things.  Is it possible?

Vince

-- 

Vincent Foley-Bourgon
Email: vinfoley@iquebec.com
Homepage: http://darkhost.mine.nu:81
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  1:18 [Caml-list] Readline support in the toplevel loop Vincent Foley
@ 2002-05-29  2:30 ` Daniel de Rauglaudre
  2002-05-29  2:45   ` Vincent Foley
  2002-05-29  5:47   ` Oleg
  2002-05-29  9:41 ` Xavier Leroy
  1 sibling, 2 replies; 12+ messages in thread
From: Daniel de Rauglaudre @ 2002-05-29  2:30 UTC (permalink / raw)
  To: OCaml Mailing list

Hi,

On Tue, May 28, 2002 at 09:18:20PM -0400, Vincent Foley wrote:

> Is it possible to have readline support in the toplevel loop of O'Caml
> so that you can press the up key to recall something you already wrote,
> and go back to edit other things.  Is it possible?

Ledit:
   ftp://ftp.inria.fr/INRIA/Projects/cristal/Daniel.de_Rauglaudre/Tools/

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  2:30 ` Daniel de Rauglaudre
@ 2002-05-29  2:45   ` Vincent Foley
  2002-05-29  5:47   ` Oleg
  1 sibling, 0 replies; 12+ messages in thread
From: Vincent Foley @ 2002-05-29  2:45 UTC (permalink / raw)
  To: OCaml Mailing list

Wow!  That works great!  Thanks a lot!

Vince

On Wed, May 29, 2002 at 04:30:06AM +0200, Daniel de Rauglaudre wrote:
> Hi,
> 
> On Tue, May 28, 2002 at 09:18:20PM -0400, Vincent Foley wrote:
> 
> > Is it possible to have readline support in the toplevel loop of O'Caml
> > so that you can press the up key to recall something you already wrote,
> > and go back to edit other things.  Is it possible?
> 
> Ledit:
>    ftp://ftp.inria.fr/INRIA/Projects/cristal/Daniel.de_Rauglaudre/Tools/
> 
> -- 
> Daniel de RAUGLAUDRE
> daniel.de_rauglaudre@inria.fr
> http://cristal.inria.fr/~ddr/
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
---end quoted text---

-- 

Vincent Foley-Bourgon
Email: vinfoley@iquebec.com
Homepage: http://darkhost.mine.nu:81
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  2:30 ` Daniel de Rauglaudre
  2002-05-29  2:45   ` Vincent Foley
@ 2002-05-29  5:47   ` Oleg
  2002-05-29  8:14     ` Daniel de Rauglaudre
  1 sibling, 1 reply; 12+ messages in thread
From: Oleg @ 2002-05-29  5:47 UTC (permalink / raw)
  To: OCaml Mailing list

On Tuesday 28 May 2002 10:30 pm, Daniel de Rauglaudre wrote:
> Hi,
>
> On Tue, May 28, 2002 at 09:18:20PM -0400, Vincent Foley wrote:
> > Is it possible to have readline support in the toplevel loop of O'Caml
> > so that you can press the up key to recall something you already wrote,
> > and go back to edit other things.  Is it possible?
>
> Ledit:
>    ftp://ftp.inria.fr/INRIA/Projects/cristal/Daniel.de_Rauglaudre/Tools/

Makes one wonder why it's not part of the standard distribution. BTW this 
works with CMU Common Lisp too. I'm very glad.

Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  5:47   ` Oleg
@ 2002-05-29  8:14     ` Daniel de Rauglaudre
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel de Rauglaudre @ 2002-05-29  8:14 UTC (permalink / raw)
  To: caml-list

Hi,

On Wed, May 29, 2002 at 01:47:54AM -0400, Oleg wrote:
> > Ledit:
> >    ftp://ftp.inria.fr/INRIA/Projects/cristal/Daniel.de_Rauglaudre/Tools/
> 
> Makes one wonder why it's not part of the standard distribution. BTW this 
> works with CMU Common Lisp too. I'm very glad.

Well, it is not exactly a tool around compilation. It is in the CDK,
I guess. And indeed I use it also with SMLNJ, these days, don't repeat
it... :-)

For all these programs, a good reflex is first look at the "hump":
   http://caml.inria.fr/humps/

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  1:18 [Caml-list] Readline support in the toplevel loop Vincent Foley
  2002-05-29  2:30 ` Daniel de Rauglaudre
@ 2002-05-29  9:41 ` Xavier Leroy
  2002-05-29 10:19   ` Daniel de Rauglaudre
  1 sibling, 1 reply; 12+ messages in thread
From: Xavier Leroy @ 2002-05-29  9:41 UTC (permalink / raw)
  To: Vincent Foley; +Cc: OCaml Mailing list

> Is it possible to have readline support in the toplevel loop of O'Caml
> so that you can press the up key to recall something you already wrote,
> and go back to edit other things.  Is it possible?

I considered it, but there are several issues.  One of them is that
readline is GPL, thus linking it with the Caml toplevel could cause
license incompatibility issues.  Another issue is portability to
platfroms that do not have readline: the line reading and prompt
handling logic is quite different between readline and just reading
from standard input.

All in all, I believe using an external line editor such as Ledit,
CLE, FEP, ILE, etc, is a lot simpler and more flexible.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29  9:41 ` Xavier Leroy
@ 2002-05-29 10:19   ` Daniel de Rauglaudre
  2002-05-29 11:16     ` sebastien FURIC
  2002-05-31 11:44     ` Sven Luther
  0 siblings, 2 replies; 12+ messages in thread
From: Daniel de Rauglaudre @ 2002-05-29 10:19 UTC (permalink / raw)
  To: OCaml Mailing list

Hi,

On Wed, May 29, 2002 at 11:41:07AM +0200, Xavier Leroy wrote:

> I considered it, but there are several issues.  One of them is that
> readline is GPL, thus linking it with the Caml toplevel could cause
> license incompatibility issues.

You may consider Ledit, because it can be used as a library: the Ledit
mli interface provides a function named input_char that you can use
instead of Pervasives.input_char. If you are interested and consider
it as a serious enough work, you can put it in the OCaml distribution.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29 10:19   ` Daniel de Rauglaudre
@ 2002-05-29 11:16     ` sebastien FURIC
  2002-05-31 11:44     ` Sven Luther
  1 sibling, 0 replies; 12+ messages in thread
From: sebastien FURIC @ 2002-05-29 11:16 UTC (permalink / raw)
  To: OCaml Mailing list



Daniel de Rauglaudre a écrit :
> You may consider Ledit, because it can be used as a library: the Ledit
> mli interface provides a function named input_char that you can use
> instead of Pervasives.input_char. If you are interested and consider
> it as a serious enough work, you can put it in the OCaml distribution.

 There is a problem however : Ledit can't run yet under Windows because
of some limitations into the Unix module.

 Sebastien.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-29 10:19   ` Daniel de Rauglaudre
  2002-05-29 11:16     ` sebastien FURIC
@ 2002-05-31 11:44     ` Sven Luther
  2002-05-31 15:06       ` Daniel de Rauglaudre
  2002-05-31 21:26       ` Oleg
  1 sibling, 2 replies; 12+ messages in thread
From: Sven Luther @ 2002-05-31 11:44 UTC (permalink / raw)
  To: Daniel de Rauglaudre; +Cc: OCaml Mailing list

On Wed, May 29, 2002 at 12:19:56PM +0200, Daniel de Rauglaudre wrote:
> Hi,
> 
> On Wed, May 29, 2002 at 11:41:07AM +0200, Xavier Leroy wrote:
> 
> > I considered it, but there are several issues.  One of them is that
> > readline is GPL, thus linking it with the Caml toplevel could cause
> > license incompatibility issues.
> 
> You may consider Ledit, because it can be used as a library: the Ledit
> mli interface provides a function named input_char that you can use
> instead of Pervasives.input_char. If you are interested and consider
> it as a serious enough work, you can put it in the OCaml distribution.

That would be very nice ...

 ... but would cause a dependency nightmare for distribution packager,
you needing ocaml to build the ledit library, and the ledit library to
build ocaml ...

... The easiest solution zould be to distribute ledit as part of the
ocaml distribution, but i don't know how practical it is, and since
there seem to be problems for ledit on non unix plateforms, i don't know
if this will happen. But then, maybe it is not so needed on Windows as
on unix ?

Also i suppose you still would want to distribute ledit as a standalone
program, in order to use it with other stuff that is not ocaml.

Having said all that, i think having ocaml toplevel built to take
advantage of ledit by default would be a very very nice solution, since
not everyone is aware of ledit, and also because often you want to type
just ocaml and not ledit ocaml, and also, maybe not everywhere you want
to use ocaml, ledit is also installed.

Friendly,

Sven Luther
> 
> -- 
> Daniel de RAUGLAUDRE
> daniel.de_rauglaudre@inria.fr
> http://cristal.inria.fr/~ddr/
> -------------------
> To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-31 11:44     ` Sven Luther
@ 2002-05-31 15:06       ` Daniel de Rauglaudre
  2002-06-04 11:26         ` Sven Luther
  2002-05-31 21:26       ` Oleg
  1 sibling, 1 reply; 12+ messages in thread
From: Daniel de Rauglaudre @ 2002-05-31 15:06 UTC (permalink / raw)
  To: OCaml Mailing list

Hi,

On Fri, May 31, 2002 at 01:44:50PM +0200, Sven Luther wrote:

>  ... but would cause a dependency nightmare for distribution packager,
> you needing ocaml to build the ledit library, and the ledit library to
> build ocaml ...

No, because the toplevel is not necessary for the bootstrap, and is
built at the end. Other libraries could be built before it.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-31 11:44     ` Sven Luther
  2002-05-31 15:06       ` Daniel de Rauglaudre
@ 2002-05-31 21:26       ` Oleg
  1 sibling, 0 replies; 12+ messages in thread
From: Oleg @ 2002-05-31 21:26 UTC (permalink / raw)
  To: caml-list

Hi

If anyone is interested, there's a nice perl script similar to l'edit, but 
for Lisp:  http://vim.sourceforge.net/scripts/script.php?script_id=221
It adds readline to the input interface and also it creates a pipe, so one 
can also interact with the Lisp interpreter from VIM instead of readline.

(Like myself, the author hated Emacs)

Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Readline support in the toplevel loop
  2002-05-31 15:06       ` Daniel de Rauglaudre
@ 2002-06-04 11:26         ` Sven Luther
  0 siblings, 0 replies; 12+ messages in thread
From: Sven Luther @ 2002-06-04 11:26 UTC (permalink / raw)
  To: Daniel de Rauglaudre; +Cc: OCaml Mailing list

On Fri, May 31, 2002 at 05:06:55PM +0200, Daniel de Rauglaudre wrote:
> Hi,
> 
> On Fri, May 31, 2002 at 01:44:50PM +0200, Sven Luther wrote:
> 
> >  ... but would cause a dependency nightmare for distribution packager,
> > you needing ocaml to build the ledit library, and the ledit library to
> > build ocaml ...
> 
> No, because the toplevel is not necessary for the bootstrap, and is
> built at the end. Other libraries could be built before it.

Ok, ...

But i was talking about packaging dependencies and
interaction with the debian autobuilders, which don't know (yet ?) how
to build a part of the source and then build another pakage and then do
it again.

But then i could build an alternative toplevel in another package later
on, or maybve simply add ledit to the ocaml source, but i am not sure if
Xavier would agree with this later on, anyway, it is my problem.

Friendly,

Sven Luther
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2002-06-04 20:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-29  1:18 [Caml-list] Readline support in the toplevel loop Vincent Foley
2002-05-29  2:30 ` Daniel de Rauglaudre
2002-05-29  2:45   ` Vincent Foley
2002-05-29  5:47   ` Oleg
2002-05-29  8:14     ` Daniel de Rauglaudre
2002-05-29  9:41 ` Xavier Leroy
2002-05-29 10:19   ` Daniel de Rauglaudre
2002-05-29 11:16     ` sebastien FURIC
2002-05-31 11:44     ` Sven Luther
2002-05-31 15:06       ` Daniel de Rauglaudre
2002-06-04 11:26         ` Sven Luther
2002-05-31 21:26       ` Oleg

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