greg_dove has quit [Quit: ChatZilla 0.9.88.2 [Firefox 10.0.2/20120215223356]]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
hnrgrgr has quit [Ping timeout: 246 seconds]
mika1 has joined #ocaml
Cyanure has quit [Remote host closed the connection]
eni has joined #ocaml
cago has joined #ocaml
ontologiae has quit [Ping timeout: 246 seconds]
eni has quit [Ping timeout: 260 seconds]
eni has joined #ocaml
djcoin has joined #ocaml
pango is now known as pangoafk
ftrvxmtrx has quit [Quit: Leaving]
pietr has joined #ocaml
pietr has quit [Read error: Connection reset by peer]
pietr has joined #ocaml
<pietr>
Why doesn't 'List.iter (f1; f2) myList' execute f1 for each element of the list? It only calls f1 once for the head of the list and then only f2 for each element of the tail...
<_habnabit>
pietr, (f1; f2) evaluates to just f2
<_habnabit>
pietr, with a warning, too
<pippijn>
if f1 is a function, it's not called
<_habnabit>
yeah.
<_habnabit>
pietr, if you're using batteries, you could do (tap f1 |- f2)
<pietr>
pippijn, yes my example is a bit wrong, f1 is applied to some arguments as well
<_habnabit>
okay, so, (f1 arg; f2) is going to call `f1 arg` and then evaluate to f2
<_habnabit>
that's what ; does. it's not a function composition operator
<pietr>
ok I understand. f1 is not called just for the first element, it is just called once when (f1; f2) is evaluated to just f2 before executing List.iter
<_habnabit>
yes
<_habnabit>
this is what tap is for
<pietr>
I'll take a look at tap
<pippijn>
it seems I'm tired
<pippijn>
I read that as "I'll take another nap"
<_habnabit>
tap: ('a -> unit) -> 'a -> 'a
<pietr>
:)
ankit9 has quit [Ping timeout: 268 seconds]
`micro has joined #ocaml
eni has quit [Ping timeout: 260 seconds]
ftrvxmtrx has joined #ocaml
Cyanure has joined #ocaml
ontologiae has joined #ocaml
ankit9 has joined #ocaml
psaxl has joined #ocaml
eikke has joined #ocaml
ikaros has joined #ocaml
ontologiae has quit [Read error: Connection reset by peer]
Cyanure has quit [Remote host closed the connection]
Tobu has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Tobu has joined #ocaml
Yoric has joined #ocaml
beckerb has joined #ocaml
ankit9 has quit [Ping timeout: 240 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
ankit9 has joined #ocaml
<pietr>
does anyone have experience with omake?
<pietr>
omake doesn't seem to find all dependencies
<pietr>
i keep getting an 'unbound module Stopwatch' error
ikaros has quit [Quit: Ex-Chat]
cdidd has quit [Ping timeout: 245 seconds]
<mfp>
pietr: did you add a OMakefile in the dir holding stopWatch.ml and declare .SUBDIRS: thedir in its parent directory's OMakefile?
Chambart has joined #ocaml
<Chambart>
#ocsigen
<Chambart>
oups forgot /j
<pietr>
I've gotten a bit further. One of the difficulties is that stopwatch should be compiled from a c file
<mfp>
the usual way to handle this is to create a static C lib and then link against that
psaxl has quit [Ping timeout: 268 seconds]
<pietr>
yes, i'm looking into that now. but I see omake also supports creating just a single .o file from a .c file, which is probably what I need
<mfp>
i.e. StaticCLibrary(mylib, some objects) and then OCAML_CLIBS[] = mylib
<mfp>
IIRC ocamlopt does link against .o args given to it, but ocamlmklib ignored them
munga has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
<pietr>
OK, it works by creating a static c library like you suggested. thanks!
cdidd has joined #ocaml
emmanuelux has joined #ocaml
cago has quit [Ping timeout: 264 seconds]
psaxl has joined #ocaml
osa1 has joined #ocaml
osa1 has quit [Ping timeout: 246 seconds]
psaxl has quit [Quit: psaxl]
eni has joined #ocaml
<yezariaely>
is there an ocaml equivalent for haskell's tpl@(q,r,s) notation? (bind a tuple to tpl but destruct it and bind the contents to q,r,s ?
<wmeyer>
yezariaely: ((q, r, s) as tpl)
<yezariaely>
wmeyer: cool, thanks!
Ptival has quit [Ping timeout: 246 seconds]
_andre has joined #ocaml
bddn has quit [Ping timeout: 265 seconds]
eni has quit [Ping timeout: 264 seconds]
bddn has joined #ocaml
psaxl has joined #ocaml
osa1 has joined #ocaml
bzzbzz has joined #ocaml
psaxl has quit [Quit: psaxl]
munga has quit [Ping timeout: 268 seconds]
ankit9 has quit [Ping timeout: 248 seconds]
bddn has quit [Ping timeout: 252 seconds]
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 260 seconds]
Yoric has joined #ocaml
bddn has joined #ocaml
emmanuelux has quit [Ping timeout: 252 seconds]
oriba has joined #ocaml
oriba has quit [Client Quit]
gnuvince_ has quit [Ping timeout: 252 seconds]
paolooo has joined #ocaml
Yoric has quit [Ping timeout: 246 seconds]
Anarchos has joined #ocaml
hkBst has quit [Quit: Konversation terminated!]
fschwidom has joined #ocaml
<_andre>
hello
<_andre>
i'm writing stubs for a C library that uses pthreads
<_andre>
the library doesn't call back into ocaml code
<_andre>
is there any special care i should take wrt the stubs?
<_andre>
i think i don't need the caml_c_thread_register() stuff in this case
<Anarchos>
_andre no you don't
<adrien>
I bind to webkit-gtk and it's not causing any issue wrt threads
<Anarchos>
just use CAMLParam, CAML return and other mlvalues macros
<_andre>
is it safe to use a custom_operations struct?
<_andre>
i'm getting a weird double-free issue
cago has joined #ocaml
munga has joined #ocaml
<_andre>
indeed, can't seem to reproduce the problem if i don't use custom_operations
pietr has quit [Quit: Ex-Chat]
gnuvince_ has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
oriba has joined #ocaml
munga has quit [Ping timeout: 248 seconds]
Yoric has joined #ocaml
tane has joined #ocaml
mika1 has quit [Quit: Leaving.]
ftrvxmtrx has quit [Quit: Leaving]
cago has quit [Ping timeout: 246 seconds]
munga has joined #ocaml
Progster has joined #ocaml
oriba has quit [Quit: oriba]
Cyanure has quit [Remote host closed the connection]
asmanur_ has quit [Ping timeout: 264 seconds]
asmanur has joined #ocaml
olasd has quit [Remote host closed the connection]
olasd has joined #ocaml
olasd has quit [Changing host]
olasd has joined #ocaml
eni has joined #ocaml
mattrepl has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
eikke has quit [Ping timeout: 268 seconds]
sepp2k1 has quit [Ping timeout: 246 seconds]
gnuvince_ has quit [Ping timeout: 264 seconds]
eni has quit [Ping timeout: 245 seconds]
Yoric has quit [Ping timeout: 260 seconds]
<Anarchos>
_andre customs blocks may have their own custom free operations if i remember correctly
fschwidom has quit [Ping timeout: 244 seconds]
sepp2k has joined #ocaml
<_andre>
Anarchos: yeah, i'm setting my own finalize function
fschwidom has joined #ocaml
wmeyer` has joined #ocaml
mattrepl_ has joined #ocaml
pheredhel` has joined #ocaml
olasd_ has joined #ocaml
olasd_ has quit [Changing host]
olasd_ has joined #ocaml
Haseo_ has joined #ocaml
mattrepl has quit [*.net *.split]
olasd has quit [*.net *.split]
munga has quit [*.net *.split]
cdidd has quit [*.net *.split]
wtetzner has quit [*.net *.split]
Haseo has quit [*.net *.split]
wmeyer has quit [*.net *.split]
jlouis has quit [*.net *.split]
pheredhel has quit [*.net *.split]
Haseo_ is now known as Haseo
mattrepl_ is now known as mattrepl
cdidd has joined #ocaml
wtetzner has joined #ocaml
munga has joined #ocaml
jlouis has joined #ocaml
mattrepl has quit [Quit: mattrepl]
pangoafk is now known as pango
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
ulfdoz has joined #ocaml
_andre has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
[1]bipedman has joined #ocaml
emmanuelux has joined #ocaml
[1]bipedman has quit [Quit: HydraIRC -> http://www.hydrairc.com <- The professional IRC Client :D]
err404 has joined #ocaml
gnuvince_ has joined #ocaml
<_andre>
so this library has a function that allows one to set thread-private data, using a void* pointer
<_andre>
how do i pass it an ocaml value and avoid it being garbage-collected?
<_andre>
does that mean that before calling set_private_data i first need to get_private_data, unregister, and only then set the new private data?
<thelema>
that would be best, yes
Yoric has joined #ocaml
ftrvxmtrx has joined #ocaml
<_andre>
do i have to use a static variable for this?
<thelema>
you have to register the place that's holding the pointer, not the pointer
<thelema>
so your example where you register foo won't work.
<_andre>
so in your example, x is some global wrapper for foo?
<thelema>
set_private_data(x, myvalue);
<_andre>
not sure i'm following. the library gives me 2 functions, getpriv(ctx) and setpriv(ctx, foo), where ctx is an opaque context object
Cyanure has joined #ocaml
<_andre>
i don't have direct access to the place that holds the pointer
<thelema>
then you can't register it as the root
<thelema>
which means you have to make some other global data structure to hold pointers, and register those as roots
<_andre>
which probably won't be thread-safe
Chambart has quit [Ping timeout: 264 seconds]
ccasin has quit [Quit: leaving]
sivoais has quit [Ping timeout: 248 seconds]
paolooo has quit [Quit: Page closed]
sivoais has joined #ocaml
tane has quit [Quit: Verlassend]
<fasta>
Why is ocsigen.org down?
<Anarchos>
fasta Their SGI O2 workstation split ? Ok i go out....
gnuvince_ has quit [Ping timeout: 256 seconds]
<Qrntz>
are there any up-to-date comprehensive tutorials on Batteries?
<Qrntz>
most of the information I find seems a bit outdated…
<thelema>
comprehensive, no.
<Qrntz>
ah, what a shame
<thelema>
aside from some build requirements that are changing form 1.x to 2.x, and some modules that were removed between 0.x and 1.x, old information should still be good.
<thelema>
Qrntz: to a large degree, it's a data structure library, what are you looking for - how to use a priority queue?
dsheets has joined #ocaml
<thelema>
(although to be honest, I could use some details on the hashcons module's intended use)
<Qrntz>
no, I'm more interested in how can I «foreach» an input channel (as in iterate over its lines)
<thelema>
IO.lines_of ic |> Enum.iter (fun line -> ...)
<Qrntz>
trying to convert a small project of my own from my self-written invent-the-bicycle-type stdlib to Batteries
<thelema>
it's more of a reference manual than a tutorial
<Qrntz>
oh, I see. thanks
<thelema>
and this documentation is for 2.x, so if you're using 1.x, there may be a few differences; new functions in 2.0 (which should be documented as new in 2.0), and PMap/PSet were moved around
Snark has quit [Quit: Quitte]
<Qrntz>
it says 1.5.0 in my package manager but I encountered comments in the installed .mli files containing «since @2.0», that's a bit confusing
<Qrntz>
I suppose it's closer to 2.0 anyway
<thelema>
oops, those shouldn't have gotten in...
* thelema
greps for those in the 1.5 source
<Qrntz>
:-)
<thelema>
I don't find any - if you run into it again, let me know
<Qrntz>
right, I must've confused something then
sgnb has quit [Ping timeout: 245 seconds]
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
sgnb has joined #ocaml
<adrien>
_andre: just to let you know, your mail to the caml-list went into gmail's spam folder for me =/
sepp2k has quit [Read error: Connection reset by peer]
Chambart has joined #ocaml
<_andre>
adrien: :(
fschwidom has quit [Read error: Connection reset by peer]