infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
rgrinberg has quit []
rgrinberg has joined #ocaml
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
infinity0 has joined #ocaml
infinity0 has quit [Remote host closed the connection]
richi235 has quit [Ping timeout: 252 seconds]
spew has joined #ocaml
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
maattdd has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
AlexRussia has joined #ocaml
maattdd has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ocaml
nomicflux has joined #ocaml
adamrbk has joined #ocaml
AlexRussia has quit [Ping timeout: 268 seconds]
AlexRussia has joined #ocaml
maattdd has joined #ocaml
AlexRussia has quit [Ping timeout: 260 seconds]
nomicflux has quit [Quit: nomicflux]
AlexRussia has joined #ocaml
maattdd has quit [Ping timeout: 268 seconds]
xaimus_ is now known as xaimus
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
nomicflux has joined #ocaml
jao has quit [Ping timeout: 252 seconds]
maattdd has joined #ocaml
maattdd has quit [Ping timeout: 260 seconds]
aubian is now known as Fistine
nomicflux has quit [Quit: nomicflux]
spew has quit [Quit: foobar]
AlexDenisov has joined #ocaml
adamrbk has quit [Quit: Connection closed for inactivity]
copy` has quit [Quit: Connection closed for inactivity]
psacrifice has joined #ocaml
freusque has joined #ocaml
AlexRussia has quit [Ping timeout: 252 seconds]
AlexRussia has joined #ocaml
govg has quit [Quit: leaving]
infinity0 has joined #ocaml
sz0 has joined #ocaml
psacrifice has quit [Remote host closed the connection]
psacrifice has joined #ocaml
MercurialAlchemi has joined #ocaml
AlexRussia has quit [Ping timeout: 258 seconds]
AlexRussia has joined #ocaml
TheLemonMan has joined #ocaml
argent_smith has joined #ocaml
richi235 has joined #ocaml
AltGr has joined #ocaml
kakadu has joined #ocaml
AlexRussia has quit [Ping timeout: 240 seconds]
copy` has joined #ocaml
AlexRussia has joined #ocaml
lucadje has joined #ocaml
<lucadje>
hello everybody
<lucadje>
i'm new in ocaml and i can't find a solution to this message
Orion3k has quit [Ping timeout: 252 seconds]
<mrvn_>
It would really help if you would share this message.
mrvn_ is now known as mrvn
<mrvn>
I'm using in_channel with Unix.select. Problem is that sometimes the channel has data buffered already but nothing left on the FD and then select hangs. How do I check if an in_channel has buffered data?
dhil has joined #ocaml
maattdd has joined #ocaml
<companion_cube>
not sure it's possible
psacrifice has quit []
<flux>
the solution is not to use Unix.select and in_channel together
<flux>
same in C, btw ;)
Orion3k has joined #ocaml
orbifx-m has quit [Quit: Simple IRC: The quit option.]
maattdd_ has joined #ocaml
orbifx has joined #ocaml
<companion_cube>
is it really worth using Unix.select directly, now that Lwt exists?
<mrvn>
never used Lwt before
<companion_cube>
well it's higher level
<mrvn>
does Lwt have something to start another programm and connect it's stdin/stdout?
<mrvn>
You get into performance problems with select way before that though anyway.
sz0 has quit [Quit: Connection closed for inactivity]
<TheLemonMan>
I think that with that many threads the lwt scheduler may be overwhelmed anyway
<companion_cube>
things like libev/libevent/libuv are more modern than "raw" select, I think?
<companion_cube>
TheLemonMan: depends on whether all the threads are active all the time
<TheLemonMan>
they're wrappers over select/poll/kqueue/whatever
<companion_cube>
well they use epoll and the likes if available, so it's better?
<mrvn>
anyway, here is my problem: I want to compute a Mandelbrot fractal on many cores. So I want a pool of processes that can do some computation. Requests are send to stdin, results come from stdout. Then I want to fire requests to compute every pixel at the pool and plot the pixel when the results come in.
<mrvn>
companion_cube: epoll and kqeue are O(1) so way better
<mrvn>
Looking at Lwt I'm thinking combining Lwt_pool with Lwt_process. Is that the right path?
lucadje has left #ocaml [#ocaml]
<TheLemonMan>
you can also fork, pin the fork to a core and use the shared memory feature
<mrvn>
TheLemonMan: not for networking.
<mrvn>
Where is the share memory part hidden?
<TheLemonMan>
well, you said many cores and didn't really specify they are not on the same machine :)
<TheLemonMan>
I mean the linux's shm* functions
<mrvn>
true. Having plain processes just gives me the option to use "ssh host slave" as command.
<mrvn>
TheLemonMan: ouch. Those don't play well with the Gc.
<TheLemonMan>
I think you can just register those as off-heap external buffers
<mrvn>
you can use BigArray.mmap but you basically have to manage them yourself.
<TheLemonMan>
disclaimer, I know little to none about ocaml's gc implementation, so take my advice with a grain of salt
<mrvn>
Or lots of C stubs if you want structured data and not just an array.
<TheLemonMan>
if you only need to store pixels then an array of uint32 is enough
<companion_cube>
mrvn: yes, lwt_pool is cool
<mrvn>
TheLemonMan: if only. I need (float * float * int) at the least
<companion_cube>
mrvn: for display, wouldn't you be better of with 3 arrays instead?
<companion_cube>
struct-of-arrays
<companion_cube>
that would play nicely with bigarray
<mrvn>
companion_cube: I don't see anything getting called when a pool needs to shut down. How do I clean up the processes when they aren't needed anymore?
<mrvn>
companion_cube: struct of arrays kills cache locality though.
<mrvn>
What do I use as "generator" to produce the request to compute a pixel? It's probably not a good idea to create a few million Lwt.t at once.
<TheLemonMan>
mrvn, have you read the recent article about how reddit built /r/place ? they've used a redis instance to store all the pixels
<pirbo>
The result is `Fatal error: exception Invalid_argument("Lwt_unix.on_signal: unavailable signal")`
<pirbo>
(using wine but also in a real windows) any insight about how I can try to debug that?
copy` has joined #ocaml
fraggle_ has joined #ocaml
ryanartecona has quit [Quit: ryanartecona]
ryanartecona has joined #ocaml
jao has joined #ocaml
dhil has quit [Ping timeout: 260 seconds]
<pirbo>
Just so you know if you want to help me. I tried to upgrade from lwt.2.6.0 to 2.7.1 (see https://github.com/pirbo/opam-cross-windows) and the error is now `err:seh:setup_exception stack overflow 3456 bytes in thread 0024 eip 00007f2096b61545 esp 0000000000700880 stack 0x700000-0x701000-0x1700000`
ryanartecona has quit [Quit: ryanartecona]
orbifx has quit [Ping timeout: 240 seconds]
ocml_ has joined #ocaml
hongbo_ has quit [Quit: Connection closed for inactivity]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
richi235 has quit [Ping timeout: 255 seconds]
sz0 has quit [Quit: Connection closed for inactivity]
AlexRussia has quit [Ping timeout: 258 seconds]
AlexRussia has joined #ocaml
richi235 has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
dhil has joined #ocaml
orbifx has joined #ocaml
AlexDenisov has joined #ocaml
orbifx has quit [Ping timeout: 240 seconds]
Xadnem has joined #ocaml
maarhart has joined #ocaml
maarhart has quit [Client Quit]
kamog has quit [Remote host closed the connection]
ygrek has joined #ocaml
silver has quit [Quit: rakede]
argent_smith has quit [Quit: Leaving.]
AlexDenisov has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pilne has joined #ocaml
Xadnem has quit [Ping timeout: 260 seconds]
octachron has quit [Quit: Leaving]
ryanartecona has joined #ocaml
kakadu has joined #ocaml
Xadnem has joined #ocaml
Xadnem has quit [Client Quit]
richi235 has quit [Ping timeout: 240 seconds]
richi235 has joined #ocaml
strykerkkd has joined #ocaml
nomicflux has quit [Quit: nomicflux]
orbifx has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
sh0t has quit [Remote host closed the connection]
ryanartecona has quit [Quit: ryanartecona]
kakadu has quit [Remote host closed the connection]
ocml_ has quit [Quit: Page closed]
snhmib has quit [Ping timeout: 252 seconds]
<vmonteco>
Hello!
<mengu>
hello vmonteco
<vmonteco>
I have a little question, I made a custom type (string * change_numbers) where change_numbers is a record. But I get a syntax error when I try to define this custom type by directly putting the record in the definition (like (string * {s1 : int; s2: int;})) I get a syntax error, why?
<Drup>
vmonteco: because you can't define records like, you need to give them a name