Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ocamlwin.exe Flaky ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christopher A. Watford <christopher.watford@g...>
Subject: Re: [Caml-list] Ocamlwin.exe Flaky ?
        Objective Caml version 3.08.0

# 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";;
        What's your name ? tim
Hello print_string "What's your name ? ";, nice to meet you!
- : unit = ()
#       Hello What's your name ? tim, nice to meet you!
- : unit = ()
#

Thats the copy and paste from my dev version, and yeah, that doesn't
even look like it is working properly.

And when I break it out line by line it goes ape. If you give me a
night I can think it over as to how to handle when somebody asks for
stdin, but really its near impossible to tell that the console is
waiting for input...basically piping the toplevel is the wrong
approach. But I have yet to succeed in embedding the toplevel :-/

On Tue, 23 Nov 2004 23:11:05 -0500, Christopher A. Watford
<christopher.watford@gmail.com> wrote:
> I'll tell you this, there is no clean way to get stdin with OCamlWin
> at the moment. I should probably look into rewriting the entire
> internals that handle reading to and from the pipe. The actual system
> that would work the best is statically linking the top level INTO the
> application, keeping me from having to pipe in from a command window,
> which is why it 'consistantly crashes' when reading from stdin.
> 
> I'll run it in debug mode, see if I can hotfix your crash, however, if
> it is dealing with reading stdin, I wouldn't get your hopes up for the
> moment.
> 
> Christopher Watford
> http://dorm.tunkeymicket.com/OCamlWinPlus/Release
> 
> 
> 
> On Tue, 23 Nov 2004 21:52:34 -0500, Normand Leclerc
> <leclercn@globetrotter.net> wrote:
> > Hi,
> >
> > I asked this to the beginner's list but the answer was elliptic.
> > I re-ask it here.
> >
> > OcamlWin.exe is consistently crashning.  I don't know if it
> > is because of SP2 of WinXP, but I would be surprised, as the rest
> > is holding well.  Also, I do not have the choice of Win.
> >
> > In general, OcamlWin is working, butI crash it from I/O, when reading the keyboard :
> > 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";
> >
> > Also, apart of an Emacs mode, is it possible to redirect the
> > interpreter's output to my small editor with with I do my own handy
> > auto-completion.  I do it with other languages,
> > but never found the way to do it with Ocaml.
> >
> > As a matter of fact, even .Ocamlinit in the same directory of
> > OcamlWin.exe is not able to change the working directory with
> > directives.
> >
> > Thanks for any help.
> > --
> > Norm.
> >
> > _______________________________________________
> > 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
> >
> 


-- 
Christopher A. Watford
christopher.watford@gmail.com
http://dorm.tunkeymicket.com