flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
threeve has joined #ocaml
threeve has quit [Client Quit]
Associat0r has quit []
jeddhaberstro has quit []
SanguineV has joined #ocaml
keram has joined #ocaml
<keram> hello
<keram> how do i include OptParse?
tar_ has joined #ocaml
Ched- has quit [Read error: 110 (Connection timed out)]
Ched- has joined #ocaml
tar_ has quit ["byebye"]
det has quit [Remote closed the connection]
nuncanada has quit [Remote closed the connection]
threeve has joined #ocaml
<thelema> keram: two stages: 1) source level - use OptParse.<identifier> in your code, or just <identifier> if you do [open OptParse]
<thelema> 2) compilation - easiest is to have optparse in current dir, otherwise -I /path/to/optParse.ml*
threeve has quit []
mfp has quit [Read error: 104 (Connection reset by peer)]
mfp has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
mishok13 has joined #ocaml
banmefruitcakes has joined #ocaml
<banmefruitcakes> i would like a ban
banmefruitcakes has quit [Client Quit]
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
filp has joined #ocaml
filp has quit ["Bye"]
mfp has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
mfp has joined #ocaml
bluestorm has joined #ocaml
bluestorm has quit [Client Quit]
mfp has quit [Read error: 104 (Connection reset by peer)]
mfp has joined #ocaml
cads has joined #ocaml
det has joined #ocaml
damg has joined #ocaml
OChameau has joined #ocaml
marmotine has joined #ocaml
seafood has joined #ocaml
marmotine has quit [zelazny.freenode.net irc.freenode.net]
SanguineV has quit [zelazny.freenode.net irc.freenode.net]
Eridius has quit [zelazny.freenode.net irc.freenode.net]
Smerdyakov has quit [zelazny.freenode.net irc.freenode.net]
cmeme has quit [zelazny.freenode.net irc.freenode.net]
marmotine has joined #ocaml
SanguineV has joined #ocaml
Eridius has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
Palace_Chan has quit ["Leaving"]
marmotine has quit [zelazny.freenode.net irc.freenode.net]
Smerdyakov has quit [zelazny.freenode.net irc.freenode.net]
cmeme has quit [zelazny.freenode.net irc.freenode.net]
SanguineV has quit [zelazny.freenode.net irc.freenode.net]
Eridius has quit [zelazny.freenode.net irc.freenode.net]
vpalle has joined #ocaml
marmotine has joined #ocaml
SanguineV has joined #ocaml
Eridius has joined #ocaml
Smerdyakov has joined #ocaml
cmeme has joined #ocaml
seafood has quit [Read error: 60 (Operation timed out)]
mfp has quit [Read error: 104 (Connection reset by peer)]
maattd1 has joined #ocaml
seafood has joined #ocaml
petchema_ has quit [Remote closed the connection]
mfp has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
mfp has joined #ocaml
mfp has quit [Read error: 104 (Connection reset by peer)]
petchema has joined #ocaml
mfp has joined #ocaml
Asmadeus has joined #ocaml
damg has quit ["ChatZilla 0.9.75.1 [SeaMonkey 1.1.7/2007112810]"]
seafood has quit []
seafood has joined #ocaml
seafood has quit [Client Quit]
asmanur has joined #ocaml
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
asmanur has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Linktim_ has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
kig has joined #ocaml
struktured has joined #ocaml
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Asmadeus_ has joined #ocaml
Asmadeus has quit [Nick collision from services.]
Asmadeus_ is now known as Asmadeus
vpalle has quit [Read error: 110 (Connection timed out)]
Linktim has quit [Read error: 113 (No route to host)]
mfp has quit [Read error: 104 (Connection reset by peer)]
struktured_ has joined #ocaml
struktured has quit [Connection reset by peer]
sporkmonger has joined #ocaml
mfp has joined #ocaml
Snark_ has joined #ocaml
Associat0r has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Linktim_ has quit [Read error: 113 (No route to host)]
struktured_ has quit [Read error: 110 (Connection timed out)]
Proteus has joined #ocaml
seafood has quit []
Linktim has joined #ocaml
vpalle has joined #ocaml
maattd1 has left #ocaml []
Myoma has quit ["Leaving"]
Myoma has joined #ocaml
munga_ has quit ["Leaving"]
mishok13 has quit [Read error: 145 (Connection timed out)]
Proteus_ has joined #ocaml
Proteus has quit [Connection reset by peer]
vpalle has quit ["Leaving"]
threeve has joined #ocaml
sporkmonger_ has joined #ocaml
mfp has quit [Read error: 110 (Connection timed out)]
mfp has joined #ocaml
marmotine has quit ["mv marmotine Laurie"]
pango_ has quit [Remote closed the connection]
sporkmonger has quit [Read error: 110 (Connection timed out)]
longh has joined #ocaml
Linktim_ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
pango_ has joined #ocaml
Jedai has quit ["KVIrc 3.2.4 Anomalies http://www.kvirc.net/"]
Jedai has joined #ocaml
jlouis has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
Linktim has joined #ocaml
Linktim has quit [Client Quit]
pantsd has quit [Read error: 104 (Connection reset by peer)]
Linktim has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
bluestorm has joined #ocaml
Amorphous has joined #ocaml
Palace_Chan has joined #ocaml
Myoma has quit ["Leaving"]
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
CoryDambach has left #ocaml []
tomh_-_ has joined #ocaml
OChameau has quit [Read error: 113 (No route to host)]
Proteus_ has quit [Read error: 113 (No route to host)]
Jedai has quit [Connection timed out]
Jedai has joined #ocaml
Snark_ has quit ["Ex-Chat"]
Asmadeus has quit ["cya !"]
Kopophex has joined #ocaml
ygrek has quit [Remote closed the connection]
itewsh has joined #ocaml
hkBst has joined #ocaml
amt2 has joined #ocaml
longh has quit [Client Quit]
amt2 has quit ["Ex-Chat"]
Linktim has quit ["Quitte"]
gaja has joined #ocaml
pango_ has quit [Remote closed the connection]
pango_ has joined #ocaml
<Palace_Chan> what does (1 lsl n) mean ?
<Palace_Chan> is lsl something in ocaml ?
<kig> logical shift left
<kig> 1 << n in C
<Palace_Chan> kig, ah so lsr and asr are logical and arithmetic shifts right ?
<bluestorm> yes they are
sporkmonger has joined #ocaml
sporkmonger has quit [Client Quit]
cads has quit ["Leaving."]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
kg4qxk has joined #ocaml
sporkmonger_ has quit [Read error: 110 (Connection timed out)]
threeve has quit []
seafood has joined #ocaml
jeremiah has joined #ocaml
Myoma has joined #ocaml
sporkmonger has joined #ocaml
<Palace_Chan> if i receive an argument x of type int * int how can i grab the first element of the tuple or the second ? do i have to add a: match x with (first,last) ?
<kig> let (a,b) = x in
<kig> there's also fst x and snd x
<kig> you can also write e.g. let multiplyTuple (a,b) = a * b
<Palace_Chan> if i do let (a,b) = x in then subsequently a will contain the first element of the tuple and b the second ?
<kig> yes
<Palace_Chan> ah, thanks, that is simpler than having to nest a match
<pango_> and also write arguments list as f ... ((first, last) as x) ... instead of just x
<Palace_Chan> pango_, ? what about f (x: int * int)(anotherarg: itstype)....
<pango_> ((first, last) as x: int * int), etc. should do, if you really want such type annotations
<bluestorm> do you really need the type annotations ?
fbotelho has joined #ocaml
<Palace_Chan> pango_, oh wait i think i get the syntax, it would be for example: f (type as x) (type2 as y)...
<Palace_Chan> to write argument lists that is
itewsh has quit ["KTHXBYE"]
<bluestorm> it's not the type you put there
<bluestorm> it's a pattern
<bluestorm> (pattern as name) match the parameter with the pattern, but also bind it to the name
gaja has quit ["Lost terminal"]
<bluestorm> let f ((x, y) as couple) : if you call f (1, 2) you'll have x -> 1, y -> 2, couple -> (1, 2)
<bluestorm> you could also do let f couple = let (x, y) = couple in ....
<bluestorm> if you want to specify a type for your argument's, it's (parameter : type) : let foo (n : int) = n , you can combine them into eg. ((first, last) as x : int * int)
<bluestorm> however, giving the type here is not very elegant and imho a bad decision in most situations
<Eridius> it's useful when you're using the object system
<bluestorm> that's a different matter
<Eridius> after all, you don't want a val foo : < size : int; .. > -> int = <fun>
<bluestorm> it's also useful when the type system fails somewhere deep down in your code and you have to debug that
<bluestorm> (but it's *not* so useful for documentation when your code gets big : there are .mli files for that purpose)
<Palace_Chan> the type inference system can fail ? wow that mus be hard to debug
<bluestorm> hm
<bluestorm> i said it wrong
<bluestorm> sometimes you fail, and the type inference system spot it
<Palace_Chan> oh oko
<bluestorm> you've got something like "this value has type .... but is used with type ...." and you're like "o_O what the hell ?"
<bluestorm> because you _know_ it is the correct type at this place, and of course the error message doesn't make sense
<Eridius> because the type inference system picked up the wrong type for it based on your error
<bluestorm> usually it's because you use your value as a parameter of a function that was coded wrong before in your code, and you didn't noticed that
<Eridius> like maybe it takes an int arg and does lots of math with it, but the very first thing it does is accidentally uses a floating point operation, now it thinks it's supposed to be given a float
<bluestorm> (wrong code -> wrong use -> wrong type inferred)
<Eridius> once you annotate it as an int, then it can point out where you accidentally treated it as a float
Proteus has joined #ocaml
<Palace_Chan> i see
<bluestorm> well, as Yoric would probably said (seems he's at IFL, sleeping with Haskellites probably), "it's time to call it a night"
bluestorm has quit [Remote closed the connection]
struktured has joined #ocaml
takuya has joined #ocaml
seafood has quit [Read error: 60 (Operation timed out)]
rwmjones_ has joined #ocaml
Proteus has quit ["Leaving"]
takuya has left #ocaml []
rwmjones_ has quit ["Closed connection"]
jlouis has quit ["Leaving"]
lde has quit [Read error: 113 (No route to host)]
Kopophex has quit ["Leaving"]
struktured_ has joined #ocaml
struktured has quit [Read error: 110 (Connection timed out)]
struktured_ has quit ["Konversation terminated!"]
<Palace_Chan> if a function declaration in a signature is: val f : type->type...
<Palace_Chan> how do i declare a type declaration in a signature ?
tomh_-_ has quit ["http://www.mibbit.com ajax IRC Client"]
gaja has joined #ocaml
struktured has joined #ocaml
threeve has joined #ocaml