gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
ccasin has quit [Quit: Leaving]
valross has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
mfp has quit [Ping timeout: 245 seconds]
jakedouglas has joined #ocaml
mfp has joined #ocaml
valross has quit [Remote host closed the connection]
valross has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
_unK has quit [Remote host closed the connection]
jakedouglas has joined #ocaml
ulfdoz has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
ulfdoz has quit [Ping timeout: 240 seconds]
f[x] has joined #ocaml
oc13 has joined #ocaml
valross has quit [Remote host closed the connection]
gildor has quit [Ping timeout: 276 seconds]
gildor has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Quit: Yoric]
munga has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
seafood has quit [Quit: seafood]
Amorphous has quit [Ping timeout: 276 seconds]
ttamttam has joined #ocaml
ikaros has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ttamttam has joined #ocaml
Amorphous has joined #ocaml
Yoric has joined #ocaml
munga has quit [Ping timeout: 252 seconds]
rwmjones_afk has quit [Ping timeout: 245 seconds]
rwmjones_afk has joined #ocaml
lpereira has joined #ocaml
adrien has quit [Quit: leaving]
adrien has joined #ocaml
ftrvxmtrx has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
Axsuul has quit []
sepp2k has joined #ocaml
verte has joined #ocaml
verte has left #ocaml []
barismetin has joined #ocaml
munga has joined #ocaml
munga has quit [Ping timeout: 255 seconds]
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
yezariaely has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
munga has joined #ocaml
unenana has joined #ocaml
unenana has quit [Client Quit]
Yoric has joined #ocaml
munga has quit [Ping timeout: 245 seconds]
orbitz has quit [Ping timeout: 240 seconds]
lpereira has quit [Quit: Leaving.]
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
_unK has joined #ocaml
th5 has joined #ocaml
munga has joined #ocaml
munga has quit [Read error: Connection reset by peer]
mjonsson has quit [Remote host closed the connection]
joewilliams is now known as joewilliams_away
ccasin has joined #ocaml
th5 has quit [Quit: th5]
jakedouglas has joined #ocaml
seafood has joined #ocaml
avsm has joined #ocaml
ikaros has joined #ocaml
seafood has quit [Quit: seafood]
munga has joined #ocaml
Yoric_ has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
Yoric_ is now known as Yoric
ikaros has quit [Quit: Leave the magic to Houdini]
<yezariaely> yesterday I asked a question on type comparison which was not really well described. I try it again now:
ikaros has joined #ocaml
<yezariaely> If i have a type abc = a | b | c | ... I can differentiate using a match x with ... expression.
<yezariaely> is it possible to use a if expression instead of a match to compare to get to know if x is of type abc created with constructor a ?
<yezariaely> the intention is, that I have a large type and simply want to know if 1 constructor fits, and if not, then an exception is thrown.
<yezariaely> however this will produce a nested match for my code and I wanted to replace the inner match by a smaller and nicer readable "if" if possible
<yezariaely> to clarify: http://pastebin.com/Fd7ys3MR
<thelema> match a with T1 e when anotherfun e -> "good" | T1 _ -> failwith "bad"
<thelema> but that's not quite what you want
<thelema> if you want [ match a with T1 e -> (match anotherfun e with T1 _ -> good | _ -> bad)], there's no builtin shortcut
<thelema> you could do [ match a with T1 e when typeof e = TypeT1 -> "good" ]
<thelema> given a typeof function that converts from a discriminated union with arguments to one without
<thelema> but you'd have to write this (despite my occasional desires for this too)
ztfw has joined #ocaml
Yoric has quit [Quit: Yoric]
ikaros has quit [Quit: Leave the magic to Houdini]
barismetin has quit [Remote host closed the connection]
ftrvxmtrx has quit [Quit: Leaving]
init1 has joined #ocaml
ttamttam has quit [Remote host closed the connection]
ikaros has joined #ocaml
jonafan has joined #ocaml
nimred has quit [Quit: Lost terminal]
ulfdoz has joined #ocaml
sepp2k has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
fraggle_laptop has quit [Quit: Quitte]
ikaros has joined #ocaml
Yoric has joined #ocaml
nimred has joined #ocaml
ygrek has joined #ocaml
yezariaely has quit [Quit: Leaving.]
munga has quit [Ping timeout: 265 seconds]
joewilliams_away is now known as joewilliams
sepp2k has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
munga has joined #ocaml
<flux> hmph, this is most annoying
<flux> the results of my Lwt.pick [..] vary depending on the order of the values in the list
<flux> I suppose I need to reproduce that in a smaller test case to figure it out :)
ygrek has joined #ocaml
ulfdoz has quit [Ping timeout: 265 seconds]
ulfdoz has joined #ocaml
<flux> hmm, I think I'm having the followint pattern:
<flux> Lwt.pick [Lwt_mvar.take a; Lwt_mvar.take b] is waiting for stuff
<flux> both a and b get stuff
<flux> a gets woken b's taken value is discarded
<flux> so I would need to use npick, but that isn't quite the same.
<flux> and I wonder how to fix this.. still need to build a minimal test case first, I suppose.
<flux> but I did annotate lwt_mvar properly and I'm getting:
<flux> take:Mvar has no contents, blocking
<flux> put:stuff put in
<flux> take:cancelled
<flux> take:Mvar has no contents, blocking
<flux> (hmph, but that might be misleading)
joewilliams is now known as joewilliams_away
init1 has quit [Quit: Quitte]
<flux> I think I've got it: http://modeemi.fi/~flux/lwttest.ml - why doesn't this output C?
hcarty has quit [Read error: Connection reset by peer]
<diml> flux: when all threads are terminated, Lwt.pick choose one at random. Try to add Random.self_init () at the beginning of your program
easy4 has quit [Ping timeout: 252 seconds]
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
avsm has joined #ocaml
lpereira has joined #ocaml
hto has joined #ocaml
easy4 has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
oc13 has quit [Ping timeout: 265 seconds]
ftrvxmtrx has joined #ocaml
easy4 has quit [Ping timeout: 240 seconds]
sepp2k has quit [Quit: sepp2k]
ygrek has quit [Ping timeout: 245 seconds]
avsm has quit [Quit: Leaving.]
nagnatron has joined #ocaml
ztfw has quit [Remote host closed the connection]
ikaros has quit [Quit: Leave the magic to Houdini]
avsm has joined #ocaml
Yoric has quit [Quit: Yoric]
avsm has quit [Quit: Leaving.]
rossberg_ has quit [Ping timeout: 240 seconds]
ccasin has quit [Quit: Leaving]
ulfdoz has quit [Ping timeout: 240 seconds]
valross has joined #ocaml
seafood has joined #ocaml
mjonsson has joined #ocaml
easy4 has joined #ocaml
wuj has joined #ocaml
munga has quit [Ping timeout: 264 seconds]
orbitz has joined #ocaml
wuj has quit [Remote host closed the connection]
wuj has joined #ocaml
ftrvxmtrx has quit [Ping timeout: 255 seconds]
nagnatron has left #ocaml []
avsm has joined #ocaml
valross has quit [Remote host closed the connection]
ftrvxmtrx has joined #ocaml
wuj has quit [Read error: Connection reset by peer]