gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
jamii has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Ping timeout: 250 seconds]
ulfdoz_ is now known as ulfdoz
rgrinberg_ has joined #ocaml
jamii has quit [Ping timeout: 276 seconds]
vivanov has joined #ocaml
lopex has quit []
<NaCl> how do I tell ocamlbuild about hygiene exceptions?
<NaCl> maybe if I could spell 'hygiene' it would work better
sepp2k has quit [Quit: Leaving.]
enthymeme has quit [Ping timeout: 258 seconds]
khia0 has joined #ocaml
khia0 has left #ocaml []
joewilliams is now known as joewilliams_away
lamawithonel has joined #ocaml
<NaCl> adrien: who needs queues when I can use http://ocsigen.org/lwt/api/Lwt_sequence
dnolen has quit [Quit: dnolen]
hto has quit [Ping timeout: 258 seconds]
hto has joined #ocaml
dnolen has joined #ocaml
jamii has joined #ocaml
<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?
<adrien> what do you currently have?
<NaCl> error occurse at line 14
<NaCl> I can't use let () = ... there because Lwt_io.printlf doesn't return (), but Lwt.t ()
<thelema_> NaCl: use () around long then/else clauses
<adrien> ( and ) or begin and end
<thelema_> if you really wanted, you could use let _ = ...
<adrien> or the "let () = ..." too (like you have line 10)
<thelema_> `let () = ignore(foo)` seems like bad form
<NaCl> thelema_: that was a hack
<thelema_> let _queue_item = Queue.take ...
* NaCl wonders why the Queue.take is throwing compiler warnings about being a partial applications
<thelema_> naming your variable starting with _ turns off the unused variable warning
<adrien> and always put the "else" clause, this habit helps with such bugs (not )using ( and ) or "begin" and "end"
<thelema_> adrien: I skip 'else' for debugging conditional prints
<thelema_> and pay lots of attention to auto-indenting being wrong
<adrien> thelema_: well, yeah, there are exceptions of course ;-)
<NaCl> adrien: your call to mkdir sucks
<NaCl> :P
<adrien> NaCl: most probably =)
<adrien> if you happen to find something that doesn't suck in
<adrien> my code, tell me ;-)
<NaCl> my code seems to want to run flam3 forever
<NaCl> uh
<NaCl> oh
* NaCl lulz at his noobieness
<adrien> :-)
ankit9 has quit [Quit: Leaving]
yoann__ has quit [Ping timeout: 260 seconds]
<NaCl> nope, still doesn't work
<NaCl> >:(
* NaCl is getting annoyed at the buffered stdout not noticing anything
<NaCl> adrien: this would have been easier with C. >_<
<adrien> flush stdout? flush_all? Printf.printf "something%!"
<NaCl> I did!
<NaCl> I used Lwt's stdio stuff
<adrien> is the thread actually running?
<NaCl> it only flushes once
<NaCl> I disabled the trhead
<NaCl> it's blocking the program
<adrien> doesn't lwt require you to write an extra line of code? (I don't remember lwt stuff very well, I haven't used it a lot)
<rproust> NaCl: are you calling Lwt_main.run?
<rproust> (or Lwt_unix.run, it doesn't matter)
<rproust> also pastebin is down I can look at your code if you pasteit somewhere else
<NaCl> At the moment I have disabled the thread
<rproust> okay
<NaCl> It's currently kind of a mess
<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]
gnuvince has quit [Quit: Lost terminal]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
<eikke> anyone using Vim to edit OCaml might like https://gist.github.com/1043747 :-)
<thelema_> eikke: ewww... 'a -> \alpha?
<eikke> of course :-D ;-)
* thelema_ likes ascii
<thelema_> 7-bit
* eikke likes maths
<thelema_> I admit this might impress some people
<eikke> it's personal taste I guess :-)
<NaCl> File "flamel.ml", line 288, characters 4-4071:
<NaCl> that's very helpful, ocaml.
eikke has quit [Ping timeout: 240 seconds]
cthuluh has quit [Ping timeout: 264 seconds]
jamii has quit [Ping timeout: 258 seconds]
BiDOrD has quit [Remote host closed the connection]
wagle has joined #ocaml
jamii has joined #ocaml
joewilliams is now known as joewilliams_away
cthuluh has joined #ocaml
khia0 has joined #ocaml
khia0 has left #ocaml []
boscop is now known as Boscop
ikaros has quit [Quit: Ex-Chat]
jamii has quit [Ping timeout: 258 seconds]
jamii has joined #ocaml
Morphous_ has quit [Read error: Operation timed out]
jamii has quit [Ping timeout: 258 seconds]
lopex has quit []
joewilliams_away is now known as joewilliams
lamawithonel__ has quit [Ping timeout: 255 seconds]
Morphous_ has joined #ocaml
jamii has joined #ocaml
lamawithonel__ has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]
joewilliams is now known as joewilliams_away
jamii has joined #ocaml
KDr2 has joined #ocaml
jamii has quit [Ping timeout: 258 seconds]