<alexyk>
what's the best structure from Batteries to keep a set of strings?
<flux>
Set.StringSet?
<adrien>
ls
<adrien>
argh :P
<alexyk>
flux: what's the advantage / disadvantage of PSet?
<flux>
alexyk, I guess it works for this case. the main advantage is that you can handle different sets with the same non-functorized code and the main disadvantage that certain operations might work in unexpected ways because the type system doesn't guarantee that the sets are the same
<flux>
in particular, union/inter/diff/compare/equal/subset/compare_subset might work differently
<alexyk>
hmm
<flux>
infact my manual page of BatPSet doesn't even mention union..
<alexyk>
union is there
<flux>
I might possibly have an old version of the manual page
<alexyk>
I just say module P=PSet in repl :)
_andre_ has quit [Quit: leaving]
rgrig has quit [Quit: Leaving]
<flux>
hmm, apparently my man-pages-rule from my tree went away along with OMakefile..
<flux>
doc doesn't build for me :-(
<flux>
src/batSeq.mli : [Invalid_argument] is not a valid exception constructor in "@raise [Invalid_argument] if given sequences of different length."
<alexyk>
btw, do folks still omake? I need to get away from a Makefile, and wonder why more projects use ocamlbuild now
<dark>
alexyk, I thought it was somewhat dead, but I saw a new release (or threat to release) that put me to hope
<dark>
on my part i'm using omake for my own little ocaml things
<alexyk>
dark: for some reason, it didn't "just work" for me :(
<flux>
alexyk, well, ocamlbuild is a decent build system that comes with ocaml :)
<dark>
yeah it didn't just worked for me too
kuatto has quit [Ping timeout: 255 seconds]
<dark>
but i was expecting makefile conventions. for example, i didn't knew that for setting an environment variable i would have to call setenv
<dark>
setenv(a, b) i think
<alexyk>
aha
<dark>
also i miss some ocamldoc thing. but Xen people has some ocamldoc function that i could use. (yeah, i haven't knew, but they use ocaml for their server o.o)
<dark>
anyway after I just saw an working OMakefile and tweaked and so on it works like a charm
<dark>
and for tex projects too (but it is less useful because all my tex things are single-file little things)
<dark>
lablgl docs anyone?.-.
<flux>
maybe you can build them yourself? if it comes with the annotations..
<dark>
I'm trying.. the source itself has no annotation
<dark>
it was generated automatically it seems
<flux>
well, the I guess the ocamldoc would be very sparse
<dark>
but i would be happy with some doc which showed the interfaces
<dark>
i have some mli here, can i get some ocamldoc from them?
drunK has joined #ocaml
<dark>
does labels have some kind of runtime overhead?
<flux>
ocamldoc foo.mli
<flux>
they don't
<dark>
or are they fully resolved at compile time? (I'm guessing that with separate compilation i would have issues)
<dark>
like my .cmo calling a labelled function from a module it does not have the code. (it would resolve this while linking?)
kuatto has joined #ocaml
<flux>
it has its interface
<flux>
the .cmi file
<flux>
if you don't have a .cmi-file for a module, you cannot access anything in it
<dark>
some files had annotations after all.. but nowhere in the source ocamldoc was called, except for a example with caml-images
<flux>
ocamldoc -html *.mli might give you something
<flux>
I have actually used very little ocamldoc :)
<dark>
(yes, i needed the -html)
<dark>
it looks like this binding is somewhat incomplete
<dark>
i don't know much about opengl, but opengl has some extension mechanism
<flux>
apparently it's more complete, but possibly less safe and not so ocamlish
<dark>
Void pointers are represented by the polymorphic type 'a
<dark>
this is interesting
<dark>
Note that most OpenGL implementations use single-precision floating point internally, even if the call is made with an API function using doubles. OpenGL 3.0, due to be released in 2008, will only support single precision floating point. > should I worry with this double-to-float conversion? (performance-wise)
<flux>
you know that ocaml 'float' is actually 'double'?
<flux>
I wouldn't worry about it
<dark>
yes
<flux>
I mean, it's not like it's loss of precision. possibly loss of memory bandwidth.
<dark>
I mean: isn't such conversion expensive?
<dark>
I suppose that if one could handle directly with float, it would have less overhead
<flux>
I can't tell. I'd imagine not very expensive. definitely more expensive than not doing it :)
<flux>
I'm under the impression that conversions between integers and floating point numbers is more expensive
<flux>
you could benchmark it :)
<dark>
I don't know how to do make good benchmarks
<dark>
I want to implement collision detection on my own. I attempted to build a quadtree (for 2D), it seemed an ocamlish structure. But it was hard to implement it correctly
<dark>
random bugs appeared, i abandoned it
<flux>
try again?-)
<dark>
I tried some 'foundational approach' and clean recursive algorithms, but there was some combinatorial problem (match cases with too much options)
<dark>
I'm looking at the source code of a game made with lablgl. Specially, the part about collisions. It is, like I suspected, a mess