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
jakedouglas has quit [Ping timeout: 272 seconds]
jakedouglas has joined #ocaml
ccasin has joined #ocaml
sgnb` has left #ocaml []
sgnb has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
ulfdoz has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
dark has joined #ocaml
<dark> thelema, why batteries switched from omake? lack of maintenance?
<dark> is there any quadtree library implemented for ocaml already? (i need to do collision detection)
sepp2k has quit [Quit: Leaving.]
iago has quit [Quit: Leaving]
jakedouglas has joined #ocaml
ccasin has quit [Quit: Leaving]
aymeric has quit [Quit: aymeric]
jakedouglas has quit [Quit: Leaving.]
<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
<thelema> as you will.
jakedouglas has joined #ocaml
<dark> wikipedia article looks like an ad
hyperboreean has quit [Quit: leaving]
hyperboreean has joined #ocaml
hyperboreean has quit [Client Quit]
hyperboreean has joined #ocaml
Associat0r has joined #ocaml
Amorphous has quit [Ping timeout: 246 seconds]
Amorphous has joined #ocaml
jakedouglas has quit [Quit: Leaving.]
rolfr has joined #ocaml
rolfr has quit [Quit: Colloquy for iPad - http://colloquy.mobi]
ikaros has joined #ocaml
munga has joined #ocaml
Yoric has joined #ocaml
<dark> (fun x -> Printf.printf "(%s) %S" x x) "fun x -> Printf.printf \"(%s) %S\" x x"
ygrek has joined #ocaml
<dark> Error: Syntax error
munga has quit [Ping timeout: 255 seconds]
xfsz has joined #ocaml
xfsz has left #ocaml []
<gildor> tab: do you perform using camlp4 syntax with oasis ?
* gildor comes back from holiday
f[x] has quit [Ping timeout: 265 seconds]
f[x] has joined #ocaml
pikachuyann has joined #ocaml
sepp2k has joined #ocaml
<flux> I just had the first week at my new job this week. doesn't look I'll ever get to code ocaml there, though, C and C++ mostly.
Yoric has quit [Quit: Yoric]
<dark> maybe better if it were some company that used ocaml but with nonsensical, unmaintenable code
<adrien> flux: code ocaml and wrap it to make it callable from C ;-)
Yoric has joined #ocaml
<dark> ... then *he* will be blamed for making nonsensical, unmaintainable ocaml code
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 245 seconds]
<dark> where is lablgl reference library? lablgtk is right there, http://wwwfun.kurims.kyoto-u.ac.jp/soft/lsl/lablgtk/html/index.html ..
<flux> chances are it comes with one?
<flux> or ocamldoc can help you create one..
<flux> (hopefully its interface is ocamldoc-annotated)
<dark> there is a caml-images under 'LablGlut/examples' that seems to have something like it, but I am unable to use it..
<dark> the .mli files are well-commented...
ikaros_ has joined #ocaml
ikaros has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
<dark> http://okmij.org/ftp/ML/resumable.ml this is so nice.. could be added to the standard library, or at least batteries
<dark> it would be even better if some syntax were added for the simpler case of co-routine support
<dark> (this is something lua and ruby has, which i miss in other languages)
eelte has joined #ocaml
coucou747 has quit [Read error: Operation timed out]
Yoric has quit [Quit: Yoric]
Yoric has joined #ocaml
aymeric has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
aymeric has quit [Quit: aymeric]
aymeric has joined #ocaml
Cilya has joined #ocaml
Cilya has quit [Client Quit]
Cilya has joined #ocaml
sepp2k has joined #ocaml
aym has joined #ocaml
aymeric has quit [Read error: Connection reset by peer]
aym is now known as aymeric
<Cilya> Hi
<Cilya> Why would a type t of module F(M) not be equal a type F(M).t ?
<flux> test case?
<flux> I'm not sure what you mean by 'type f of module F(M)'
<Cilya> test case is too big
<flux> well, surely you can make it small?-o
<Cilya> and i didn't managed to make a small test case
<flux> maybe it's something else then..
<Cilya> i have a module say A = F(M)
<Cilya> and the .mli tells that A.t have type F(M).t
<Cilya> else than what ?
<Cilya> i don't have any idea where to start
<dark> and you are constructing F(M), too, elsewhere?
<Cilya> i have a trivial type equation
<dark> I think that if you define the "same" type two times, you get different types
<Cilya> and ocaml fail to prove it
<dark> ocaml toplevel actually represents this by type/versionnumber
<dark> I mean: if you instantiate the same functor two times, the type will not be the same or even compatible (i guess)
<flux> could this be your issue?
<Cilya> 404
<dark> pasted in your pvt
<Cilya> only the second link
<dark> ok, 404 too here
<flux> fixed
<dark> ah:)
<dark> i guess that verifying if two modules are equivalent is undecidable
<Cilya> module equality is just propagation of type equality
<flux> I've used that feature for my benefit, though. when dealing with type-incompatible types for example.
<flux> s/dealing/making/
<flux> so I can create different modules that boil down to containing an integer
<flux> but such integers aren't type-compatible
<flux> if you want the same module, cannot you have a name for it?
<Cilya> i can show you these two lines :
<Cilya> module StdIntegersZone : StdAbstractDomain with type t = IntegersZone(StdIdentificator).t
<Cilya> = IntegersZone(StdIdentificator)
<flux> ah, it is NOT the same case. infact it's the : StdAbstractDomain that makes the incompatiblity
<Cilya> why ?
<flux> this is your case: http://www.modeemi.fi/~flux/foo3.ml
<Cilya> I didn't force the type of F
<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.
<Cilya> this works
<thelema> ... loading... slow internet :(
boscop has joined #ocaml
boscop_ has quit [Ping timeout: 246 seconds]
<tab> gildor: not sure, i understand your question
<tab> -,
<tab> gildor: we're evaluating oasis at the moment, and we have some modules requiring camlp4
ben_m has joined #ocaml
Associat0r has quit [Quit: Associat0r]
<gildor> tab: I will be pleased to help you
<gildor> tab: you asked a question yesterady or the day before about oasis and camlp4
LionMadeOfLions has joined #ocaml
<gildor> tab: beware that this is the first version of oasis, the v0.2.0 is already far better
<gildor> tab: and will be even better if you have some suggestions
<Cilya> thelema, the code i pasted is working
<Cilya> not exactly the same thing
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<Cilya> the related bug seems to be much more like the one I have
<Cilya> thx thelema
<Cilya> I will tell Xavier Leroy that I hate him next time I see him
sepp2k has quit [Quit: Leaving.]
philtor has joined #ocaml
ftrvxmtrx has joined #ocaml
philtor has quit [Ping timeout: 245 seconds]
itewsh has quit [Quit: o/]
ikaros_ has quit [Ping timeout: 246 seconds]
ASpiwack has quit [Ping timeout: 252 seconds]
ASpiwack has joined #ocaml
ASpiwack has quit [Ping timeout: 252 seconds]
ASpiwack has joined #ocaml
ben_m has quit [Quit: WeeChat 0.3.3]
<pikachuyann> bonne nuit | good night
pikachuyann has quit [Quit: Quitte]
aymeric has quit [Quit: aymeric]
tiglionabbit has joined #ocaml
<tiglionabbit> hi
<tiglionabbit> I'm trying to go through the ocaml tutorial, but I'm having trouble with the part where it asks me to run the graphics example. http://www.ocaml-tutorial.org/the_structure_of_ocaml_programs