flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml.org | Public logs at http://tunes.org/~nef/logs/ocaml/
travisbrady has quit [Quit: travisbrady]
emmanuelux has quit [Remote host closed the connection]
ineol has joined #ocaml
ineol has quit [Quit: ineol]
ollehar has quit [Ping timeout: 260 seconds]
introom has joined #ocaml
csakatoku has joined #ocaml
osa1 has quit [Ping timeout: 248 seconds]
introom has quit [Remote host closed the connection]
darkf has joined #ocaml
travisbrady has joined #ocaml
madroach has quit [Ping timeout: 248 seconds]
madroach has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
travisbrady has quit [Quit: travisbrady]
travisbrady has joined #ocaml
weie_ has joined #ocaml
q66 has quit [Quit: Leaving]
Drup has quit [Quit: Leaving.]
weie has quit [Ping timeout: 256 seconds]
osnr has quit [Quit: Leaving.]
ygrek has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
weie has joined #ocaml
weie_ has quit [Ping timeout: 240 seconds]
leo_33 has quit [Ping timeout: 268 seconds]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
travisbrady has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 248 seconds]
shinnya has quit [Ping timeout: 260 seconds]
csakatok_ has joined #ocaml
csakatoku has quit [Ping timeout: 248 seconds]
osnr has quit [Quit: Leaving.]
mattrepl has quit [Quit: mattrepl]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Quit: Leaving.]
leo_33 has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
osnr has quit [Client Quit]
ben_zen has joined #ocaml
Neros has quit [Ping timeout: 240 seconds]
gautamc has joined #ocaml
ygrek has joined #ocaml
mattrepl has joined #ocaml
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
breakds has quit [Quit: Konversation terminated!]
<gasche> thelema: should I go along with the release?
chrisdotcode has joined #ocaml
osnr has quit [Quit: Leaving.]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
mattrepl has quit [Quit: mattrepl]
chrisdotcode has quit [Ping timeout: 240 seconds]
chrisdotcode__ has joined #ocaml
<adrien> morning
chrisdotcode has joined #ocaml
<adrien> wmeyer`: I was grumpy yesterday too and went to bed later: midnight instead of 10:30pm :P
chrisdotcode__ has quit [Ping timeout: 240 seconds]
chrisdotcode has quit [Remote host closed the connection]
osnr has quit [Quit: Leaving.]
<gasche> thelema: I'm leaving for Italy right now, so I'm sorry but I think the upload+announce duty may fall back on one this one more time
<gasche> I can handle the future more frequent releases
<adrien> pffffffffffffffft
<adrien> slacker :
<adrien> :D
ontologiae_ has joined #ocaml
yacks has quit [Quit: Leaving]
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ben_zen has quit [Quit: leaving]
osnr has quit [Quit: Leaving.]
Simn has joined #ocaml
ontologiae_ has quit [Ping timeout: 246 seconds]
mika1 has joined #ocaml
cago has joined #ocaml
ttamttam has joined #ocaml
ontologiae_ has joined #ocaml
ygrek has joined #ocaml
demonimin has quit [Ping timeout: 246 seconds]
hkBst has joined #ocaml
hkBst has quit [Changing host]
hkBst has joined #ocaml
demonimin_ has joined #ocaml
demonimin_ is now known as demonimin
leo_33 has quit [Ping timeout: 240 seconds]
leo_33 has joined #ocaml
leo_31 has joined #ocaml
leo_33 has quit [Ping timeout: 252 seconds]
thomasga has joined #ocaml
leo_31 has quit [Ping timeout: 252 seconds]
leo_33 has joined #ocaml
ollehar has joined #ocaml
leo_33 has quit [Ping timeout: 264 seconds]
leo_33 has joined #ocaml
ineol has joined #ocaml
ocp has joined #ocaml
leo_33 has quit [Ping timeout: 240 seconds]
leo_33 has joined #ocaml
mye has joined #ocaml
ollehar has quit [Ping timeout: 246 seconds]
csakatok_ has quit [Remote host closed the connection]
mort___ has joined #ocaml
ulfdoz has joined #ocaml
leo_31 has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
leo_33 has quit [Ping timeout: 246 seconds]
ttamttam has joined #ocaml
osa1 has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
redfire has joined #ocaml
leo_31 has quit [Ping timeout: 240 seconds]
leo_33 has joined #ocaml
avsm has joined #ocaml
mcclurmc has joined #ocaml
leo_33 has quit [Ping timeout: 246 seconds]
leo_31 has joined #ocaml
yacks has joined #ocaml
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
thomasga has quit [Quit: Leaving.]
thomasga has joined #ocaml
ggole has joined #ocaml
leo_31 has quit [Ping timeout: 240 seconds]
leo_33 has joined #ocaml
gautamc has quit [Read error: Connection reset by peer]
gautamc has joined #ocaml
fayden has quit [Read error: Operation timed out]
csakatoku has joined #ocaml
weie has quit [Read error: Connection reset by peer]
weie has joined #ocaml
amirmc has joined #ocaml
Drup has joined #ocaml
<whitequark> hm, I want to check if a string only contains characters from a particular range
<whitequark> say [a-zA-Z0-9_]
<adrien_oww> try the Str module?
<adrien_oww> or
<whitequark> C
<adrien_oww> iter over
<adrien_oww> and match char with 'a' .. 'z' -> true | 'A' .. 'Z' -> true ...
<ygrek> Scanf.sscanf "%[a-zA-Z0-9_]%!"
<whitequark> actually that doesn't even matter, since I'm using unicode strings
Neros has joined #ocaml
<whitequark> nevermind, have to do it uh... my own way
<ygrek> and why unicode would matter?
<ygrek> unless of course you are using UCS-2
<whitequark> ygrek: hm right, all of the trailing octets in UTF-8 won't fit in my range
<whitequark> thanks
dsheets has joined #ocaml
leo_33 has quit [Read error: Connection reset by peer]
leo_33 has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
ggherdov has quit [Changing host]
ggherdov has joined #ocaml
ggherdov has quit [Changing host]
ggherdov has joined #ocaml
ineol has quit [Quit: ineol]
ineol has joined #ocaml
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
<adrien_oww> Camomille?
<whitequark> adrien_oww: C
<whitequark> I'm using js_of_ocaml so C is out of question
<adrien_oww> ah
<adrien_oww> maybe JS has built-ins for that
<whitequark> but that would make my code *dependent* on js_of_ocaml, as opposed to being portable to it
<whitequark> I want to have a JS demo and a proper standalone version with bare ocaml
<adrien_oww> then put these functions in a separate module
<adrien_oww> and conditionaly build that module or another one that uses Camomille
<whitequark> sscanf would work just as well :)
<whitequark> utf-8 is pretty cleverly designed.
<whitequark> self-synchronizing, variable-length and backwards compatible
ineol has quit [Quit: ineol]
<mrvn> it's actually strange how many programs have problems with utf-8. Taking them as plain 8bit strings should just work.
<whitequark> mrvn: as long as the only thing you do with them is storage and concatenation, yes
<whitequark> the moment you attempt to look inside, you're screwed.
<ggole> Finding specific (ascii) characters also works iirc
<whitequark> kind of, but what're you going to do with a byte index inside a string?
<mrvn> you can compare them, hash them, sort them (for some form of order and if they are normalized)
<whitequark> no, no and no
<whitequark> all of that requires normalization
<whitequark> (if you want your results to make any sense.)
<adrien_oww> (he mentionned it)
<whitequark> adrien_oww: it seems like he only mentioned it with regards to sorting
<whitequark> if you try to compare them as octet sequences, you produce security bugs
<ggole> Collation is a pretty complicated thing
<ggole> I'd like an abstract Text.t that did the right thing
<mrvn> whitequark: huh? you never get a false positive
<ggole> Never exposing characters, etc
<whitequark> mrvn: false negatives are a worst problem
ulfdoz has quit [Ping timeout: 240 seconds]
<whitequark> *worse
amirmc1 has joined #ocaml
avsm1 has joined #ocaml
<mrvn> whitequark: don't see that. So the user gets permission denied when he doesn't type normalized.
<whitequark> mrvn: so imagine, my user account is named whitéquark
amirmc has quit [Ping timeout: 276 seconds]
avsm has quit [Ping timeout: 240 seconds]
<whitequark> there is more than one way to encode that, so an adversary can create another account with the same name
<whitequark> and phish the administrator, for example
<ggole> You can also get identical looking strings that are different
<ggole> Which can lead to problems
<whitequark> for a more clear explanation look at the IDN rules, they're pretty complicated
<ggole> (Collation doesn't solve that though)
<whitequark> ggole: yeah exactly what I'm explaining
<whitequark> well, normalization gets rid of *identically* looking strings
<mrvn> whitequark: I can create whitepuark too.
<ggole> No, I mean strings with identical *appearance*
<whitequark> mrvn: that's a different word from whitequark
<whitequark> whitéquark and whitéquark *are* identical
<mrvn> nope
<whitequark> yes
<whitequark> they have same character sequence
<whitequark> errr, same grapheme sequence
<whitequark> whitequark and whitepuark don't
<whitequark> funniest thing is that there are legitimate ways in which you can get different encodings for é
<whitequark> for example Linux DEs produce it as a composed character yet OS X produces a decomposed one, with the default IME settings
<ygrek> it doesn't really matter as long as we have same characters for many different unicode code points
<mrvn> whitequark: They only look the same to you because you display a 8-bit byte sequenze as UTF-8 text. 8-P
<ggole> Α А A <- different characters
<whitequark> mrvn: → nitpicker's corner :p
<whitequark> ggole: oh yes, that too
<whitequark> the second is russian A, the last is english A
<whitequark> what the hell is the first one?
<ggole> Greek
<mrvn> All I see is ? ? A
<adrien_oww> I see A, A and A
<adrien_oww> all the same
<whitequark> yeah, if your terminal has utf-8 support then what adrien_oww says
<mrvn> bad font? Shouldn't they differ?
<whitequark> no
<whitequark> same grapheme
<ggole> No, they are homoglyphs
<ggole> Hence the security issues
<whitequark> hm
<whitequark> yes, ggole is right
<ggole> (There are recommendations for how to deal with this, but I doubt they are widely appreciated.)
<whitequark> well, IDN implements all of them
<whitequark> otherwise it would be a huge problem. it is a problem nevertheless, but of a manageable magnitude
* ggole nods
<adrien_oww> mrvn: here you go: http://imgur.com/UonG3G1
<mrvn> But that is a problem with unicode being confusing. Not a problem of utf-8.
<whitequark> no, that is a problem with humans being confusing
<whitequark> adrien_oww: god, you have a tiny font
<whitequark> well, either that, or my 170 DPI
<mrvn> or you didn't zoom in
<whitequark> I sure did
<adrien_oww> whitequark: could be a big screen
<adrien_oww> 15" screen
<whitequark> adrien_oww: 13" and 1920x1080
<mrvn> whitequark: insane
<whitequark> mrvn: awesome
<mrvn> not to work with
<whitequark> I scaled everything up about 2x, but fonts are super crisp
<whitequark> it's also an IPS panel, so it looks uber amazing :3
<mrvn> I wouldn't mind a 24" 4k display
<adrien_oww> it's roughly the same dpi (very roughly)
<ggole> I like the "show off" panel.
<ggole> "I've been working, honest!"
<adrien_oww> term was opened :P
<whitequark> argh, I would show you my screenshot but the 4G dongle is overheated and doesn't want to upload stuff
<whitequark> (I think the reason is heat. When it's cold, it has better RF performance.)
<adrien_oww> what is it?
<adrien_oww> I get ads
<whitequark> the screenshot, presumably
<adrien_oww> closed, reloaded, less ads
<whitequark> http://i1.minus.com/ibcJzI25doUdva.png < direct link
<whitequark> internet has ads?
amirmc1 has quit [Quit: Leaving.]
csakatoku has quit [Remote host closed the connection]
ygrek has quit [Ping timeout: 248 seconds]
kaustuv has joined #ocaml
<whitequark> ohh, so ocaml explodes if I try to compare a value which refers to itself
<whitequark> sad
yacks has quit [Ping timeout: 268 seconds]
<adrien_oww> let rec x = x ?
<whitequark> er, that's an error
<whitequark> but yeah, same idea
<companion_cube> let rec l = 1 :: l;;
skchrko has joined #ocaml
* whitequark nods
<whitequark> hm, interesting, Hashtbl.mem'ing that value seems to work.
<companion_cube> when you say "compare", do you mean equality or total ordering?
<whitequark> well, it hangs inside caml_compare_val
<whitequark> called from caml_equal
<whitequark> hm, maybe that's a js_of_ocaml bug. let me check the native version.
<kaustuv> was anything decided at any of the recent ocaml meetings/workshops about the future of ocamlbuild and ocp-build? Are both going to be supported indefinitely, or will ocp-build eventually replace ocamlbuild?
cago has quit [Ping timeout: 248 seconds]
<whitequark> hmmmm, native build crashes with Out_of_memory
<whitequark> does that mean "out of stack space" as well?
<adrien_oww> this exception isn't triggered on stack overflow
<adrien_oww> s
<whitequark> hm, then I'm lost
<adrien_oww> kaustuv: ping wmeyer` :-)
<adrien_oww> whitequark: strace it
<whitequark> hm, so it allocated 12GB and then died
<whitequark> ... I think it's GB?
<whitequark> mremap(0x7f9766f38000, 6295552, 12587008, MREMAP_MAYMOVE) = 0x7f9766337000
<whitequark> the manual doesn't state the unit for mremap sizes. hm. bytes, I guess
<whitequark> so it allocated 12MB and died. that's... strange.
<companion_cube> do you use big arrays?
<whitequark> no
<whitequark> and nothing in 3rd-party code uses them either
<adrien_oww> whitequark: Out_of_memory would be triggered after an allocation faield
<adrien_oww> failed
<companion_cube> could it be that compare uses a heap-allocated queue to compare the values in BFS?
<whitequark> does ocaml have -Xmx?
<adrien_oww> this line doesn't show an allocation failure
<whitequark> adrien_oww: yes exactly
<adrien_oww> whitequark: man Gc
<adrien_oww> also, compile with -g
<whitequark> after it mremaps, it munmaps it successfully
<adrien_oww> use OCAMLRUNPARAM="b"
<whitequark> adrien_oww: I did, and enabled backtraces
<whitequark> that didn't show me anything
<whitequark> it crashed on Hashtbl.find_option
<whitequark> so presumably it exhausted the memory before that
<kaustuv> the question you should be asking is why do you have recursive values?
<whitequark> kaustuv: reasons
<kaustuv> ain't no such thing as a good reason to have a recursive value
<whitequark> the uh, problem domain is naturally recursive there
<whitequark> metaclass of Class is Class
<kaustuv> let ( === ) x y = Marshal.to_string x [] = Marshal.to_string y [] ;;
<companion_cube> whitequark: sounds like you're going to have to write your own comparison function
<companion_cube> kaustuv: aaawwww :D
<whitequark> companion_cube: first I'd want to understand why exactly it dies in such a weird way
<whitequark> are records compared by identity or contents?
<whitequark> and hashed
<companion_cube> by contents if you use (=) or Pervasives.compare
<companion_cube> (which is the case for Hashtbl)
<whitequark> eh
<whitequark> comparing stuff which potentially contains mutable fields by contents
<whitequark> that's just asking for trouble
<companion_cube> when types have weird properties like this, I usually write my own comparison function
<companion_cube> (and often hashconsing)
<whitequark> hm.
<whitequark> can I use something from Obj to compare records by identity?
<whitequark> to write such a comparison function
<companion_cube> (==)
<companion_cube> the builtin comparison by address
<whitequark> oh. that simple
<whitequark> awesome, thanks
<kaustuv> ordering by address is just a bad idea
<kaustuv> since addresses move around
<companion_cube> ordering by address is infeasible in OCaml
<companion_cube> but equality is possible
<whitequark> no, don't need ordering, only equality
q66 has joined #ocaml
cago has joined #ocaml
ineol has joined #ocaml
yacks has joined #ocaml
<ggole> Self-referential structures make perfect sense, although their semantics aren't as nice
<ggole> Graphs and linked-lists and disjoint sets all naturally self-refer
yacks has quit [Ping timeout: 240 seconds]
osa1 has joined #ocaml
yacks has joined #ocaml
avsm1 has quit [Ping timeout: 240 seconds]
walter has joined #ocaml
ttamttam has quit [Ping timeout: 248 seconds]
cago has quit [Ping timeout: 276 seconds]
<whitequark> so I have this weird error with functors
<whitequark> anyone knows why?
<kaustuv> the .mli says Make is a module type, but the .ml says it's a module.
<kaustuv> basically, s/module type Make =/module Make :/ in the .mli
<whitequark> awesome, thanks
ollehar has joined #ocaml
djcoin has joined #ocaml
<whitequark> >Moreover, hash always terminates, even on cyclic structures.
<whitequark> how?
<companion_cube> it only considers a finite number of blocks
walter has quit [Quit: This computer has gone to sleep]
<companion_cube> so 2 lists of 100,000 elements with the 10,000 first same elements will have the same hash
<whitequark> I see
<whitequark> so will it traverse my single-object cycle 10,000 times?
<whitequark> that's gonna be slow
<companion_cube> I think it's actually much less ;)
<companion_cube> that was just an illustration
<companion_cube> look at Hashtbl.hash_param
<whitequark> 10/100
<whitequark> yeah, and I could always do hash consing
<whitequark> it's not hard for my case
<whitequark> enough to hash the class name for classes, in fact, and everything else is not cyclic
<whitequark> hm, no, it actually is cyclic. well whatever, then hash of name for classes and regular hash for everything else.
<whitequark> also yay, custom compare function with Hashtbl.Make works just as I want
<whitequark> thanks everyone
<companion_cube> \o/
<whitequark> I still think that OCaml functors are really ugly :/
<whitequark> they surely work, and I understand why are the way they are, but still ugly as hell
<companion_cube> you too wish for typeclasses? ^^
<whitequark> yes, I think that would do the job
<whitequark> though I'm not sure how would you fit them into ocaml as it is. for example how'd you express a custom compare function for Hashtbl with typeclasses?
yacks has quit [Ping timeout: 240 seconds]
<companion_cube> hashtbl would take keys that are instance of Hashable and Eq
<companion_cube> that would remove the need for polymorphic comparison and hash
<whitequark> sure, but then you will only be able to have one equality function for a given type
<whitequark> and hashing
<companion_cube> most of the time it's enough, but otherwise haskell proposes type aliases
<companion_cube> (which I find ugly, too)
avsm has joined #ocaml
<whitequark> yeah
<whitequark> so essentially that would only remove the need for polymorphic compare
<companion_cube> otoh, at least it typechecks whether you use consistently typeclasse instances
<whitequark> which is kind of fine on one hand, but on the another I wish there was better support for polymorphic functions in ocaml
<companion_cube> it would also make Set, Map, etc. modules rather than functors
<companion_cube> typeclasses are polymorphic functions, but it's *bounded* polymorphism
<whitequark> hm. yes, in fact I'm saying exactly same thing as you
fayden has joined #ocaml
yacks has joined #ocaml
<whitequark> scanf is confusing
<whitequark> utop # Scanf.sscanf s2 "%[a-zA-Z0-9_]%!";;
<whitequark> - : (string -> '_a) -> '_a = <fun>
<whitequark> what the hell does it want from me
amirmc has joined #ocaml
<flux> a function that accepts a string and returns whatever
<companion_cube> whitequark: you need to give it a continuation
<companion_cube> the continuation will receive the parsed values
<whitequark> ah I see
<leo_33> In mobile networks, data traffic is not evenly distributed. Some sectors/cells have a higher
<leo_33> concentration of traffic than others. To reproduce this in the case study, the Alcatel-Lucent Radio
<ggole> The scanf/printf types are definitely a bit strange
<ggole> And it takes a while to appreciate wtf kprintf is for
<ggole> But it does more or less make sense
gautamc has quit [Ping timeout: 240 seconds]
walter has joined #ocaml
<companion_cube> the nice thing is %a, again (or whatever the equivalent of %a is for sscanf)
amirmc has quit [Quit: Leaving.]
amirmc has joined #ocaml
ttamttam has joined #ocaml
<whitequark> ggole: so why is ksprintf needed?
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
<ggole> whitequark: suppose you want to write an error function that takes a format string and some args, and does whatever with those (logs em to a file or something)
<ggole> How would you write it with printf?
<whitequark> I'd use sprintf?
<asmanur> ggole: use kprintf
<ggole> Try it
<asmanur> oh sorry
<ggole> asmanur: yes, I'm explaining the need for it
mika1 has quit [Quit: Leaving.]
<asmanur> yeah, should've read a bit more of the backlog :/
<ggole> No worries.
mika1 has joined #ocaml
breakds has joined #ocaml
cago has joined #ocaml
<whitequark> works for me :)
<flux> whitequark, but you don't actually write the string to a file..
<flux> whitequark, you just return it, you could just do let err = Printf.sprintf
<flux> whitequark, why don't you make it return "Here is the message: (message here). Have a nice day!"
<whitequark> F5 it
<ggole> whitequark: yeah, it "works" because the wrapper is just a wrapper. Try printing something before and after the message, for instance.
<flux> whitequark, err "hello %d %d" 10 20;; -> doesn't work :(
<flux> whitequark, why don't you make that work as well?
<whitequark> flux: oooh that's what you meant
<whitequark> sure
<flux> (I bet this is the best way to learn ;-))
mfp has joined #ocaml
<whitequark> flux: haha, you could say "for user-defined printf-like functions" and that would be 10 minute quicker :p
ygrek has joined #ocaml
<ggole> It's a bit of a workaround for the lack of variadic arguments
* whitequark nods
<whitequark> and for general format string... uh... weirdness
<ggole> Oh, I forgot to mention that the k stands for "continuation"
<ggole> Took me ages to figure that out -_-
<whitequark> sure, that's obvious
<whitequark> oh
<ggole> Thanks
<ggole> :)
<whitequark> `k' is the standard symbol for continuations :D
<ggole> Yeah. I was less familiar with FP conventions when I first started with OCaml, though.
<whitequark> kontinuation
<whitequark> German?!
ollehar has quit [Read error: Connection reset by peer]
mye has quit [Quit: mye]
ollehar has joined #ocaml
mrvn has left #ocaml []
mrvn has joined #ocaml
amirmc has quit [Quit: Leaving.]
kaustuv has left #ocaml []
introom has joined #ocaml
amirmc has joined #ocaml
cago has quit [Ping timeout: 264 seconds]
ygrek has quit [Ping timeout: 248 seconds]
ben_zen has joined #ocaml
amirmc has quit [Quit: Leaving.]
mye has joined #ocaml
amirmc has joined #ocaml
avsm has quit [Quit: Leaving.]
travisbrady has joined #ocaml
avsm has joined #ocaml
leo_33 has quit [Ping timeout: 264 seconds]
leo_33 has joined #ocaml
redfire has quit [Quit: WeeChat 0.4.1]
hkBst has quit [Quit: Konversation terminated!]
demonimin has quit [Ping timeout: 246 seconds]
leo_33 has quit [Ping timeout: 256 seconds]
leo_33 has joined #ocaml
cago has joined #ocaml
cago has left #ocaml []
leo_31 has joined #ocaml
leo_31 has quit [Client Quit]
introom has quit [Remote host closed the connection]
amirmc has quit [Quit: Leaving.]
ben_zen has quit [Ping timeout: 246 seconds]
leo_33 has quit [Ping timeout: 256 seconds]
leo_33 has joined #ocaml
mika1 has quit [Quit: Leaving.]
demonimin has joined #ocaml
ygrek has joined #ocaml
leo_31 has joined #ocaml
leo_33 has quit [Ping timeout: 264 seconds]
leo_33 has joined #ocaml
leo_31 has quit [Ping timeout: 252 seconds]
amirmc has joined #ocaml
leo_33 has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
thomasga1 has quit [Read error: No route to host]
thomasga has joined #ocaml
leo_33 has joined #ocaml
shinnya has joined #ocaml
ggole has quit [Ping timeout: 268 seconds]
leo_31 has joined #ocaml
leo_33 has quit [Ping timeout: 264 seconds]
skchrko has quit [Quit: Leaving]
ggole has joined #ocaml
csakatoku has joined #ocaml
mcclurmc has quit [Quit: Leaving.]
gnuvince has quit [Ping timeout: 256 seconds]
amirmc has quit [Quit: Leaving.]
tane has joined #ocaml
gnuvince has joined #ocaml
gnuvince has quit [Changing host]
gnuvince has joined #ocaml
ineol has quit [Quit: ineol]
avsm has quit [Quit: Leaving.]
darkf has quit [Quit: Leaving]
thomasga1 has joined #ocaml
thomasga has quit [Read error: Connection reset by peer]
ttamttam has quit [Quit: ttamttam]
thomasga1 has quit [Quit: Leaving.]
ygrek has quit [Ping timeout: 268 seconds]
<whitequark> have any of you read the Cyclone paper on regions?
<pippijn> yes
<pippijn> but I'm very busy now, so let's talk later
<whitequark> ok
<whitequark> one quick question though: must I read Tofte & Talpin's paper as well, or does Cyclone one describe them well enough?
<whitequark> eh. dumb question. nevermind, I'll just read it nevertheless
dsheets has quit [Ping timeout: 264 seconds]
ocp has quit [Ping timeout: 245 seconds]
travisbrady has quit [Quit: travisbrady]
mort___ has quit [Ping timeout: 276 seconds]
tani has joined #ocaml
<mrvn> Given a bunch of rectangels that may overlap or contain each other. What is a good way to find a small set of rectanges that covers them all without being too much too large?
csakatoku has quit [Remote host closed the connection]
<ggole> Sounds a bit like a clustering problem
tane has quit [Ping timeout: 246 seconds]
<thizanne> mrvn: I would probably list the rectangles which are removables, remove the one which needs the lesser number of other rectangles to be covered, and continue until all rectangles are necessary
<thizanne> if getting the rectange which needs the less others to be covered costs too much, I expect the rectangle intersecting the smaller amount of other rectangles could give a not so bad result
<ggole> I think he is after inexact cover
<ggole> Dirty rectangles for drawing would be my guess
<mrvn> thizanne: that ignores that fact that I can create a rectangle that covers a bit extra. Say I have to equal sizes rectangles with a 1 pixel gap between them. Then a rectangle that covers them both and that 1 pixel gap is better.
mye has quit [Quit: mye]
<thizanne> well it will work
<thizanne> amongst your 3 rectangles, both the two equal size ones can be covered since the big one covers them
<thizanne> can be removed*
<mrvn> what big one? There are only 2 rectangles
<thizanne> oh, ok
<thizanne> I thought you want a subset of your rectangles
<mrvn> no, that would be easy
<ggole> Just unioning the extents is easy
ontologiae_ has quit [Ping timeout: 248 seconds]
<ggole> If you want some fast sloppy thing you could try to remove the maximum amount of untouched space at corners, recursively
<ggole> Stopping when the win becomes small
<ggole> This misses cases like a circle of rectangles with a large amount of unused space in the middle though
<mrvn> wouldn't that just give me a rectangle covering them all?
<ggole> No
<ggole> Start with the big rectangle
travisbrady has joined #ocaml
<ggole> Then try to kill each corner, replacing it with several smaller bits
<mrvn> ggole: so I split the rectangle in 4 and see if any covers nothing. the repeat?
<mrvn> i.e. a quadtree
<ggole> No, you'd need to do a little search
<ggole> Looking at how much area you gain by advancing the killed area by X in one direction
<ggole> You'd need a spatial index to make the queries fast though :/
<bernardofpc> mrvn: math-wise, this is Vitali covering
<bernardofpc> (or something like that)
<bernardofpc> (which is a greedy algorithm)
<bernardofpc> the too much too large is a 3x condition, or 5x if your collection is infinite
<mrvn> factor 3 makes that totaly useless
<bernardofpc> ok
<bernardofpc> (and in fact Vitali is only for subcover, not what you're looking for, as far as I understand)
tani has quit [Quit: Verlassend]
<mrvn> I have a GUI and that needs to redraw some widgets. Each widget has a rectangle in which it draws. Once they have drawn I need to copy the affected regions to the screen.
<mrvn> And it is better to copy a bit more than needed than to have too many small copy operations.
<bernardofpc> right
<bernardofpc> you have a cost function in terms of n and m ?
<mrvn> not yet
<bernardofpc> (also, trying to make a too smart reclustering may cost you more than what you'll get :d)
<mrvn> yeah. I need something fast and dirty. No point optimizing the regions for 1s when the copy only taks 1/100th
<ggole> Are they sorted?
<mrvn> no
<mrvn> or maybe
<ggole> You might be able to exploit ordering to look for "holes" cheaply
osnr has joined #ocaml
osnr has quit [Changing host]
osnr has joined #ocaml
djcoin has quit [Quit: WeeChat 0.4.0]
osa1 has quit [Ping timeout: 276 seconds]
osa1 has joined #ocaml
travisbrady has quit [Quit: travisbrady]
Zeev has joined #ocaml
Neros has quit [Ping timeout: 264 seconds]
mye has joined #ocaml
travisbrady has joined #ocaml
bkpt has joined #ocaml
bondar has joined #ocaml
bondar has quit [Client Quit]
bondar has joined #ocaml
osa1_ has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Excess Flood]
bondar has joined #ocaml
bondar has quit [Client Quit]
yacks has quit [Ping timeout: 268 seconds]
osa1 has quit [Ping timeout: 240 seconds]
yacks has joined #ocaml
mort___ has joined #ocaml
Neros has joined #ocaml
bondar has joined #ocaml
ollehar has quit [Ping timeout: 240 seconds]
ggole has quit []
osa1_ has quit [Ping timeout: 253 seconds]
ollehar has joined #ocaml
mye has quit [Quit: mye]
avsm has joined #ocaml
tane has joined #ocaml
vpit3833` has joined #ocaml
Anarchos has joined #ocaml
vpit3833 has quit [Ping timeout: 264 seconds]
avsm has quit [Quit: Leaving.]
mort___ has quit [Quit: Leaving.]
bondar has quit []
leo_31 has quit [Ping timeout: 276 seconds]
zRecursive has joined #ocaml
pkrnj has joined #ocaml
levi has joined #ocaml
zRecursive has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
zRecursive has joined #ocaml
mye has joined #ocaml
osa1 has joined #ocaml
dsheets has joined #ocaml
avsm has joined #ocaml
leo_33 has joined #ocaml
travisbrady has quit [Quit: travisbrady]
walter has quit [Read error: Connection reset by peer]
walter has joined #ocaml
mort___ has joined #ocaml
zRecursive has left #ocaml []
demonimin_ has joined #ocaml
demonimin has quit [Ping timeout: 256 seconds]
tane has quit [Quit: Verlassend]
ineol has joined #ocaml
Simn has quit [Quit: Leaving]
pkrnj has quit [Quit: Computer has gone to sleep.]
ulfdoz has quit [Ping timeout: 264 seconds]
dezzy has quit [Read error: Connection reset by peer]
dezzy has joined #ocaml
vpit3833` is now known as vpit3833
pkrnj has joined #ocaml
vext01 has quit [Ping timeout: 264 seconds]
bkpt has quit [Quit: Leaving]
osa1 has quit [Read error: Connection reset by peer]
vpit3833` has joined #ocaml
vpit3833 has quit [Ping timeout: 256 seconds]
ineol has quit [Quit: ineol]
vpit3833` is now known as vpit3833
dezzy has quit [Changing host]
dezzy has joined #ocaml
dsheets has quit [Ping timeout: 240 seconds]
Drup2 has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
mort___ has quit [Quit: Leaving.]
Drup2 has quit [Read error: Connection reset by peer]
Drup has joined #ocaml
mye has quit [Quit: mye]
ollehar has quit [Ping timeout: 276 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
Anarchos has quit [Quit: Vision[0.9.7-H-130604]: i've been blurred!]
Drup has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]