ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
<twobitsprite> either the author of this book has one-liner-syndrome big-time, or its just conventional to have long for-loops on one line in OCaml...
<mikeX> ;D
<avlondono> ammm what's wrong with Array.make_matrix ?
<pango> nothing
* twobitsprite double checks the docs
<twobitsprite> ah, there is a make_matrix... noh spiffy
<twobitsprite> s/noh/how/
<twobitsprite> how would I put a referance in a racord? "let position = { x:int ; y:int ; color:color ref }"?
<twobitsprite> that seems to work... sorry, I'll start hypothosizing outloud and just try them in the toplevel first :P
<twobitsprite> s/stop/start
mikeX has quit ["Leaving"]
mlh_ has joined #ocaml
monochrom has joined #ocaml
<twobitsprite> does "int -> char * char -> int" == "int -> (char * char) -> int"?
Gueben has quit [Remote closed the connection]
dan2_ is now known as dan2
_exa has joined #ocaml
monochrom has quit [Read error: 110 (Connection timed out)]
exa has quit [Read error: 110 (Connection timed out)]
<twobitsprite> hmm... I entered "mod 4 5;;" in the toplevel and the program exited... I'm not sure if "mod" exists, I was just trying it... I would have expected an error instead of it exiting...
<pango> # mod 4 5 ;;
<pango> Syntax error
<pango> (mod being underlined)
<pango> mod exists, but is infix
<pango> # 4 mod 5 ;;
<pango> - : int = 4
<pango> (Pervasives module)
threeve has quit []
_exa has quit [Read error: 104 (Connection reset by peer)]
Korollary has joined #ocaml
<Korollary> is there a way to make the compiler to spit out the inferred types in a file ?
dan2 is now known as dan2_
Smerdyakov has joined #ocaml
dan2_ has quit [Excess Flood]
dan2_ has joined #ocaml
<twobitsprite> is there a module or library that will allow me to run a subprocess and read from/write to it's stdout/stdin?
<Smerdyakov> Yes. Look in the unix library.
<twobitsprite> I'm in windows...
<Smerdyakov> Then the answer to your question may be "no," unless you go through Cygwin.
<Smerdyakov> Or if someone has provided this functionality in a Windows API library.
<Smerdyakov> BTW, stop using Windows. ;)(
<twobitsprite> I'd like to, but my linux box is fried right now...
<twobitsprite> So, essentially Ocaml is broken in windows...
<Smerdyakov> What do you mean?
<twobitsprite> it isn't fully ported...
<Korollary> you can use cygwin
<Korollary> Smerdyakov: is there a way to make the compiler spit out the inferred types in a file ?
dan2_ has quit [Excess Flood]
<Smerdyakov> twobitsprite, the library is called "unix." It ought to be clear that it is for UNIX only!
<Smerdyakov> Korollary, I don't know of one.
dan2_ has joined #ocaml
<Korollary> Smerdyakov: thanks anyway
<twobitsprite> well... it seems like certain parts of the Unix module work in windows, so I might be in luck
dan2_ has quit [Excess Flood]
<Smerdyakov> twobitsprite, I'm guessing from your wording earlier that you want to run a "subprocess" implemented in another language?
dan2_ has joined #ocaml
<twobitsprite> Smerdyakov: I want to run another program, and read its output and be able to send to its input...
<twobitsprite> I've found the function that does that... create_process
<twobitsprite> and it says it works in windows, so...
<Smerdyakov> Why do you want it to be another program instead of another thread, which is easy to do if everything involved is OCaml code?
<twobitsprite> I need to run gnugo
<Smerdyakov> So then the issue is that the "other program" isn't written in OCaml?
<twobitsprite> I'm writing a Go playing AI, and I want to train/test it against gnugo
<Smerdyakov> I'm not going to give up until you give me a "yes" or "no" answer. ;)
<twobitsprite> gnugo is not writen in ocaml
<twobitsprite> "no"
<twobitsprite> i.e. I need to run gnugo and be able to interface to it via stdin/stdout
<Smerdyakov> There are better ways to manage communication between concurrent threads.
<Smerdyakov> Hopefully if gnugo were implemented in OCaml, it would support a more typed interface.
<twobitsprite> I don't know how else I would interface with gnugo
<Smerdyakov> A module that contains functions you can use to make requests/receive replies/etc..
<twobitsprite> how would these requests/replies be send/received?
<twobitsprite> s/send/snt
<twobitsprite> bleh.. :P
<Smerdyakov> Were it up to me to implement, I would probably use the Concurrent ML port provided as the Event module of the threads library.
<Smerdyakov> But the point is that you don't need to worry about these things if the functionality is presented as a well-designed library.
<pango> Korollary: ocamlc -i
<Korollary> pango: Yup, I seem to have missed that in the docs. Thanks.
<pango> it's in the man page
Smerdyakov has quit ["sleep"]
shrimpx_ has joined #ocaml
shrimpx has quit [Remote closed the connection]
Snark has joined #ocaml
ramkrsna has joined #ocaml
ramkrsna has quit [Remote closed the connection]
__DL__ has joined #ocaml
pango_ has joined #ocaml
pango_ has quit [Remote closed the connection]
Snark has quit ["Leaving"]
pango has quit [Read error: 110 (Connection timed out)]
pango has joined #ocaml
Korollary has quit [Read error: 110 (Connection timed out)]
Gueben has joined #ocaml
Snark has joined #ocaml
mlh_ has quit [Client Quit]
mattam has joined #ocaml
mikeX has joined #ocaml
mikeX has quit ["Leaving"]
ChipsterOne has joined #ocaml
<ChipsterOne> hello
Herrchen has joined #ocaml
Herrchen has quit [Client Quit]
Herrchen has joined #ocaml
Herrchen has quit ["brb"]
Herrchen has joined #ocaml
threeve has joined #ocaml
ChipsterOne has quit []
zigong has joined #ocaml
Schmurtz has quit [Read error: 113 (No route to host)]
_zigong has joined #ocaml
threeve has quit []
zigong has quit [Read error: 110 (Connection timed out)]
_zigong has quit [Remote closed the connection]
threeve has joined #ocaml
Schmurtz has joined #ocaml
Schmurtz has quit [Read error: 104 (Connection reset by peer)]
Schmurtz has joined #ocaml
Smerdyakov has joined #ocaml
Smerdyakov has quit [Client Quit]
vezenchio has joined #ocaml
Schmurtz has quit ["Dodo !"]
Korollary has joined #ocaml
ramkrsna has joined #ocaml
Korollary has quit [Read error: 110 (Connection timed out)]
zigong has joined #ocaml
_batdog has joined #ocaml
batdog has quit [Read error: 110 (Connection timed out)]
TaXules has quit [Read error: 104 (Connection reset by peer)]
batdog has joined #ocaml
Boojum has joined #ocaml
Snark has quit [Read error: 104 (Connection reset by peer)]
Boojum is now known as Snark
TaXules has joined #ocaml
_batdog has quit [Read error: 110 (Connection timed out)]
ramkrsna has quit [Remote closed the connection]
ski has joined #ocaml
menace has joined #ocaml
pango has quit ["Leaving"]
menace has quit [Nick collision from services.]
pango has joined #ocaml
twobitsprite has quit [Read error: 110 (Connection timed out)]
menace has joined #ocaml
Snark has left #ocaml []
palomer has joined #ocaml
<palomer> how would you implement streams (a la sicp) in ocaml?
gim has joined #ocaml
threeve has quit []
zigong has quit [Remote closed the connection]
<palomer> ie, how do I mimic delayed evaluation?
<ski> e.g. by a function from unit
* ski thinks OCaml has a Lazy module which you can import for this
<ski> or maybe you don't want caching of the delayed expr, just the delay/force thing ? (i.e. more or less cbn, then)
mrsolo has joined #ocaml
__DL__ has quit ["Bye Bye"]
ulfdoz has joined #ocaml
ski has quit ["Zzz"]
twobitsprite has joined #ocaml
twobitsprite has left #ocaml []
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
Gueben has quit [Remote closed the connection]
vezenchio has quit ["\o/ in mochintin namocniuh \o/"]
TaXules has quit [Read error: 104 (Connection reset by peer)]