<flux>
hm, funny, ocaml-ev works fine when it's not a library, but segfaults immediately when I compile it with ocamlfind -package ocaml-ev etc
Mr_Awesome has joined #ocaml
<flux>
ahha, the problem of naming my module/library "ev" in the precense of actual system library ev, apparently..
middayc has quit [Read error: 110 (Connection timed out)]
middayc has joined #ocaml
middayc_ has quit [Read error: 110 (Connection timed out)]
|Catch22| has quit []
shortcircuit is now known as _shortcircuit
<flux>
hmph, can't understand why now if fails to find any symbols from the system libev, even though I have -cclib -lev
<flux>
it works if I put use the .a version, though, but I don't think I used that one before
<flux>
well, almost works, it's still missing functions from librt
Robdor has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]>
hi
khigia has left #ocaml []
AxleLonghor1 has left #ocaml []
ttamttam has joined #ocaml
naufraghi has joined #ocaml
jlouis has joined #ocaml
bluestorm has joined #ocaml
jlouis_ has quit [Read error: 110 (Connection timed out)]
seafood_ has quit []
Robdor has quit ["Konversation terminated!"]
<flux>
finally.. I always get hit by this, I inadvertently produce some .a or .so that has the same name as the original library, and things break horribly :)
<flux>
maybe I'll learn next time..
naufraghi has quit []
<evn>
yeah i do that too
<evn>
worst is, whether it breaks becomes totally platform dependent
<flux>
anyway, following the guideline "release early, release often", I put on v0.2 of ocaml-ev online; library issues (almost) fixed, dynamic loading to toplevel is the remaining issue..
mwc has quit ["Leaving"]
<flux>
hm, I took a peek at the perl interface, and I'm thinking: would it be better if the function argument was the last in the functions, instead of the first?
<flux>
usually ocaml functions have the function as the first argument, but I don't know if it's the best model here..
OChameau has joined #ocaml
hkBst has joined #ocaml
<bluestorm>
hm
<bluestorm>
stupid system-stuff question
<bluestorm>
i have a program that waits for input (on stdin) and prints output (stdout) in a loop
<bluestorm>
i would like to call it from an ocaml program, ie. give it some input, and get the output back
<flux>
and?
<bluestorm>
i've tried Unix.open_process but if i only give the input an flush it, the program don't get any end-of-line, and wait indefinitely
<bluestorm>
(then Unix.close_process ...)
<bluestorm>
i got it working by actually closing the channel
<flux>
two-way communication can be tricky, in a deadlockky way..
<bluestorm>
and then, using Unix.close_process
<bluestorm>
but it looks a bit ugly :D
<flux>
I usually just build it with Unix.fork, Unix.dup, etc
<bluestorm>
let foo a b = if true = false then a else b ?
<bluestorm>
hmm
<bluestorm>
doesn't work :p
<Yoric[DT]>
Nope.
<Yoric[DT]>
Actually, adding just one variant would be sufficient.
<mfp>
can you use CPS?
<mfp>
something like (alpha -> 'a) -> (beta -> 'a) -> (alpha union beta -> 'a)
<Yoric[DT]>
Possibly.
<Yoric[DT]>
But would that work ?
<Yoric[DT]>
# let f (a:[> ] -> 'a) (b:[> ] -> 'a) x = ( a x, b x );;
<Yoric[DT]>
val f : (([> ] as 'a) -> 'b) -> ('a -> 'b) -> 'a -> 'b * 'b = <fun>
<Yoric[DT]>
Not exactly what I want.
<mfp>
hmm you'd need to use camlp4 to expand the cases in order to dispatch to the appropriate function in the generated (a union b -> 'a) func
<Yoric[DT]>
But how can I even specify (a union b) ?
<mfp>
you don't, you just use pattern matching #a as x -> ... | #b as x-> ... the problem is that you need the constructors, it's not generic
<bluestorm>
hmm
<bluestorm>
ocaml camlp4o.cma
<bluestorm>
# type f = [> ];; ()
<bluestorm>
Assertion failed, file "camlp4/Camlp4/Struct/Camlp4Ast2OCamlAst.ml", line 262, char 8
<bluestorm>
heh, bugs in revised syntax too
<mfp>
works with 3.10.1
<bluestorm>
hm
<bluestorm>
you're right, it's a 3.10.0 console
<Yoric[DT]>
Anyway, gotta run.
<Yoric[DT]>
Cheers.
Yoric[DT] has quit ["Ex-Chat"]
flx has joined #ocaml
flux has quit [Read error: 104 (Connection reset by peer)]
letrec has quit [Read error: 110 (Connection timed out)]
letrec has joined #ocaml
munga has joined #ocaml
ttamttam has left #ocaml []
Quaver has quit []
Quaver has joined #ocaml
LordMetroid has joined #ocaml
jlouis_ has joined #ocaml
flx is now known as flux
<flux>
any comments on my parameter order dilemma I mentioned?-) for example I have a function timer_init : (timer cb -> unit) -> offset -> interval -> unit
<flux>
and a load of other _init -functions which all always have a function parameter, and always as the first one
<flux>
is that better than going the "function as last argument" route?
jlouis has quit [Read error: 110 (Connection timed out)]
<bluestorm>
hm
<bluestorm>
flux: how do you imagine partial application in that case ?
Yoric[DT] has joined #ocaml
<flux>
bluestorm, I think it's a rare incident when one wants to partially apply those functions
<flux>
I wonder what kind of application would be more common then
<bluestorm>
yes but in my experience, the argument you'll want to partially apply is often the one you'll naturally want at the first place
<bluestorm>
it might be some mindset of ML programmers, though
naufraghi has joined #ocaml
naufraghi has left #ocaml []
<flux>
interesting.. my main module apparently runs before my module has a change to run its top level expressions
<flux>
how is that possible?
<flux>
and it actually depends somehow on how I compile it
<flux>
if I explicitly put .cmo-files on the command line they do get exectued, but I use .cma -files, they don't
<flux>
how do I know this? I have a main level expression in ev.ml that says Printf.printf "registering..\n%!", yet a c-function is called before that gets outputted
<flux>
is this why some modules have an additional init-module? hmm..
musically_ut has quit [Remote closed the connection]
<flux>
ahha, the init module might have solved the issue
musically_ut has joined #ocaml
uuuppz has quit [Read error: 113 (No route to host)]
musically_ut has quit [Remote closed the connection]
mfp has quit [Read error: 104 (Connection reset by peer)]
seafood_ has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
musically_ut has joined #ocaml
musically_ut has quit [Remote closed the connection]
musically_ut has joined #ocaml
dwmw2_gone is now known as dwmw2
TheLittlePrince has joined #ocaml
uuuppz has joined #ocaml
naufraghi has joined #ocaml
<naufraghi>
Hello!
<flux>
hello.
<naufraghi>
Is OCaml applying as OS project for Summer Of Code?
<naufraghi>
google one
<flux>
no idea. there is the ocaml summer project ran by jane street, though.
<flux>
well, atleast was last year
<naufraghi>
I think 2008 too
TheLittlePrince has quit [Client Quit]
<naufraghi>
what can be a non core improvement one can work on?
<naufraghi>
I was thinking about a doctest framework
<flux>
doctest?
<naufraghi>
like in python, pieces of code inside the comments
<naufraghi>
like a cut and paste from the toplevel
<naufraghi>
they are executed by the unittest framework
<naufraghi>
and the output in the comment must the same as the output of the new excecution
<naufraghi>
they are good for prototyping
<naufraghi>
and for doc allignment
<naufraghi>
(my wireless connection is up and down and up...)
<naufraghi>
do you think such a work could be usefull?
olleolleolle has joined #ocaml
ardor has quit []
middayc has quit []
seafood_ has quit []
jsk has joined #ocaml
naufraghi has left #ocaml []
<flux>
I don't know, I haven't used one
AxleLonghorn has joined #ocaml
naufraghi_ has joined #ocaml
naufraghi has joined #ocaml
naufraghi_ has quit [Read error: 104 (Connection reset by peer)]
postalchris has joined #ocaml
<naufraghi>
hello again, back with the evolution of yesterday geometric code!
_shortcircuit has quit [Read error: 104 (Connection reset by peer)]
<naufraghi>
have a look at the timing at the botton
shortcircuit has joined #ocaml
<naufraghi>
the generic "area" is 2 times slower...
<naufraghi>
I can find the "problem" in the "to_cpoints" map
<naufraghi>
some hint to mantain the generic code and the performance too?
RobertFischer has joined #ocaml
ziph has quit []
pango has quit [Remote closed the connection]
postalchris has quit ["Leaving."]
postalchris has joined #ocaml
pango has joined #ocaml
Morphous has joined #ocaml
TheLittlePrince has joined #ocaml
<thelema>
naufraghi: can I answer your question about ~step:(a + step)
marmottine has joined #ocaml
jdev has quit [Remote closed the connection]
jdev has joined #ocaml
munga has quit ["Leaving"]
<thelema>
naufraghi: building a list of 100,000 points, converting it to 100,000 cpoints, and then processing the second list doesn't gain you efficiency. what do you get if your trapezoid function had a dual that worked on boxed points? This would save the GC the work of collecting 100,000 nodes
Morphous_ has quit [Read error: 110 (Connection timed out)]
Linktim has joined #ocaml
LordMetroid has quit ["Leaving"]
<naufraghi>
I'm back
<naufraghi>
thelema:
<naufraghi>
thelema: yes, I'd like to understand the missing :
<naufraghi>
in ~step
<thelema>
~step means ~step:step
<thelema>
I doubt you want the step to increase each time, you want the same step between points
delamarche has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
Linktim_ has joined #ocaml
naufraghi_ has joined #ocaml
naufraghi has quit [Read error: 104 (Connection reset by peer)]
Linktim- has joined #ocaml
<naufraghi_>
thelema: ok, dumm question :P I was missing a parameter
jlouis has joined #ocaml
AxleLonghorn has left #ocaml []
bongy has joined #ocaml
Linktim has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
jlouis_ has quit [Read error: 110 (Connection timed out)]
Haveo has joined #ocaml
Haveo has left #ocaml []
Linktim_ has joined #ocaml
coucou747 has joined #ocaml
olleolleolle_ has joined #ocaml
love-pingoo has joined #ocaml
bongy has quit ["Leaving"]
Linktim- has quit [Read error: 110 (Connection timed out)]
Linktim- has joined #ocaml
dwmw2 is now known as dwmw2_gone
ygrek has joined #ocaml
delamarche has quit []
olleolleolle has quit [Read error: 113 (No route to host)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
TheLittlePrince has quit [Client Quit]
Linktim- has quit [Connection timed out]
olleolleolle_ has quit [Read error: 104 (Connection reset by peer)]
olleolleolle has joined #ocaml
middayc has joined #ocaml
Linktim- has joined #ocaml
naufraghi_ has left #ocaml []
ttamttam has joined #ocaml
jderque has joined #ocaml
Linktim_ has joined #ocaml
jlouis_ has joined #ocaml
LordMetroid has joined #ocaml
goalieca has joined #ocaml
middayc has left #ocaml []
Linktim- has quit [Read error: 110 (Connection timed out)]
Linktim_ has quit [Read error: 110 (Connection timed out)]
jlouis has quit [Read error: 110 (Connection timed out)]
OChameau has quit ["Leaving"]
naufraghi_ has joined #ocaml
naufraghi_ has left #ocaml []
uuuppz has quit [Read error: 113 (No route to host)]
musically_ut has quit [Remote closed the connection]
musically_ut has joined #ocaml
ita has joined #ocaml
<jonafan>
anybody ever use wxOcaml?
bongy has joined #ocaml
postalchris has quit [Read error: 113 (No route to host)]
postalchris has joined #ocaml
uuuppz has joined #ocaml
ttamttam has left #ocaml []
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
middayc_ has joined #ocaml
<RobertFischer>
Is there an Erlang-style messaging library in existence for Ocaml?
<bluestorm>
hm
<bluestorm>
there was something from a Summer Project
<bluestorm>
but i'm not sure what they've achieved, and it may not be maintained anymore
<bluestorm>
RobertFischer: and there is JoCaml wich if i understand correctly (but i don't know JoCaml) provides similar things
<bluestorm>
(in a maybe more camlish way)
ciscbrain has joined #ocaml
musically_ut has quit [Remote closed the connection]
<RobertFischer>
"The execution of JoCaml programs can be distributed among numerous machines, possibly running different systems; new machines may join or quit the computation. At any time, every process or expression is running on a given machine. In this implementation, the runtime support consists of several system-level processes that communicate using TCP/IP over the network."
<flux>
maybe code mobility means something else, such as populating nodes with code over the network?
<RobertFischer>
Or moving code between Ocaml and JoCaml implementations?
<RobertFischer>
That was what I thought it meant.
<hcarty>
I think code mobility in this case is the ability of an individual process being able to move from one system to another
<RobertFischer>
A process is an OS-specific term -- it's got a PID and that kind of stuff.
<hcarty>
s/being able//
<RobertFischer>
So I'm not sure what it means to move a process from one system to another.
<hcarty>
Whatever the proper replacement for process is then
<RobertFischer>
What are you trying to get at when you say "process"?
<hcarty>
Mobile process, or something similar
<hcarty>
A process in the OS sense, I suppose. I do not know the proper terminology
<hcarty>
Under some systems, a running process can be migrated to a different node in a cluster, for instance
<pango>
yup, like with Mosix
<pango>
(no personal experience with it, though)
<hcarty>
pango: Yes, Mosix is what I was thinking of
bongy has quit [Read error: 110 (Connection timed out)]
<RobertFischer>
So you're talking about moving an entire executing program image to another system.
<RobertFischer>
I don't need that so much.
<RobertFischer>
So that's fine.
aheller has left #ocaml []
<RobertFischer>
One thing that would be cool is the ability to "push" code to a client.
<RobertFischer>
So a client would connect, the server would say, "Here's the instructions to process Foobar.", and then it would start delegating Foobar processing to the client.
ita has quit ["Hasta luego!"]
<hcarty>
Actually... that looks like what the JoCaml docs are calling "code mobility"
<hcarty>
The docs say sending a functional value with give a run-time error
<RobertFischer>
Yeah.
<RobertFischer>
I'm reading about that right now.
<RobertFischer>
That's kinda sad.
<hcarty>
If you included the code on both ends you could use a variant or string to tell the client what to run. That would be much less flexible though.
ciscbrain has quit []
<RobertFischer>
And it creates an administration problem.
<RobertFischer>
I've got to make sure the codebase is kept in sync in both places.
<RobertFischer>
This also makes deploying a client a bit more painful.
RobertFischer has left #ocaml []
RobertFischer has joined #ocaml
* RobertFischer
lives...AGAIN!!!
<RobertFischer>
If you think of a clustered environment (e.g. cloud computing), it'd be a lot nicer to have bringing up a client consist of running an application and pointing it at a server.
<RobertFischer>
And then, if you wanted to change what the node does, you simply stop that process, start the same program, but point it at another server.
<RobertFischer>
That'd be slick.
<Yoric[DT]>
RobertFischer: http://jocaml.inria.fr/ "Disparition of mobility features, sacrified for the sake of OCaml compatibility."