<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>
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: 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.]