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
lopex has quit []
Associat0r has quit [Quit: Associat0r]
enthymeme has quit [Quit: thanks for the help, #erlang :3]
dnolen has quit [Quit: dnolen]
joewilliams is now known as joewilliams_away
lamawithonel_ has joined #ocaml
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Ping timeout: 260 seconds]
mfp has quit [Ping timeout: 250 seconds]
alexyk has quit [Quit: alexyk]
mfp has joined #ocaml
Reaganomicon has joined #ocaml
george_z0rwell has quit [Ping timeout: 250 seconds]
khia0 has joined #ocaml
khia0 has left #ocaml []
hcarty has quit [Ping timeout: 250 seconds]
hcarty has joined #ocaml
lamawithonel__ has quit [Read error: Connection reset by peer]
lamawithonel__ has joined #ocaml
joewilliams_away is now known as joewilliams
lamawithonel__ has quit [Read error: Connection reset by peer]
lamawithonel__ has joined #ocaml
lamawithonel__ has quit [Read error: Connection reset by peer]
lamawithonel__ has joined #ocaml
joewilliams is now known as joewilliams_away
lamawithonel__ has quit [Read error: Connection reset by peer]
Associat0r has joined #ocaml
lamawithonel__ has joined #ocaml
lamawithonel__ has quit [Read error: Connection reset by peer]
ankit9 has joined #ocaml
lamawithonel__ has joined #ocaml
ulfdoz has joined #ocaml
Associat0r has quit [Quit: Associat0r]
vivanov has joined #ocaml
ulfdoz has quit [Ping timeout: 240 seconds]
ankit9 has quit [Quit: Leaving]
axiles has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
ankit9 has joined #ocaml
vivanov_ has joined #ocaml
Cyanure has joined #ocaml
edwin has joined #ocaml
ftrvxmtrx has joined #ocaml
rgrinberg_ has joined #ocaml
vivanov__ has joined #ocaml
rgee has quit [Read error: Connection reset by peer]
wishi has quit [Quit: No Ping reply in 180 seconds.]
wishi has joined #ocaml
ikaros has joined #ocaml
thomasga has joined #ocaml
edwin has quit [Remote host closed the connection]
edwin has joined #ocaml
lamawithonel has joined #ocaml
lamawithonel__ has quit [Ping timeout: 255 seconds]
fraggle_ has quit [Quit: -ENOBRAIN]
vivanov__ has quit [Ping timeout: 276 seconds]
vivanov_ has quit [Ping timeout: 276 seconds]
vivanov has quit [Ping timeout: 276 seconds]
fraggle_ has joined #ocaml
<palomer_> hey kids
<palomer_> I've got a fun typing question foryall
<palomer_> I want to do this:
<palomer_> type ('a,'b,'c) foo = ...
<palomer_> type (_,_) bar = Bar: ('a,'b,'c) foo * 'a -> ('b,'c) bar
<palomer_> (which would work in the gadt branch)
<palomer_> how do I do this with first class modules?
Reaganomicon has quit [Read error: Connection reset by peer]
Reaganomicon has joined #ocaml
avsm has joined #ocaml
ankit9 has quit [Ping timeout: 252 seconds]
Reaganomicon has quit [Read error: Connection reset by peer]
Reaganomicon has joined #ocaml
lopex has joined #ocaml
vivanov has joined #ocaml
joelr has joined #ocaml
<joelr> moin
<joelr> how do i fix this error, assuming i'm using native code from the toplevel? Error: Reference to undefined global `SDB'
<joelr> oops, i think i may have answered that. you can't use native code with the toplevel
avsm has quit [Quit: Leaving.]
alfa_y_omega has quit [Ping timeout: 246 seconds]
alfa_y_omega has joined #ocaml
ankit9 has joined #ocaml
alfa_y_omega has quit [Ping timeout: 276 seconds]
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
Tommytom has joined #ocaml
Tommytom has left #ocaml []
lamawithonel has quit [Excess Flood]
lamawithonel has joined #ocaml
avsm has quit [Quit: Leaving.]
palomer has joined #ocaml
palomer_ has quit [Ping timeout: 252 seconds]
lamawithonel has quit [Remote host closed the connection]
joelr has quit [Quit: joelr]
vivanov has quit [Ping timeout: 260 seconds]
fraggle_laptop has joined #ocaml
oriba has joined #ocaml
dnolen has joined #ocaml
<hcarty> I feel special. I just created item #1000 for oasis...
<thelema_> yay
Tommytom has joined #ocaml
<Tommytom> Hello how to make a delay of 10 millisecond
<Tommytom> ?
<thelema_> Tommytom: not with sleep, maybe select? Does it need to be portable? And are you doing something you should do another way?
<Tommytom> I have 3 threads with infinite loop and 100% of my proc, so I want to make sleep.
<thelema_> yup, you're doing something you should do another way
<thelema_> val delay : float -> unit
<thelema_> (in Thread)
<Tommytom> OKay
<Tommytom> In thread module
<Tommytom> It's a server
<Tommytom> To receive information
<thelema_> threads shouldn't sleep and poll for work to do, but should block on events
<thelema_> (or mutex/conditions)
<Tommytom> MMh okay
<Tommytom> With delay it work :)
<Tommytom> Thx you
avsm has joined #ocaml
Tommytom has left #ocaml []
lopex has quit [Ping timeout: 252 seconds]
lamawithonel has joined #ocaml
vivanov has joined #ocaml
<gildor> anyone know, if it is possible to go from Ocsigen's XHTML.t to string ?
<flux> I believe so
<flux> wasn't there a pretty printing function or something?
<gildor> flux: the XHTML.M.pretty_print seems to -> unit
lopex has joined #ocaml
<flux> I seem to recall the function to do the magic wasn't exported or something
<gildor> flux: too ad
<gildor> too bad
<flux> well, it seems that I don't find my source code where I think I'd have done it now
<mfp> gildor: Xhtmlcompact.xhtml_print
<gildor> mfp: great, but [`Html] XHTML.elt, do you think there are support for fragments
<gildor> xhtml_list_print...
<mfp> seems so
dnolen has quit [Quit: dnolen]
oriba has left #ocaml []
ankit9 has quit [Ping timeout: 255 seconds]
george_z0rwell has joined #ocaml
Reaganomicon has quit [Ping timeout: 255 seconds]
philtor has joined #ocaml
impy has quit [Read error: Connection reset by peer]
alexyk has joined #ocaml
KDr2 has joined #ocaml
Smerdyakov has joined #ocaml
alexyk has quit [Quit: alexyk]
ankit9 has joined #ocaml
KDr2 has quit [Quit: Leaving.]
ulfdoz has joined #ocaml
joewilliams_away is now known as joewilliams
philtor has quit [Ping timeout: 255 seconds]
<hcarty> Is it possible to merge documentation comments from foo.ml and foo.mli when building documentation with ocamlbuild?
<rproust> hcarty: I've never seen it done
enthymeme has joined #ocaml
ulfdoz has quit [Ping timeout: 258 seconds]
<hcarty> rproust: Ok, thanks. The documentation says that .ml comments are ignored if a .mli is present. I wasn't sure if there was a work-around available.
<hcarty> Copying comments from .ml to .mli it is then
<thelema_> hcarty: I'm pretty sure there's no workaround
<hcarty> thelema_: Thanks
edwin has quit [Remote host closed the connection]
ankit9 has quit [Quit: Leaving]
edwin has joined #ocaml
<mfp> hcarty: actually, ocamldoc *can* merge the docs from the .mli and the .ml
Smerdyakov has quit [Quit: Leaving]
<mfp> hcarty: you can even specify which parts/tags are to be merged (and which is preferred) with the -m option (in order to merge everything, -mA should do)
<mfp> see also -inv-merge-ml-mli
<hcarty> mfp: Is it possible to do that through ocamlbuild?
<mfp> OTOH dunno about how to pass -mA via ocamlbuild :-/
<mfp> does it accept arbitrary options?
<mfp> hmm how come it allows to specify the command for ocamlc, ocamlopt, ocamldep, ocamlyacc, menhir, ocamllex, ocamlmktop, ocamlrun(!) but not ocamldoc?
<hcarty> mfp: It looks like it does - I'm adding the flags now to test
<thelema_> mfp: well, oops.
<thelema_> mfp: thank you for correcting
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
<hcarty> mfp: "-m A" and "-inv-merge-ml-mli" do not seem to work as I expect them to
<hcarty> But they are being passed to ocamlfind ocamldoc, so I'm likely getting something wrong in the invocation
<hcarty> mfp: The problem seems to be that ocamlbuild only passes the .mli if one exists
<hcarty> I don't know that there is a way to pass both the .ml and .mli
<thelema_> hcarty: you'll probably have to make your own rule
ulfdoz has joined #ocaml
alexyk has joined #ocaml
<hcarty> thelema_: Likely so. I'm not sure I'm willing to go that far yet.
<NaCl> How would I go about specifying that a program needs to link against a specific file in ocamlbuild's _tags?
Tobu has quit [Remote host closed the connection]
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
rossberg has quit [Ping timeout: 264 seconds]
rossberg has joined #ocaml
<thelema_> hcarty: you're willing to write a program to transfer comments from .ml to .mli, but not willing to write a new ocamldoc rule?
<thelema_> NaCl: can't do it in _tags (unless it's a library), have to do it in myocamlbuild.ml
<hcarty> thelema_: Not write a program - copy over the ocamldoc comments manually
<hcarty> thelema_: I've only written one ocamldoc rule before, and I found the process tricky and fraught with peril
<thelema_> hcarty: ah, ok.
ftrvxmtrx has joined #ocaml
<hcarty> If I can find a way to fake it with flags then that would be cool. But I don't see an equivalent to the 'env "%.ml"' function rule definitions get
<NaCl> thelema_: sweet. Although I could just modify lablgtk's META
<adrien> use fedora's?
<NaCl> they use the default one
<adrien> oh?
<adrien> might be copied later on
<NaCl> isn't in the spec file
<adrien> or not
mejalx has joined #ocaml
joewilliams is now known as joewilliams_away
cizra2 has quit [Ping timeout: 244 seconds]
Pepe_ has quit [Read error: Operation timed out]
Pepe_ has joined #ocaml
cizra2 has joined #ocaml
joewilliams_away is now known as joewilliams
<NaCl> adrien: debian has its own META(s)
<adrien> godi too
<adrien> and lablgtk.git//adrien/META too :P
<adrien> if I don't forget about it, I'll push it for comments next week
<thelema_> adrien: does your branch ocamlfind install lablgtk?
<adrien> thelema_: it only changes the META file
<thelema_> :(
<adrien> thelema_: lablgtk's Makefile-s are quite "scary"
jamii has joined #ocaml
<thelema_> I know. I got most of the way into ocamlfind-ifying the install, and it was ugly
<adrien> best would be to oasisfy it
<adrien> gildor told me that was planned (now that it's planned, it only has to be done :p )
<thelema_> adrien: the limits of my oasis-ifying ability are at providing custom commands for configure, make, install
<adrien> yeah, the hardest part: build the tools (for the current host: build==host), run the tools, the (cross-)compile the rest
* NaCl does not know enough ocaml to want to mess with build systems
<thelema_> huh? cross compiling?
<adrien> thelema_: not making it impossible: that means that you have to make it possible to use two different compilers for when you build the tools and when you build everything else
<adrien> and gets funnier since install also installs these tools so you have to cross-compile them in the end too
<thelema_> adrien: I still don't follow - what cross compiling is there in lablgtk?
<thelema_> it's a normal ocaml library that links against C libraries
<adrien> thelema_: there isn't _now_ but a new build system shouldn't make it hard (and we'll probably get an official ocaml cross-compiler in a not-so-distant future)
<thelema_> you mean for compiling lablgtk for windows?
<NaCl> adrien: the debian METAs split them up a little more
<adrien> thelema_: or any platform actually: it's a common issue: the build system builds tools it wants to run on the build computer with the cross-compiler (because someone has set CC=my-cross-gcc)
<adrien> NaCl: direct link?
<adrien> or open vim :P
jamii has quit [Ping timeout: 258 seconds]
Tobu has quit [Remote host closed the connection]
<adrien> NaCl: well, I split too: http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=lablgtk/lablgtk.git;a=blob;f=META;h=5143cb9944ac8a55b0905b99d68be2257d4ea27b actually (this file still has to be actually checked)
Tobu has joined #ocaml
jamii has joined #ocaml
<NaCl> hmmm
sepp2k has joined #ocaml
<NaCl> adrien: the debian package has the GNOME parts split up too
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 255 seconds]
avsm has quit [Ping timeout: 252 seconds]
<NaCl> adrien: and how do I specify threading in _tags so that ocamlfind will pick up on it?
<adrien> NaCl: ocamlbuild, 3.12.0 and -thread?
<adrien> ocamlbuild -use-ocamlfind I mean
<NaCl> ocamlbuild -use-ocamlfind
<NaCl> with "<*>: thread" in _tags
<adrien> it's broken in 3.12.0, fixed in 3.12.1-rc
<NaCl> wooo
<NaCl> so what should I do now?
<adrien> 3.12.1 is something I've been waiting for because of that
<adrien> use lwt threading?
lopexx has joined #ocaml
<NaCl> hmmmm
<NaCl> glib_into_lwt or lwt_into_glib?
<adrien> "Lwt_glib.init ()" so it's lwt into glib
<NaCl> apparently the default is glib_into_lwt
<NaCl> in unix, anyway
Tommytom has joined #ocaml
Tommytom has left #ocaml []
Cyanure has quit [Ping timeout: 258 seconds]
oriba has joined #ocaml
oriba has left #ocaml []
ikaros has quit [Quit: Ex-Chat]
<NaCl> kk
<NaCl> adrien: seems I'm walking on relatively untrodden ground
<adrien> NaCl: actually, this part of code was meant to allow adding new elements to the work-queue while the work-queue is being processed
<adrien> I think; and I'm not sure why it needs to be done in a thread
<NaCl> adrien: so flam3 doesn't block the GUI
<adrien> this code ( http://pastebin.com/sgKDBvzn ) is really unreadable
jamii has quit [Ping timeout: 258 seconds]
<adrien> NaCl: did _you_ add the call to Thread.create or was it from me?
<NaCl> uh, I think that was you
<NaCl> adrien: that was taken straight from the original tarball you gave me a year or two ago
axiles has quit [Remote host closed the connection]
<adrien> you're making me feel old ='(
<NaCl> I already feel old.
jamii has joined #ocaml
<adrien> I'm almost sure this part of code is actually useless and I'm completely sure it's badly written
<adrien> you have a function that takes a predicate and another function "f"; if pred () then it calls f () which returns something *and* changes a variable that is used in "pred"
<adrien> I'm under the impression the call to Thread.create was mostly a work-around for the ugliness of this
<NaCl> uh
<NaCl> don't ask me, I am kind of useless wrt this. :P
<adrien> well: is the code easy to understand? it isn't, so it's crap and deserves to die
<adrien> have you been able to compile it?
<NaCl> if I enable threads, yup
<NaCl> right now, lwt is complaining
<adrien> you can see that when you run it, you can increase or decrease the number of flames left to generate
<NaCl> yeah
<adrien> that's what this ugly code does, as far as I'm concerned, I'd rewrite it
<NaCl> bluh
<adrien> :-)
<NaCl> any ideas on how I should go about trying this?
<NaCl> hmmm
<NaCl> I could make a function that sets up a bunch of threads, sticks them in a list, and runs them interatively
<NaCl> sound like a good idea?
<adrien> ah, I had misread my own code and it's worse than I thought :-)
<NaCl> heh
<adrien> as for your idea, make a list/queue of functions that you then put in a(n) (lwt) thread
<adrien> rather than a list of threads directly
<NaCl> functions, then for each function in the list, bind a thread to it.
<NaCl> hm
<NaCl> does that work if the structure is modified while the list is being used?
<adrien> maybe add a global variable (a queue) that can be modified by everything so that the updates are automatically seen by some kind of worker thread
<adrien> list, that wouldn't work since you don't modify lists
<adrien> you need something mutable
<NaCl> hmm
<NaCl> Array?
<adrien> Queue :P
<NaCl> ah, well, duh. :P
<adrien> resizing arrays doesn't sound like a good plan
<NaCl> woo memory
<NaCl> guess I could make a "jobs" queue
<adrien> or an "'a list ref", but then you have to make sure you'll keep it as this in your code and not suddenly work on an "'a array" (if you, like me, tend to dereference as early as possible)
<NaCl> heh
* NaCl will probably make a structure of (description, thread function)
boscop_ is now known as boscop
<NaCl> adrien: you wrote a license for this. What license do you want to use?
ankit9 has joined #ocaml
<NaCl> going to put it on my git soonish
<adrien> been trying to think about that for one or two minutes now and I don't know :P
<adrien> you get my copyrights about it (I believe you'll rewrite pretty much everything in the end anyway)
<NaCl> I was just going to use the LGPLv2+ or GPLv2+
<NaCl> or both
<adrien> why L?
<NaCl> Uh, good point
<NaCl> or GPLv3+
<adrien> in the context of this application, this doesn't matter much and in these cases, I tend to go for the most copyleft license
<adrien> or the oen with the weakest license? hmmm, can't remember :P
<NaCl> wtfpl, prolly
<thelema_> :) I like the WTFPL
<adrien> my reasonning is "would someone try to make a proprietary fork? will this bite me back?"
<adrien> for flamel, I doubt someone would so bsd/mit/x11/wtfpl all sound good too
<adrien> (more than copyleft license actually, I don't know why I mentionned these in the first place)
lopex has quit []
lopexx has quit []
lopex has joined #ocaml
<NaCl> hmm
vivanov has quit [Ping timeout: 240 seconds]
<NaCl> adrien: I hate software licensing
alexyk has quit [Quit: alexyk]
<adrien> :-)
Anarchos has joined #ocaml
alexyk has joined #ocaml
alexyk has quit [Client Quit]
lopex has quit [Ping timeout: 276 seconds]
<NaCl> adrien: leaning towards MIT
<adrien> NaCl: why?
<adrien> oh, and ISC too
* NaCl shrugs
<thelema_> doesn't matter. just pick one and move on. If you want commercial people to be able to build on your work, pick something from the permissive category, if you want only free derivatives, pick GPL category
<NaCl> commerical people will never build on this thing
<thelema_> then it really doesn't matter, pick whatever you want and move on.
lopex has joined #ocaml
<adrien> we need a dice with "MIT/X11/ISC", "GPLv2", "LGPLv2.1", "GPLv3", "GPLv3+", "BSD", "WTFPL", "Apache", ... sides
lamawithonel has quit [Remote host closed the connection]
<NaCl> last I recall, the MIT/X11/ISC and BSD licenses wire essentially equivalent
<thelema_> there's 2-clause and 3-clause BSD licenses
<NaCl> 2-clause is the same as those other three, IIRC
* NaCl selected 2-clause BSD
jamii has quit [Ping timeout: 258 seconds]
impy has joined #ocaml
zmoazeni has joined #ocaml
edwin has quit [Remote host closed the connection]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
thomasga has quit [Quit: Leaving.]
Associat0r has joined #ocaml
lopex has quit [Ping timeout: 276 seconds]
lopex has joined #ocaml
fraggle_laptop has quit [Ping timeout: 255 seconds]
alexyk has joined #ocaml
BiDOrD_ has quit [Quit: No Ping reply in 180 seconds.]
BiDOrD has joined #ocaml
Modius has quit [Ping timeout: 244 seconds]
Morphous_ has quit [Ping timeout: 240 seconds]
djv has joined #ocaml
orbitz has quit [Ping timeout: 240 seconds]
dnolen has joined #ocaml
orbitz has joined #ocaml
djv has quit [Quit: http://irc2go.com/]
rgrinberg_ has quit [Ping timeout: 276 seconds]
Morphous_ has joined #ocaml
Modius has joined #ocaml
alexyk has quit [Quit: alexyk]
KDr2 has joined #ocaml