Smerdyakov has joined #ocaml
baader has quit ["I'll be back"]
phubuh has joined #ocaml
m[kel[ has joined #ocaml
lam has joined #ocaml
reffie has joined #ocaml
lam has quit ["leaving"]
lam has joined #ocaml
m[kel[ has quit [Remote closed the connection]
smklsmkl has joined #ocaml
brwill is now known as brwill|zzz
docelic has joined #ocaml
docelic has quit ["later"]
atom-z has joined #ocaml
docelic has joined #ocaml
rox has quit ["Client exiting"]
docelic has quit ["later"]
brwill|zzz is now known as brwill
rox has joined #ocaml
docelic has joined #ocaml
brwill is now known as brwill|out
docelic has quit ["Client Exiting"]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
<
atom-z>
do people ever talk in here?
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
<
atom-z>
Riastradh: are you alive?
<
phubuh>
... someone in this channel is ... speaking?!
<
Riastradh>
We must put this date down in history!
<
atom-z>
Riastradh: in ocaml, whats the equiv. of sscanf?
<
Riastradh>
Scanf.scanf, I think.
<
Riastradh>
Ah, Scanf.sscanf, not .scanf.
<
atom-z>
Riastradh: thanks
<
atom-z>
how do i import a module? the tutorial i'm reading hasnt told me (yet)
<
Riastradh>
Specify, please -- do you mean import a module in the ocaml toplevel, or into a .ml file?
<
Riastradh>
Er, no, don't answer that.
<
Riastradh>
Answer instead: do you mean import all the bindings of a module into the current namespace, or just use bindings from a module?
<
atom-z>
answer: python code example: from xml.sax import *
<
Riastradh>
open Module
<
Riastradh>
Python's 'import xml.sax' and then 'xml.sax.foo' would be in OCaml just 'Xml.Sax.foo' (with no import).
<
atom-z>
why does this not work:
<
atom-z>
while true do
<
atom-z>
x = input_line fp;
<
Riastradh>
First of all, you should avoid imperative code like that.
<
atom-z>
i still want to know why its broken though :)
<
Riastradh>
Second, '=' compares to values.
<
Riastradh>
s/to/two/1
<
Riastradh>
4 = 4 (* ==> true *)
<
Riastradh>
Third, I have to go now.
<
jlouis>
atom-z: = is comparison
<
jlouis>
you will need assignment
rzoz has joined #ocaml
<
atom-z>
jlouis: whats assignment?
<
jlouis>
in eg. C assignment is int x = 3;, in Pascal it is x := 3;, in SML it is x := 3 (and I think it is in Ocaml too)
<
jlouis>
in ocaml you can do: r := 1 or r.contents <- 1, depending on what you prefer
<
jlouis>
but it is not neat ocaml style
<
jlouis>
you would use recursion instead of looping
<
jlouis>
(iteration)
mattam has joined #ocaml
mattam_ has quit [Read error: 60 (Operation timed out)]
rzoz has quit ["Client Exiting"]
det has joined #ocaml