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!)
marmotine has quit [Read error: 110 (Connection timed out)]
LordMetroid has quit ["Leaving"]
Associat0r has quit []
hkBst has quit ["Konversation terminated!"]
Morphous has joined #ocaml
bzzbzz has quit [Read error: 110 (Connection timed out)]
Morphous_ has quit [Read error: 110 (Connection timed out)]
Ched- has quit [Read error: 110 (Connection timed out)]
Ched- has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
RobertFischer has joined #ocaml
<RobertFischer> Okay, I know that functional programmers like recursion, but this documentation (from Thread) is just ridiculous.
<RobertFischer> val wait_timed_read : Unix.file_descr -> float -> bool
<RobertFischer> See Thread.wait_timed_read.
johnnowak has quit []
johnnowak has joined #ocaml
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
RobertFischer has joined #ocaml
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
pattern has quit [Remote closed the connection]
pattern has joined #ocaml
Kopophex has quit ["Leaving"]
pango has quit [Remote closed the connection]
bluestorm has joined #ocaml
rwmjones has joined #ocaml
Tetsuo has joined #ocaml
pango has joined #ocaml
filp has joined #ocaml
jlouis has quit ["Leaving"]
johnnowak has quit []
Linktim has joined #ocaml
Yoric[DT] has joined #ocaml
Mr_Awesome has joined #ocaml
hkBst has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
LordMetroid has joined #ocaml
guillem has joined #ocaml
Linktim has joined #ocaml
ppsmimou has joined #ocaml
smimou has quit [Read error: 104 (Connection reset by peer)]
smimou has joined #ocaml
smimou has quit ["bli"]
coucou747 has joined #ocaml
smimou has joined #ocaml
LordMetroid has quit ["Leaving"]
OChameau has joined #ocaml
Jedai has joined #ocaml
rwmjones has quit ["Closed connection"]
rwmjones has joined #ocaml
gim has joined #ocaml
Snark has joined #ocaml
vbmithr has left #ocaml []
Associat0r has joined #ocaml
Linktim_ has joined #ocaml
<Yoric[DT]> Mmmhhh....
<Yoric[DT]> Performance question
<Yoric[DT]> In [match x with Bla _ as y -> y], I see that [y] doesn't have to have the same type as [x].
<Yoric[DT]> Does this mean that [as y] will cause a copy ?
<Yoric[DT]> Or that OCaml has produced some transparent type-cast?
<bluestorm> copy is quite unlikely in a reference-passing world
l_a_m has joined #ocaml
<Yoric[DT]> I'm just surprised by the fact that something which is a [match x with ... y -> y] produces an [y] with a type different from that of [x].
<Yoric[DT]> I *guess* there's no copy.
Linktim has quit [Read error: 110 (Connection timed out)]
<bluestorm> (function _ as y -> y) is 'a -> 'a
<bluestorm> i'd say you're doing some polymorphic-variant white magic
pango- has joined #ocaml
<bluestorm> and i'd except the strange behavior to be caused by the type system only, with no impact on the value representation
<Yoric[DT]> Except I'm not using a polymorphic variant, just a regular sum type.
<Yoric[DT]> Well, just surprised that some value may be an inhabitant of two distinct types without an Obj.magic...
<bluestorm> hmm
pango has quit [Remote closed the connection]
pango- is now known as pango
rby has joined #ocaml
<Yoric[DT]> Ok, patch for pa_monad contributed.
Associat0r has quit []
Associat0r has joined #ocaml
rwmjones_ has joined #ocaml
rwmjones has quit [Read error: 104 (Connection reset by peer)]
tomh has joined #ocaml
RobertFischer has joined #ocaml
RobertFischer has left #ocaml []
RobertFischer has joined #ocaml
seafood has quit [Connection reset by peer]
Associat0r has quit []
seafood has joined #ocaml
Associat0r has joined #ocaml
marmotine has joined #ocaml
<mfp> <Yoric[DT]> In [match x with Bla _ as y -> y], I see that [y] doesn't have to have the same type as [x]. -> you're getting this without polymorphic variants??
<Yoric[DT]> type ('a, 'b) either = Left of 'a | Right of 'b
<Yoric[DT]> fun x -> match x with Left l -> assert false | Right _ as y -> y
<Yoric[DT]> - : ('a, 'b) either -> ('c, 'b) either = <fun>
<mfp> interesting
<mfp> in the toplevel, the returned value is == to the original one
<Yoric[DT]> Not for me.
<Yoric[DT]> I just checked in my toplevel.
<Yoric[DT]> (and with the compiler)
<Yoric[DT]> 3.10.1
<mfp> 3.10.2 here
<Yoric[DT]> :/
<mfp> also physical equality with ocamlopt
<Yoric[DT]> Oh, you mean == .
<Yoric[DT]> (I thought this was just a shortcut :))
<mfp> yes, I really meant (==) :)
<Yoric[DT]> :)
<Yoric[DT]> Haven't tested that.
<Yoric[DT]> It's good.
<Yoric[DT]> Means that there's no copy.
<mfp> but huh what where you testing then?
<mfp> (since a == b implies a = b)
<Yoric[DT]> I was only testing typing issues.
<Yoric[DT]> Not physical equality.
<mfp> ah, you meant that the type differed
<mfp> I'm also seeing ('a, 'b) either -> ('c, 'b) either, with no copy
<mfp> (neither in the toplevel nor with ocamlopt)
seafood has quit []
<Yoric[DT]> All of this seems to mean that I can remove an optimization using Obj.magic from my code :)
seafood has joined #ocaml
Axioplase_ is now known as Axioplase
Associat0r has quit []
Associat0r has joined #ocaml
struk_atwork has joined #ocaml
struk_atwork is now known as structured
guillem has quit [Remote closed the connection]
<RobertFischer> How do you convert a char into a string?
<Yoric[DT]> In a weird manner.
<Yoric[DT]> String.make your_char 1
<orbitz> .create 1 chr
<orbitz> it's raelly gay
<Yoric[DT]> (iirc)
<RobertFischer> Excellent.
<Yoric[DT]> Ok, orbitz probably remembers better than I do.
<orbitz> Yoric[DT]: i think both functinos exist
<Yoric[DT]> It's less brain-dead with ExtLib.
<Yoric[DT]> (String.of_char)
<orbitz> yeah
<orbitz> the OCaml stdlib String module is a real let down IMO
<RobertFischer> orbitz: The standard library in general is a bit...sparse.
<RobertFischer> But that's why we have ExtLib and Core. :-)
<bluestorm> Extlib xor Core, actually
pango has quit [Remote closed the connection]
seafood has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
pango has joined #ocaml
rby_ has joined #ocaml
rby has quit [Read error: 110 (Connection timed out)]
rby has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
rwmjones_ has quit [clarke.freenode.net irc.freenode.net]
tsuyoshi has quit [clarke.freenode.net irc.freenode.net]
orbitz has quit [clarke.freenode.net irc.freenode.net]
svenl has quit [clarke.freenode.net irc.freenode.net]
cmeme has quit [clarke.freenode.net irc.freenode.net]
cmeme has joined #ocaml
orbitz has joined #ocaml
filp has quit ["Bye"]
rwmjones_ has joined #ocaml
tsuyoshi has joined #ocaml
svenl has joined #ocaml
rby_ has quit [Read error: 110 (Connection timed out)]
* coucou747 est un sodas
cpfr has left #ocaml []
rwmjones_ has quit ["Closed connection"]
guillem has joined #ocaml
OChameau has quit ["Leaving"]
filp has joined #ocaml
rwmjones has joined #ocaml
jeremiah has joined #ocaml
RobertFischer has quit ["Taking off -- check out http://smokejumperit.com and http://enfranchisedmind.com/blog/"]
Kopophex has joined #ocaml
asmanur_ has joined #ocaml
asmanur_ has quit [Client Quit]
johnnowak has joined #ocaml
Snark has quit ["Ex-Chat"]
Snrrrub has joined #ocaml
sporkmonger has joined #ocaml
sporkmonger has quit []
zarvok has joined #ocaml
zarvok has quit ["Leaving"]
Snrrrub has quit []
r0bby has quit [Remote closed the connection]
coucou747 has quit ["bye ca veut dire tchao en anglais"]
Linktim has joined #ocaml
Linktim_ has quit [Read error: 110 (Connection timed out)]
r0bby has joined #ocaml
marmotine has quit [Remote closed the connection]
Yoric[DT] has quit ["Ex-Chat"]
Jedai has quit [Read error: 113 (No route to host)]
LordMetroid has joined #ocaml
pattern has quit [Remote closed the connection]
filp has quit ["Bye"]
johnnowak has quit []
jlouis has joined #ocaml
Linktim has quit ["Quitte"]
pattern has joined #ocaml
<bluestorm> rwmjones: are you there ?
rwmjones has quit [Read error: 104 (Connection reset by peer)]
<bluestorm> .. guess that's an answer :p
bluestorm has quit ["Konversation terminated!"]
Tetsuo has quit ["Leaving"]
johnnowak has joined #ocaml
johnnowak has quit [Client Quit]
guillem has quit [Remote closed the connection]
hkBst has quit ["Konversation terminated!"]
LordMetroid has quit [Connection timed out]