gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.1 http://bit.ly/nNVIVH
xaimus has quit [Ping timeout: 245 seconds]
<thelema> mrvn: when gildor is ready.
mjonsson has quit [Remote host closed the connection]
mjonsson has joined #ocaml
mjonsson has quit [Remote host closed the connection]
16SABF5BU has joined #ocaml
16SABF5BU has quit [Client Quit]
36DABJHFK has joined #ocaml
36DABJHFK has quit [Remote host closed the connection]
mjonsson has joined #ocaml
TDJACR has quit [Quit: Fixing connections.]
mjonsson has quit [Remote host closed the connection]
Progster has quit [Ping timeout: 245 seconds]
Xizor has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
eni has joined #ocaml
pango is now known as pangoafk
ankit9 has joined #ocaml
Submarine has quit [Ping timeout: 246 seconds]
eni has quit [Ping timeout: 246 seconds]
hto has quit [Quit: Lost terminal]
edwin has joined #ocaml
edwin has left #ocaml []
Hussaind has joined #ocaml
Hussaind has left #ocaml []
Snark has joined #ocaml
tactics_ has quit [Read error: Connection reset by peer]
<yezariaely> why can't I do a union on BatMap.StringMap ?!
<_habnabit> what would the union be?
Sablier has joined #ocaml
<yezariaely> ah :/ no I see my mistake. I changed it to a Map but before it was a set
<yezariaely> no = now
<yezariaely> there, the union was well defined
<_habnabit> yes, it's well-defined on sets
<yezariaely> As I wrote: module BindingSet = BatMap.StringMap I assumed it is still a map :/
<yezariaely> map extension would be the correct operation, here...
Xizor has quit [Ping timeout: 260 seconds]
cdidd has quit [Remote host closed the connection]
Cyanure has joined #ocaml
djcoin has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
silver has joined #ocaml
mika1 has joined #ocaml
ocp has joined #ocaml
<flux> a union for maps could easily be defined if they get a merge function
<flux> I dare say it would be useful at times :)
cago has joined #ocaml
ousado has quit [Ping timeout: 245 seconds]
ftrvxmtrx has joined #ocaml
ousado has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
eni has joined #ocaml
Kakadu has joined #ocaml
alpounet has quit [Quit: Bye.]
alpounet has joined #ocaml
eni has quit [Quit: Leaving]
avsm has joined #ocaml
rixed has joined #ocaml
<Kakadu> hi!
<Kakadu> How to rewrite this code http://paste.in.ua/4411/raw/ using GADTs?
* Kakadu tryies tounderstand what GADT types are wnd where they are usable
gasche has joined #ocaml
<gasche> GADT question, to the rescue!
<gasche> (who had a GADT question?)
<djcoin> oh! gasche is back :)
<Ptival> 11:31 < Kakadu> How to rewrite this code http://paste.in.ua/4411/raw/ using GADTs?
<gasche> type (_, _) eq = Refl : ('a, 'a) eq
<gasche> but hm
<gasche> you don't need Eq here in fact
<gasche> just write
<Ptival> type t shouldn't use eq
<gasche> type _ t = | Bool : bool -> bool t | If : bool -> 'a -> 'a -> 'a t | ....
<Ptival> this ^ :)
<gasche> (I'd rather have used If of bool t * 'a t * 'a t, but anyway)
<Ptival> well, with "bool t" in If
<gasche> yes
<gasche> If : bool t -> 'a t -> 'a t -> 'a t in the general case
<gasche> hm
<gasche> correction: If : bool t * 'a t * 'a t -> 'a t
<gasche> djcoin, I'm not really "back"; I'm a recovering IRC addict, so I need not to stay here too long
<djcoin> Yeah I know :)
Kakadu_ has joined #ocaml
Cyanure has quit [Remote host closed the connection]
<Kakadu_> I need a syntax tip http://paste.in.ua/4413/
<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)
<Kakadu_> http://paste.in.ua/4413/. and what next?
thomasga has joined #ocaml
<Kakadu_> Bool and Int are not gadt's constructors in my example, right?
<gasche> you And and Plus constructors look weird
<gasche> yes they are
<gasche> the constructor Bool takes a "bool" and returns a "bool t"
<gasche> you can only do that with GADTs (or phantom types through a module boundary)
avsm has quit [Quit: Leaving.]
<gasche> I'd rather have written And : bool t * bool t -> bool t
<gasche> Plus : int t * int t -> int t
<Kakadu_> gasche: but I can write http://paste.in.ua/4414/ without any gadts. Where is the difference?
<gasche> If (Int 1, Int 2, Int 3) is accepted
<gasche> or even If (Int 1, Int 2, Bool true)
<gasche> Kakadu, those would not be accepted by the GADT
<gasche> (lunch time !)
<Kakadu> hm, very interesting
<Kakadu_> So, If I write | Plus of int t * int t -> int t this is constructor of function
<Kakadu_> Byt when I write | Plus : int t * int t -> int t this is GADT where 'a is narrowed to int
Sablier has quit [Read error: Connection reset by peer]
Sablier_ has joined #ocaml
Sablier_ has quit [Read error: Connection reset by peer]
Sablier has joined #ocaml
avsm has joined #ocaml
<mfp> avsm: this is the database engine I'd been talking to you about > http://obigstore.forge.ocamlcore.org/index.html
<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
<orbitz> So you notice it more
<orbitz> You get an upvote from me
<orbitz> Is thisjust for fun or do you have a production use for it?
<mfp> I have an application I've been working on for a while built on top of it
<orbitz> Cool
<orbitz> What's the app do?
<mfp> it's a simplified version control/file sync system
<mfp> "git meets dropbox" of sorts
<orbitz> Cool
<mfp> hoping to go beta soon
ankit9 has quit [Ping timeout: 265 seconds]
ankit9 has joined #ocaml
Cyanure has joined #ocaml
thizanne has joined #ocaml
Progster has joined #ocaml
csmrfx has quit [Quit: leaving]
<mfp> my skill has dulled, it only took half an hour for my link to be shot down :-/
mort___ has left #ocaml []
<gasche> mfp, are the performance numbers as hot as r17's ?
<gasche> (I suppose not, otherwise you'd have mentioned it)
<gasche> ah, and you should cross-post to r/ocaml
<mfp> gasche: well, I consider them good. Sustaining 60000 random (hotspot) writes over 1 billion keys on a mid-powered EC2 node is good I think.
<gasche> can you reproduce (some of) r17 performance measurements to compare?
<mfp> also, range reads at ~300000/s, etc.
<gasche> I must say that, not being in the database business myself, raw numbers tell me nothing at all
<gasche> I need you to claim (based on probably biased problem sets etc. etc.) "X% as fast as (popular) blah"
<mfp> hmm I could claim "at least 50% of redis write speed with fully fsync()ed persistence" or such
<mfp> or "faster sequential write than redis" or stuff
<gasche> yeah, that would help making your prototype the next hot thing to talk about on reddit
<mfp> but I dislike the whole pick-competitor-make-biased-bms-show-you-win business
<gasche> making benchmark as unbiased as possible is also quite good
<gasche> at least, given you say that you are "similar to r17", it would be interesting to compare to r17
<mfp> similar _in spirit_ :) r17 would complement by DB (in fact, I'm writing stuff to inject data from obigstore into r17)
<mfp> so as to avoid bias, I did something maybe too extreme: avoid comparing it to other stuff :P
<flux> what's r17?
<mfp> a "brute-force" data processing language
<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].
<sepp2k> +>
mattrepl has joined #ocaml