From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 444D2BB81 for ; Wed, 24 Nov 2004 05:22:15 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAO4MEc8030611 for ; Wed, 24 Nov 2004 05:22:14 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id FAA05874 for ; Wed, 24 Nov 2004 05:22:14 +0100 (MET) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.197]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iAO4MDqg002380 for ; Wed, 24 Nov 2004 05:22:13 +0100 Received: by wproxy.gmail.com with SMTP id 68so54196wri for ; Tue, 23 Nov 2004 20:22:12 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=BRyvvVEblulUVHfo1zUOFzsRiHXDKTPxuEtWdu3f2o/w5SoN/41h+CuxhbLGP4Gg6d+fTelLpTnR4lLBRRrHQ5n/Uqs/hYrOEDg8gvqaiQGfNNdRr8ZpRopeFz7rZeruvWmnTO5KPeWDFbZ1bsnFGrZAh0/qVmfpeIIkvhW+w7c= Received: by 10.54.41.63 with SMTP id o63mr313646wro; Tue, 23 Nov 2004 20:22:08 -0800 (PST) Received: by 10.54.31.63 with HTTP; Tue, 23 Nov 2004 20:22:07 -0800 (PST) Message-ID: <8008871f041123202242c15f5c@mail.gmail.com> Date: Tue, 23 Nov 2004 23:22:07 -0500 From: "Christopher A. Watford" Reply-To: "Christopher A. Watford" To: Normand Leclerc Subject: Re: [Caml-list] Ocamlwin.exe Flaky ? Cc: caml-list@inria.fr In-Reply-To: <8008871f04112320116471ec3@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <2226355.20041123215234@globetrotter.net> <8008871f04112320116471ec3@mail.gmail.com> X-Miltered: at concorde with ID 41A40C76.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41A40C75.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 stdout:01 stdin:01 stdin:01 toplevel:01 toplevel:01 wrote:01 rewriting:01 internals:01 statically:01 wrote:01 beginner's:01 stdout:01 emacs:01 ocaml:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.0 X-Spam-Level: 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 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 > 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