danly has quit [Read error: 60 (Operation timed out)]
batdog|gone is now known as batdog
danly_ has quit [Read error: 60 (Operation timed out)]
slipstream has quit [kornbluth.freenode.net irc.freenode.net]
duncanm has quit [kornbluth.freenode.net irc.freenode.net]
khaladan has quit [kornbluth.freenode.net irc.freenode.net]
bohanlon has quit [kornbluth.freenode.net irc.freenode.net]
julien has quit [kornbluth.freenode.net irc.freenode.net]
datrus has quit [kornbluth.freenode.net irc.freenode.net]
seafood_ has quit [kornbluth.freenode.net irc.freenode.net]
gim has quit [kornbluth.freenode.net irc.freenode.net]
datrus has joined #ocaml
slipstream has joined #ocaml
duncanm has joined #ocaml
khaladan has joined #ocaml
bohanlon has joined #ocaml
julien has joined #ocaml
seafood_ has joined #ocaml
gim has joined #ocaml
pango_ has joined #ocaml
pango has quit [Remote closed the connection]
abez has joined #ocaml
<abez>
Hi, I'm having problems with compiling threading on GNU/Linux 2.6. I call Fatal error: exception Sys_error("Thread.create: Cannot allocate memory")
<abez>
err that is the error, I call /usr/local/bin/ocamlc.opt -thread unix.cma threads.cma control_module.ml to compile it
<abez>
I can use vmthreads and run from the interpretter just fine, but when I compile natively it chokes and gives me that Fatal error.
<abez>
Smerdyakov: so have you successfully compiled some ocaml code that uses threads?
<abez>
I can't find any google info on this. It is like this doesn't happen to people. I have tried 3.09.1 and 3.09.3
JosephRivers has quit [Read error: 104 (Connection reset by peer)]
Skal has joined #ocaml
<abez>
so I compile http://churchturing.org/w/control_module.ml with ocamlopt.opt -thread -I /usr/lib/ocaml/3.09.1/unix -I /usr/lib/ocaml/3.09.1/threads/ unix.cmxa threads.cmxa control_module.ml
<abez>
and I get Fatal error: exception Sys_error("Thread.create: Cannot allocate memory")
<abez>
when I run it
<abez>
if I compile it with ocamlc -thread -I /usr/lib/ocaml/3.09.1/unix -I /usr/lib/ocaml/3.09.1/vmthreads/ unix.cma threads.cma control_module.ml
<abez>
it works
<abez>
Does anyone have any example thread code that compiles natively?
Skal has quit [Remote closed the connection]
dechunker has joined #ocaml
_fab has joined #ocaml
pauldia has joined #ocaml
<pango_>
abez: how many threads do you create ?
<abez>
oh jeeze
<abez>
that is the best question
<abez>
I thought it was blocking
<abez>
but it was creating tonnes
<pango_>
with vmthreads the limit is quite high (over tens of thousands I think, even if performance quickly gets horrible), while with native threads you run in operating system limit first
<pango_>
if you plan to use lots of threads switch to Erlang, or something designed for that
<abez>
My problem was I spawning a billion threads for no good reason
<pango_>
I think it's accept() that's blocking
<abez>
yep
<abez>
you're right
<abez>
I was wondering why there was such high latency before
<abez>
:(
<abez>
thank you pango_ for your great question
<pango_>
np ;)
_velco has joined #ocaml
microcape has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
_fab has quit [Read error: 104 (Connection reset by peer)]
batdog is now known as batdog|gone
velco has joined #ocaml
pango_ has quit ["brb"]
pango has joined #ocaml
pango_ has joined #ocaml
pango has quit [Remote closed the connection]
ramki has joined #ocaml
Demitar_ has quit [Read error: 104 (Connection reset by peer)]
Demitar__ has joined #ocaml
Demitar_ has joined #ocaml
Demitar__ has quit [Read error: 104 (Connection reset by peer)]
Demitar__ has joined #ocaml
_fab has joined #ocaml
velco has quit [Remote closed the connection]
Skal has joined #ocaml
clog has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
jeremy_c has left #ocaml []
_velco has quit ["I'm outta here ..."]
Snark has quit ["Leaving"]
<dark_light>
why with let rec x = 1 :: 2 :: 3 :: 4 :: 5 :: x;; i got val x : int list = [1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; 1; 2; 3; 4; 5; ...] but with let rec x = [1; 2; 3; 4; 5] @ x;; i receive only This kind of expression is not allowed as right-hand side of `let rec' pointing to x?
<abez>
dark_light: because x is a function and not a list
<abez>
dark_light: Think order of operations
<dark_light>
abez, no, x has type int list
<dark_light>
and, hmmm
<abez>
no
<abez>
let rec x
<dark_light>
x is a recursive constant, not a function..
<abez>
that means x is a function
<abez>
wait
<dark_light>
let rec x y = means that x is a possibly function, but let rec x = means that x is a possible recursive constant..
<dark_light>
well, maybe the allowing using x with @ leads to undecidable situations
<abez>
you can't use functions involving y either
<abez>
I saw a section in the manual on recursive definition