<adrien>
orbitz: well, the issue is that it's, hmmm, weird
<adrien>
not very intuitive
<yezariaely>
it is black magic, thus no docs ;-)
<orbitz>
black magic, the most forbidden kind
xcombelle has joined #ocaml
Fnar has joined #ocaml
Fnar has quit [Changing host]
Fnar has joined #ocaml
bobzhang1988 has quit [Ping timeout: 260 seconds]
<yezariaely>
Batteries: how can I print a BatSet to a string? is there some hidden string_of function I can't find?
<yezariaely>
(the print function prints into IO)
fraggle_ has joined #ocaml
Fnar has quit [Read error: Connection reset by peer]
_andre has joined #ocaml
BiDOrD has joined #ocaml
cdidd has quit [Ping timeout: 260 seconds]
BiDOrD_ has quit [Ping timeout: 248 seconds]
avsm has quit [Quit: Leaving.]
<flux>
yezariaely, I think there's string IO for that
eni has quit [Ping timeout: 260 seconds]
hongboz has joined #ocaml
Submarine has quit [Quit: Leaving]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
gnuvince has quit [Ping timeout: 252 seconds]
<ousado>
adrien: it's [...]/format.en.html now I think
Kakadu has joined #ocaml
eni has joined #ocaml
_andre has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
jave has quit [*.net *.split]
bzzbzz_ has quit [*.net *.split]
bzzbzz has joined #ocaml
mcstar has joined #ocaml
_andre has joined #ocaml
fraggle_ has joined #ocaml
rgrinberg has joined #ocaml
jave has joined #ocaml
jave has quit [Max SendQ exceeded]
avsm has joined #ocaml
madroach has quit [Quit: leaving]
madroach has joined #ocaml
jave has joined #ocaml
madroach has quit [Client Quit]
madroach has joined #ocaml
_andre has quit [*.net *.split]
fraggle_ has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
_andre has joined #ocaml
fraggle_ has joined #ocaml
rgrinberg has joined #ocaml
gnuvince has joined #ocaml
hongboz has quit [Remote host closed the connection]
hongboz has joined #ocaml
<samposm>
if I let ( + ) = Pervasives.( +. ) for floating point purposes, what would be a good name for interger + then?
<f[x]>
Pervasives.(+) obv
<mcstar>
integer_add
<samposm>
I'd like it to look like +
<samposm>
I already use +| for vector addition
<mcstar>
it alrady is +
<samposm>
I just "overvrote" integer + with +. above
<mcstar>
so, to increase confusion, call integer addition +.
<samposm>
yeah, I though of that :-)
<samposm>
maybe +i ... no
<samposm>
<+> seems to work, hmm
<f[x]>
let (add_some_integers_even_though_floats_are_so_much_nicer) = (+)
<djcoin>
let (x_X) = (+)
<mcstar>
(+) :: Num a => a -> a -> a
<mcstar>
XD
xcombelle has quit [Quit: I am a manual virus, please copy me to your quit message.]
<adrien>
hi, is there a distribution that ships lablgtk2 with no ocamlfind support?
<adrien>
this is *VERY* important to tell me if you don't want ocaml-cairo to break for everyone in a couple of days =)
<f[x]>
adrien, got some spare ninja squads?
<adrien>
f[x]: what do you mean?
sepp2k1 has joined #ocaml
<f[x]>
find somebody not using ocamlfind -> send ninjas -> number of ocamlfind-ignorant users decreased
<rwmjones>
adrien: not one that I'm aware of
<adrien>
f[x]: ah :-)
<rwmjones>
everyone should use ocamlfind, else they are morons ..
sepp2k has quit [Ping timeout: 260 seconds]
<mcstar>
yay im a moron
<adrien>
yup, and lablgtk2 is going to use ocamlfind, which, at least for godi, breaks ocaml-cairo
<rwmjones>
why are you not using ocamlfind with lablgtk2?
<mcstar>
actually i was told by adrien to always use ocamlfind
<mcstar>
the reason i didnt use, is noobness
<adrien>
but ocaml-cairo's dev is also a lablgtk2 dev so I'm going to have him update ocaml-cairo's build system but it'll be nicer if he can simply drop support for lablgtk2 installs without ocamlfind
<adrien>
rwmjones: see git :-)
<adrien>
mcstar: well, you can skip using it for your ownstuff of course but as soon as you're not in a very simle situation, it's worth taking 5 minutes (less actually) and learn ocamlfind
<mcstar>
yeah, its just that from my experience, in a lot of environments you can go pretty far witout a build system(if you dont publish the code..)
<mcstar>
and it was unusual that i had to use ocamlfind for even linking with a simple library
<rwmjones>
actually I find ocamlfind is simpler than trying to work out the link command by hand
<f[x]>
you don' t have to
<rwmjones>
particularly if my program links to any non-trivial number of libs
<adrien>
"ocamlfind" is shorter to type than "/opt/ocaml/..." :-)
Cyanure has joined #ocaml
<hcarty>
yezariaely: There is a patch from ocamlpro which adds support for file-level functors. I don't know how supported/experimental it is.
hongboz has quit [Remote host closed the connection]
hongboz has joined #ocaml
eni has quit [Ping timeout: 248 seconds]
hongboz has quit [Ping timeout: 255 seconds]
avsm has quit [Quit: Leaving.]
braibant has joined #ocaml
braibant has quit [Client Quit]
braibant has joined #ocaml
seanmcl has joined #ocaml
mika1 has quit [Quit: Leaving.]
Kakadu has quit [Quit: Page closed]
avsm has joined #ocaml
madroach has quit [Quit: leaving]
madroach has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Progster has joined #ocaml
<samposm>
I am doing collision detection for a large number of objects. Which data structure should I choose to store the objects in? (I know the number of them) List? Vector?
<zorun>
it depends
<zorun>
are objects interdependent or not?
<samposm>
no. everything is very simple.
<zorun>
do you only need to iterate objects sequentially, or do you need random access?
<samposm>
I only need to iterate through the list
<adrien>
the number of elements never changes?
<samposm>
never
<adrien>
array :P
<zorun>
I would have said a list :)
<adrien>
array uses half the memory
<adrien>
well
<adrien>
half and then 80% for Gc's but it's not used in the same way
<zorun>
oh yeah, quadtrees can be useful for collision detection :)
<samposm>
thanks, but my object are actually very homogeneously located in space, so I am thinkin I can du with a grid of 3d boxes instead of a space partitioning tree
<mcstar>
if you bin your particles by proximity, that is a kind of space partitioning
<samposm>
yes it is
<adrien>
samposm: you're reinventing an algorithm?
<samposm>
I am no expert in raytracing, but I remember so old book explaining that is the distribution ob objects is homogeneous, space partitioning grid is slightly faster than space partitioning trees
eni has joined #ocaml
<samposm>
also, I am thinking the box grid is slightly easier to code than an octree
<mcstar>
yes, since you dont have to store the tree, because it is rigid
<mcstar>
but if youre space is sparsely filled, you are better off with a tree
<samposm>
adrien: no, no reinventing here
<mcstar>
-e
<samposm>
...unles someone knows of a ready implementation of a space partitioning tree?
<samposm>
3d space
<mcstar>
probably some game library has it
<mcstar>
not sure about which, wrt ocaml, i have absolutely no idea
<samposm>
yews, in C++, sure
<mcstar>
yews, where?
<samposm>
I apologise for my typos
smondet has joined #ocaml
<mcstar>
there are cosmological simulations that might use space partitioning
<mcstar>
or even molecular dynamics
<mcstar>
how do you detect collision?
<mcstar>
s
<samposm>
my objects are flat pices of slab, I already wrote to collision detection code
<samposm>
pieces*
<mcstar>
im asking how do you detect them
<samposm>
with a bit of high school mathematics. the detection function is 11 lines of code
<samposm>
(my case is very special and simple)
<mcstar>
but what type is the detection algorithm of?
<mcstar>
do you detect a collision after it happened, or you predict one, before it happebed
<mcstar>
happened*
<samposm>
oh, I am doing kind of raytracing, not object-object collisions
smondet has quit [Remote host closed the connection]
smondet has joined #ocaml
munga has joined #ocaml
xcombelle has joined #ocaml
seanmcl has quit [Quit: seanmcl]
eni has quit [Ping timeout: 264 seconds]
eni has joined #ocaml
eni has quit [Ping timeout: 245 seconds]
silver has quit [Remote host closed the connection]
wieczyk has quit [Ping timeout: 244 seconds]
djcoin has quit [Quit: WeeChat 0.3.2]
<hcarty>
thelema: odb does not seem to work with OCaml 4.0 from Subversion
<hcarty>
thelema: I'll check - thanks for looking into it
<thelema>
sorry for breaking things; I should have tested further. My test of whether or not the info file parsed correctly was fooled by the presence of \n embedded in the value.
<hcarty>
thelema: A quick test looks good here
<thelema>
so the --info result looked correct like it had many keys and values, when it actually had one key, and the value was the rest of the key=value pairs
<hcarty>
thelema: Ah, makes sense
<hcarty>
"odb.ml --unstable lwt" worked with a version/4.00 checkout of OCaml
<thelema>
"worked" = "does not currently work"?
<hcarty>
thelema: Sorry - let "worked" = "Just tried it with Great Success"
<thelema>
awesome.
ocp has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
<hcarty>
thelema: Once the packages in oasis-db are updated with oasis 0.3 everything should Just Work with OCaml 4.x
<thelema>
hcarty: which reminds me - I tried to do the "rebuild the setup" action on oasis-db, and got a failure; need to bother gildor about this
Progster has quit [Ping timeout: 260 seconds]
<hcarty>
At this point Batteries doesn't due to stdlib changes and lots of others don't work because of the oasis/setup.ml Format module incompatibility trouble.
<hcarty>
thelema: Ah, good to know
<thelema>
hcarty: there's a branch of batteries that has support for 4.0
<thelema>
I may punt and use the makefile as I did for camomile to swap in code for different versions of ocaml
<thelema>
I've almost backported the 4.00 hashtbl to work under 3.12, but I need an implementation of the seeded_hash in pure ocaml
<hcarty>
C? That's unfortunate.
<thelema>
it makes sense for performance reasons - this kind of bit twiddling is better done in C
<hcarty>
So it's the hash function itself, not something in the initialization?
<thelema>
yes, it's the actual computation of hash function with seed as second input
<hcarty>
I don't know why I had it in my head that the initialization had something magic in C but not the hash function itself
<thelema>
I guess I could cheat and just xor the seed with the result of the unseeded hash function, but this would be... not secure
Progster has joined #ocaml
<hcarty>
It's probably not a good idea for Batteries to be less secure than the stdlib
<hcarty>
thelema: I ran into another issue I think
<hcarty>
thelema: Failure "Package not in stable repo: tarball=ocamlify-0.0.1.tar.gz".
<thelema>
:(
<hcarty>
thelema: On a completely fresh ocamlbrew
<hcarty>
3.12.1
<thelema>
looks like more problems with pl parsing... investigating
<thelema>
hcarty: what's it' installing to get this error?
<hcarty>
thelema: Installing ocamlify
<hcarty>
As part of an oasis install
<thelema>
n/m, problem is just in ocamlify pl
<thelema>
ah, an unfortunate interaction between empty deps and my two preprocessing regexes
<thelema>
hcarty: once more.
<thelema>
(bug should be fixed)
<hcarty>
thelema: Thanks - trying again. I'll let you know how it goes.
<hcarty>
thelema: Further this time :-)
<hcarty>
Installing camomile\nException: Failure "No download method available for: camomile".
<thelema>
fixing...
<thelema>
fixed in 084de2b
<hcarty>
thelema: Testing again
<hcarty>
thelema: Good so far. It made it past camomile.
<hcarty>
thelema: Success with ocamlbrew's default set of packages on 3.12.1
<thelema>
I hope there's no more features of property lists that I'm forgetting.
<hcarty>
I'm trying a handful of other packages as well
Cyanure has quit [Remote host closed the connection]
<_habnabit>
is there something to make tuareg-indent-phrase only wrap comments and not try to reindent my code?
<_habnabit>
tuareg-mode and I seem to have some differences on proper indentation style
_andre has quit [Quit: leaving]
Submarine has quit [Quit: Leaving]
wagle has quit [Read error: Connection reset by peer]
sgnb has quit [Read error: Connection reset by peer]
gnuvince has quit [Ping timeout: 245 seconds]
sgnb has joined #ocaml
eni has joined #ocaml
wagle has joined #ocaml
<adrien>
release week, everything is going to explode :P
<pippijn>
yay
<pippijn>
I'm looking forward to not being here
<adrien>
but you will :P
<pippijn>
I won't
<pippijn>
I will be climbing the himalayas
eni has quit [Quit: Leaving]
ocp has quit [Quit: Leaving.]
bzzbzz has quit [Quit: leaving]
mcstar has quit [Quit: mcstar]
<wmeyer>
pippijn: don't want to promise but I might deliver something
<wmeyer>
C_quot is on my plate still - just needs integration
<wmeyer>
pippijn: how is your frontend work going?
Progster has quit [Ping timeout: 244 seconds]
gnuvince has joined #ocaml
braibant has quit [Quit: Leaving.]
tbrady has joined #ocaml
smondet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<thelema>
_habnabit: I've noticed that tuareg mode and typerex give different indentings for expressions broken across lines - is this part of your disagreement on indentation style?
<_habnabit>
thelema, mostly it's where the | gets indented to after a match-with
<_habnabit>
thelema, i.e. whether it's the same level as the `match` or two spaces in
<_habnabit>
thelema, actually, tuareg _used_ to do the latter, but now insists on the former after I got a newer version
<thelema>
_habnabit: ah, you prefer the old version - two spaces in
* thelema
looks for the config on this
<_habnabit>
thelema, well, it's more of that there's a whole gigantic codebase that uses that, and I'm trying to minimize diff thrash
<thelema>
ah, yes.
<thelema>
tuareg-pipe-extra-unindent
<_habnabit>
aha
<_habnabit>
guess I should just set that back
<_habnabit>
there's also alignment of |>s on successive lines
<_habnabit>
really I'd just prefer if only comments were wrapped
emmanuelux has joined #ocaml
<thelema>
also, tuareg-(with,function)-indent
<thelema>
but I see why you want the function you want
Progster has joined #ocaml
<thelema>
which is not going to be produced by these changes
<_habnabit>
right.
<thelema>
hmm, M-q says that depending on the context, it will only justify and indent a comment
<_habnabit>
this is with the point in the comment
<thelema>
maybe 'tuareg-in-comment-p is broken
<thelema>
in any case, try using indent-region (C-M-\) with the region being your comment.
<_habnabit>
well, it's not that I'm trying to indent it. I'm trying to fill it like M-q does in, say, fundamental-mode
<_habnabit>
fill-paragraph
<thelema>
then use fill-region
<_habnabit>
yeah, I just tried that
<thelema>
I dunno what it's bound to, one sec
<_habnabit>
doesn't look like it's bound to anything
<thelema>
yup, you'll have to bind it
<_habnabit>
it doesn't align my *s :(
<thelema>
correct, it totally breaks *
<_habnabit>
oh, it looks like a bug in tuareg-mode
<_habnabit>
if I put a *) on a line by itself after my comment block, it doesn't re-indent any ocaml code after it
<_habnabit>
well, it does the same thing with just ), but not (* *)
<thelema>
well, there's your workaround and something to submit.
<thelema>
I guess it might decide that that's the end of the phrase.
<_habnabit>
yeah.
<thelema>
hmm, what version of tuareg are you using?
<_habnabit>
it calls indent-region on too large of a region
<_habnabit>
let's see
<thelema>
it looks like I'm using 2.0.5, and my M-q does just a single comment properly
<_habnabit>
svn revno 195
<_habnabit>
whatever that means
<_habnabit>
it says 2.0.5 in the comments at the top of tuareg.el
<thelema>
ok, that's what mine says too
<thelema>
I'm not sure about svn revno
<wmeyer>
is there anyway to get backtraces from camlp4of loaded library that throws an exception during parsing?
<thelema>
although it looks like there's been a bunch of work - the tuareg repo is up to commit 391
<_habnabit>
oh, dang
<thelema>
and 2.0.6 was r389
<wmeyer>
I am dropping of camlp4 parser anyway - but it would be useful to know where this exceptions is coming from
<thelema>
wmeyer: dunno, do you have OCAMLRUNPARAM=b set?
<_habnabit>
guess I should update
<wmeyer>
thelema: yep, it's not working - I'm wondering if anybody got that problem before
<_habnabit>
good excuse to restart emacs too
<wmeyer>
I'm using byte camlp4 - but perhaps without -g flag
<wmeyer>
_habnabit: M-x load-file ENTER <full path to tuareg>
<_habnabit>
wmeyer, eh?
<thelema>
_habnabit: to avoid restarting emacs
<_habnabit>
yes, but at the moment, I'm not trying to avoid it
<_habnabit>
sometimes I am (and I know how to reload modes in those cases)