<gasche>
correction: If : bool t * 'a t * 'a t -> 'a t
<Kakadu_>
btw, bool t is t with constuctor Bool or t parametrized by bool type as 'a?
<gasche>
you should not write "type 'a t ="
<gasche>
it's too confused
<gasche>
rather use "type _ t ="
<gasche>
(it makes sense to bind a variable here only if you mix GADT and non-GADT constructors, which is not advised if you're not already comfortable with GADT alone)
<mfp>
have yet to decide whether/what to expose with a REST interface
<avsm>
mfp: awesome! does leveldb expose an async-friendly interface to bind to?
<mfp>
it assumes you use threads :-/
<mfp>
so I have to Lwt_preemptive.detach stuff
<mfp>
it's np for writes (as I do group commits and expect them to be slow with fsync and all)
<mfp>
as for reads, atm. I just detach operations presumed to be slow (range queries)
<mfp>
unless you tell the server to assume all lookups will block, in which case it detaches all ops
<avsm>
mfp: i guess the only way out is libaio, which can be quirky to work with
<avsm>
mfp: we ported https://github.com/Incubaid/baardskeerder to mirage to play with it, and its a really nice interface in pure ocaml. the main difference is in the data structure it uses (btree vs ls merge trees), so random writes will probably be worse
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 265 seconds]
<mfp>
yes, leveldb's main appeal is its LSM structure
<mfp>
there's a 0 chance it'll gain an async-friendly intf though, since they care about portability
<mfp>
with leveldb being used in chrome
<mrvn>
avsm: I'm maintaining libaio-ocaml in Debian.
mort___ has joined #ocaml
mort___ has quit [Client Quit]
mort___ has joined #ocaml
<orbitz>
Main probelsm with LevelDB are reads if you ahv etoo many levels and useing iter on a deleted key
<mfp>
orbitz: what do you mean > "useing iter on a deleted key"?
<orbitz>
mfp: If you delete a key in LevelDb then use the iter function to jump to the key you deleted, it takes a considerably longer time
<gasche>
Kakadu, that would rather be "| Plus of int * int" versus "| Plus : int * int -> int t"
<mfp>
orbitz: more than if you had just updated the value? I thought the mechanism was largely the same (coalescing data from diff levels)
<gasche>
because (Plus of int t * int t -> int t) corresponds to (Plus : (int t * t int -> int t) -> 'a t)
<orbitz>
mfp: Deletes are done by tombstones so if you iterate to a point it has to iterate all your dead stuff before it too
<orbitz>
mfp: AFAIK this is nto fixed yet, but will be
<orbitz>
mfp: a Get will always go directly to the key though
_andre has joined #ocaml
<mfp>
ah now I get what you meant
<Kakadu_>
gasche: Thanks a lot, I understanded
<mfp>
the problem being having to skip deleted values when iterating
<mfp>
I thought you were referring to some weird quirk in iterators/seek
<orbitz>
oh no
<orbitz>
The levels stuff kind of stinks on EC2 apaprently, because it's an extra seek once you get too much data (accordingot Kiip video)
<orbitz>
But they are fixing that too
<mfp>
extra seek? afaik the promise is ~1 seek if 10% of the working set fits in mem, 2 if 1% and so on
<orbitz>
mfp: the Kiip guys found they got an extra 15ms latency for every level that had to be hit, on EC2
<mfp>
well yes, isn't that exactly what you'd expect?
<orbitz>
YOu'd expect more latency, the main problem is IO on EC2 has so much extra latency
<mfp>
uh seems reddit's DB went ~20? minutes back in time
<mfp>
anyway, lunchtime
thomasga has quit [Ping timeout: 245 seconds]
<flux>
mfp, does it do master-slave or master-master mirroring?
<flux>
or if it doesn't do those yet, will it do them at some point :)
<flux>
ah, it does replication
<Hodapp>
mfp: iiiinteresting
<mfp>
flux: master-slave
<mfp>
flux: LSM-trees are strong at writing, but weaker at reading; fortunately reads are easily scaled with master-slave, and it's easier to implement too :)
ckirkendall has joined #ocaml
ankit9 has quit [Read error: Operation timed out]
Ptival has quit [Quit: leaving]
Ptival has joined #ocaml
Ptival has quit [Client Quit]
Ptival has joined #ocaml
Ptival has quit [Client Quit]
Ptival has joined #ocaml
sepp2k has joined #ocaml
Progster has quit [Ping timeout: 260 seconds]
gnuvince has quit [Ping timeout: 250 seconds]
tlockney has quit [Excess Flood]
tlockney has joined #ocaml
cdidd has joined #ocaml
osa1 has joined #ocaml
rwmjones is now known as rwmjones_afk
gnuvince has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
Sablier has quit [Read error: Connection reset by peer]
beckerb has quit [Quit: Konversation terminated!]
sepp2k has quit [Quit: Leaving.]
Kakadu_ has quit [Quit: Page closed]
Kakadu has quit [Quit: Page closed]
ocp has quit [Ping timeout: 244 seconds]
cago has quit [Quit: Leaving.]
mika1 has quit [Quit: Leaving.]
eni has joined #ocaml
silver has quit [Read error: Connection reset by peer]
hto has joined #ocaml
Sablier has joined #ocaml
avsm has quit [Quit: Leaving.]
Submarine has quit [Quit: Leaving]
Kakadu has joined #ocaml
oriba has joined #ocaml
avsm has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
Kakadu has joined #ocaml
ftrvxmtrx has joined #ocaml
wmeyer has joined #ocaml
djcoin has quit [Quit: WeeChat 0.3.2]
avsm has quit [Quit: Leaving.]
Yoric has joined #ocaml
pangoafk is now known as pango
Progster has joined #ocaml
Xizor has joined #ocaml
Framedragger has joined #ocaml
sepp2k has joined #ocaml
Framedragger has quit [Ping timeout: 244 seconds]
avsm has joined #ocaml
avsm has quit [Client Quit]
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
tac-tics has quit [Ping timeout: 245 seconds]
tac-tics has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
ckirkendall has quit [Ping timeout: 245 seconds]
Tobu has quit [Read error: Connection reset by peer]
oriba has quit [Ping timeout: 246 seconds]
gnuvince has quit [Ping timeout: 240 seconds]
oriba has joined #ocaml
avsm has joined #ocaml
<adrien>
I can't remember: is "let f { a; b; c} = ..." a recent syntax?
<adrien>
what about "let f { a = a; b = b; c = c } = ..." ?
sepp2k has quit [Ping timeout: 246 seconds]
_andre has quit [Quit: leaving]
Kakadu has quit [Ping timeout: 240 seconds]
<thelema>
adrien: yes, 3.12
<thelema>
{a=a} is pre-3.12
<adrien>
thelema: thanks =)
Cyanure has quit [Ping timeout: 260 seconds]
<pippijn>
adrien: you were asked about
<adrien>
release-time at work, and of course the project is late
sepp2k has joined #ocaml
<adrien>
anyone has a 3.11.x? a 4.00? a whatever-but-3.12?
<pippijn>
ah
<adrien>
working on yypkg in my spare time
<adrien>
and now, readying lablgtk's next release
<adrien>
(well, actually: adding more code so there can be more bugs)
eni has quit [Ping timeout: 246 seconds]
<jonafan>
ocsigen needs documentation
<jonafan>
i'm getting to the point of being willing to read ocsigen's source
eni has joined #ocaml
* adrien
wishes there was a "let _un_open M in" to cancel a previous "let open M in"
<adrien>
(I also need to check how old this syntax is =/ )
<pippijn>
that would probably be some effort to implement
eni has quit [Remote host closed the connection]
<flux>
hmm, let open in is on 3.12 as well, isn't it?
<adrien>
checking
<flux>
and I doubt it'd be great to have unopen, how complicated would the code to be with that..
<flux>
just use local module aliases or even smaller scopes
<flux>
(local module aliases were already in 3.11 ;))
<adrien>
yes, it is
<flux>
if you need to support older compilers, why not just use one..
<adrien>
ah, right!
<adrien>
it's "let module M = X in" which is much older: 2.00
<adrien>
flux: I'm going to fall asleep
<flux>
but it's not even 23 yet there!
<flux>
I, ont
<flux>
I, on the other hand, am actually going to sleep about now ;)
<adrien>
heh :-)
<flux>
happy release pressure!
<adrien>
not been sleeping much recently
<flux>
yeah, sleeping helps
<adrien>
it's triple release pressure: at work, lablgtk, and yypkg \o/
<flux>
I've been having some bad habbits lately of going to sleep at 24
<flux>
yypkg?
<adrien>
you don't know it? ='(
<adrien>
my package manager, which is actually something pretty trivial to do
<adrien>
and there are corresponding packages for windows
<flux>
actually now that you mention, you've probably mentioned it a couple times here
<flux>
not a user, sorry :)
<flux>
also I don't use Windows a lot
<adrien>
I've been working on making my own builds of a cross-compiling gcc and a better environment
ocp has joined #ocaml
ocp has left #ocaml []
<gildor_>
anyone knows how to ask godi to rebuild everything that reverse depends on a new package ?
Cyanure has joined #ocaml
gnuvince has joined #ocaml
<adrien>
if people are interested in testing before release: get lablgtk's git HEAD
<adrien>
it has quite a lot of changes
Cyanure has quit [Remote host closed the connection]
smondet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Framedragger has joined #ocaml
Framedragger has quit [Client Quit]
Framedragger has joined #ocaml
TDJACR has joined #ocaml
<adrien>
flux: can I go to bed now? ;-)
Snark has quit [Quit: Quitte]
Xizor has quit [Ping timeout: 260 seconds]
tac-tics has quit []
ttm has quit [Disconnected by services]
The_third_man has joined #ocaml
mjonsson has joined #ocaml
<sepp2k>
When writing a function that works with polymorphic variants, is there a way to tell the type system, that the result will use the same constructor as the argument? I.e. that when I use my function on a value of type [< `A | `B], I'll get back a value of type [< `A | `B], even though the function has a case `C -> `C.
<Drakken>
sepp2k using the same constructor is more than just having the same type.
<Drakken>
since there are two constructors in [< `A | `B]
<sepp2k>
Drakken: What I meant is that if the input is `A, the output is `A, if the input is `B, the output is `B, and if the input is `C, the output is `C. So if I can make the type system aware of that, it can know that calling f on a value of type [`A | `B] will give me another value of type [`A | `B].