nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
hxegon has joined #ocaml
struk|desk|away is now known as struk|desk
johnf has quit [Read error: Connection reset by peer]
johnf has joined #ocaml
Reshi has joined #ocaml
mistermetaphor has quit [Remote host closed the connection]
yegods has quit [Remote host closed the connection]
yegods has joined #ocaml
Reshi has quit [Ping timeout: 248 seconds]
julian_ has joined #ocaml
chindy has quit [Ping timeout: 276 seconds]
Fistine has quit [Quit: leaving]
julian_ has quit [Remote host closed the connection]
jeffmo has quit [Quit: jeffmo]
BitPuffin|osx has quit [Ping timeout: 248 seconds]
hxegon has quit [Quit: BRB]
dsheets has joined #ocaml
pyon has quit [Read error: Connection reset by peer]
pyon has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
struk|desk is now known as struk|desk|away
hxegon has joined #ocaml
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
Reshi has joined #ocaml
FreeBirdLjj has joined #ocaml
pierpa has quit [Ping timeout: 240 seconds]
Reshi has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
struk|desk|away is now known as struk|desk
Haudegen has quit [Ping timeout: 244 seconds]
seangrove has quit [Ping timeout: 260 seconds]
JacobEdelman_ has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 246 seconds]
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
Haudegen has joined #ocaml
struk|desk is now known as struk|desk|away
FredF has joined #ocaml
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
kdas_ has quit [Quit: Leaving]
struk|desk|away is now known as struk|desk
johnf_ has joined #ocaml
johnf has quit [Ping timeout: 248 seconds]
johnelse has quit [Ping timeout: 248 seconds]
johnelse has joined #ocaml
GeorgeHahn has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
Reshi has joined #ocaml
FreeBird_ has joined #ocaml
aantron has quit [Remote host closed the connection]
FreeBirdLjj has quit [Ping timeout: 276 seconds]
mistermetaphor has joined #ocaml
palomer has quit [Quit: palomer]
gbarboza has quit [Remote host closed the connection]
hxegon has quit [Quit: BRB]
Algebr` has joined #ocaml
troydm has quit [Ping timeout: 244 seconds]
hxegon has joined #ocaml
palomer has joined #ocaml
struk|desk has quit [Ping timeout: 244 seconds]
copy` has quit [Quit: Connection closed for inactivity]
yegods has quit []
noddy has joined #ocaml
<Algebr`>
wth opam install conf-ncurses The following dependencies couldn't be met: - magic-mime -> ocamlfind Your request can't be satisfied: - No package matches ocamlfind.
<Algebr`>
oh great: available: [os = "darwin" | os = "freebsd" | os = "netbsd" | os = "openbsd"] in ncurses, im screwed on linux
noddy has quit [Ping timeout: 260 seconds]
wiredsis` has joined #ocaml
julien_t has joined #ocaml
wiredsis` has quit [Remote host closed the connection]
JacobEdelman_ has quit [Quit: Connection closed for inactivity]
<Algebr`>
what the heck is going on in opam... -camlp4.4.02+7 is in conflict with lwt.2.5.1
FredF has quit [Remote host closed the connection]
FredF has joined #ocaml
seangrove has joined #ocaml
struk|desk has joined #ocaml
struk|desk is now known as struk|desk|away
Reshi has quit [Ping timeout: 244 seconds]
julien_t has quit [Ping timeout: 268 seconds]
MercurialAlchemi has joined #ocaml
nicholasf has quit [Ping timeout: 252 seconds]
wiredsister has quit [Ping timeout: 248 seconds]
GeorgeHahn has quit [Read error: Connection reset by peer]
palomer has quit [Quit: palomer]
AlexRussia has quit [Ping timeout: 276 seconds]
kushal has joined #ocaml
pyon has quit [Quit: fix config]
pyon has joined #ocaml
wiredsister has joined #ocaml
wiredsister has quit [Ping timeout: 250 seconds]
mistermetaphor has quit [Remote host closed the connection]
Reshi has joined #ocaml
Reshi has quit [Ping timeout: 276 seconds]
djellemah_ has joined #ocaml
Anarchos has joined #ocaml
larhat has quit [Ping timeout: 240 seconds]
nicholasf has joined #ocaml
nicholasf has quit [Client Quit]
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ocaml
hydan has quit [Remote host closed the connection]
hydan has joined #ocaml
Haudegen has quit [Read error: Connection reset by peer]
djellemah has quit [Remote host closed the connection]
djellemah has joined #ocaml
rwmjones_hols is now known as rwmjones
dwillems has joined #ocaml
ygrek has joined #ocaml
Simn has joined #ocaml
hxegon has quit [Quit: BRB]
wiredsister has joined #ocaml
Reshi has joined #ocaml
wiredsister has quit [Ping timeout: 268 seconds]
Reshi has quit [Ping timeout: 252 seconds]
M-Illandan has quit [Ping timeout: 244 seconds]
dsheets has joined #ocaml
TheLemonMan has joined #ocaml
M-Illandan has joined #ocaml
Reshi has joined #ocaml
ygrek has quit [Ping timeout: 268 seconds]
larhat has joined #ocaml
julien_t has joined #ocaml
jwatzman|work has joined #ocaml
dwillems has quit [Ping timeout: 264 seconds]
Reshi has quit [Ping timeout: 244 seconds]
Reshi has joined #ocaml
julien_t has quit [Ping timeout: 268 seconds]
igitoor has quit [Ping timeout: 268 seconds]
igitoor has joined #ocaml
igitoor has joined #ocaml
igitoor has quit [Changing host]
sepp2k has joined #ocaml
mettekou has joined #ocaml
<companion_cube>
camlp4.4.02+7 is in conflict with lwt.2.5.1 <- meh
<companion_cube>
a wild conflict appears oO
Vintila has joined #ocaml
Kakadu has joined #ocaml
silver has joined #ocaml
kushal has quit [Quit: Leaving]
ohCamel has joined #ocaml
mettekou has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
seangrove has quit [Ping timeout: 244 seconds]
<ohCamel>
What is the Lwt equivalent for Sys.command?
dwillems has joined #ocaml
mettekou has joined #ocaml
mettekou has quit [Client Quit]
<def`>
Lwt_process.shell & pread ?
<ohCamel>
Maybe Lwt_process.exec is the one
Haudegen has joined #ocaml
Haudegen has quit [Ping timeout: 268 seconds]
Reshi has quit [Ping timeout: 264 seconds]
<adrien>
they're not the same when it comes to handling of stdin/out/err but otherwise they match
<def`>
no, exec is like Unix.exec
<def`>
you will miss shell expansion (... not necessarily a bad thing)
<adrien>
sorry, I meant: pread
<adrien>
for exec, definitely, they're not the same
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
Vintila has quit [Ping timeout: 276 seconds]
wiredsister has joined #ocaml
wiredsister has quit [Ping timeout: 260 seconds]
dsheets has quit [Remote host closed the connection]
dsheets has joined #ocaml
malina has joined #ocaml
Haudegen has joined #ocaml
Reshi has joined #ocaml
darkf has quit [Quit: Leaving]
tane has joined #ocaml
kushal has joined #ocaml
aantron has joined #ocaml
freehck has quit [Ping timeout: 260 seconds]
<malina>
nup nup
Simn has quit [Ping timeout: 246 seconds]
_andre has joined #ocaml
Simn has joined #ocaml
kushal has quit [Ping timeout: 240 seconds]
FredF has quit [Remote host closed the connection]
Reshi has quit [Ping timeout: 244 seconds]
FredF has joined #ocaml
kushal has joined #ocaml
FredF has quit [Ping timeout: 248 seconds]
tane has quit [Quit: Verlassend]
dsheets has quit [Remote host closed the connection]
ggole has joined #ocaml
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
Haudegen has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
dwillems has quit [Ping timeout: 268 seconds]
freehck has joined #ocaml
anoisz has joined #ocaml
ohCamel has quit [Ping timeout: 250 seconds]
seangrove has joined #ocaml
dwillems has joined #ocaml
seangrove has quit [Ping timeout: 260 seconds]
julien_t has joined #ocaml
dhil has joined #ocaml
nicoo has quit [Remote host closed the connection]
kushal has quit [Ping timeout: 240 seconds]
kushal has joined #ocaml
kushal has quit [Remote host closed the connection]
kushal has joined #ocaml
pierpa has joined #ocaml
kushal has quit [Quit: Leaving]
hay207 has joined #ocaml
hay207 has quit [Client Quit]
mali__ has joined #ocaml
mali__ has quit [Remote host closed the connection]
jwatzman|work has quit [Quit: jwatzman|work]
zaquest has quit [Ping timeout: 276 seconds]
nicoo has joined #ocaml
julien_t has quit [Ping timeout: 276 seconds]
hxegon has joined #ocaml
hay207 has joined #ocaml
Haudegen has joined #ocaml
<Leonidas>
Algebr`: I have magic-mome installed just fine
<Leonidas>
also no ncurses dependency
troydm has joined #ocaml
zaquest has joined #ocaml
t4nk810 has joined #ocaml
palomer has joined #ocaml
malina has quit [Ping timeout: 250 seconds]
snhmib has joined #ocaml
dsheets has joined #ocaml
seangrove has joined #ocaml
<Maelan>
i noticed my code (which does not actually go beyond the capacity of an int) is about 6 times slower with zarith than with plain ints
<palomer>
hey everyone
<Maelan>
when interpreted as well as when ocamlopt-ed
<palomer>
I want to do something special in lwt
<palomer>
I want to run two different thunks concurrently
<palomer>
like a <&> b
<Maelan>
since zarith uses plain ints for small integers, how comes such an overhead?
<palomer>
but if a returns, I want everything to return
<palomer>
if b returns, I want to do nothing
<mrvn>
Maelan: because everything has to first check if it is a small int
<Maelan>
(i use only additions, substractions, squaring and perfect_square)
malina has joined #ocaml
<Maelan>
(and for plain ints perfect_square is implemented using int_of_float % sqrt % float)
<Maelan>
mrvn, can this check alone be 5 times as slow as the int operations themselves?
<mrvn>
Maelan: a branch is damn expensive
<companion_cube>
there is probably a test + branching + operation itself
<companion_cube>
whereas the int operation is just a few instructions
MercurialAlchemi has quit [Ping timeout: 260 seconds]
toolslive has quit [Remote host closed the connection]
<Maelan>
ok
<Maelan>
it’s a pity
<companion_cube>
well, bigints come with a cost
wiredsister has joined #ocaml
kushal has joined #ocaml
<ggole>
Well predicted branches are super cheap
wiredsister has quit [Ping timeout: 264 seconds]
<ggole>
Might be the cost of spilling around a function call or something
<Maelan>
oh, and well, i use for loops in the plain int version, what becomes while loops with a reference in the zarith version. don’t know if it matters
<ggole>
I doubt it, nonescaping references are pretty cheap
<Maelan>
ggole, shouldn’t the cost of function calls disappear with ocamlopt, thanks to inlining?
struk|desk|away is now known as struk|desk
<Maelan>
(i tried -inline 99…)
<ggole>
The functions may not be inlined if they are too large
<mrvn>
or if they are C code
<ggole>
Which can happen if the rarely taken half of the branch is complicated
<ggole>
Partial inlining can still work in this case, but OCaml doesn't do that (iirc)
jwatzman|work has joined #ocaml
<ggole>
flambda may improve this a bit
freehck has quit [Ping timeout: 260 seconds]
<companion_cube>
there's also the write barrier, if you use a reference
<companion_cube>
it might be the reason for the 5× slowdown
<companion_cube>
Maelan: try to rewrite with a recursive function, without a reference
<companion_cube>
and tell us if it's as slow
<ggole>
Nonescaping references shouldn't take a write barrier hit
kushal has quit [Ping timeout: 250 seconds]
<ggole>
So it depends how the code is written
<companion_cube>
does Ocaml analyse escaping now!?
<ggole>
I think the analysis is a bit simpler than that
<companion_cube>
I think it just adds barriers whenever the type is not a primitive type
<ggole>
If you have a ref which is created like let r = ref ... and which is only incremented, read, set, etc, then it becomes a mutable local
<ggole>
The first is just a loop, the second shows caml_modify, etc
<companion_cube>
but then maybe "assign" actually referes to camlmodify
<companion_cube>
refers*
<ggole>
Eh? caml_modify is the write barrier
<ggole>
Which is elided in the first (nonescaping) case
<companion_cube>
you're right
<companion_cube>
that's cool!
<ggole>
This is why the List stuff is implemented with references and is still fairly efficient
<companion_cube>
which List stuff? :D
<ggole>
I mean the Array stuff, sorry
<ggole>
Functions like fold_left are implemented with a loop and reference
zarul has quit [Ping timeout: 248 seconds]
<companion_cube>
ah yeah
Anarchos has joined #ocaml
ohCamel has joined #ocaml
hay207 has quit [Read error: Connection reset by peer]
hay207 has joined #ocaml
marsam has joined #ocaml
MercurialAlchemi has joined #ocaml
nicoo has quit [Remote host closed the connection]
nicoo has joined #ocaml
kushal has joined #ocaml
<mrvn>
ggole: They better not use a refrence
<ggole>
Eh?
<mrvn>
fold_left doesn't need one
<ggole>
Array.fold_left uses one
<ggole>
Because, I assume, otherwise you need an internal loop function
<mrvn>
don't see why it would.
struk|desk is now known as struk|desk|away
<ggole>
How would you implement it?
<companion_cube>
it's not necessary, but it's convenient
dsheets has quit [Remote host closed the connection]
<mrvn>
let fold_left fn acc arr = let len = length arr in let rec loop acc = function i when i = len -> acc | loop (fn acc arr.(i)) (i + 1) in loop acc 0
<companion_cube>
sure
<companion_cube>
actually it might be faster using a reference + Array.iter :)
<companion_cube>
(which uses unsafe_get)
<mrvn>
what would you use a reference for?
<mrvn>
companion_cube: iter is a special case of fold_left with acc = ()
dsheets has joined #ocaml
<companion_cube>
yes, and iter is very simple to write using for
mistermetaphor has joined #ocaml
<ggole>
mrvn: this is the "internal function" that I was referring to
<ggole>
(Before flambda) this involves a jump and a closure construction
<ggole>
Which the ref version avoids.
<companion_cube>
you can write the inner function outside, with explicit passing of arguments
<ggole>
That's much more tedious than using the ref.
<companion_cube>
let rec loop_fold_ a f acc i = .....;; let fold_left f acc a = loop_fold_ a f acc 0
<companion_cube>
yep
<mrvn>
what would you put in the ref?
<ggole>
The accumulator value.
<mrvn>
and how would that avoid the inner loop?
slash^ has joined #ocaml
<companion_cube>
the inner loop would be a for, not a function
<mrvn>
and why (other than lifting fn) would an inner loop be slower than an outer?
<mrvn>
companion_cube: for and tail recursion is the same
<ggole>
let fold_left f init a = let r = ref init in for i = 0 to Array.length a - 1 do r := f !r a.(i) done; !r
<companion_cube>
seriously, many functions on arrays are more convenient to write with ref/exceptions
<mrvn>
i find ggole far from convenient
copy` has joined #ocaml
IbnFirnas has joined #ocaml
<ggole>
¯\_(ツ)_/¯
<ggole>
Oops, encoding fail
<ohCamel>
Lwt_process.shell doesn't return an Lwt thread. Does it mean it returns possibly before the shell command returns?
<nicoo>
ggole: No, the encoding looks right
<nicoo>
companion_cube: Refs are slow, though :P
<companion_cube>
depends on the type
badon has quit [Read error: Connection reset by peer]
FreeBird_ has quit [Ping timeout: 264 seconds]
badon has joined #ocaml
<ggole>
nicoo: oh, it appears as a ¥ here
<ggole>
Might be a font thing
mietek has quit [Ping timeout: 246 seconds]
mietek has joined #ocaml
hcarty has joined #ocaml
<hcarty>
ohCamel: Lwt_process.shell doesn't run the application
<hcarty>
ohCamel: It wraps the command you provide in syntax which should be OS-appropriate
jgjl has joined #ocaml
ohCamel has quit [Ping timeout: 250 seconds]
dwillems has quit [Ping timeout: 260 seconds]
kushal has quit [Quit: Leaving]
seangrove has quit [Ping timeout: 268 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
foocraft has joined #ocaml
tane has joined #ocaml
hay207 has quit [Quit: Konversation terminated!]
d0nn1e has quit [Ping timeout: 246 seconds]
d0nn1e has joined #ocaml
<nicoo>
ggole: Might be
<nicoo>
companion_cube: Are you saying the write barrier gets optimized away? How does the compiler even do that?
wiredsister has joined #ocaml
<ggole>
The reference is rewritten from a heap-allocated block to a mutable local (eg, register or stack slot)
<nicoo>
Oh, and it works only for unboxed values, then (i.e. things represented as an OCaml integer, tagged as not-a-pointer for the GC)
<nicoo>
Yes, that makes sense
<Kakadu>
Folks, is it kind of possible to remove deepest element in the nested pairs? (where we pass a number which represents depth like we deal with dependent type)
<ggole>
No, it works for any value
<ggole>
The write barrier can *also* be eliminated when the contents of a ref is guaranteed to be an immediate value, even when the ref is a heap-allocated block.
<companion_cube>
nicoo: for immediate types
palomer_ has joined #ocaml
<nicoo>
Ah, ok, I see
<mrvn>
ggole: as soon as you allocate the GC needs the barrier
<flux>
hmm, I wonder what I have broken in my ocamlbuild. 1) ocamlbuild -clean ok 2) ocamlbuild -j 8 webcamViewer.native ok 3) modify a source file 4) ocamlbuild -j 8 webcamViewer.native does noething and I have a zero-byte _build/webcamViewer.native
ggole has quit [Ping timeout: 264 seconds]
<flux>
in fact I can omit step 3
<flux>
and -j 8
dwillems has quit [Ping timeout: 244 seconds]
hxegon has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
<flux>
this seems relevant: webcamViewer.native exists in source dir -> import it
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
<flux>
and strace says open("webcamViewer.native", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 5 (and close after an fnctl FD_CLOEXEC and an lseek)
<flux>
clearly it's my myocamlbuild.ml, because reverting a bunch of changes fixes it.. :)
Lasher` has joined #ocaml
seangrove has joined #ocaml
dwillems has joined #ocaml
<flux>
I guess it's bad to use Command.execute at each dispatch stage instead of just in the After_rules..
butts_butts has joined #ocaml
hcarty1 has joined #ocaml
slash^1 has quit [Read error: Connection reset by peer]
hcarty has quit [Ping timeout: 250 seconds]
Kakadu has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
fs4lv1n1_ has quit [Quit: leaving]
nicholasf has joined #ocaml
hcarty1 has quit [Quit: WeeChat 1.4]
leyyin has joined #ocaml
dinosaure1 is now known as dinosaure
Haudegen has quit [Ping timeout: 248 seconds]
dsheets has joined #ocaml
Reshi has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
hxegon is now known as hxegon_AFK
hxegon_AFK is now known as hxegon
Algebr`` has quit [Remote host closed the connection]
dhil has joined #ocaml
hxegon is now known as hxegon_AFK
Anarchos has joined #ocaml
anoisz has left #ocaml ["Leaving"]
haesbaert has quit [Remote host closed the connection]
hxegon_AFK has quit [Quit: BRB]
Haudegen has joined #ocaml
ollehar has joined #ocaml
ollehar has quit [Client Quit]
_andre has quit [Quit: leaving]
johnf_ has quit [Read error: Connection reset by peer]
<Anarchos>
Where can i find information about test contexts in OUnit2 ?
hxegon has joined #ocaml
BitPuffin has quit [Ping timeout: 244 seconds]
darkf has joined #ocaml
johnf_ has joined #ocaml
dsheets has joined #ocaml
hcarty has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
butts_butts_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
butts_butts has quit [Ping timeout: 244 seconds]
nicholasf has quit [Remote host closed the connection]
larhat has joined #ocaml
dhil has quit [Ping timeout: 264 seconds]
seangrove has joined #ocaml
leyyin has quit [Quit: So Long, and Thanks for All the Fish]
marsam has joined #ocaml
sepp2k has quit [Quit: Leaving.]
MercurialAlchemi has quit [Ping timeout: 268 seconds]
aantron has quit [Read error: Connection reset by peer]
aantron has joined #ocaml
julien_t has quit [Ping timeout: 248 seconds]
nicholasf has joined #ocaml
k1000 has left #ocaml [#ocaml]
seangrove has quit [Ping timeout: 260 seconds]
dwillems has quit [Ping timeout: 240 seconds]
Reshi has quit [Ping timeout: 244 seconds]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
butts_butts_ has quit [Ping timeout: 244 seconds]
foocraft_ has quit [Ping timeout: 250 seconds]
Reshi has joined #ocaml
marsam has quit [Remote host closed the connection]
yegods has joined #ocaml
dwillems has joined #ocaml
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
orbitz has quit [Ping timeout: 246 seconds]
hcarty has quit [Quit: WeeChat 1.4]
noddy has joined #ocaml
t4nk810 has quit []
Reshi has quit [Ping timeout: 260 seconds]
tane has quit [Quit: Verlassend]
antkong has joined #ocaml
dsheets has joined #ocaml
dsheets has quit [Ping timeout: 250 seconds]
dwillems has quit [Quit: Leaving]
BitPuffin|osx has joined #ocaml
noddy has quit [Ping timeout: 250 seconds]
badon has quit [Remote host closed the connection]
badon has joined #ocaml
dsheets has joined #ocaml
Simn has quit [Quit: Leaving]
dsheets has quit [Ping timeout: 250 seconds]
silver has quit [Quit: rakede]
rwmjones has quit [Ping timeout: 244 seconds]
dhil has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
badon has quit [Read error: Connection reset by peer]
rwmjones has joined #ocaml
badon has joined #ocaml
madroach has joined #ocaml
hxegon has left #ocaml ["PEACE OUT"]
struk|desk|away is now known as struk|desk
Kakadu has quit [Remote host closed the connection]