<NaCl>
Query: so if I have a function with no arguments just sitting out in the open, is it assumed to be some value and evaluate it?
<NaCl>
Sure looks like it
* NaCl
was initially confused by his backtrace not saying that the error came from the 'root' or something
wagle has quit [Read error: Connection reset by peer]
wagle has joined #ocaml
KDr2 has quit [Ping timeout: 255 seconds]
KDr2 has joined #ocaml
jamii has quit [Ping timeout: 252 seconds]
dnolen has quit [Quit: dnolen]
hto has quit [Quit: Lost terminal]
axiles has joined #ocaml
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
Cyanure has joined #ocaml
ankit9 has quit [Client Quit]
zorun has quit [Read error: Operation timed out]
zorun has joined #ocaml
edwin has joined #ocaml
Cyanure has quit [Ping timeout: 258 seconds]
Associat0r has quit [Quit: Associat0r]
rgrinberg_ has quit [Ping timeout: 260 seconds]
Cyanure has joined #ocaml
Arsenik has joined #ocaml
Cyanure has quit [Client Quit]
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ankit9 has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
eikke has joined #ocaml
<adrien>
NaCl: a
<adrien>
NaCl: you could do something like "let f = fun () -> function_that_does_the_work param1 param2 param3", so you'll create a closure that captures param{1..3} and then you can simply "Thread.create f" (or anything equivalent, like "List.iter (fun f -> f ()) list_of_tasks"
<adrien>
as you see: don't skip the "()" ;-)
nannto__ has joined #ocaml
nannto_ has quit [Ping timeout: 276 seconds]
nannto_ has joined #ocaml
nannto__ has quit [Ping timeout: 244 seconds]
ikaros has joined #ocaml
thomasga has joined #ocaml
KDr2 has quit [Quit: Leaving.]
ulfdoz has quit [Ping timeout: 258 seconds]
ulfdoz has joined #ocaml
Pepe_ has quit [Ping timeout: 244 seconds]
gildor has quit [Ping timeout: 244 seconds]
gildor has joined #ocaml
sepp2k has joined #ocaml
Pepe_ has joined #ocaml
KDr2 has joined #ocaml
fraggle_ has quit [Quit: -ENOBRAIN]
fraggle_ has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Client Quit]
Vinnipeg has joined #ocaml
ftrvxmtrx has joined #ocaml
ftrvxmtrx has quit [Client Quit]
ftrvxmtrx has joined #ocaml
dnolen has joined #ocaml
<NaCl>
adrien: yeah, the () is necessary
<NaCl>
adrien: well, I got thread spawning to work. Thing is that I need to start GtkThread for it to work
<NaCl>
in all circumstances
ulfdoz has quit [Ping timeout: 276 seconds]
yoann__ has joined #ocaml
<adrien>
hmmm, can't remember
<NaCl>
adrien: anyway, a Queue would make it hard to remove items unless there is some counter somewhere
<NaCl>
I could use the Lwt.sequence type.
<NaCl>
I was also thinking about using numbers buttons with numbers on them, and using them to generate more flames
<NaCl>
instead of and/or including the current spin box
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
<adrien>
I don't know Lwt.sequence but it could work
<adrien>
as for the rest, up to you =)
* NaCl
in the end wonders who's going to use the thing. :P
<adrien>
raela!
<NaCl>
heh
sepp2k has quit [Ping timeout: 255 seconds]
<adrien>
I also have a friend of mine who used them for the poster of some event
dnolen has quit [Quit: dnolen]
ulfdoz has joined #ocaml
<NaCl>
randomly generated ones? :P
<NaCl>
adrien: ^
<adrien>
yup :-)
<adrien>
he wanted a nicely symmetrical one and you quite easily get ones
<adrien>
when you don't want to learn how to program flam3, such things are handy ;-)
<NaCl>
true
sepp2k has joined #ocaml
KDr2 has quit [Quit: Leaving.]
<NaCl>
adrien: also, last night, I managed to make threads work under bytecode but not under native code
<adrien>
not impossible at all
* NaCl
has much to learn
<NaCl>
adrien: so, when is lablgtk going to support gtk3? :P
<adrien>
well, with ocamlbuild -use-ocamlfind on 3.12, you're really facing a bug, and it's possible the META files are made so that you don't have it with bytecode
Arsenik has quit [Remote host closed the connection]
<adrien>
as for gtk3, I don't know :-)
avsm has quit [Ping timeout: 240 seconds]
<adrien>
also, there's now some experimental support for gobject-introspection in lablgtk.git and that might help (you know what I think about it however)
avsm has joined #ocaml
<NaCl>
adrien: would definitely save implementation time if it worked
<adrien>
it works, at least partly
<adrien>
but it's gobject-introspection: for every error you fix, you have 2 new ones, until you stumble on errors in gobject-introspection itself
<NaCl>
mmmm
<NaCl>
adrien: bluh, syntax errors
<NaCl>
adrien: how would I go about using imperative code within conditionals?
<NaCl>
but the interesting stuff is in the let callback () = ... part starting on line 277
<NaCl>
anyway, I've got to run
<NaCl>
bbiab
<rproust>
NaCl: definitely not the right way to chain Lwt effectful expressions
<rproust>
the way lines 278, 279 and 280 are chained (using ;) does not guarantee that the flush happens after the strings being written to the buffer
sepp2k has quit [Quit: Leaving.]
<rproust>
the expression `Lwt_io.printlf … ; Lwt_io.printlf … ; Lwt_io.flush …` actually start three threads
joewilliams_away is now known as joewilliams
<rproust>
NaCl: when you get back, take a look at http://pastebin.com/YqGvs0RL and notice the use of `;` and `>>= fun () ->`
cizra2 has quit [Ping timeout: 276 seconds]
Snark has joined #ocaml
cizra2 has joined #ocaml
nannto_ has quit [Ping timeout: 252 seconds]
ankit9 has joined #ocaml
nannto_ has joined #ocaml
digimmortal has joined #ocaml
digimmortal has quit [Ping timeout: 246 seconds]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
Vinnipeg has quit [Remote host closed the connection]
avsm1 has quit [Client Quit]
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
yezariaely has joined #ocaml
alexyk has joined #ocaml
Anarchos has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
thomasga has quit [Quit: Leaving.]
lamawithonel_ has joined #ocaml
lamawithonel has quit [Ping timeout: 252 seconds]
enthymeme has joined #ocaml
yezariaely has left #ocaml []
eikke has joined #ocaml
<gildor>
all: can you try to send a test mail to gildor@ocamlcore.org and tell me if it bounces
cthuluh has quit [Read error: Connection reset by peer]
<malouin>
gildor: sure
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Ping timeout: 240 seconds]
cthuluh has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
vivanov has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
<gildor>
malouin, thelema_: I got your emails, thx
<thelema_>
gildor: n/p
lopex has joined #ocaml
digdugg has joined #ocaml
<digdugg>
hi is this thing on?
<thelema_>
digdugg: yes, it is
<digdugg>
thelema_: great. back to lurking, just getting started with functional programming. lots to learn.
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 255 seconds]
boscop_ is now known as boscop
eikke has joined #ocaml
avsm has joined #ocaml
ftrvxmtrx has joined #ocaml
eikke has quit [Ping timeout: 246 seconds]
Snark has quit [Quit: Ex-Chat]
axiles has quit [Remote host closed the connection]
jamii has joined #ocaml
ankit9 has quit [Quit: Leaving]
avsm has quit [Quit: Leaving.]
sepp2k has joined #ocaml
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
<NaCl>
rproust: making some progress, thanks for the example/corrections
Tobu has quit [Client Quit]
Tobu has joined #ocaml
eikke has joined #ocaml
eikke has quit [Ping timeout: 250 seconds]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
Tobu has quit [Ping timeout: 264 seconds]
edwin has quit [Remote host closed the connection]
Tobu has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]
jamii has joined #ocaml
<rproust>
NaCl: np, if you need help for lwt related stuff… (never used it with gtk bindings though)
<NaCl>
There is a gtk example in lwt
<NaCl>
I just decided to make a background thread that waits for jobs to enter the queue, then executes them
vivanov has quit [Quit: Lost terminal]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
<rproust>
What's the expected gain (compared to starting threads and letting the main loop execute them)? Is it for the exercise? for control over the running threads?
<NaCl>
There is "exercise", but I'm also (eventually) going to be looking at the output of the process and displaying it in some form in the UI
<NaCl>
if that makes a difference.
<rproust>
okay
<NaCl>
I'm relatively new to messing with multithreading, or ocaml period, so I'm very open to suggestions
<thelema_>
NaCl: try staying with event loops to begin.
<rproust>
well lwt makes it easy to do multithreading (IMHO) but you have to understand how to use monads before you can use it properly
<NaCl>
yeah. that I do not.
<rproust>
and then you have to understand how and when threads are started (considering there's no start, spawn, fork or anything of the sort)
<NaCl>
yeah, I was looking for that at first. :P
<rproust>
NaCl: the type checker can help you. If you use ; or let..in in the wrong place it will tell you.
<NaCl>
if I were to use a the event loop... bleh, I think that was what I was doing earlier (incorrectly)
<NaCl>
I got the "scheduler" idea working, but I'll try the "launch from loop" idea again.
lopex has quit [Ping timeout: 276 seconds]
<rproust>
just iter/map/fold over the queue/sequence you register your jobs onto
<NaCl>
and then check if the iteration is running before trying to relaunch it again
<NaCl>
that appears to have been my problem previously
<rproust>
you want to have only one job executing at a time?
<NaCl>
for now
<rproust>
there's a iter_s that iterates sequentially
<NaCl>
yeah, I saw that
<rproust>
(not that good for the exercise though)
<NaCl>
eventually, these jobs will take 30 minutes to do on my quad-core machine. I think one-at-a-time is prudent. :P
<rproust>
you can also handle thread pools with Lwt_pool
<rproust>
that makes it easy to run 4 threads on a quad-core
eikke has joined #ocaml
<NaCl>
the jobs to be launch thread themselves
<NaCl>
*launched
<NaCl>
but yeah, I'll look into it
<NaCl>
maybe if I can lower the time to render the previews to < 10 seconds
lopex has joined #ocaml
wagle has quit [Read error: Connection reset by peer]