struktured has quit [Read error: 113 (No route to host)]
sarek_ has joined #ocaml
sarek_ has left #ocaml []
middayc has quit [Read error: 110 (Connection timed out)]
middayc_ has quit [Read error: 110 (Connection timed out)]
middayc has joined #ocaml
bzzbzz has joined #ocaml
middayc__ has quit [Read error: 110 (Connection timed out)]
boost has quit []
boost has joined #ocaml
Pimm has quit [Read error: 60 (Operation timed out)]
caligula__ has quit [Read error: 60 (Operation timed out)]
caligula__ has joined #ocaml
<c0m>
WEEEE!
<c0m>
i fixed it!!!
middayc___ has quit ["ChatZilla 0.9.85 [Firefox 3.0.15/2009101601]"]
Jedai has quit [leguin.freenode.net irc.freenode.net]
ulfdoz_ has joined #ocaml
Jedai has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ulfdoz_ has quit [Read error: 110 (Connection timed out)]
caligula_ has joined #ocaml
caligula__ has quit [Success]
munga_ has quit [Read error: 113 (No route to host)]
Jedai has quit [leguin.freenode.net irc.freenode.net]
Jedai has joined #ocaml
Xteven has quit [leguin.freenode.net irc.freenode.net]
mal`` has quit [leguin.freenode.net irc.freenode.net]
tmaeda has quit [leguin.freenode.net irc.freenode.net]
avysk has quit [leguin.freenode.net irc.freenode.net]
mrvn has quit [leguin.freenode.net irc.freenode.net]
Camarade_Tux has quit [leguin.freenode.net irc.freenode.net]
rwmjones has quit [leguin.freenode.net irc.freenode.net]
Xteven has joined #ocaml
mal`` has joined #ocaml
tmaeda has joined #ocaml
avysk has joined #ocaml
mrvn has joined #ocaml
Camarade_Tux has joined #ocaml
rwmjones has joined #ocaml
Camarade_Tux has quit [Read error: 131 (Connection reset by peer)]
Xteven has quit [Read error: 131 (Connection reset by peer)]
Xteven_ has joined #ocaml
Camarade_Tux has joined #ocaml
Xteven_ has quit [leguin.freenode.net irc.freenode.net]
mrvn has quit [leguin.freenode.net irc.freenode.net]
avysk has quit [leguin.freenode.net irc.freenode.net]
rwmjones has quit [leguin.freenode.net irc.freenode.net]
mal`` has quit [leguin.freenode.net irc.freenode.net]
tmaeda has quit [leguin.freenode.net irc.freenode.net]
Modius has quit [Read error: 104 (Connection reset by peer)]
middayc has quit [Read error: 104 (Connection reset by peer)]
Xteven_ has joined #ocaml
mal`` has joined #ocaml
tmaeda has joined #ocaml
avysk has joined #ocaml
mrvn has joined #ocaml
rwmjones has joined #ocaml
Modius has joined #ocaml
mrvn_ has joined #ocaml
mrvn has quit [Read error: 131 (Connection reset by peer)]
Jedai has quit [leguin.freenode.net irc.freenode.net]
tmaedaZ has joined #ocaml
Jedai has joined #ocaml
Modius has quit [SendQ exceeded]
Modius has joined #ocaml
tmaeda has quit [Read error: 145 (Connection timed out)]
sgnb` has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb` is now known as sgnb
c0m has quit [Read error: 60 (Operation timed out)]
tmaedaZ is now known as tmaeda
Dodek has quit [Read error: 110 (Connection timed out)]
Associat0r has quit []
sgnb` has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
avysk has quit [leguin.freenode.net irc.freenode.net]
Xteven_ has quit [leguin.freenode.net irc.freenode.net]
rwmjones has quit [leguin.freenode.net irc.freenode.net]
mal`` has quit [leguin.freenode.net irc.freenode.net]
Xteven_ has joined #ocaml
mal`` has joined #ocaml
avysk has joined #ocaml
rwmjones has joined #ocaml
ygrek has joined #ocaml
zhijie has joined #ocaml
boost has quit []
slash_ has joined #ocaml
tmaeda is now known as tmaedaZ
Pimm has joined #ocaml
Snark has joined #ocaml
albacker has joined #ocaml
_zack has joined #ocaml
_unK has joined #ocaml
munga_ has joined #ocaml
BigJ has quit ["Leaving"]
ulfdoz has joined #ocaml
Modius has quit [Read error: 104 (Connection reset by peer)]
Modius has joined #ocaml
ski_ has joined #ocaml
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
BiDOrD has quit [Read error: 110 (Connection timed out)]
BiDOrD has joined #ocaml
Leonidas has quit [Remote closed the connection]
Leonidas has joined #ocaml
ulfdoz has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
_zack has quit ["Leaving."]
munga_ has quit [Read error: 113 (No route to host)]
drunK_ has joined #ocaml
drunK_ has quit [Remote closed the connection]
_unK has quit [Read error: 110 (Connection timed out)]
_JusSx_ has joined #ocaml
ttamttam has joined #ocaml
Yoric[DT] has joined #ocaml
_unK has joined #ocaml
_unK has quit [Remote closed the connection]
stan_ has joined #ocaml
_unK has joined #ocaml
ttamttam has quit ["Leaving."]
onigiri has joined #ocaml
<thelema>
wow, enum is expensive
<thelema>
It's definitely a convenience thing. And boy is it convenient. But don't put it in any inner loops.
<Camarade_Tux>
like how?
avysk has quit [Read error: 145 (Connection timed out)]
tmaedaZ is now known as tmaeda
<thelema>
like I rewrote an inner loop that was using Set.enum to iterate through a set
<thelema>
I changed it to a fold with an exception to break out early, and my program about doubled in speed
<thelema>
(admittedly, this routine accounted for 70% of the program's CPU time)
<thelema>
but that means the loop must have sped up about 3x
<thelema>
btw, I remember reading that using (-) for compare isn't efficient
<thelema>
my third most expensive function in my program is now batint_compare
<thelema>
for my integer sets
sgnb` is now known as sgnb
<Yoric[DT]>
Yeah, I was thinking about how to have something [enum]-like, without the cost.
<Yoric[DT]>
My feeling is that it's not possible without metaprogramming.
<thelema>
I'm still using Enum, just not for my inner loop
BiDOrD has quit [Read error: 145 (Connection timed out)]
BiDOrD has joined #ocaml
<thelema>
ah, I should eliminate the functor overhead of my sets - that's about 7% of my runtime just to compare ints
tmaeda is now known as tmaedaZ
<mrvn_>
what does enum do that is so expensive?
<thelema>
mrvn_: there's a ton of closure generation and mutating of values.
mrvn_ is now known as mrvn
<thelema>
I think...
* Yoric[DT]
would bet on closures.
<Yoric[DT]>
(and many indirections)
<thelema>
basically the constants are large, despite the low big-O
<thelema>
it seems there is a small win on using (-) for [compare]
<thelema>
Yoric[DT]: The reason I blame mutability for poor enum performance is that when I removed enum from my inner loop, profiling didn't rank caml_modify and other mutation functions at the top anymore
<Yoric[DT]>
interesting
ski_ has quit ["Lost terminal"]
<mfp>
thelema: BatSet's enum is quite inefficient
<mfp>
it's implemented using Enum.append + Enum.delay
ski_ has joined #ocaml
<thelema>
mfp: yes, it's not a flaw in batSet's enum implementation, it's just the fundamental performance characteristics of using Enum for a tree traversal
<mfp>
thelema: well, I think it can be made faster by reifying the continuation manually and avoiding higher-level Enum functions
<thelema>
doing Enum.get each time to get a node, matching to handle None, etc.
<thelema>
oh, inefficient... oops, I misread
<flux>
I suppose not even batteries' Set has iterators? (as in objects, not functions)
<thelema>
flux: just enum and backwards - what else would you want?
<mfp>
I sort of remember implementing them
<mfp>
maybe as a patch in Batteries BTS or something
<flux>
thelema, an iterator such as they have in C++ or perhaps in ocaml reins
<flux>
thelema, so an object that points to an element in a set and that can be advanced or reversed (hm, better word for this?)
<thelema>
un-vanced. (I just made that up)
<thelema>
maybe de-vanced.
<flux>
devance isn't a word. deviance is, let's use that..
<thelema>
I think your iterator concept is really just a 'next-element' and 'previous-element' function pair
<thelema>
maybe with some state to make this more efficient?
<flux>
well, monodirectional iterators are basically enums
<flux>
but C++ uses iterators for example returning the location of a find operation
<flux>
and from that point you can traverse backwards and forwards
<mfp>
or rather git show fbac14e
<thelema>
mfp: for the efficient-enum implementation?
<mfp>
the prev implementation of Pmap.enum (similar to Set), which should be faster
<mrvn>
C++ also has const, insert, delete and forward and reverse interators.
<thelema>
insert iterators? Apparently I don't know C++ as well as I should
<flux>
although this has nothing to do with insert iterators, you can use iteartor iterators for inserting stuff into a (mutable, doubly-linked) linked list
<flux>
whops, s/iteartor //
<mrvn>
I think the difference was that it.next() would skip the items you just inserted.
<flux>
oh, I thought you meant stuff like back_inserter_iterator
<mrvn>
an iterator for every data type and a data type for every iterator. :)
<thelema>
heh, iterator distance
<mfp>
thelema: do you have an enum benchmark/use case handy? I could try to write a faster enum for Set
<thelema>
I'll see if I can distill my use-case into something standalone
_zack has joined #ocaml
<thelema>
hi _zack
Associat0r has joined #ocaml
<thelema>
mfp:current git for aaa now has examples/benchmark/t_enum.ml which is my use-case as a benchmark
<mfp>
k, fetching
<thelema>
hmm, I just got an email for my second push, but not my first...
<mfp>
thelema: module ISet = Set.Make(struct type t = int let compare (x: int) (y:int) = Pervasives.compare x y end) -> let compare x y = x - y is much faster if you don't expect overflows; otherwise, if x > y then 1 else if y < x then -1 else 0
<thelema>
ah, that was why compare=(-) is bad.
<thelema>
we should fix that in batteries.
Associat0r has quit []
<thelema>
For this example, you're welcome to fix this.
<thelema>
I'll get batInt.compare
<thelema>
also, your example is bad -- x < y == y < x
<mfp>
typo indeed, else if x < y then -1
* thelema
is tempted to publish his full project, to see what kinds of optimizations the community can come up with, except it's for a class project, and I'd be in trouble if another student got the code.
<thelema>
Not that any of the other students would be hanging around #ocaml
<mfp>
thelema: I get 0.488 -> 0.328 with the new enum ()
<thelema>
not bad. Let me know what you want me to put into batteries
<thelema>
btw, what's up with "[-ccopt -O9] have a real impact on performance" (from "Ocaml as fast as C" optimization powerpoint)
<mfp>
it's a joke(?)
<mrvn>
-O666 is much faster
<thelema>
lol
ttamttam has joined #ocaml
<mfp>
how comes there's no Enum.xxxx : 'a t -> 'a ?
<thelema>
Enum.get : 'a t -> 'a option
<mfp>
raising No_more_elements on EOE
<mfp>
without option
<thelema>
foo.Enum.next () ?
<mfp>
the type is abstract, you can't do that
<thelema>
yeah, yeah...
<mfp>
I also optimized count while I was at it, should be much faster now (no allocation), O(depth) stack
<mfp>
thelema: how should I commit this? to my aaa branch, to yours (you have to add me as a contrib then), to a separate one?
<mfp>
the cleanest way, as far as the history is concerned, is to push to your repos directly
* thelema
will add you as a contrib
<thelema>
done
* thelema
realizes that pulling from frequent contributors has too much overhead at this point
<mfp>
if I understand the way pull (push?) queues work, that generates lots of merge commits
<mfp>
on the contributor's end
<thelema>
I agree that merge commits are uglier than rebase merges
<mfp>
they're OK when you have a long-lived branch
<mfp>
but one merge per commit pulled from another repos is just too much
<thelema>
yup, and I'm expecting (hoping for) many small commits for many small bugs
<mfp>
pushed
<thelema>
got it
<thelema>
like the bug I introduced in compare. Thanks for fixing.
Dodek_ has joined #ocaml
<thelema>
does anyone know how to order omake dependencies? i.e. have a target "reinstall: uninstall install"?
<thelema>
my omake always wants to run install first
BiDOrD has quit []
<mrvn>
$(MAKE) install
<mrvn>
or | I think
<thelema>
if I provide the requirements at the command line, it works -- [omake uninstall install]
<thelema>
but I'm trying to get a [omake reinstall] that does the same thing, and failing
ikaros_ has joined #ocaml
ikaros has quit [Read error: 113 (No route to host)]
<mfp>
thelema: I'm migrating testsuite/ to OMake in order to run the tests without installing
ulfdoz has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
<thelema>
mfp: great. If you have any ideas on automating the release, I'd love to know. My git-fu has failed me
_zack has quit ["Leaving."]
Amorphous has quit [Read error: 104 (Connection reset by peer)]
Submarine has joined #ocaml
Snark has quit ["Ex-Chat"]
Amorphous has joined #ocaml
_JusSx_ has quit ["leaving"]
Pimm has joined #ocaml
stan_ has quit [Client Quit]
kaustuv has joined #ocaml
gareth_0 has joined #ocaml
<ua>
`/whois mfp
<mfp>
ua: stalking me?
delsvr_ has joined #ocaml
<ua>
mfp: not really. just wanted to see if your the one who did the last commits on aaa batteries
<ua>
but it's awkward of course.
<mfp>
ua: are you interested in AAA? I think thelema is looking for a few more hands
gareth_0 has quit [Remote closed the connection]
<ua>
i'm looking into the log at times to see what comes out of it.
gareth_0 has joined #ocaml
<ua>
i'm using batteries in a project atm and am a bit "afraid" because of the lack of development
<ua>
but i didn't really look into the aaa code
<ua>
as of yet
<mfp>
ua: I think that (aside from Yoric not having time anymore) the reason why Batteries stalled was the complexity of the build system
<mfp>
building & documentation generation were very very involved
<ua>
yes, i didn't even try to understand it.
<mfp>
AAA simplifies them notably and thus makes it much easier to contribute
<ua>
i will have a closer look at aaa in the next days.
<ua>
right now i'm not event using the camlp4 syntax extensions of batteries.
<ua>
and the sexplib marshalling, so won't miss it.
<mfp>
that's fortunate, because AAA doesn't have them atm.
<mfp>
I'm thinking of bringing them back, though
<mfp>
they're not hard to build & install, and you'd use them as other extensions via ocamlfind
<ua>
i thought the original plan for aaa was to get rid of them?
<mfp>
with -syntax camlp4o -package aaa.syntax
<mfp>
I have to ask thelema
<ua>
was this because they introduced more complexity?
<mfp>
I think so
<mfp>
but building them (as opposed to using them in the build process) is rather easy
<mfp>
even the latter is manageable in fact
Submarine has quit ["Leaving"]
Pimm has quit [Read error: 110 (Connection timed out)]
<thelema>
The original plan for batteries was to have a version without crazy libraries (which is my problem with core - sexplib+bin_prot are crazy)
<thelema>
I'm not opposed to sexplib as an optional component, I just don't want it required
<thelema>
That said, I don't know how to do sexplib optionally - it's got to be there at type declaration time.
<flux>
the problem with sexplib and bin_prot and others is that there is no single 'good' answer, although their areas of operation overlap significantly..
<flux>
I don't mind that I need to choose some libraries outside the standard set. but then again I suppose the whole point of batteries in general was to reduce that need..
<thelema>
yes, which is why I'm thinking about including some small libraries within aaa's distribution
<thelema>
for example camlzip and ocaml-fileutils
Pimm has joined #ocaml
<thelema>
I'd love to take some parts of LWT, but I dunno how well I could extract them...
<thelema>
for instance the toplevel improvements
<mfp>
thelema: what about Batteries' own extensions? extensible printf, estrings (rope literals, etc.)
<thelema>
Those are much easier to have as components of AAA, and if there's not going to be a batteries project supporting them, there's room in the AAA camp for them.
slash_ has quit [Client Quit]
gareth_0 has quit [Remote closed the connection]
gareth_0 has joined #ocaml
ygrek has quit [Remote closed the connection]
gareth_0 has quit [Client Quit]
crooter_afk is now known as crooter
kaustuv has quit ["ERC Version 5.3 (IRC client for Emacs)"]