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

Ocamlwin.exe Flaky ? Comfort of editing ?

Expand Messages
  • Normand Leclerc
    Hi, I am new to Ocaml, used it a bit two years age and want to get back at it but encounter real difficulties to set it up conveniently. I have two questions.
    Message 1 of 3 , Nov 23, 2004
    • 0 Attachment
      Hi,

      I am new to Ocaml, used it a bit two years age and want to get
      back at it but encounter real difficulties to set it up
      conveniently.


      I have two questions.

      1-- First about stability ---

      OcamlWin.exe is consistently crashning. I don't know if it
      is because of SP2 of WinXP, but would I am surprised, as the rest
      is solid.

      It does crash systematically in readline, like when I execute
      HY and Low :
      let () = print_string "Bienvenue au jeu HighLow\n\n" in
      let () = print_string "Devinez le nombre" in
      print_string " caché : \n\n";;

      (* From Developing Applications *)
      let rec hilo n =
      let () = print_string "tapez un nombre : " in
      let i = read_int () in
      if i = n then
      let () = print_string "Bravo !" in
      let () = print_newline ()
      in print_newline ()
      else
      let () = if i < n then
      let () = print_string "Il est plus grand."
      in print_newline ()
      else
      let () = print_string "Il est plus petit."
      in print_newline ()
      in hilo n
      ;;


      As a matter of fact, I crash it with as short as the Greeting :
      print_string "What's your name ? ";
      flush stdout;
      let answer = input_line stdin in
      print_string ("Hello " ^ answer);
      print_string ", nice to meet you!\n";
      exit 0;;

      2-- Second about convenience to program. ---

      Although I did set the local directory where I want to put my .ml
      programs in the Icon, even with the -I directive,

      Although I did place a .ocamlinit file in the directory where
      OcamlWin.exe is, even also in the lib directory, with the
      following directives:
      #directory "D:/Programs/NL_Sources"
      #cd "D:/Programs/NL_Sources"
      #use "tst.ml"

      Although I do give a #directory and a #use directive in the
      interpreter,
      When I open the _File_ menu of the interpreter, it does always
      point to the lib directory.

      I tried also to set up my small programmers editor (like I do for
      csc.exe or Tcl in EditPlus), to be able to
      receive the output of the interpreter, or of ocaml.exe in a
      window, to no avail.

      I feel a bit dumb here. Is it possible to program Ocaml with a reasonable degree of
      comfort ?
      Tcl has a nice console. Rebol has a remarkable console
      interpreter, with help and source at the tips of the fingers.
      And Ocaml has ledit in unix. Basta.

      Thanks List.
      --
      NL
    • Christophe TROESTLER
      ... I do not know about OcamlWin.exe since I do not use Win$, but you could use instead the tuareg Emacs mode (http://www-rocq.inria.fr/%7eacohen/tuareg/) or
      Message 2 of 3 , Nov 23, 2004
      • 0 Attachment
        On Tue, 23 Nov 2004, Normand Leclerc <leclercn@...> wrote:
        >
        > 1-- First about stability ---
        >
        > OcamlWin.exe is consistently crashning.

        I do not know about OcamlWin.exe since I do not use Win$, but you
        could use instead the tuareg Emacs mode
        (http://www-rocq.inria.fr/%7eacohen/tuareg/) or launch OCamlBrowser
        (you need to install the appropriate version of Tk) and start a shell
        (File -> Shell).

        > 2-- Second about convenience to program. ---

        Under Emacs + Tuareg, if you visit a file, you can just issue C-x C-e
        to evaluate the phrase your cursor is on (if an ocaml process has to
        be created, it starts in the dir where you file is located).

        Hope it helps,
        ChriS
      • andrew cooke
        i use ocaml on win2k with cygwin and it s been absolutely solid. i use emacs to edit the code, with a caml mode grabbed off the net and compile/run directly
        Message 3 of 3 , Nov 23, 2004
        • 0 Attachment
          i use ocaml on win2k with cygwin and it's been absolutely solid. i use
          emacs to edit the code, with a caml mode grabbed off the net and
          compile/run directly from the command line (via Makefiles).

          are you using the cygwin version, or downloading directly from the caml site?

          if you're not using cygwin, you might try:

          - uninstalling what you have
          - going to http://www.cygwin.com and installing cygwin
          - once you have cygwin installed and working, re-run the installer
          and select/install ocaml

          however, i have heard that cygwin is not as reliable on xp as it is on
          win2k. and cygwin has its own learning curve, of course.

          andrew


          Normand Leclerc said:
          >
          > Hi,
          >
          > I am new to Ocaml, used it a bit two years age and want to get
          > back at it but encounter real difficulties to set it up
          > conveniently.
          >
          >
          > I have two questions.
          >
          > 1-- First about stability ---
          >
          > OcamlWin.exe is consistently crashning. I don't know if it
          > is because of SP2 of WinXP, but would I am surprised, as the rest
          > is solid.
          >
          > It does crash systematically in readline, like when I execute
          > HY and Low :
          > let () = print_string "Bienvenue au jeu HighLow\n\n" in
          > let () = print_string "Devinez le nombre" in
          > print_string " caché : \n\n";;
          >
          > (* From Developing Applications *)
          > let rec hilo n =
          > let () = print_string "tapez un nombre : " in
          > let i = read_int () in
          > if i = n then
          > let () = print_string "Bravo
          > !" in
          > let () = print_newline ()
          > in print_newline ()
          > else
          > let () = if i < n
          > then
          > let () =
          > print_string
          > "Il est plus
          > grand."
          > in
          > print_newline
          > ()
          > else
          > let () =
          > print_string "Il
          > est plus petit."
          > in print_newline
          > ()
          > in hilo n
          > ;;
          >
          >
          > As a matter of fact, I crash it with as short as the Greeting :
          > print_string "What's your name ? ";
          > flush stdout;
          > let answer = input_line stdin in
          > print_string ("Hello " ^ answer);
          > print_string ", nice to meet you!\n";
          > exit 0;;
          >
          > 2-- Second about convenience to program. ---
          >
          > Although I did set the local directory where I want to put my .ml
          > programs in the Icon, even with the -I directive,
          >
          > Although I did place a .ocamlinit file in the directory where
          > OcamlWin.exe is, even also in the lib directory, with the
          > following directives:
          > #directory "D:/Programs/NL_Sources"
          > #cd "D:/Programs/NL_Sources"
          > #use "tst.ml"
          >
          > Although I do give a #directory and a #use directive in the
          > interpreter,
          > When I open the _File_ menu of the interpreter, it does always
          > point to the lib directory.
          >
          > I tried also to set up my small programmers editor (like I do for
          > csc.exe or Tcl in EditPlus), to be able to
          > receive the output of the interpreter, or of ocaml.exe in a
          > window, to no avail.
          >
          > I feel a bit dumb here. Is it possible to program Ocaml with a reasonable
          > degree of
          > comfort ?
          > Tcl has a nice console. Rebol has a remarkable console
          > interpreter, with help and source at the tips of the fingers.
          > And Ocaml has ledit in unix. Basta.
          >
          > Thanks List.
          > --
          > NL
          >
          >
          >
          >
          >
          > Archives up to September 30, 2004 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
          >
          >
          >
          >
          >
          >
          >
          >


          --
          ` __ _ __ ___ ___| |_____ work web site: http://www.ctio.noao.edu/~andrew
          / _` / _/ _ \/ _ \ / / -_) personal web site: http://www.acooke.org/andrew
          \__,_\__\___/\___/_\_\___| list: http://www.acooke.org/andrew/compute.html
        Your message has been successfully submitted and would be delivered to recipients shortly.