Loading ...
Sorry, an error occurred while loading the content.

readline-like functionality in OCaml ?

Expand Messages
  • Sergei Steshenko
    Hello All, I am trying to play with OCaml interactively, which means I frequently need to re-enter the same text. Other languages often have readline
    Message 1 of 5 , Feb 5, 2013
    • 0 Attachment
      Hello All,

      I am trying to play with OCaml interactively, which means I frequently need to re-enter the same text.

      Other languages often have 'readline' built-in (well, for OCaml the fact that 'readline' is GPL probably means it is too restrictive).

      As a workaround I am using 'rlwrap' - like this in my case:

      /mnt/sdb8/sergei/AFSWD_debug/20121021/rlwrap-0.37/binsh/rlwrap /mnt/sdb8/sergei/AFSWD_debug/20121021/ocaml-3.12.1/binsh/ocaml
      .

      Is there a built-in solution for OCaml ? I mean, is there something which has compatible with OCaml license and has the needed functionality ?

      Thank,
        Sergei.
    • Eric Cooper
      ... I use either ledit in a terminal, or ocaml-mode s run-caml function in Emacs. Neither is built-in , though. -- Eric Cooper e c c @ c m u . e
      Message 2 of 5 , Feb 5, 2013
      • 0 Attachment
        On Tue, Feb 05, 2013 at 03:17:03PM -0800, Sergei Steshenko wrote:
        >
        > Hello All,
        > I am trying to play with OCaml interactively, which means I frequently need to
        > re-enter the same text.
        > Other languages often have 'readline' built-in (well, for OCaml the fact that
        > 'readline' is GPL probably means it is too restrictive).
        > As a workaround I am using 'rlwrap' - like this in my case:
        > /mnt/sdb8/sergei/AFSWD_debug/20121021/rlwrap-0.37/binsh/rlwrap
        > /mnt/sdb8/sergei/AFSWD_debug/20121021/ocaml-3.12.1/binsh/ocaml
        > .
        > Is there a built-in solution for OCaml ? I mean, is there something which has
        > compatible with OCaml license and has the needed functionality ?

        I use either ledit in a terminal, or ocaml-mode's run-caml function
        in Emacs. Neither is "built-in", though.

        --
        Eric Cooper e c c @ c m u . e d u
      • Philippe Veber
        Hi, to play interactively with ocaml, utop is a must now, as it offers multiline edition, multiline history and a very smart completion mechanism. You can
        Message 3 of 5 , Feb 5, 2013
        • 0 Attachment
          Hi,

          to play interactively with ocaml, utop is a must now, as it offers
          multiline edition, multiline history and a very smart completion mechanism.
          You can install utop with opam very easily.

          hope that helps,
          ph.

          2013/2/6 Eric Cooper <ecc@...>

          > On Tue, Feb 05, 2013 at 03:17:03PM -0800, Sergei Steshenko wrote:
          > >
          > > Hello All,
          > > I am trying to play with OCaml interactively, which means I frequently
          > need to
          > > re-enter the same text.
          > > Other languages often have 'readline' built-in (well, for OCaml the fact
          > that
          > > 'readline' is GPL probably means it is too restrictive).
          > > As a workaround I am using 'rlwrap' - like this in my case:
          > > /mnt/sdb8/sergei/AFSWD_debug/20121021/rlwrap-0.37/binsh/rlwrap
          > > /mnt/sdb8/sergei/AFSWD_debug/20121021/ocaml-3.12.1/binsh/ocaml
          > > .
          > > Is there a built-in solution for OCaml ? I mean, is there something
          > which has
          > > compatible with OCaml license and has the needed functionality ?
          >
          > I use either ledit in a terminal, or ocaml-mode's run-caml function
          > in Emacs. Neither is "built-in", though.
          >
          > --
          > Eric Cooper e c c @ c m u . e d u
          >
          >
          > ------------------------------------
          >
          > Archives up to December 31, 2011 are also downloadable at
          > http://www.connettivo.net/cntprojects/ocaml_beginners
          > The archives of the very official ocaml list (the seniors' one) can be
          > found at http://caml.inria.fr
          > Attachments are banned and you're asked to be polite, avoid flames
          > etc.Yahoo! Groups Links
          >
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Sergei Steshenko
          Thanks for the tip on utop . Looking up utop I came across http://alan.petitepomme.net/cwn/2011.08.02.html#2 (I know there is a newer version already). The
          Message 4 of 5 , Feb 6, 2013
          • 0 Attachment
            Thanks for the tip on 'utop'.

            Looking up 'utop' I came across http://alan.petitepomme.net/cwn/2011.08.02.html#2 (I know there is a newer version already).

            The above post mentions dependencies of 'utop'; I build stuff myself from sources within my own AppsFromScratch; I am still with ocaml-3.12.1.

            So, my practical question is: can 'utop' and all its dependencies be built with ocaml-3.12.1 ?

            Thanks,
              Sergei.




            >________________________________
            > From: Philippe Veber <philippe.veber@...>
            >To: ocaml_beginners@yahoogroups.com
            >Sent: Wednesday, February 6, 2013 9:08 AM
            >Subject: Re: "ocaml_beginners"::[] readline-like functionality in OCaml ?
            >
            >

            >Hi,
            >
            >to play interactively with ocaml, utop is a must now, as it offers
            >multiline edition, multiline history and a very smart completion mechanism.
            >You can install utop with opam very easily.
            >
            >hope that helps,
            >ph.
            >
            >2013/2/6 Eric Cooper ecc@...>
            >
            >> On Tue, Feb 05, 2013 at 03:17:03PM -0800, Sergei Steshenko wrote:
            >> >
            >> > Hello All,
            >> > I am trying to play with OCaml interactively, which means I frequently
            >> need to
            >> > re-enter the same text.
            >> > Other languages often have 'readline' built-in (well, for OCaml the fact
            >> that
            >> > 'readline' is GPL probably means it is too restrictive).
            >> > As a workaround I am using 'rlwrap' - like this in my case:
            >> > /mnt/sdb8/sergei/AFSWD_debug/20121021/rlwrap-0.37/binsh/rlwrap
            >> > /mnt/sdb8/sergei/AFSWD_debug/20121021/ocaml-3.12.1/binsh/ocaml
            >> > .
            >> > Is there a built-in solution for OCaml ? I mean, is there something
            >> which has
            >> > compatible with OCaml license and has the needed functionality ?
            >>
            >> I use either ledit in a terminal, or ocaml-mode's run-caml function
            >> in Emacs.  Neither is "built-in", though.
            >>
            >> --
            >> Eric Cooper             e c c @ c m u . e d u
            >>
            >>
            >> ------------------------------------
            >>
            >> Archives up to December 31, 2011 are also downloadable at
            >> http://www.connettivo.net/cntprojects/ocaml_beginners
            >> The archives of the very official ocaml list (the seniors' one) can be
            >> found at http://caml.inria.fr
            >> Attachments are banned and you're asked to be polite, avoid flames
            >> etc.Yahoo! Groups Links
            >>
            >>
            >>
            >>
            >
            >[Non-text portions of this message have been removed]
            >
            >
            >
            >
            >
          • Philippe Veber
            Hi Sergei, it sure can, as I ve been using utop before switching to ocaml 4.00; that being said, you may have to dig the appropriate versions of utop and its
            Message 5 of 5 , Feb 8, 2013
            • 0 Attachment
              Hi Sergei,

              it sure can, as I've been using utop before switching to ocaml 4.00; that
              being said, you may have to dig the appropriate versions of utop and its
              dependencies and that may not be fun. Otherwise consider using opam, which
              could make your like easier. Alternatively, you could have a look to opam
              packages to check the constraints on compiler+deps versions.

              hope that helps !
              ph.

              2013/2/6 Sergei Steshenko <sergstesh@...>

              > Thanks for the tip on 'utop'.
              >
              > Looking up 'utop' I came across
              > http://alan.petitepomme.net/cwn/2011.08.02.html#2 (I know there is a
              > newer version already).
              >
              > The above post mentions dependencies of 'utop'; I build stuff myself from
              > sources within my own AppsFromScratch; I am still with ocaml-3.12.1.
              >
              > So, my practical question is: can 'utop' and all its dependencies be built
              > with ocaml-3.12.1 ?
              >
              > Thanks,
              > Sergei.
              >
              >
              >
              >
              > >________________________________
              > > From: Philippe Veber <philippe.veber@...>
              > >To: ocaml_beginners@yahoogroups.com
              > >Sent: Wednesday, February 6, 2013 9:08 AM
              > >Subject: Re: "ocaml_beginners"::[] readline-like functionality in OCaml ?
              > >
              > >
              > >
              > >Hi,
              > >
              > >to play interactively with ocaml, utop is a must now, as it offers
              > >multiline edition, multiline history and a very smart completion
              > mechanism.
              > >You can install utop with opam very easily.
              > >
              > >hope that helps,
              > >ph.
              > >
              > >2013/2/6 Eric Cooper ecc@...>
              > >
              > >> On Tue, Feb 05, 2013 at 03:17:03PM -0800, Sergei Steshenko wrote:
              > >> >
              > >> > Hello All,
              > >> > I am trying to play with OCaml interactively, which means I frequently
              > >> need to
              > >> > re-enter the same text.
              > >> > Other languages often have 'readline' built-in (well, for OCaml the
              > fact
              > >> that
              > >> > 'readline' is GPL probably means it is too restrictive).
              > >> > As a workaround I am using 'rlwrap' - like this in my case:
              > >> > /mnt/sdb8/sergei/AFSWD_debug/20121021/rlwrap-0.37/binsh/rlwrap
              > >> > /mnt/sdb8/sergei/AFSWD_debug/20121021/ocaml-3.12.1/binsh/ocaml
              > >> > .
              > >> > Is there a built-in solution for OCaml ? I mean, is there something
              > >> which has
              > >> > compatible with OCaml license and has the needed functionality ?
              > >>
              > >> I use either ledit in a terminal, or ocaml-mode's run-caml function
              > >> in Emacs. Neither is "built-in", though.
              > >>
              > >> --
              > >> Eric Cooper e c c @ c m u . e d u
              > >>
              > >>
              > >> ------------------------------------
              > >>
              > >> Archives up to December 31, 2011 are also downloadable at
              > >> http://www.connettivo.net/cntprojects/ocaml_beginners
              > >> The archives of the very official ocaml list (the seniors' one) can be
              > >> found at http://caml.inria.fr
              > >> Attachments are banned and you're asked to be polite, avoid flames
              > >> etc.Yahoo! Groups Links
              > >>
              > >>
              > >>
              > >>
              > >
              > >[Non-text portions of this message have been removed]
              > >
              > >
              > >
              > >
              > >
              >
              >
              > ------------------------------------
              >
              > Archives up to December 31, 2011 are also downloadable at
              > http://www.connettivo.net/cntprojects/ocaml_beginners
              > The archives of the very official ocaml list (the seniors' one) can be
              > found at http://caml.inria.fr
              > Attachments are banned and you're asked to be polite, avoid flames
              > etc.Yahoo! Groups Links
              >
              >
              >
              >


              [Non-text portions of this message have been removed]
            Your message has been successfully submitted and would be delivered to recipients shortly.