sponge45 changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/
desp has joined #ocaml
<desp> hi
<desp> how do I write (and run in the interactive command-line interpreter) a program utilizing the Big_int module?
<Smerdyakov> Please read the first page of the num library documentation.
<Smerdyakov> No, that's the documentation for a module, not a library.
<desp> thanks.
desp has left #ocaml []
swater_ has quit ["Quat"]
smimou has quit ["bli"]
pantsd has quit ["Leaving."]
bluestorm has quit ["Konversation terminated!"]
mbishop has quit [Remote closed the connection]
shekmalhen has joined #ocaml
pantsd has joined #ocaml
sponge45 has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
shekmalhen has quit ["leaving"]
_JusSx_ has quit [Read error: 113 (No route to host)]
Debolaz2 has joined #ocaml
Debolaz has quit [Read error: 60 (Operation timed out)]
mbishop has joined #ocaml
danly has joined #ocaml
Mr_Awesome has joined #ocaml
danly has quit ["Leaving"]
Smerdyakov has quit ["Leaving"]
pantsd has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit []
Foxyloxy has quit ["Sausages!"]
bluestorm has joined #ocaml
sponge45 has quit ["zzzzzzzzzz"]
Mr_Awesome has quit ["and the Awesome Level drops"]
Hadaka has quit [Read error: 110 (Connection timed out)]
_velco has joined #ocaml
_velco is now known as velco
shawn_ has joined #ocaml
swater has joined #ocaml
shawn_ has quit ["This computer has gone to sleep"]
smimou has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
_JusSx_ has joined #ocaml
ikaros has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
bluestorm has joined #ocaml
twobitsp1ite has joined #ocaml
twobitsprite has quit [Read error: 110 (Connection timed out)]
Smerdyakov has joined #ocaml
bluestorm has quit ["Konversation terminated!"]
danly has joined #ocaml
johnnowak has joined #ocaml
johnnowak has quit [Remote closed the connection]
dark_ is now known as dark_light
rindolf has joined #ocaml
<rindolf> Hi all!
<rindolf> I have two functions that call each other. How do I pre-declare them?
<rindolf> Or pre-declare one?
<tsuyoshi> let rec?
<tsuyoshi> hmm.. not working
<tsuyoshi> # let rec foo, bar = (fun () -> bar ()), (fun () -> foo ());;
<tsuyoshi> Only variables are allowed as left-hand side of `let rec'
<tsuyoshi> =^(
<tsuyoshi> I guess you could have a function argument and just use currying
mbishop has quit [Remote closed the connection]
<tsuyoshi> ha that's not working either
<tsuyoshi> let foo_x bar () = bar ();;
<tsuyoshi> let bar_x foo () = foo ();;
<tsuyoshi> let rec foo = foo_x (bar_x foo);;
<tsuyoshi> This kind of expression is not allowed as right-hand side of `let rec'
<Smerdyakov> You have to use the 'and' keyword with 'let rec'.
<tsuyoshi> ohhh
<tsuyoshi> never heard of that before
<Smerdyakov> Then I guess you haven't read any decent OCaml tutorial through. ;)
<tsuyoshi> do you have an example?
<Smerdyakov> No. Read the manual.
<tsuyoshi> where's the decent tutorial with this and keyword?
<Smerdyakov> The one in the manual
<tsuyoshi> oh I see.. there is an example
<tsuyoshi> they don't explain the "and" keyword at all though
<tsuyoshi> I never noticed it
faf has joined #ocaml
batdog|gone is now known as batdog
<stevan> hey rindolf, hacking some Ocaml now?
<rindolf> stevan: yes.
<rindolf> stevan: hi.
<stevan> rindolf: have you see Perl4Caml?
<rindolf> stevan: no.
<rindolf> stevan: OK.
<stevan> it is a pretty nice bridge between Perl and Ocaml, being a fellow Perl hacker I would assume you would appreciate it
<rindolf> stevan: yes.
<rindolf> stevan: albeit that's not what I'm looking for at the moment.
<rindolf> stevan: I'm looking for a way for two functions to call each other.
<stevan> rindolf: can you paste your current code?
<stevan> usually let rec and 'and' will do i
<stevan> t
<stevan> as Smerdyakov said above (although he left out much details)
<stevan> when you declare "let rec" it makes the function visible within it's own scope (and so can be called recursively)
<tsuyoshi> let rec foo () = bar () and bar () = foo ();;
<stevan> but when you put 'and' between another function definition, it becomes visible in that scope too
bluestorm has joined #ocaml
<stevan> rindolf: the first section on this page "Mutally Recursive Functions" (http://www.ocaml-tutorial.org/labels) should help
<rindolf> stevan: thanks.
<stevan> your welcome :)
<rindolf> stevan: I'm sorry for bothering you people, but I need this for an SML exercise, and it doesn't seem to work there.
<rindolf> I asked it on #sml now.
slipstream has quit [Read error: 104 (Connection reset by peer)]
bluestorm has quit [Remote closed the connection]
<stevan> rindolf: one second,.. I will grab my SML book
bluestorm has joined #ocaml
<rindolf> stevan: found it.
<rindolf> stevan: http://www.cs.cornell.edu/courses/cs312/2006sp/lectures/lec03.html # Search for "mutually recursive"
<stevan> rindolf: cool :)
slipstream has joined #ocaml
swater has quit ["Quat"]
swater has joined #ocaml
rindolf has quit ["Yay! I'm a Llama again!"]
_JusSx_ has quit [Client Quit]
_JusSx_ has joined #ocaml
mbishop has joined #ocaml
faf has left #ocaml []
joshcryer has quit [Read error: 104 (Connection reset by peer)]
bluestorm has quit ["Konversation terminated!"]
_JusSx_ has quit [Client Quit]
nonpop has joined #ocaml