flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
Associat0r has joined #ocaml
Associat0r has quit [Remote closed the connection]
xahlee has joined #ocaml
<xahlee> what's wrong with this? let m = (3,4) in match m with (3 as x, 4 as y) -> (x + y, x - y);;
<mrvn> precedence
<hcarty> xahlee: match m with (x, y) when x = 3 && y = 4-> x + y
<mrvn> let m = (3,4) in match m with ((3 as x), (4 as y)) -> (x + y, x - y);;
<hcarty> Or that!
<brendan> ocaml precedence is sometimes nonintuitive)
<xahlee> am learning the keyword "as". I didn't understand, in this case match (3,4) with (3 , (4 as y)) -> y;; why should the y be grouped?
<mrvn> Because , binds stronger than as
<xahlee> if not grouped, y becomes ((3,4),4) apparently
<mrvn> no, without () is is with ((3, 4) as y)
<xahlee> oh.
<xahlee> humm.... thx.
jeanbon has quit [Read error: 110 (Connection timed out)]
<xahlee> mrvn: why is (3,4 as y) equivalent to ((3,4) as y) ? is that just ocaml quirk?
<mrvn> because , is stronger than as in the grammar
<xahlee> oic
<mrvn> The () in (3,4) are purely for readability
<xahlee> oh. lol.
<mrvn> match m with 3,4 as y -> ... is just as valid.
<xahlee> so n-tuples is really just a, b, c without parens, in some sense?
<mrvn> exactly.
<xahlee> umm. interesting.
<mrvn> I always use () though for readability.
<xahlee> ic
jober has joined #ocaml
Ppjet6 has quit ["leaving"]
Delemas has quit ["Leaving"]
hkBst has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
slash_ has quit ["leaving"]
jlouis has quit [Remote closed the connection]
Associat0r has joined #ocaml
jlouis has joined #ocaml
jober has left #ocaml []
Associat0r has quit []
schmx has quit [Read error: 110 (Connection timed out)]
thelema_ has joined #ocaml
xahlee has quit ["banned in #emacs by johnsu01 (john sullivan)"]
rhar has quit [Read error: 110 (Connection timed out)]
Mr_Awesome has joined #ocaml
rhar has joined #ocaml
rhar has quit ["Leaving"]
ched__ has joined #ocaml
ched_ has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
seafood has quit []
seafood has joined #ocaml
Mr_Awesome has quit [Remote closed the connection]
Mr_Awesome has joined #ocaml
tarbo2 has quit [Read error: 104 (Connection reset by peer)]
tarbo2 has joined #ocaml
mfp_ has joined #ocaml
mfp has quit [Read error: 110 (Connection timed out)]
rhar has joined #ocaml
verte has joined #ocaml
kaustuv_ has quit [Read error: 113 (No route to host)]
Camarade_Tux has joined #ocaml
rhar has quit ["Leaving"]
ulfdoz has quit [Remote closed the connection]
ulfdoz has joined #ocaml
Snark has joined #ocaml
seafood has quit []
jeanbon has joined #ocaml
smimou has joined #ocaml
hkBst has joined #ocaml
marmottine has joined #ocaml
Alpounet has joined #ocaml
jeanbon has quit ["J'y trouve un goût d'pomme."]
mfp_ is now known as mfp
<Alpounet> hi
_zack has joined #ocaml
smimram has joined #ocaml
Alpounet has quit [Remote closed the connection]
smimou has quit [Read error: 110 (Connection timed out)]
<Snark> http://glondu.net/debian/ocaml_transition_monitor.html <- no ocaml-batteries-included in sight
seafood has joined #ocaml
<Camarade_Tux> seems normal if it's "transition", nothing prevents batteries from being added later imho
<Snark> hmmm... it is uninstallable now
<Snark> I found they have a channel elsewhere... I'm asking there
<mfp> Snark: "they"? are you referring to batteries or debian-ocaml?
<mfp> -> Public IRC channel: #debian-ocaml on irc.debian.org (OFTC)
<mfp> (don't see why they cannot use this very channel, not like there's too much traffic)
seafood has quit []
slash_ has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
<Snark> mfp, I was referring to debian-ocaml
<Snark> well, they have their own channel anyway... and I'm pretty sure they come here too :-)
jeanbon has joined #ocaml
hastake has joined #ocaml
hastake_ has quit [Read error: 101 (Network is unreachable)]
jlouis has quit ["Lost terminal"]
elena has quit [Remote closed the connection]
jeanbon has quit ["J'y trouve un goût d'pomme."]
_zack has joined #ocaml
jeanbon has joined #ocaml
ttamttam has joined #ocaml
Yoric[DT] has joined #ocaml
itewsh has joined #ocaml
jeanbon has quit ["J'y trouve un goût d'pomme."]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
gim has quit [Read error: 110 (Connection timed out)]
* mfp finds yet another stdlib replacement in OMake's sources
<mfp> by Jason Hickey et al.
<mfp> Yoric[DT]: maybe something of use for batteries here > http://svn.metaprl.org/svnroot/mojave/libmojave/
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
jlouis has joined #ocaml
hastake has quit [Read error: 101 (Network is unreachable)]
|jedai| is now known as jedai
jeanbon has joined #ocaml
hastake has joined #ocaml
jlouis has quit ["bbl"]
_zack has left #ocaml []
verte has quit ["http://coyotos.org/"]
Smerdyakov has joined #ocaml
m1chi has joined #ocaml
<m1chi> Hi there !
delamarche has joined #ocaml
itewsh has joined #ocaml
Camarade_Tux_ has joined #ocaml
Camarade_Tux has quit [Read error: 110 (Connection timed out)]
jeanb-- has joined #ocaml
ttamttam has left #ocaml []
jeanbon has quit [Read error: 110 (Connection timed out)]
jeanb-- is now known as chickenzilla
maskd has quit [Read error: 113 (No route to host)]
psnively has joined #ocaml
<kmkaplan> Documentation for Random.int looks bogus.
psnively has left #ocaml []
jlouis has joined #ocaml
Snark has quit ["Ex-Chat"]
ched__ has quit [Remote closed the connection]
seafood has joined #ocaml
Ched has joined #ocaml
<Yoric[DT]> kmkaplan: any suggestion?
<kmkaplan> Yoric[DT]: Oh man... In my browser the "^30" is nearly invisible.
<kmkaplan> So I just read: "bound must be greater than 0 and less than 2."
<Yoric[DT]> Indeed.
* Yoric[DT] will take a look at the css.
<kmkaplan> Cool.
<Yoric[DT]> Ah, I see that we've already done something to fix this in Batteries.
schme has joined #ocaml
<Yoric[DT]> Superscript font is 8pt in Batteries' doc, instead of 4pt in original doc.
<Yoric[DT]> Should make things readable.
<Yoric[DT]> mrvn: what's libmojave?
<kmkaplan> Yoric[DT]: ah right. In the batteries doc it is indeed easily readable.
marmottine has quit ["mv marmotine Laurie"]
<mfp> Yoric[DT]: libmojave seems to be yet another stdlib, used internally in OMake
<Yoric[DT]> ok
m1chi has quit ["Chatzilla 0.9.75.1 [SeaMonkey 1.1.13/0000000000]"]
* Yoric[DT] will need to take a deeper look one of these days.
jlouis has quit ["lamergamery"]
xahlee has joined #ocaml
<xahlee> when i use a var in a pattern, like “x”, does ocaml actually compile it to “_ as x”
<xahlee> what am trying to say, is that if a var in pattern is just a sugar syntax?
<mrvn> I believe _ as x getscompiled to x
<xahlee> humm.
<mrvn> _ is just a special x that gets thrown away by the way.
<xahlee> ic.
<mrvn> let _ = 1 + 1
<mrvn> not match specific.
* mrvn hates circular dependencies.
<mrvn> I really wish ocaml would allow foo.ml to depend on bla.mli and bla.ml to depend on foo.mli.
<xahlee> mli is compiled ml?
<mrvn> mli is the public interface for a module
<Yoric[DT]> mrvn: yeah.
<xahlee> humm. ok. Lots learning to do yet here.
<Yoric[DT]> That's where we need loooots of rewriting in Batteries.
<mrvn> xahlee: If you don't have an .mli file then everything in the .ml file is public. If you want to hide parts of it then you need to write an .mli file that skips those parts. You can create an .mli file by running 'ocamlc -i foo.ml >foo.mli' and then alter it.
<xahlee> ic. interesting.
<xahlee> i learned that name patterns cannot repeat. What would be a normal way to do this:
<xahlee> let d = (3, 3, 4) in match d with ( a, a, c ) -> (a, c);;
<mrvn> xahlee: bad form. a shadows a
<mrvn> (a, b, c) when a = b
<xahlee> ah ok.
<mrvn> Strictly speaking would one have to add the GPL preamble and copyright info to every patch one sends out?
<mrvn> ups
Yoric[DT] has quit ["Ex-Chat"]