flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
jeddhaberstro has joined #ocaml
chickenzilla has quit [Read error: 110 (Connection timed out)]
kaustuv_ has joined #ocaml
slash_ has quit ["leaving"]
verte has joined #ocaml
Camarade_Tux_ has quit ["Leaving"]
Smerdyakov has quit ["GONE"]
hkBst has quit [Read error: 104 (Connection reset by peer)]
xahlee has quit ["banned in #emacs by johnsu01 (john sullivan)"]
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
seafood has quit []
mfp has quit [Read error: 101 (Network is unreachable)]
jeddhaberstro has quit []
seafood has joined #ocaml
m3ga has joined #ocaml
Snark has joined #ocaml
itewsh has joined #ocaml
marmottine has joined #ocaml
Camarade_Tux has joined #ocaml
sysop_fb has joined #ocaml
m3ga has quit ["disappearing into the sunset"]
mfp has joined #ocaml
det has quit [Read error: 104 (Connection reset by peer)]
det has joined #ocaml
seafood has quit []
itewsh has quit [Success]
itewsh has joined #ocaml
seafood has joined #ocaml
m3ga has joined #ocaml
m3ga has quit [Client Quit]
sysop_fb has quit []
jeanbon has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
Proteus has joined #ocaml
<Proteus> join #clojre
tar_ has joined #ocaml
tar_ has quit []
seafood has quit []
__mattam__ has joined #ocaml
kelaouchi has quit [Read error: 104 (Connection reset by peer)]
kelaouchi has joined #ocaml
mattam has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
Yoric[DT] has joined #ocaml
hkBst has joined #ocaml
seafood has quit []
seafood has joined #ocaml
verte has quit ["http://coyotos.org/"]
ched_ has quit [Remote closed the connection]
Ched has joined #ocaml
r0bby_ has joined #ocaml
r0bby has quit [Connection timed out]
seafood has quit [Read error: 104 (Connection reset by peer)]
seafood has joined #ocaml
seafood has quit []
__mattam__ is now known as mattam
delamarche has quit []
jeanb-- has joined #ocaml
jeanb-- is now known as chickenzilla
jeanbon has quit [Nick collision from services.]
chickenzilla is now known as jeanbon
<Camarade_Tux> given n points in a 2D space, does anyone know how to find the set of the minimum bounding rectangles such that each rectangle holds at most 6 points, is of minimal area and the set's cardinality is minimal too ?
<mrvn> Why should such a thing exist?
<mfp> Camarade_Tux: how do you prioritize between minimal area and minimal set cardinality?
<mrvn> Minimal area would be one point per rectange and size 0
<mrvn> But that might be 6 times as big a set as needed.
<mfp> you cannot minimize both at once (i.e. 1 degenerate rectangle per point = min. area)
<mrvn> Do you maybe the minimal that that has the minimum area of all minimal sets?
<mrvn> +meen
oriba has joined #ocaml
<mrvn> Camarade_Tux: can points be in multiple rectangles?
<mrvn> And how many points are we talking about?
<mrvn> Best I can think of is a recurivetry&error and that won't work well with many points.
<Camarade_Tux> mrvn, indeed, it has to be a trade-off between the box/rectangle area and the number of boxes so let's say none of them should be too extreme
<Camarade_Tux> also, points can be in only one rectangle at a time, rectangles can overlap though
<Camarade_Tux> and, maybe lots of points, but I'll start with only a few (a hundred ?)
<mrvn> Pick a point and start a rectangle. Pick another point so that enlarging the rectangle does only add that point or to start a new rectangle. Do a width first search of "picking" and only keep the best 1000 solutions in each round or something.
<mrvn> Maybe instead of area would the squareness of the area not be better?
<mrvn> Or the radius of the cicumference.
<kaustuv_> Find candidate rectangles using the Gabriel Graph would be my suggestion. (http://en.wikipedia.org/wiki/Gabriel_graph)
<Camarade_Tux> there's what is called vam-split : afaik, for each dimension, you calculate the Variance of the points relatively to that dimension and you split the space along the space along the dimension showing the higher variance (argh, bad english)
<Camarade_Tux> mrvn, but your algorithm should work too, especially since I can probably only consider less than 1000 points at a time
* Camarade_Tux will check the Gabriel graph too
<Camarade_Tux> I have to go, bbl
<Camarade_Tux> btw, the goal is to build an Hilbert R-Tree ( http://en.wikipedia.org/wiki/Hilbert_R-tree )
<mfp> Yoric[DT]: re: linking and Batteries_xxx, my recollection of the last conversation is that it ended with "afk phone", not with a definite answer ;)
<Yoric[DT]> :)
<Yoric[DT]> That's possible.
<mfp> having ocamlopt fixed would indeed be the best solution (and a no-op for batteries :-)
<Yoric[DT]> Yep.
<mfp> the pb is that we don't know if that's ever going to happen, or when
thelema has quit [Nick collision from services.]
thelema_ is now known as thelema
thelema_ has joined #ocaml
<thelema> My opinion is that it's not high priority for batteries. Of course it'd be better, but I don't see executable size as that big of a deal. Bandwidth and disk space are cheap
<mfp> even if work on that started right now, the result would be, what, 1 or 2 years away (3.12+)?
<mfp> thelema: is not only exec size, but also the deps dragged in
<mfp> it'd be something against batteries: progs that use it become much harder to install/distribute
<mfp> also, it's ~5MB per hello world atm., but could easily grow to 30MB+ as stuff is integrated into batteries
<Yoric[DT]> Well, frankly, I'd rather work on dynamic link.
<Yoric[DT]> Well, frankly, I'd rather work on dynamic linking.
<mfp> dynlink too error prone
<mfp> in my exp, so far
* mfp accidentally pressed enter when about to edit that :P
<mfp> the segfaults, the pb with generative exceptions, still unsure about the interface checks performed at load-time
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
<Yoric[DT]> mfp: yes, but it requires less re-design :)
<mfp> true, but you can say the redesign buys you something: getting rid of segfaults and other pesky problems :)
<mfp> did xleroy go beyond saying that linking+packages could maybe change someday?
<Yoric[DT]> Well, he explored a few possibilities but didn't get beyond that point.
<Yoric[DT]> Perhaps if someone were to open a mantis bug and insist on the topic :)
<kaustuv> surely most of that 5M is dead code and a simple dcelim pass can take care of it?
Proteus has quit [Read error: 110 (Connection timed out)]
<thelema> kaustuv_: that code is spread across many modules - one needs an infrastructure to produce submodules by eliminating values
<kaustuv> It doesn't need to be too intelligent. MLton has a simple dead code elimination pass to get rid of the basis that is not used in a program. Very simple heuristics are enough if you can depend on some invariants the basis guarantees (eg. no module-local state)
<thelema> actually, this might be impossible with the addition of dynlink to the mix.
<kaustuv> obviously it would be limited to -nodynlink
<thelema> ok.
<thelema> dcelim before producing native code...
<thelema> What's the problem with module-local state?
<kaustuv> well, it can make things live even if the module isn't used in client
<kaustuv> code
<thelema> only if that module-local state is used by (something that's used by) the client
<kaustuv> Not necessarily. Module initialization code is always emitted. Imagine something in Batteries that touches every function in all its submodules. If the client only uses Batteries.Foo, then the module initialization of Batteries is loaded and Batteries.Bar is live even if the client doesn't use Batteries.Bar
<thelema> one problem with doing this in ocaml is that modules consist entirely of *only* initialization code. function definitions can have side-effects.
<thelema> which is why link order is important - it determines runtime order
<Yoric[DT]> In addition to which we need a number of side-effects to obtain, say, consistant IO.
<kaustuv> by function definition having a side effect, do you mean things like:
<kaustuv> let fresh = let c = ref 0 in fun () -> incr c ; !c
<thelema> no, more like: let rand_int = Random.self_init (); fun () -> Random.int max_int
Alpounet has joined #ocaml
<thelema> most initialization effects could be turned into module-local initialization (instead of function local)
<Alpounet> Hi.
<kaustuv> "Could"? You mean "must", surely. And yes, such functions would break this simple heuristic.
<thelema> but imagine a module which does some complex initialization (building some sort of lookup table), and the user wants to debug this with some print statements.
<kaustuv> That's fine. The complaint about a 5M hello world is presumably that most of that 5M is taken up by library code, and presumably nothing in Batteries needs such fancy modules
<thelema> Now imagine all that initialization happening ... n/m, if it happens at runtime, it's runtime, and just part of the function. If it happens at module init time, it's module init, and can be pulled out.
<thelema> Okay, so we want to drop code we don't use, except for module initialization
<flx_> well, at the moment non-referenced .cmo-files are dropped, with their initialization code, if they are put into .cma-files
<flx_> so while it can be surprising, it's something that can be handled
<thelema> so there's no infrstructure to cull dead code out of a module
<thelema> even the mli system only hides
<thelema> this seems simple, but ocaml has taken the tact of "do what the code says to do", which can involve defining lots of unused functions
jeanb-- has joined #ocaml
jeanbon has quit [Nick collision from services.]
jeanb-- is now known as jeanbon
CoryDambach has joined #ocaml
marmottine has quit ["mv marmotine Laurie"]
mwhitney has quit [Read error: 131 (Connection reset by peer)]
mwhitney has joined #ocaml
jeddhaberstro has joined #ocaml
vuln has joined #ocaml
slash_ has joined #ocaml
slash_ has quit ["leaving"]
Proteus has joined #ocaml
Associat0r has joined #ocaml
rwmjones_ has joined #ocaml
Associat0r has quit [Success]
rwmjones_ has quit [Client Quit]
Alpounet has quit ["Ex-Chat"]
jeanb-- has joined #ocaml
Ched has quit [Remote closed the connection]
Snark has quit ["Ex-Chat"]
Camarade_Tux has quit ["Leaving"]
Ched has joined #ocaml
jeanbon has quit [Nick collision from services.]
jeanb-- is now known as jeanbon
ttamttam has joined #ocaml
oriba has quit ["Verlassend"]
jlouis has quit ["Lost terminal"]
jlouis has joined #ocaml
ttamttam has left #ocaml []
vuln has quit [Read error: 113 (No route to host)]
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]