<rwmjones>
probably you need to add -lapr to the command line there ... there's a Fedora meeting this evening, and if that goes well then I'll be packaging up mod_caml in a day or two anyway
<rwmjones>
there are other, known problems with mod_caml & apache 2.2 at the moment
slipstream-- has quit [Read error: 104 (Connection reset by peer)]
slipstream has joined #ocaml
love-pingoo has joined #ocaml
<oracle1>
hi. is there a library or so which provides random numbers following a distribution other than uniform?
nearfar has quit [Read error: 110 (Connection timed out)]
screwt8 has quit [Remote closed the connection]
<oracle1>
probably ocamlgsl
<G>
rwmjones: evening
olegfink has joined #ocaml
<rwmjones>
G evening
<rwmjones>
or lunchtime as it is here :-)
<G>
heh
<G>
I must go back and read all the ocaml stuff on the fedora lists
<G>
had an exam last week, but for some reason I'm even busier now ;)
Hadaka has quit [kubrick.freenode.net irc.freenode.net]
tree_ has quit [kubrick.freenode.net irc.freenode.net]
Hadaka has joined #ocaml
tree_ has joined #ocaml
Hadaka has quit [Read error: 104 (Connection reset by peer)]
<rwmjones>
kelaouchi, if you use 'nm -D' on the various libraries which Apache has installed, you should be able to list out the symbols they provide until you find the one needed
<rwmjones>
for example:
<rwmjones>
nm -D /usr/lib/libapr-1.so.0.2.7 | less
<rwmjones>
as an example has:
<rwmjones>
000000000000fed0 T apr_file_open
<rwmjones>
which means that apr_file_open is provided (as a 'T'ext symbol, so it's a function)
<rwmjones>
and also has:
<rwmjones>
U closedir
<rwmjones>
which means that closedir is 'U'ndefined (ie. provided by another library - in this case, glibc)
<rwmjones>
T = text (functions), D = data, U = undefined (required by this library, provided by another library)
ziggurat has joined #ocaml
mbishop_ has joined #ocaml
eradman has quit [Remote closed the connection]
eradman has joined #ocaml
Naked has joined #ocaml
Naked is now known as Hadaka
<kelaouchi>
thx rwmjones ;)
noteventime has joined #ocaml
what3_ has joined #ocaml
<kelaouchi>
not sure this mod_caml is ok anyway
<kelaouchi>
not sure it is up to date
<kelaouchi>
to be able to work with apache v2
mbishop has quit [Read error: 110 (Connection timed out)]
what3 has quit [Read error: 110 (Connection timed out)]
<rwmjones>
kelaouchi, there are some known bugs. If you contact Joel Reymont, he's got it working with latest Apache. I'll be trying to do the same later this week.
what3_ is now known as what3
ziggurat has quit ["Leaving"]
pango has quit [Remote closed the connection]
pango has joined #ocaml
noteventime has quit [Remote closed the connection]
descender has quit [Read error: 110 (Connection timed out)]
descender has joined #ocaml
malc has joined #ocaml
malc is now known as malc_
malc_ is now known as malc
lamby has joined #ocaml
<lamby>
Can anyone think why you must specify "rec" for a recursive call in (Oca)ML?
<malc>
shadowing - let a n = print_int 1; let a n = a n;
<flux>
I don't know the rationale, but I sometimes like to reuse identifier within functions, and if they were recursive, it wouldn't quite work
<flux>
however, for shadowing top-level definitions is what has bitten me a few times, I don't like it :)
<flux>
s/for //
<lamby>
Yes, I'm thinking the shadowing thing is annoying. The only reason I can come up is that there are different formal semantics for recursive method calls and non-recursive.
<lamby>
..And you might need some hand-waving rule so that a prover chooses the right one if you didn't have it explicit.
<rwmjones>
lamby, it's common to want to redefine previous definitions
<rwmjones>
I often write code which looks like:
<rwmjones>
let xs = List.map (...) xs in
<rwmjones>
let xs = List.map (...something else...) xs in
<rwmjones>
where 'xs' is being passed through a series of transformations
<rwmjones>
so you need to be able to tell the different between let (above) and let rec (not used nearly so often)
<tsuyoshi>
so compile that one and see what the speed difference is
rwmjones is now known as rwmjones_away
<flux>
tsuyoshi, which ray.ml did you base that on?
<tsuyoshi>
the minimal one
<flux>
hm
<tsuyoshi>
oh haha I forgot there are a whole bunch of versions on there
<flux>
I took fork.tar.bz2
<flux>
top only displays one process taking 99% cpu
<tsuyoshi>
running forkray?
<flux>
so what am I doing wrong_
<flux>
ah, only ray
<tsuyoshi>
oh ray is the original
<flux>
..so I can just use that and not get anything from ffconsultancy..
<tsuyoshi>
yeah
<flux>
34.695s for the original
<flux>
./forkray > ray.kuva2 34,96s user 0,24s system 196% cpu 17,923 total
<tsuyoshi>
awesome
<flux>
and it produces the same picture
Oxylin has quit [Client Quit]
<flux>
hm, somehow the length of fork.ml surprises me, but I suppose 130 lines is ok
<tsuyoshi>
the version without select was a lot simpler
<tsuyoshi>
I think actually it was a mistake to use an array to store the children's state
<tsuyoshi>
should go back to using a map
<flux>
why can't it use Array.init instead of that Obj.magic-trick?
<Smerdyakov>
Obj.magic? Sounds like someone wants a language with type-level computation.
<tsuyoshi>
flux: no suitable default value
<flux>
init doesn't need default value
<flux>
you provide it a default initialization function
<flux>
and as far as I can see, you could replace that for-loop with Array.init
<tsuyoshi>
which one?
<flux>
the first one in map
<tsuyoshi>
oh
<tsuyoshi>
I tried that actually
<tsuyoshi>
it doesn't work because you can't fork in the middle of an Array.init
<tsuyoshi>
or maybe you can, but both the child and the parent options have to have the same type and I couldn't get it to compile
<flux>
hmm
<flux>
oh, I can see what the problem was, but I fixed it
<tsuyoshi>
the child process doesn't actually ever return.. so if you could fool the type checker into accepting it...
<flux>
assert false will tell that
<flux>
modeemi.fi/~flux/patch
<flux>
(formatting is bad, but I minimized the length of the patch)
<tsuyoshi>
assert false?
<flux>
assert false.
<flux>
it clearly tells that this point of code cannot be reached :)
<flux>
and from the type inference point of view it is 'a
<Smerdyakov>
Just one of many ways of building an expression that has any type.
<tsuyoshi>
oh really
<tsuyoshi>
ohh that's much nicer
<tsuyoshi>
I think a map would still be better than an array though
<Smerdyakov>
It would be even nicer in a more advanced type system where "assert false" requires a proof of unreachability.
<tsuyoshi>
I did a binary search but.. it seems kind of awkward
<flux>
I suppose using array for that specific purpose is ok
<mbishop>
Smerdyakov: what language would have that type system?
<Smerdyakov>
mbishop, Coq does, but you can have even simpler language designs that have similar properties.
<tsuyoshi>
flux: what kind of system do you have?
<bluestorm_>
hm
<flux>
tsuyoshi, dual athlon 1900+ MP
<tsuyoshi>
someone running this on osx got 16 seconds extra system time in the forking version
<flux>
..with linux
<flux>
2.6 series
<tsuyoshi>
I wonder if that means the osx scheduler sucks
<flux>
do you think of trying out how a version that uses marshalling both ways would perform?
<tsuyoshi>
that would be a bit more complicated.. would add another child state for writing
<flux>
but it would allow using less than n processes
<tsuyoshi>
I was also thinking of pipelining it
<tsuyoshi>
less than n processes?
<flux>
well, I suppose you could get that in other means too
<flux>
where n is the length of list to process
<tsuyoshi>
oh it's already doing that
<flux>
oh
<tsuyoshi>
the first argument to map is the number of processes
<flux>
I didn't look that closely :)
<flux>
but the case I was really thinking was doing pmap under pmap
<flux>
it would need some manager process
<tsuyoshi>
that is pretty cool that it gets a nearly 50% speedup though
<flux>
well, yes.. but one cannot just search/replace map with pmap in an application and expect it to work (it will however if you avoid side effects), or get performance boost :). but I believe it has its uses.
<flux>
years ago I wrote a class for c++ that provided fancy syntax for doing for-loops in parallel (forked in constructor and waited in destructor), but it required the result data would be placed in shared memory
<flux>
didn't ever use it for anything, though :)
Smerdyakov has quit ["Leaving"]
Submarine has joined #ocaml
<oracle1>
how can List.for_all throw a Division_by_zero exception eventho I dont do division in the function it calls?
<oracle1>
oh
<oracle1>
dont worry.
<jlouis>
heh
<jlouis>
Isn't it funny: You just have to write a single sentence, end it with a question mark and press enter. Then it reveals itself.
ygrek has quit []
shawn__ has quit [Read error: 110 (Connection timed out)]
love-pingoo has joined #ocaml
pantsd has quit [Read error: 110 (Connection timed out)]
tsuyoshi has quit ["Lost terminal"]
tsuyoshi has joined #ocaml
Smerdyakov has joined #ocaml
<tsuyoshi>
what did flux say his system was again
bluestorm_ has quit ["Konversation terminated!"]
<Smerdyakov>
He said it was fantastic.
<tsuyoshi>
oh I'll just say an athlon running linux
love-pingoo has quit ["Connection reset by pear"]
malc has joined #ocaml
pango_ has joined #ocaml
malc has quit [Nick collision from services.]
malc has joined #ocaml
malc has quit [Nick collision from services.]
malc_ has joined #ocaml
garulfounix has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
<tsuyoshi>
after reading jon's new code I figured out I had a bug in mine
<tsuyoshi>
I've only been closing half of the pipes
<tsuyoshi>
that's what gave me the error before
_blackdog_away has quit ["Ex-Chat"]
bebui_ has joined #ocaml
bebui_ has quit [Client Quit]
<tsuyoshi>
hmm.. what is he comparing to when he says "faster than any language that uses a concurrent GC"
<tsuyoshi>
you could use this same method in any language, really
<tsuyoshi>
it would be pretty easy in lisp, for instance
<tsuyoshi>
if someone hasn't already done it
<Smerdyakov>
And if someone has already done it, it will be really, really hard.
love-pingoo has joined #ocaml
joshcryer has quit [Client Quit]
joshcryer has joined #ocaml
<tsuyoshi>
hmm.. now what if I made it autodetect the number of processors