<thelema>
dark: batteries switched to omake to have shorter build times, we switched back because omake was an extra dpeendency and we figured out how to do faster builds w/o ocamlbuild
<thelema>
afaik, there's no perl quadtree library
<dark>
perl? :)
<thelema>
err, ocaml
<dark>
I just think I will mis-implement this, but I will try
Shion has joined #ocaml
<dark>
I was in doubt on what to do with an object that crosses boundaries
<dark>
i mean, a quad tree with points can have its elements only on leaves
<dark>
but with objects with area maybe i have to insert objects in internal nodes
<dark>
or maybe insert the same object multiple times, at each children
<dark>
i liked this type .. constraint .. syntax, is this new?
<dark>
the "old" syntax of type .. (something as 'a) .. still work
<dark>
but the pretty printer emits this constraint thing
<dark>
maybe this new syntax is more powerful, and let one express things not possible before?
<dark>
tuareg recognizes this 'constraint' so this must not be that new..
joewilliams_away is now known as joewilliams
<thelema>
I'd recommend deciding which subtree each boundary belongs in
<thelema>
as to 'constraint', it's rarely a good idea to use it.
<thelema>
it's almost exclusively good for constraining 'a to a polymorphic variant type
<dark>
suppose certain object is in the center of current rectangle
<dark>
it would belong to all 4 sub-trees
<dark>
or, it would be stored in the internal node of this quadrant itself
joewilliams is now known as joewilliams_away
<thelema>
or you can decide that the boundary lines default to the left and the top
<dark>
but this object can collide with objects on any quadrant
<dark>
so i would have to check left-top with anyone, right?
<thelema>
do your objects have any size?
<dark>
yes
<dark>
it's not a point exactly on the line; it's an object with an area
<thelema>
if so, objects near the corner of the first quadrant can collide with objects in the other three
<dark>
objects would have means of returning they are completely inside an quadrant
<dark>
if yes, i insert them on this quadrant
<dark>
if no, they are half in a quadrant, half in another. or possibly in 3 quadrants. or at 4 quadrants at same time
<thelema>
so what's the problem of being on a line?
<dark>
if an object is on more than one quadrant, what should i do?
<dark>
i can insert it on all quadrants
<dark>
if i insert it on just one quadrant, this quadrant must be checked with everything else (i.e. it becomes 'special')
<thelema>
If you can ask the object which quadrants it can collide with...
<dark>
.. that's why i want to restrict the data structure with "as"
<dark>
(so that it will always be an object that i can query this)
<dark>
i'm trying this approach
joewilliams_away is now known as joewilliams
<thelema>
I don't think restricting the structure like that will do anything that specifying the type without constraint will do
joewilliams is now known as joewilliams_away
<dark>
it will make possible to write a function that calls this method, and still keep the signature clean
<dark>
i.e. the "add" function will call this method, but will not have any constraint visible in the type (it will be hidden in the tree type)
<dark>
i would prefer some mechanism akin to type classes, but i'm trying to do this with oo + row types
<flux>
that's exactly the way I've used it: module Id1 : ID = Make(struct end) module Id2 : ID = Make(struct end)
<flux>
hmm
<flux>
right, I didn't read it properly through
<flux>
:)
<flux>
but I guess it's still the same issue
<Cilya>
if think that if I force the type of F, i don't get the error
<flux>
doesn't module StdIntegersZone = IntegersZone(StdIdentificator) work for you?
<Cilya>
but, I need to keep its original type since i make use of it in the same module
<Cilya>
it works in the .ml, but fail to match the interface
<Cilya>
hmm
<Cilya>
i'm mistaken
<Cilya>
the interface matching fail further
ccasin has joined #ocaml
ccasin has quit [Quit: Leaving]
oriba has joined #ocaml
<Cilya>
ok, i gave up and change of architecture
<Cilya>
thx flux
<Cilya>
i still didn't understand, but i can't spend much more time on this
ccasin has joined #ocaml
joewilliams_away is now known as joewilliams
joewilliams is now known as joewilliams_away
psnively has joined #ocaml
philtor has joined #ocaml
ygrek has quit [Ping timeout: 245 seconds]
philtor has quit [Read error: Operation timed out]
munga has joined #ocaml
Anarchos has joined #ocaml
munga has quit [Quit: Ex-Chat]
jakedouglas has joined #ocaml
jeddhaberstro has joined #ocaml
jeddhaberstro has quit [Client Quit]
oriba has left #ocaml []
Owner_ has joined #ocaml
<Owner_>
If Perl programmers are Perl monks, what are Ocaml programmers called?
<adrien>
tuaregs?
<gildor>
adrien: I like that ;-)
itewsh has joined #ocaml
<Owner_>
do you thin the tauregs are like the fremen of dune?
<gildor>
inspired, probably, but they don't live in the same space
<gildor>
(planet + time)
<Owner_>
i'll cancel my guild highliner trip
<mfp>
Owner_: caml riders
ftrvxmtrx has quit [Ping timeout: 276 seconds]
<Anarchos>
hi adrien
ASpiwack has quit [Ping timeout: 260 seconds]
ASpiwack has joined #ocaml
<adrien>
hi Anarchos =)
jeddhaberstro has joined #ocaml
psnively has quit [Quit: psnively]
<Cilya>
is this possible that for higher depth of module equation, 2 instances of a functor with the same module failed to be proven equal ?
<thelema>
Cilya: maybe you need some "with type t = t" annotations
Owner_ has quit [Quit: Page closed]
<Cilya>
i have enough
<Cilya>
Type declarations do not match:
<Cilya>
type av = D.t
<Cilya>
is not included in
<Cilya>
type av = IntegersZone(I).t
<Cilya>
when D = IntegersZone(I)
<Cilya>
but, unable to reproduce on a small example
<thelema>
ah, this is just the nominality of modules - module equality is by full module name/path, not by structure.
<Cilya>
if I say that A = B (C)
<Cilya>
why can't I replace B (C) by A ?
ASpiwack has quit [Ping timeout: 240 seconds]
ASpiwack has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 245 seconds]
dark has quit [Ping timeout: 276 seconds]
sepp2k1 has quit [Quit: Leaving.]
<thelema>
Because when determining if two modules are equal, ocaml doesn't test to see if all their components are equal, it tests to see if the module paths are equal.
sepp2k has joined #ocaml
<Cilya>
on simple examples, you can substitude B (C) by a module A = B (C)
<Cilya>
so, path equality is tested modulo module equality
<thelema>
are you sure?
<Cilya>
yes
<thelema>
for functors, you usually can, because it's the module type that matters...
<thelema>
but module equality is different, from what I understand.