smimou changed the topic of #ocaml to: OCaml 3.08.3 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/
Skal_ has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
<TheDracle> tyler_: You can define it the way you were if you use it later in a way that allows it to infer the type of the list.
<TheDracle> Wait.. Maybe not with ref though..
<TheDracle> Nah, it works fine with ref :P
<mlh> anyone here use osiris? i'm just recompiling with cygwin ocaml, using the line recommended in the README.txt :
<mlh> ocamlc -dllib -lwin32 -I win32 -a win32/win32.cma mtlib.mli mtlib.ml osiris.mli osiris.ml -o osiris.cma
<mlh> and getting: win32/win32.cmi is not a compiled interface
<TheDracle> Does win32.cmi exist?
<mlh> yes, win32/win32.cmi
<TheDracle> Hm, is there a win32.mli anywhere?
<mlh> no
<TheDracle> Where did you get win32.cmi from?
<TheDracle> Is this iny our osiris package?
<mlh> it was all in the download
humasect has quit [Read error: 54 (Connection reset by peer)]
humasect_ has joined #ocaml
<TheDracle> mlh: Ookay :P I think it's complaining because it doesn't like the format of that cmi file.
<TheDracle> Probably made by a different version of ocamlc.
<mlh> ah. yes, it was 3.06, i'm using 3.08.1
<TheDracle> Is there like, a makefile or something that will let you rebuilt the package using your ocamlc?
humasect has joined #ocaml
humasect_ has quit [Read error: 54 (Connection reset by peer)]
<mlh> ah never mind, there is a source dist i can d/l. back later.
<TheDracle> mlh: Heh, good luck :)
Skal_ has quit ["Client exiting"]
_fab has quit [Remote closed the connection]
znutar has quit [Read error: 60 (Operation timed out)]
<mlh> :-) well it needs visual c++, so i might d/l the free cli version sometime and have a go
shingoki has joined #ocaml
<shingoki> Can someone point me to an explanation of the "in" keyword?
<Riastradh> It's part of the 'let' syntax.
<shingoki> yes but what does it do?
<Riastradh> It doesn't do anything itself except delimit the binding from the body.
<shingoki> so if you use in, the thing you are letting only exists until a ;; ?
<shingoki> or something like that?
<Riastradh> Until the end of the let, whether that be the end of a top-level form, the end of a begin/end, or a double-semicolon at the REPL.
<shingoki> ok, I don't understand all that but I see the point now :)
<shingoki> so it just lets you define your own scope
<shingoki> Seems like there is a lot to ocaml :)
<shingoki> like this tutorial I'm reading is nice, but I don't think he really understands what ; does, and I'm not that sure I do either
<Riastradh> Semicolons separate two items in a sequence (begin/end block, let body, &c.).
<shingoki> Seems that it is an operator that is there to make sure the next expression is evaluated, and then just returns that next expression
<shingoki> well yeah that's WHERE they are, but it's not WHAT they are
<shingoki> Well, AFAICT :)
<Riastradh> You shouldn't worry about double-semicolons, though; you just write them at the end of an input at the REPL.
<Riastradh> Semicolons are item separators in sequences. Better?
* Riastradh ducks.
<shingoki> hell if I know :)
<shingoki> well there was an explanationand I think I got it
<shingoki> its like, in a+b+c, a b and c are all evaluated
<shingoki> and you get the sum
<Riastradh> So if you write:
<Riastradh> begin
<Riastradh> foo bar baz
<Riastradh> quux zot mumble
<Riastradh> end
<shingoki> in a;b;c a b and c are all evaluated and you get c
<Riastradh> That looks to OCaml like one big function call, the same as 'foo bar baz quux zot mumble'.
<shingoki> yup
<Riastradh> However,
<Riastradh> begin
<Riastradh> foo bar baz;
<Riastradh> quux zot mumble
<Riastradh> end
<Riastradh> is a sequence of two function calls.
<shingoki> yup
<shingoki> but it seems that what actually happens is
<shingoki> that ocaml wants to evaluate foo bar bas;quux zot mumble
<shingoki> so it evaluates the first bit, then ";" is an operator that makes it evaluate the second bit, and throw away the first bit, and return the second bit
<shingoki> but I could be completely wrong
<Riastradh> Yes, you can think of it that way, but it's not quite the same. ; is special syntax in OCaml due to evaluation rules.
<Riastradh> (In SML, ; actually is just an operator that returns the value of its second argument.)
<shingoki> ok
<shingoki> but not in ocaml?
<shingoki> why is it different?
<Riastradh> SML's order of argument evaluation is strictly specified.
<Riastradh> OCaml's is not.
<shingoki> arguments to functions?
<Riastradh> So with OCaml 'f g' could evaluate f or g first, while with SML it would evaluate f and then g.
<Riastradh> This extends similarly to tuples & operators.
<shingoki> not quite following you :)
<shingoki> you mean that if you have multiple arguments to a function they may be evaluated in any order?
<Riastradh> Yes.
<shingoki> is that not a bit evil?
<Riastradh> Writing function calls that depend on an order of evaluation is not encouraged by the functional paradigm.
<Riastradh> I never do it: I _always_ lift out any such dependencies int lets and comment them.
<shingoki> Yeah I can't imagine a good reason to assume that there is a given order
<shingoki> just seems like it might be a good idea to have a fixed order :)
<shingoki> I suppose if you make it random you keep people honest :)
<shingoki> I think I have ; and in sorted out now
<shingoki> I don't quite get ;; though
<Riastradh> There's a big flame war going on about it on comp.lang.scheme right now.
<Riastradh> ;; is just for ending inputs at the REPL (the interactive evaluator).
<shingoki> but it is also used in programs in files?
<Riastradh> It can be, but it usually isn't.
<shingoki> right
<shingoki> so it tells the interactive mode to go and do stuff
<shingoki> I have to say ocaml looks great so far, seems to have a hell of a lot of stuff that I've been trying to do in other languages
<shingoki> but it's weird that I've never run into it anywhere :)
zzorn has quit ["They are coming to take me away, ha ha"]
tsume_ is now known as Guilmon
<shingoki> Well thanks for help
shingoki has quit ["Leaving"]
Guilmon is now known as tsume
mr_pengy has joined #ocaml
jewel has joined #ocaml
tyler_ has quit ["leaving"]
mr_pengy has quit [Remote closed the connection]
tintin has joined #ocaml
mlh has quit ["brb"]
mlh has joined #ocaml
vezenchio has quit ["I live in a yurt on the steppes of Sheepfuckistan. That's why."]
vezenchio has joined #ocaml
monochrom has quit ["me!"]
zzorn has joined #ocaml
Snark has joined #ocaml
clog has joined #ocaml
Submarine has joined #ocaml
Skal has joined #ocaml
smimou has joined #ocaml
ejt has quit [Read error: 60 (Operation timed out)]
smimram has joined #ocaml
smimou has quit [Read error: 60 (Operation timed out)]
mrvn has joined #ocaml
ejt has joined #ocaml
mellum has quit [Read error: 60 (Operation timed out)]
mrvn_ has quit [Read error: 110 (Connection timed out)]
jewel has quit [Read error: 110 (Connection timed out)]
mellum has joined #ocaml
Submarine has quit ["Leaving"]
mrvn_ has joined #ocaml
mrvn has quit [Read error: 60 (Operation timed out)]
CosmicRay has joined #ocaml
julbouln has joined #ocaml
nocte has left #ocaml []
|Lupin| has joined #ocaml
<|Lupin|> Hello
<julbouln> hi
cognominal has quit [Remote closed the connection]
cognominal has joined #ocaml
__DL__ has quit ["Bye Bye"]
__DL__ has joined #ocaml
<|Lupin|> Folks, what do you think about type classes ?
<|Lupin|> Do yo think it would be great to have this in Caml, ornot ?
<ejt> that's a vague question
<|Lupin|> ejt: How could it be more precise ?
<Nutssh> Type inference is rather nice.
<|Lupin|> Nutssh: is there a link ?
<|Lupin|> Nutssh: with type classes, I mean ?
CosmicRay has quit ["Leaving"]
<Nutssh> You're not really asking an exact question.
<|Lupin|> Nutssh: I just would like to know what the opinion of Caml programmers about type classes is.
_JusSx_ has joined #ocaml
<Nutssh> They have advantages and disadvantages.
Submarine has joined #ocaml
|Lupin| has left #ocaml []
vezenchio has quit ["\o/ http://wats.mainia.de/norse.jpg \o/"]
CosmicRay has joined #ocaml
<vincenz> "typeclasses are very nice, however they do not fit well with the module system and afaik they defer some things to runtime
vdrab has joined #ocaml
yangsx has joined #ocaml
<yangsx> anybody active?
<ejt> y
tintin has quit [Read error: 110 (Connection timed out)]
tintin has joined #ocaml
<yangsx> ejt: have you noticed the discussion on caml-list about the garden layout problem?
<ejt> I don't watch the list, but I saw the slashdot article
<yangsx> OK. I joined the discussion. The thing is I found the ocaml version performs far better than the c++ version, but nobody checks that point
<ejt> people did check it
<ejt> I know people on this list were quoting times in the order of 15 seconds
<ejt> s/list/channel
<yangsx> nobody confirms my results. The problem is I tried the experiments on two different machines and still get similar results
<yangsx> which says that the ocaml version performs far better than the c++ version when the arguments get larger, say 8x8
yangsx has quit [Remote closed the connection]
gl` has joined #ocaml
Skal has quit ["Client exiting"]
julbouln has quit ["Leaving"]
<svenl> /win 20
<gl`> echec
<smimram> hum
__DL__ has quit [Remote closed the connection]
__DL__ has joined #ocaml
<Submarine> Salut Rémy
Submarine has quit ["Leaving"]
pango has joined #ocaml
pjb has joined #ocaml
pjb has left #ocaml []
Submarine has joined #ocaml
gl has joined #ocaml
svenl has quit [Read error: 60 (Operation timed out)]
mflux has quit [sterling.freenode.net irc.freenode.net]
svenl has joined #ocaml
mflux has joined #ocaml
pango has quit ["Leaving"]
pango has joined #ocaml
kisu has joined #ocaml
gim has joined #ocaml
Snark has joined #ocaml
Herrchen has quit ["bye"]
zzorn is now known as zzorn_afk
Snark has quit ["Leaving"]
humasect has quit [Read error: 104 (Connection reset by peer)]
humasect has joined #ocaml
CosmicRay has quit ["Client exiting"]
joey_ has joined #ocaml
fludd has left #ocaml []
kisu has quit [Connection timed out]
CosmicRay has joined #ocaml
zzorn_afk has quit ["They are coming to take me away, ha ha"]
gim has quit []
KrispyKringle has left #ocaml []
CosmicRay has left #ocaml []
dan2_ has joined #ocaml
gim has joined #ocaml