<thelema>
sumanah: I've looked at it and find nothing obviously wrong with the diff.
<sumanah>
thelema: mind commenting?
<sumanah>
you're "thelema314" on mediawiki.org, aren't you?
<thelema>
yes
<sumanah>
we appreciated your comments on the other OCaml code a lot
<thelema>
sumanah: I can't say I said that much, but ok
<sumanah>
thelema: "I see nothing wrong with this" is a useful thing to hear :)
<thelema>
sumanah: done.
<sumanah>
thanks thelema
bobry has joined #ocaml
<synfin>
Would there be an existing standard library that reads mbox mail?
emma has joined #ocaml
<thelema>
synfin: isn't mbox quite trivial to parse?
<synfin>
thelema: Yes. But reinventing the wheel is foolish.
<f[x]>
I wouldn't say that mbox is trivial to parse
<synfin>
thelema: hence why I thought there may be one already.
<f[x]>
ocamlnet should have mime parsers
<synfin>
f[x]: I'll look at that, thank you.
<flux>
I have at least one mbox parser somewhere lying around..
<thelema>
http://en.wikipedia.org/wiki/Mbox <- according to this, you'll have to pick a variant, as eudora and mozilla mail clients use a variant of the standard
<thelema>
synfin: if you want to do more than just split the mbox file into its individual emails, you'll have to do a bunch of work, but just parsing an mbox file into a list of emails should be pretty simple.
sumanah has left #ocaml []
<flux>
it has mbox.mli, mbox.ml, but they depend on parserAux.ml (small) and ParserCoFixed which is a fixed version of an older Batteries library (or a wrapper for it really)
<flux>
no license file there but consider it public domain :)
<thelema>
flux: is it that hard to get fixes for batteries upstreamed?
<flux>
thelema, actually I think it has been upstreamed
<flux>
it's an older source I haven't touched for a long while
<flux>
(the file names were actually mail.mli and mail.ml)
<flux>
apparently it's lazy as well, good I guess if reading the mailbox is io bound and you want to interleave some processing
<thelema>
flux: actually, I doubt laziness helps for that in ocaml
<flux>
IIRC it has already gone through a few mailboxes, so maybe it works :-)
<flux>
thelema, in principle it might, because the operating system has preloaded stuff
<flux>
the the operating system is doing reading from the device while your algorithm is running
<thelema>
I'm thinking that if you need data, it'll block and the OS will be kicked into motion no sooner than when you need the data
<thelema>
the OS could do prefetching, that could help...
<flux>
I would imagine all modern operating systems do prefect
<synfin>
actually, I believe netmime may do what I need, or I can assuage it to do what I need.
<flux>
ocamlnet library does have all sort of good stuff in it
<synfin>
definitely, I'm parsing it now.
<flux>
should perhaps glancy through its interface files again some day, to refresh the list of things I can just reuse, instead of rewrite :)
<synfin>
flux: Absolutely, little point in rewriting something that works well, unless for pedagogic reasons.
Pepe_ has quit [Ping timeout: 260 seconds]
Pepe_ has joined #ocaml
dnolen has quit [Quit: dnolen]
bobry1 has quit [Quit: Leaving.]
andre_ has joined #ocaml
_andre has quit [Ping timeout: 260 seconds]
fenard has joined #ocaml
<fenard>
hi
<thelema>
hi
<fenard>
gildor, you're around ? :)
<fenard>
hi thelema
fraggle_ has quit [Ping timeout: 260 seconds]
ttamttam has left #ocaml []
ttamttam has joined #ocaml
ttamttam has left #ocaml []
ankit9 has quit [Read error: Connection reset by peer]
larhat has quit [Quit: Leaving.]
ankit9 has joined #ocaml
<gildor>
fenard: hi
<fenard>
hi gildor
<gildor>
fenard: I am around but not for a long time
lopexx has joined #ocaml
<thelema>
is there any way to test if a lazy value has been forced?
<thelema>
ah, lazy_is_val. sorry for the noise
junsuijin has joined #ocaml
fenard has left #ocaml []
lopex has quit []
lopexx is now known as lopex
Kakadu has quit [Ping timeout: 252 seconds]
Associat0r has joined #ocaml
Associat0r has quit [Changing host]
Associat0r has joined #ocaml
Reaganomicon has joined #ocaml
Anarchos has joined #ocaml
<_habnabit>
there's not a symmetric difference function on sets, is there?
<_habnabit>
I don't see one, but.
ygrek has joined #ocaml
<thelema>
_habnabit: You can build it with Map.merge
<_habnabit>
hah. I ended up just defining my own funciton.
<_habnabit>
(in terms of difference and union)
<thelema>
sdiff A B = A-B U B-A
<_habnabit>
yeah, that's what I did.
<thelema>
sure, but why do three tree merges when you can do one
<_habnabit>
how would you do it with a map using a set?
<thelema>
well you'd have to use maps to unit instead of sets
<_habnabit>
I haven't looked at the implementations; is lockstep tree traversal an easy thing? I might just submit a patch.
<thelema>
yes, it's pretty easy and there's lots of examples.
<thelema>
the idea is that you decompose one tree on its root and you split the other tree based on the value of that root into subtrees that are less than and greater than that root