mbishop changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | Grab Ocaml 3.10.0 from http://caml.inria.fr/ocaml/release.html (featuring new camlp4 and more!)
noteventime has quit ["Leaving"]
<tsuyoshi> so, I did a parallel map last night/this morning
mikeX__ has quit ["leaving"]
JeffSmac has joined #ocaml
<JeffSmac> in ocamllex, is there a way to get a rule to return more than one token at a time?
bzzbzz has quit ["leaving"]
<tsuyoshi> ok.. I switched this thing from using maps to arrays and it doesn't compile anymore
<tsuyoshi> oh whoops.. I'm calling fork inside the array init function
<tsuyoshi> jesus.. that's not gonna work
<tsuyoshi> unfortunately I seem to be getting in the habit of using Obj.magic
<tsuyoshi> doesn't seem to be any better way of initializing arrays
<tsuyoshi> goddamnit.. why doesn't the standard library have an array binary search
<tsuyoshi> I wrote my own and it doesn't work
<tsuyoshi> oh it works... I just had the compare arguments in the wrong order
<JeffSmac> You should almost never have to use Obj.magic
<tsuyoshi> JeffSmac: I didn't have to... but I did
<JeffSmac> looking
<tsuyoshi> if anyone has an actual multiprocessor machine to test this code on, I'd like to hear the results
<tsuyoshi> all I have are single processor machines
<tsuyoshi> so it works, but it's not anything impressive really
<JeffSmac> karatsuba multiplication?
<tsuyoshi> karatsuba?
<JeffSmac> nm, i just was looking at your code and it looked like something I'd looked at before
<JeffSmac> but i could try it... i'm on a core duo machine
<JeffSmac> 2 cores
<tsuyoshi> well, let me know
<tsuyoshi> I gotta go now
<tsuyoshi> be back in a few hours
<JeffSmac> ok
jao has quit []
<JeffSmac> where is 'a Enum from?
love-pingoo has joined #ocaml
shawn__ has joined #ocaml
JeffSmac has quit []
Submarine has joined #ocaml
shawn__ has quit [Read error: 110 (Connection timed out)]
shawn has joined #ocaml
oracle1 has quit [Remote closed the connection]
oracle1 has joined #ocaml
love-pingoo has quit ["Connection reset by pear"]
<tsuyoshi> extlib
smimou has joined #ocaml
joshcryer_ has joined #ocaml
Modius has quit [Read error: 110 (Connection timed out)]
joshcryer has quit [Nick collision from services.]
joshcryer_ is now known as joshcryer
rwmjones has joined #ocaml
love-pingoo has joined #ocaml
G has quit [Read error: 110 (Connection timed out)]
Submarine has quit ["Leaving"]
eumenides has quit [Read error: 104 (Connection reset by peer)]
G has joined #ocaml
eumenides has joined #ocaml
<kelaouchi> hello #ocaml
<kelaouchi> wich way can i get the HeVeA symbol as i can get the LaTeX symbol using /LaTeX ?
smimou has quit ["bli"]
eumenides has quit [Read error: 104 (Connection reset by peer)]
sgillespie has quit ["leaving"]
jao has joined #ocaml
love-pingoo has quit ["Leaving"]
mikeX has joined #ocaml
ulfdoz has quit [Remote closed the connection]
ulfdoz has joined #ocaml
mikeX_ has joined #ocaml
olegfink has quit [Read error: 104 (Connection reset by peer)]
olegfink has joined #ocaml
mikeX has quit [Read error: 110 (Connection timed out)]
zarvok has joined #ocaml
cjeris has joined #ocaml
sioraiocht has left #ocaml []
sioraiocht has joined #ocaml
sioraiocht has left #ocaml []
Modius has joined #ocaml
ygrek has joined #ocaml
pango has quit [Remote closed the connection]
pango has joined #ocaml
screwt8 has quit [Remote closed the connection]
screwt8 has joined #ocaml
mikeX has joined #ocaml
mikeX__ has joined #ocaml
slipstream-- has joined #ocaml
slipstream has quit [Read error: 110 (Connection timed out)]
mikeX_ has quit [Read error: 110 (Connection timed out)]
mikeX has quit [Read error: 110 (Connection timed out)]
eumenides has joined #ocaml
eumenides has quit [Read error: 104 (Connection reset by peer)]
eumenides has joined #ocaml
benny has joined #ocaml
smimou has joined #ocaml
benny_ has quit [Read error: 110 (Connection timed out)]
JeffSmac has joined #ocaml
<JeffSmac> does anyone know if it's possible to make ocamllex return more than one token from a single entry?
<tsuyoshi> hmm.. I wonder if I can make this forking map go faster with pipelining
<flux> tsuyoshi, you're talking about the parallel map with fork and friends?
<tsuyoshi> would have to implement a ring buffer for the marshalling and also queue up the results from the children
<flux> I wonder why not use threads for that
<tsuyoshi> flux: yeah I got a couple versions of it working last night
<tsuyoshi> because ocaml threads aren't concurrent
<rwmjones> threads won't give you the SMP speed-up though
<rwmjones> of course you may not care about that ... for OCaml AdWords API we used threads because the problem was network/server side, not client
<tsuyoshi> xavier says they're not going to do a threaded gc because he thinks we should use multiple processes instead
<tsuyoshi> not sure if I agree with him or not
<rwmjones> when we get > 16 core processors (only a few years away) you'll be glad you didn't rely on threads / shared memory for concurrency
<tsuyoshi> why is that?
<rwmjones> because such processors will necessarily be NUMA
<tsuyoshi> numa?
<rwmjones> by which I mean they'll look more like a cluster-on-a-chip than a SMP machine
<rwmjones> NUMA = non uniform memory access
<tsuyoshi> oh really
<rwmjones> it basically describes architectures where each processor has local memory
<tsuyoshi> I have never heard of that
<tsuyoshi> well I mean I've heard of the idea but I didn't know that's what they were planning on doing in the future
<JeffSmac> Just making sure... you guys know about http://camlp3l.inria.fr/ right?
<rwmjones> and accessing the memory of another processor is possible, but much slower
<rwmjones> yup
<tsuyoshi> jeffsmac: yeah
<tsuyoshi> I looked at that and jocaml and I didn't really understand either of them at first glance
<rwmjones> you might want to stick to OCamlMPI - simple and crude, but it will let your program scale over clusters which exist now
joshcryer has quit [Client Quit]
<tsuyoshi> so maybe I should write an mpi map
<tsuyoshi> I don't have any multi core machines but I do have a couple networks of mostly-idle linux desktops I could play with
bluestorm_ has joined #ocaml
Submarine has joined #ocaml
<flux> tsuyoshi, anyway, I don't think for most pmap purposes you should fork right there, but instead fork beforehand a set of worker processes..
<flux> tsuyoshi, perhaps only one for each available core
<flux> but yes, the capability to get real concurrency is nice
<flux> you still might want to use threads, though
<flux> or atleast I'd like to see a nice synchronous Event-module for caml for inter-process communication
<flux> (I like the model a lot, and I don't think I'm even exploiting it to the max..)
JeffSmac has quit []
<tsuyoshi> the problem with forking ahead of time is that then you have to marshall the argument data
<rwmjones> tsuyoshi, what do you mean?
<tsuyoshi> when you fork, all the data that is available to the parent process is copied to the child process
<rwmjones> oh I see, yes
<rwmjones> tsuyoshi, out of interest, what's this for?
<tsuyoshi> if you fork at the start of the program, then generate some data, and then want to pass it to the children to work on, you have to copy it to children
<tsuyoshi> oh, someone on the caml mailing list asked about it
<tsuyoshi> I thought it was an interesting idea but nobody really had any code
<rwmjones> I saw that - I was wondering what you're using it for ... number crunching?
<tsuyoshi> I don't have any use for it personally
<tsuyoshi> the only thing I'm coding right now is a data entry program
<rwmjones> for another take on this, have a look at my "Ancient" library: http://merjis.com/developers/ancient
<rwmjones> if you've got a lot of fixed (read-only) data then it's the way to go
<tsuyoshi> rwmjones: would it work over nfs?
<rwmjones> that's a very good question actually :-) the answer, I think, is yes it would, but you'd definitely want to check it out with a small sample first
<rwmjones> I mean ... you can mmap files over NFS, and it's read-only so there are no locking/concurrency issues, so it _ought_ to work
<tsuyoshi> oh ok.. so there's no locking
<rwmjones> you can lock the shared file explicitly if you want, using ordinary Unix.lockf
<tsuyoshi> hmm.. so it's read-only
<rwmjones> but it shouldn't be necessary, right
<rwmjones> you can actually do dangerous writes to the ancient heap ... _if_ you really know what you're doing
<rwmjones> but it's a fast way to get segfaults if you're careless
<tsuyoshi> so you can write?
<tsuyoshi> could it be used instead of marshalling?
<rwmjones> it actually is very close to marshalling
<rwmjones> it won't work in a mixed 32/64-bit environment for that reason
<rwmjones> it was basically designed to work on clusters of almost identical machines
<Submarine> Astrée forks when it runs on multiprocessors.
<Submarine> the painful thing is sending back the results through a pipe and marshalling
<tsuyoshi> what are "ad-hoc polymorphic primitives"?
<tsuyoshi> oh never mind, I just realized what he meant
love-pingoo has joined #ocaml
Oxylin has joined #ocaml
Oxylin has quit [Client Quit]
mikeX__ is now known as mikeX
shawn has quit ["This computer has gone to sleep"]
clog has joined #ocaml
cjeris has quit [Read error: 104 (Connection reset by peer)]
<tsuyoshi> hmm.. I think I will go back to using a map instead of an array in the forking map
smimou has quit ["bli"]
smimou has joined #ocaml
smimou has quit ["bli"]
smimou has joined #ocaml
pantsd has joined #ocaml
shawn has quit ["This computer has gone to sleep"]
noteventime has quit ["Leaving"]
smimou has quit ["bli"]
ziggurat has joined #ocaml
ziggurat has quit [Remote closed the connection]
_ziggurat has joined #ocaml
_ziggurat has left #ocaml []
ziggurat has joined #ocaml
cmeme has quit ["Client terminated by server"]
cmeme has joined #ocaml