TheLittlePrince has quit [Read error: 104 (Connection reset by peer)]
TheLittlePrince has joined #ocaml
Waleee has quit []
thermoplyae has quit [Remote closed the connection]
thermoplyae has joined #ocaml
Snrrrub has joined #ocaml
m3ga has joined #ocaml
brooksbp has joined #ocaml
AxleLonghorn has joined #ocaml
Morphous has quit ["shutdown"]
Amorphous has joined #ocaml
AxleLonghorn has left #ocaml []
TheLittlePrince has quit [Remote closed the connection]
brooksbp has quit []
mwc has joined #ocaml
mwc has left #ocaml []
middayc has joined #ocaml
delamarche has quit []
middayc has quit []
mrsolo has quit ["Leaving"]
m3ga has quit ["disappearing into the sunset"]
postalchris has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
seafood_ has joined #ocaml
postalchris has quit [Read error: 110 (Connection timed out)]
goalieca has joined #ocaml
szell has quit [Client Quit]
m3ga has joined #ocaml
thermoplyae has quit ["daddy's in space"]
__suri has joined #ocaml
Snrrrub has joined #ocaml
bluestorm has joined #ocaml
<flux>
neale, I'm in the process of writing bindings for libev, however I too have some gc issues at the moment
ecc has quit [Read error: 113 (No route to host)]
m3ga has quit ["disappearing into the sunset"]
jderque has joined #ocaml
Snrrrub has quit [Read error: 110 (Connection timed out)]
bluestorm has quit [Remote closed the connection]
ygrek has joined #ocaml
yminsky has joined #ocaml
hkBst has joined #ocaml
szell has joined #ocaml
|Catch22| has quit []
Linktim has joined #ocaml
seafood_ has quit []
l_a_m has joined #ocaml
marmottine has joined #ocaml
seafood_ has joined #ocaml
andrewdotnich has joined #ocaml
ttamttam has joined #ocaml
hkBst has quit ["Konversation terminated!"]
goalieca has quit [Remote closed the connection]
ygrek has left #ocaml []
ygrek has joined #ocaml
<ygrek>
is there a way to copy a file not using Unix.system?
bongy has joined #ocaml
<pango>
open source file for read, open target file for write, while you haven't reached source file eof read from it in a buffer and write buffer's content to target file. When done, close both files
dwmw2_gone is now known as dwmw2_GVA
<ygrek>
thats an option, but no system call wrapper?
<pango>
there's no system call to copy files
<ygrek>
I do not mean syscall, but any system api - CopyFile on win32 etc
<flux>
/bin/cp is the closest you can get
<flux>
however, if you change your mind and want to use it, do it the safe way: Unix.putenv "SRC" sourcename; Unix.putenv "DST" dstname; Unix.system "/bin/cp -- \"$SRC\" \"$DST\""
<pango>
that's not the safest way
<flux>
hm
<flux>
not?-(
<flux>
what can go wrong?
<flux>
oh, you mean refer to using Unix.exec?
<pango>
the way you wrote it still involves a shell to expand environment variables
<flux>
exactly, that was the point?
<flux>
note the quotes, which also go to the shell
<ygrek>
why is it safer than Unix.system (sprintf "/bin/cp %s %s" source dest) ?
<pango>
ygrek: nope
<flux>
ygrek, think source = "; rm -rf /"
<flux>
pango, what kind of source name were you thinking that wouldn't be safe?
<ygrek>
ah, I see
<pango>
requirement is to pass arguments as array string... So I suppose exec* and create_process* should be fine
<flux>
pango, Unix.putenv "SRC" "\"\nBLA'`\"\nbla"; Unix.system "/bin/echo \"$SRC\"" works exactly as expected
<flux>
exec has the advantage of being slightly more efficient too
<pango>
flux: but you must fork() first, if you want to keep control
<flux>
well, system does that anyway; infact I think it'll likely do it twice, once for the shell and once for cp
<pango>
yes
<pango>
I was referring to your last msg about exec
<flux>
it's not a drop-in replacement to system, but it's the essence of the alternative approach ;)
<pango>
actually it'd be a good idea to add a "copy file" syscall... Filesystems doing COW (copy-on-write) could provide highly efficient implementation, etc.
bongy has quit [Read error: 110 (Connection timed out)]
LordMetroid has quit [Read error: 110 (Connection timed out)]
lordmetroid__ has joined #ocaml
lordmetroid_ has quit [Connection timed out]
Snrrrub has joined #ocaml
lordmetroid__ has quit ["Leaving"]
wy has joined #ocaml
dwmw2_GVA is now known as dwmw2_gone
Snrrrub has quit [Read error: 110 (Connection timed out)]
Linktim_ has joined #ocaml
andrewdotnich has quit []
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
Linktim- has joined #ocaml
andrewdotnich has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
andrewdotnich has quit []
Linktim- has quit [Read error: 110 (Connection timed out)]
marmottine has quit [Read error: 113 (No route to host)]
andrewdotnich has joined #ocaml
andrewdotnich has quit ["zzzz"]
marmottine has joined #ocaml
<wy>
hello
<jlouis_>
hep!
AxleLonghorn has joined #ocaml
bongy has joined #ocaml
seafood_ has quit []
bongy has quit ["Leaving"]
<jlouis_>
yminsky: nice posts on phantom types and universal embeddings
postalchris has joined #ocaml
jderque has quit [Read error: 113 (No route to host)]
bzren has joined #ocaml
<yminsky>
Thanks. We hope to post a bunch more in the same vein. I feel like we've built up a fair bit of material over the last few years.
tjoad94 has joined #ocaml
tjoad94 has quit [Client Quit]
AxleLonghorn has left #ocaml []
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
wy has quit ["Leaving"]
LordMetroid has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
postalchris has quit ["Leaving."]
<jlouis_>
yminsky: Indeed! I happen to know Stephen from MLton and he tends to cook up amazing solutions to problems ;)
dwmw2_gone is now known as dwmw2_GVA
Linktim has joined #ocaml
dwmw2_GVA is now known as dwmw2_gone
uuuppz has quit [Read error: 113 (No route to host)]
Linktim_ has joined #ocaml
thermoplyae has joined #ocaml
Anarchos has joined #ocaml
Linktim- has joined #ocaml
bluestorm has joined #ocaml
Deknos has joined #ocaml
ecc has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Deknos is now known as menace
Linktim_ has quit [Read error: 110 (Connection timed out)]
mfp_ is now known as mfp
<Anarchos>
is the ocaml cvs accessible right now ?
<thelema>
the git branch suffers one problem from the conversion, and some configure files (magically copied from an upstream branch) didn't make it into the needed branches. Non-INRIA branches have the needed files checked in, the INRIA branches I'm afraid to do so with, for fear of breaking synchronization
LordMetroid has quit ["Leaving"]
middayc has joined #ocaml
middayc_ has joined #ocaml
middayc has quit [Read error: 110 (Connection timed out)]
middayc_ has quit []
middayc has joined #ocaml
Linktim- has joined #ocaml
hsuh has quit [Remote closed the connection]
ttamttam has joined #ocaml
ttamttam has left #ocaml []
thelema has quit ["Killed by frash (Requested by panasync)"]
marmottine has quit ["Quitte"]
hasone has joined #ocaml
letrec has quit [Connection timed out]
bluestorm has quit ["Konversation terminated!"]
mwc has joined #ocaml
evn_ has quit []
ygrek has quit [Remote closed the connection]
evn_ has joined #ocaml
<flux>
hmh, I'm having hard time fixing ocaml-ev's gc issues.. maybe it's a plain simple bug somewhere, as afaik I've ensured the registration of c-referred ocaml values as gc roots already.
<Anarchos>
i have plenty of segfault myself, due to multithread in my C code, even if i register global roots
szell` has joined #ocaml
<flux>
my case is single threaded
<flux>
atleast I've found a case that triggers the problem always
<flux>
even if I keep references to the data I'm creating, so it shouldn't be a released-too-early-kind of problem but rather a stuff-gets-moved - maybe
<flux>
actually, maybe not! I disabled heap compactions, and still the same.. oh well, maybe this points me to the source better.
<Anarchos>
have you compiled ocaml with debug flags ?
<flux>
ocaml itself or my code?
<flux>
I've tried compiling my code with debug flags at times
<flux>
it crashes at a function that converts stuff from a bitmask to a list
<flux>
so mainly it's allocating memory..
<flux>
OCAMLRUNPARAM=v255 makes the program say "Growing page table to 10335 entries" as its last thing.
<Anarchos>
so this growing is eating some of your pointers
<Anarchos>
have you printf'ed all your global roots you are registering ?
<flux>
not
jlouis has joined #ocaml
<flux>
at this point I actually register my roots to statically allocated buffers
<flux>
with a fixed number of slots (and an assertion that I don't run over the number)
szell has quit [Read error: 110 (Connection timed out)]
<Anarchos>
i don't know what is the effect to use statically allocated buffers with the GC
jlouis_ has quit [Read error: 110 (Connection timed out)]
Snrrrub has joined #ocaml
<flux>
hm, I wonder if my test case is simply allocating too much memory
<flux>
its memory space is one gigabyte..
<Anarchos>
maybe your static memory area is growing upon the ocaml heap ? but i don't know how to detect it simply
<flux>
maybe I'll put all the memory releasing stuff back in and test the behavior again
<flux>
fun stuff, crashes under gdb at around 250M, doesn't crash without gdb
<flux>
and .opt crashes :)
<flux>
maybe I'll put together a minimal version of that to see the issue better.. but not tonight.
evn_ has quit []
l_a_m has quit [Remote closed the connection]
Linktim- has quit [Remote closed the connection]
Snrrrub has quit [Read error: 110 (Connection timed out)]