flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab OCaml 3.10.2 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
tomh has quit ["http://www.mibbit.com ajax IRC Client"]
threeve has joined #ocaml
subconscious has quit ["This computer has gone to sleep"]
Kopophex has quit ["Leaving"]
threeve has quit []
Palace_Chan has joined #ocaml
Palace_Chan has quit ["Palace goes to sleep"]
jeddhaberstro has quit []
pantsd has joined #ocaml
Snark has joined #ocaml
GustNG has joined #ocaml
ozy` has joined #ocaml
Submarine has joined #ocaml
GustNG1 has quit [Read error: 110 (Connection timed out)]
ahamsandwich has joined #ocaml
ahamsandwich has left #ocaml []
ahamsandwich has joined #ocaml
ahamsandwich has quit []
Mr_Awesome has joined #ocaml
Linktim has joined #ocaml
guillem has joined #ocaml
<flux> at times it has been said that some aspects of type classes would be possible to emulate with classes
<flux> for example the Num-class would be possible that way: val (+) : 'a num -> 'a num -> 'a num, right?
<flux> I wonder if anyone's tried to write a monadic library that way
Axioplase_ has quit [Read error: 110 (Connection timed out)]
<flux> the problem with the num-class would be that for example numbers would need to be lifted into the monad manually
<flux> but I wonder if the problem persists when writing the bind-function for a monad
filp has joined #ocaml
jlouis has quit ["Leaving"]
viimrles has quit [Read error: 60 (Operation timed out)]
hkBst has joined #ocaml
Linktim_ has joined #ocaml
viimrles has joined #ocaml
jlouis has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
jlouis_ has joined #ocaml
jlouis_ has quit [Read error: 104 (Connection reset by peer)]
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
struktured__ has quit ["Konversation terminated!"]
Yoric[DT] has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
Yoric[DT] has joined #ocaml
subconscious has joined #ocaml
pango has quit [Remote closed the connection]
yziquel has joined #ocaml
<yziquel> hi. i've been trying to do a Thread.select, and I end up with the following error message:
<yziquel> Thread 3 killed on uncaught exception Unix.Unix_error(3, "select", "")
<yziquel> Anyone knows what error code 3 stands for in select?
<gildor> yziquel: Use Unix.handle_unix_error around your Thread.select
<yziquel> gildor: looking at this function...
<yziquel> hum. handle_unix_error is not very convenient with many arguments... i'll put that in my code right away.
<yziquel> gildor. Thanks. It complains about a bad file descriptor... even though I do not know why. Thanks.
<gildor> windows or linux ?
<yziquel> gildor: linux.
<gildor> yziquel: maybe already closed file descriptor ,
<gildor> ?
<yziquel> gildor: that's possible.
<yziquel> gildor: what happens if i'm waiting in a Thread.select and, meanwhile, i close one of the file descriptors it's waiting on? Will it continue to wait for some event on another file descriptor, or just raise an error?
<gildor> yziquel: I think it will raise an error
<yziquel> gildor: hmm. Painful. Lots of mutexes to use, then... thanks.
Associat0r has quit []
<Yoric[DT]> yziquel: unless I'm mistaken, OCamlNet's equeue has a much more friendly interface than Unix.select.
itewsh has joined #ocaml
<yziquel> Yoric[DT]: thanks. I'll have a look at it at some point.
<Yoric[DT]> The site seems down at the moment, though.
<yziquel> i've got another issue (will look at equeue later on): I'd like thread 1 to wait for thread 1 to get in the Thread.select statement. I want thread 1 to resume activity only when I'm sure that thread 2 is listening. Anyone has suggestions on how to do that?
<yziquel> Sorry: I'd like thread 1 to wait for thread 2 (not 1).
ozy` has quit [Read error: 110 (Connection timed out)]
<Yoric[DT]> Well, you can try playing with Condition and Event.
itewsh has quit [Remote closed the connection]
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
ozy` has joined #ocaml
Linktim_ has quit ["Quitte"]
Linktim has joined #ocaml
filp has quit [Read error: 110 (Connection timed out)]
filp has joined #ocaml
<yziquel> Yoric[DT]: As far as I understand these two modules, they are not satisfying: The condition that I need is "waiting in Thread.select"... Can't trigger it before being in Thread.select (race condition), and can't trigger after Thread.select, 'cause I'd be waiting in Thread.select for quite a long time... As for the Event library, the situation seems to be the same.
Submarine_ has joined #ocaml
Submarine_ has quit ["Leaving"]
filp has quit ["Bye"]
yziquel has quit [Read error: 104 (Connection reset by peer)]
yziquel has joined #ocaml
Axioplase has joined #ocaml
<yziquel> Sorry, had trouble with my computer. To sum up, what would be really great would be to have a Condition.select statement, doing the same thing as Thread.select, and sending a signal to the other threads waiting for that signal. Can this be done?
Axioplase is now known as Axioplase_
yziquel has left #ocaml []
<Yoric[DT]> Sorry, I haven't toyed with select, so I'm not sure.
<Yoric[DT]> There's an Event.select, though, isn't it?
yziquel has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
pantsd has joined #ocaml
<flux> I suppose the Event-module can be used for most synchronizaton purposes
<flux> ..once you get the idea on how to use it :)
<flux> the first time I saw its interface it didn't quite dawn on me; I had to refer to concurent ml documentation to get it
filp has joined #ocaml
<Yoric[DT]> I actually liked it when I saw it first.
<Yoric[DT]> I just haven't used it many times -- and never in conjunction with Unix.
<flux> it's difficult to interface anything non-file with Unix.select..
<flux> you basically need to have another thread with a pipe that feeds stuff to it
<flux> (or process)
<flux> I suppose it might be possible with signals and polling too, but using a pipe sounds more robust
filp has quit ["Bye"]
GustNG1 has joined #ocaml
GustNG2 has joined #ocaml
GustNG has quit [Read error: 110 (Connection timed out)]
fremo has quit ["leaving"]
GustNG1 has quit [Read error: 110 (Connection timed out)]
davidm123 has joined #ocaml
<davidm123> is there a recommended way to build mingw binaries under a cygwin version of ocamlc?
<davidm123> I tried "ocamlc -custom -verbose -ccopt '-mno-cygwin' ...", but that tries to link to /usr/lib/ocaml/libcamlrun.a (a cygwin library)
hkBst has quit [Read error: 104 (Connection reset by peer)]
<Yoric[DT]> Mmmhh....
<Yoric[DT]> I'm trying to compile a file foo_bar.ml as if it were module foo.ml .
<Yoric[DT]> Any idea?
Snark has quit ["Ex-Chat"]
<Yoric[DT]> (technically, I have a module which I want to compile both as a Mylibrary.cma and Mylibrary_nothreads.cma)
<Yoric[DT]> My explanations are unclear.
<Yoric[DT]> Let me restart.
<Yoric[DT]> I have two modules, one defined in a.ml and the other one defined in a_nothreads.ml .
<Yoric[DT]> I would like to compile them respectively to a.cma and a_nothreads.cma .
<Yoric[DT]> Now, they define the same interface, except one works when linked with -thread and the other one when not linked with -thread.
<Yoric[DT]> So I'd like both of them to define the same module A.
<Yoric[DT]> Of course, with a.ml and a_nothreads.ml, I'm going to end up rather with two distinct modules A and A_nothreads .
<Yoric[DT]> Which is not as nice.
<bacam> But for some reason you want to avoid a separate nothreads directory?
<Yoric[DT]> Any idea?
<Yoric[DT]> Well, I can't think of any way of having two fully separate directories with OCamlBuild.
<bacam> Ah, I've no experience of ocamlbuild.
<Yoric[DT]> Yeah, with a regular Makefile, it wouldn't be too hard.
<Yoric[DT]> Mmmhh... I may have an idea.
<Yoric[DT]> Ok, separate subdirectories are possible with ocamlbuild, after all.
Axioplase_ is now known as Axioplase
<Yoric[DT]> Gasp.
<Yoric[DT]> Except something is bound to fail.
<Yoric[DT]> Mmmhh....
<Yoric[DT]> Well, I guess I'm going to make two distinct findlib packages, after all.
Palace_Chan has joined #ocaml
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Amorphous has joined #ocaml
<palomer> :O>
jlouis has quit ["Leaving"]
jlouis has joined #ocaml
yziquel has quit [Read error: 110 (Connection timed out)]
Submarine has quit [Read error: 110 (Connection timed out)]
comglz has joined #ocaml
ofaurax has joined #ocaml
Palace_Chan has quit ["Palace goes to sleep"]
comglz has quit ["AddToFunc ExitFunction I Exec exec sudo halt"]
Linktim has quit ["Quitte"]
Yoric[DT] has quit ["Ex-Chat"]
_JusSx_ has joined #ocaml
_JusSx_ has quit [Client Quit]
johnnowak has joined #ocaml
yziquel has joined #ocaml
snhmib has joined #ocaml
yziquel has quit [Read error: 110 (Connection timed out)]
guillem has quit [Remote closed the connection]
Axioplase is now known as Axioplase_
tar_ has joined #ocaml
jlouis has quit ["Leaving"]
Philonous has joined #ocaml
ofaurax has quit ["Leaving"]
johnnowak has quit []
pattern has left #ocaml []