asmanur has quit [Remote closed the connection]
malodios is now known as diosmalo
diosmalo is now known as diosmalo08
yminsky has joined #ocaml
yminsky has quit []
bluestorm has quit ["Konversation terminated!"]
thermoplyae has joined #ocaml
nuncanada has joined #ocaml
nuncanada has quit [Read error: 104 (Connection reset by peer)]
buluca has joined #ocaml
mattc58 has joined #ocaml
jlouis has joined #ocaml
mattc58 has quit [Client Quit]
jlouis_ has quit [Read error: 110 (Connection timed out)]
pattern has quit [Remote closed the connection]
pattern has joined #ocaml
zenhacker-rouan has joined #ocaml
<
zenhacker-rouan>
hi everyone
<
zenhacker-rouan>
i was wondering how can i display an exn exception's message
<
thermoplyae>
something like Printexc.to_string
kelaouch1 has quit [Remote closed the connection]
<
thermoplyae>
might be a more direct way, i'm not familiar with the module, just happened to have seen the line recently
<
zenhacker-rouan>
thnx
<
zenhacker-rouan>
i will give it a try
<
zenhacker-rouan>
thermoplyae: thnx, that did the trick
asmanur has joined #ocaml
buluca has quit [Read error: 113 (No route to host)]
ygrek has joined #ocaml
Associat0r has quit []
thermoplyae has quit ["daddy's in space"]
Demitar has joined #ocaml
bluestorm has joined #ocaml
zmdkrbou has quit [Read error: 110 (Connection timed out)]
ceztko has joined #ocaml
zmdkrbou has joined #ocaml
<
ceztko>
(happy new year)
<
ceztko>
a question, suppose i have this type: "(exp*exp) list" . Can i obtain two "exp list"(s) with pattern matching?
<
pango>
see List.split implementation in the standard lib...
<
ceztko>
ok, so there's no O(1) way to obtain this, right?
<
pango>
no, it's O(n)
<
pango>
btw their implementation is a bit naive (no tail-rec calls)
<
bluestorm>
hm pango
<
bluestorm>
if the order preservation is important
<
bluestorm>
would you prefer tailrec + List.rev over naïve impl. ?
<
pango>
so it's only for lists under a few tenths of thousands elements
<
pango>
naive implementation is more readable, and possibly slightly faster, when it works
<
pango>
so both ways have their merits
<
bluestorm>
last time i tested it, the difference was huge
<
bluestorm>
(not quite +100% but still..)
Morphous has joined #ocaml
Yoric[DT] has joined #ocaml
* ceztko
sta ascoltando - - (X«Amarok)
Amorphous has quit [Read error: 110 (Connection timed out)]
Morphous has quit ["shutdown"]
Amorphous has joined #ocaml
<
pango>
non tailrec seems to be 30~35% faster (compiled in native, 32 bits)
<
pango>
over the whole range of lists lengths it can handle
<
pango>
mmmh it may also depend on how you tweak the GC...
zmdkrbou has quit [Read error: 110 (Connection timed out)]
<
pango>
and indeed over 100% faster in bytecode, specially for small lists which can be several times faster
<
pango>
s/small/very small/ (< 10 elmts)
zmdkrbou has joined #ocaml
FZ has quit [Read error: 104 (Connection reset by peer)]
asmanur is now known as asma
ceztko has quit ["Sto andando via"]
Associat0r has joined #ocaml
<
flux>
Extlib uses dirty tricks to do for example List.map in a tail-recursive fashion
<
flux>
but I suppose it's ok, because it'll be under the hoods :)
<
flux>
(dirty trick in question is using mutable lists which are binary compatible with ocaml lists..)
<
flux>
and I can't see a situation where it would hurt for example parallelism, because the return value cannot be seen before the function exits
<
flux>
linear types would be nice, for such a list you would be able to provide safe coercion into standard lists
<
flux>
(for such a mutable linearly typed list)
asma has quit [Remote closed the connection]
asmanur has joined #ocaml
richardw has left #ocaml []
FZ has joined #ocaml
buluca has joined #ocaml
hkBst has joined #ocaml
yminsky has joined #ocaml
jedai has joined #ocaml
yminsky has quit []
pango has quit [Remote closed the connection]
filp has joined #ocaml
pango has joined #ocaml
Morphous has joined #ocaml
Morphous_ has joined #ocaml
Amorphous has quit [Nick collision from services.]
Morphous_ has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
Morphous has quit [Connection timed out]
FZ has quit ["ChatZilla 0.9.78.1 [Firefox 2.0.0.11/2007112718]"]
filp has quit ["Bye"]
jlouis_ has joined #ocaml
jlouis has quit [Read error: 110 (Connection timed out)]
hkBst has quit [Read error: 104 (Connection reset by peer)]
hkBst has joined #ocaml
yminsky has joined #ocaml
leo037 has joined #ocaml
yminsky has quit []
gim has joined #ocaml
Associat0r has quit []
Associat0r has joined #ocaml
robyonrails has joined #ocaml
asmanur has quit [Remote closed the connection]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
thermoplyae has joined #ocaml
mordaunt has joined #ocaml
robyonrails has quit ["Leaving"]
ygrek has quit [Remote closed the connection]
jnkm has quit ["reboot"]
thermoplyae has quit [Remote closed the connection]
thermoplyae has joined #ocaml
leo037 has quit [Read error: 113 (No route to host)]
leo037 has joined #ocaml
jnkm has joined #ocaml
smimou has joined #ocaml
jlouis has joined #ocaml
yminsky has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
rillig has joined #ocaml
rillig has left #ocaml []
Yoric[DT] has quit ["Ex-Chat"]
buluca has quit [Read error: 113 (No route to host)]
yminsky has quit []
Morphous has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
zmdkrbou has quit [Read error: 110 (Connection timed out)]