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
emmanuelux has joined #ocaml
<orbitz> Wheee got unit tests going too
emmanuelux has quit [Remote host closed the connection]
<orbitz> I'm unstoppable!
emmanuelux has joined #ocaml
avsm has quit [Quit: Leaving.]
brendan has quit [Quit: leaving]
<jaxtr> ahh it's a wonderful day
<wmeyer```> orbitz: cool! what you writing there?
<wmeyer```> is thelema_ here
Sablier_ has quit [Quit: Kat]
<orbitz> wmeyer```: Working in a little web/applications erver for kicks
ulfdoz_ has joined #ocaml
<wmeyer```> orbitz: you can always use Marshal module for the protocol
<wmeyer```> orbitz: just the hint, of course not in the places where you do HTTP
<orbitz> wmeyer```: I'll proabbly convr to msgpack or something
ulfdoz has quit [Ping timeout: 245 seconds]
ulfdoz_ is now known as ulfdoz
<orbitz> the idea is to have a message queue between evrything, and if they use a fairly easy to parse format you can replace any component with, for example, a C version of it when needed
<orbitz> Now the question is: async or lwt
<wmeyer```> orbitz: can't say anything about async, but i did use lwt
sepp2k1 has quit [Remote host closed the connection]
<orbitz> I have used lwt. the upsdie to async is it's mostly in Ocaml so arguably more trustworthy
<orbitz> and I already depend on Core
<orbitz> Only downside is possibly performance, and no pretty lwt camlp4 magic
<wmeyer```> you can always write your own camlp4 magic based on the lwt extension, should not be difficult - I am surprised nobody has done that before
<orbitz> Hrm, would be ab intersting time to learn camlp4
<orbitz> Other idea I had was usign pa_monad
<wmeyer```> orbitz: you can consider biniou too
<orbitz> I have not heard of that
<wmeyer```> orbitz: could do it too (pa_monad)
<wmeyer```> however lwt is not strictly monadic
<wmeyer```> it's slightly stronger than monad
<orbitz> I'm thinking of do pa_monad for Async
<orbitz> Not sure if it is strictly monadic thouhg...
<wmeyer```> you will not have paraler threads
<orbitz> I wonder if pa_monad just works iwth Async since Jane st is pretty good at providing bind functions...
<wmeyer```> you can sequence them but pa_lwt has "and" too
<orbitz> Yeah
<wmeyer```> yes it will work
<orbitz> Out of the box?
<wmeyer```> yes
<wmeyer```> just insert "perform" and here you go
<wmeyer```> open the module or say "perform with Async.foobar"
<wmeyer```> s/"perform with Async.foobar"/"perform with Async.Foobar"
<orbitz> Have you done thi sbefore or just assumign it works? soudns intersting
<wmeyer```> orbitz: i've done that before
<orbitz> Async.Std doesn't seem to have bind
<wmeyer```> orbitz: for parsing combinators in batteries, for my custom monad, and if i recal correctly for lwt too
<wmeyer```> and just having bind and return in scope is enough
<orbitz> ahh thar she blows
<orbitz> Async.Std.Deferred
<orbitz> Can you have multiple -pp's?
<wmeyer```> orbitz: yes, you can have several Camlp4 syntax extensions stacked
<orbitz> Thanks for the help today
<orbitz> it's quite late here though so I'm off to bed
<wmeyer```> orbitz: you are welcome
<wmeyer```> orbitz: i am off too
mfp has quit [Ping timeout: 260 seconds]
mfp has joined #ocaml
gongura has joined #ocaml
hcarty has quit [Ping timeout: 248 seconds]
hcarty has joined #ocaml
orbitz has quit [Remote host closed the connection]
hcarty has quit [Ping timeout: 240 seconds]
hcarty has joined #ocaml
wtetzner has quit [Ping timeout: 260 seconds]
phao has joined #ocaml
<phao> is there too much difference between ocaml and sml?
cdidd has joined #ocaml
Hussaind has joined #ocaml
Hussaind has left #ocaml []
gongura_ has joined #ocaml
gongura has quit [Ping timeout: 245 seconds]
gongura_ is now known as gongura
BiDOrD_ has joined #ocaml
BiDOrD has quit [Ping timeout: 252 seconds]
eni_ has joined #ocaml
eni_ is now known as eni
emmanuelux has quit [Ping timeout: 264 seconds]
Submarine has joined #ocaml
gongura has quit [Ping timeout: 245 seconds]
gongura has joined #ocaml
Kakadu has joined #ocaml
Kakadu has quit [Client Quit]
Kakadu has joined #ocaml
bobry has joined #ocaml
gongura has left #ocaml []
osa1 has joined #ocaml
eni has quit [Ping timeout: 240 seconds]
<phao> mfp, hey, did you read that ocaml book you recommended me?
mort___ has joined #ocaml
benozol has joined #ocaml
ankit9 has joined #ocaml
mort___ has quit [Quit: Leaving.]
Snark has joined #ocaml
mort___ has joined #ocaml
eni has joined #ocaml
eikke has joined #ocaml
snearch has joined #ocaml
avsm has joined #ocaml
mort___ has quit [Quit: Leaving.]
snearch has left #ocaml []
cyphase has quit [Ping timeout: 265 seconds]
mort___ has joined #ocaml
eikke has quit [Ping timeout: 245 seconds]
orbitz has joined #ocaml
eikke has joined #ocaml
avsm has quit [Quit: Leaving.]
mort___ has quit [Quit: Leaving.]
eni has quit [Quit: Leaving]
avsm has joined #ocaml
benozol has quit [Ping timeout: 246 seconds]
eikke has quit [Ping timeout: 245 seconds]
* adrien curses at shell scripting
mort___ has joined #ocaml
milosn has quit [Ping timeout: 260 seconds]
Tobu has quit [Ping timeout: 272 seconds]
Yoric has joined #ocaml
milosn has joined #ocaml
osa1 has quit [Quit: Konversation terminated!]
mort___ has quit [Quit: Leaving.]
Sablier has joined #ocaml
sepp2k has joined #ocaml
ankit9 has quit [Ping timeout: 252 seconds]
Tobu has joined #ocaml
Yoric has quit [Quit: Instantbird 1.2a1pre -- http://www.instantbird.com]
Yoric has joined #ocaml
eni has joined #ocaml
ankit9 has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
Snark has quit [Quit: Quitte]
Submarine has quit [Ping timeout: 244 seconds]
eni has quit [Ping timeout: 244 seconds]
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
ankit9 has quit [Ping timeout: 260 seconds]
wtetzner has joined #ocaml
ankit9 has joined #ocaml
phao has quit [Quit: Not Here]
<wmeyer```> thelema_: ?
hongboz has quit [Remote host closed the connection]
eikke has joined #ocaml
osa1 has joined #ocaml
ankit9 has quit [Ping timeout: 244 seconds]
hongboz has joined #ocaml
ankit9 has joined #ocaml
oriba has joined #ocaml
mob_ has joined #ocaml
emmanuelux has joined #ocaml
fasta_ is now known as fasta
tchell has quit [Ping timeout: 244 seconds]
mehitabel has quit [Ping timeout: 245 seconds]
phao has joined #ocaml
fraggle_ has quit [Remote host closed the connection]
mehitabel has joined #ocaml
tchell has joined #ocaml
mob_ has left #ocaml []
fraggle_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
sepp2k has joined #ocaml
InCogito has joined #ocaml
<InCogito> hi there, what is the software engineering need that polymorphic variants cure?
<flux> incogito, in theory: defining variants in an extensible way in a modular fashion. in practice: quick'n dirty definition of variants for local (say, a sinlge function) needs
<Qrntz> what about phantom types and subtyping
avsm has joined #ocaml
<flux> well, there is more to that. when you destructure polymorphic variants, you get to pass those destructured values forward and they can still destructure them without caring about the impossible values. makes the match coverage work better in those cases.
<InCogito> flux: thanks. Meanwhile I have found http://www.math.nagoya-u.ac.jp/~garrigue/papers/variant-reuse.pdf this seems to be the paper I should read
<flux> incogito, thanks for the pointer, seems interesting
<orbitz> easy peasy
<flux> I wonder if/when the ocaml compilar is going to make use of GADTs
<InCogito> one more basic thing: what is the difference between a sum type and a variant?
<orbitz> nothing AFAIK
<orbitz> synonyms
<wmeyer```> orbitz: yep :-) it's easy with pa_monad
<orbitz> wmeyer```: only thing I'm not sure abotu is error handling. I have this convenient return typ ethat is liek Either, I'll probably try to make an bind over Return.t Deferred.t so i can get some sane error semantics
<wmeyer```> orbitz: you perhaps need a monad transformer - but don't know the detail
<wmeyer```> maybe exceptions would be fine, if it's local enough
<wmeyer```> btw: async looks neat
<wmeyer```> flux: this might happen but I think the OCaml compiler code base starts catching up with the new features with a delay. First of all you want to know that they are robust, second reason is that is less portable, especially in std library which can be used by other implementation - less rich in features
eni has joined #ocaml
benozol has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
ankit9 has quit [Quit: Leaving]
eni has quit [Ping timeout: 248 seconds]
<orbitz> wmeyer```: The main benefor of Async according to the Jane St guys is there is only a tiny C shim in there, whreas Lwt apparently has a lot of C. so they feel it's more trustworthy
avsm has joined #ocaml
struktured has quit [Read error: Operation timed out]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
lin has joined #ocaml
eikke has quit [Ping timeout: 260 seconds]
<wmeyer```> orbitz: Indeed. That's mainly unix module though
<mrvn> InCogito: A sum type would be union { int x; float f; }, a variant would be type int_float = Int of int | Float of float. While the garantied behaviour is identical the variant is type save. The union just has undefined behaviour if you mess up the type.
<mrvn> flux: doesn't the compiler have to support GADTs before it can use GADTs? Otherwise you get a bootstrap problem.
<mrvn> wmeyer```: what is Async?
eikke has joined #ocaml
<flux> mrvn, it depends where they are being used etc
<flux> but it seems to me evaluators, and possibly extension compilers, are the ones most to benefit from them :)
<mrvn> flux: I think GADTs would be most usefull for the grammar.
InCogito has quit [Quit: Leaving]
phao has quit [Read error: Connection reset by peer]
benozol has quit [Quit: Konversation terminated!]
<wmeyer```> mrvn: the stuff in boot is usually regurally copied with the fresh bytecode compiled version of the tools
<mrvn> wmeyer```: you still have to generate it at least once.
<wmeyer```> mrvn: there are quite few intermediate representations in OCaml and I would think all of them would benefit from GADTs
<wmeyer```> mrvn: it's just perhaps nobody have time to do it - and not sure if it's worth at all as the code base is stable
<mrvn> well, never change a running system. Rewriting all that code to use GADTs would add some new bugs.
<flux> or find old ones?-)
<mrvn> Maybe 4.1 or 5.0 will use GADTs.
<wmeyer```> mrvn: exactly
<mrvn> I think it is a good idea to not use new features in the compiler itself till they have been around for a release at least.
<wmeyer```> flux: possible, but i would think that GADTs are not strong enough to express these invariants + the codebase has been maturing fro quite long
<wmeyer```> flux: in case of the type checker - this more complicated - as it's mostly imperative AFAIK
<wmeyer```> mrvn: Async is Core's alternative to lwt
<mrvn> wmeyer```: With GADTs you would do some type checks already in the grammar. E.g. (+) would only accept an integer expression
<mrvn> wmeyer```: does it have async file IO or just sockets like lwt?
<wmeyer```> mrvn: and that's very simple invariant
<wmeyer```> mrvn: don't know :-) but I would think it has both
osa1 has quit [Ping timeout: 260 seconds]
<mrvn> wmeyer```: async file IO is hard. You need system threads or kernel specifc stuff ==> lots of C code.
<sgnb> mrvn: lwt has async file IO afaict
<sgnb> (and indeed it's hard)
<sgnb> diml should know better
<mrvn> sgnb: lwt uses threads, no optimization for kernel specifc async io.
<mrvn> so just fake async io
<mrvn> iirc
<mrvn> time to get some food.
* wmeyer``` is in the maze of yacc grammar
Tobu has quit [Ping timeout: 272 seconds]
Tobu has joined #ocaml
Tobu has quit [Changing host]
Tobu has joined #ocaml
struktured has joined #ocaml
lin has quit [Remote host closed the connection]
Tobu has quit [Remote host closed the connection]
phao has joined #ocaml
Tobu has joined #ocaml
Yoric has joined #ocaml
osa1 has joined #ocaml
Submarine has joined #ocaml
Submarine has quit [Changing host]
Submarine has joined #ocaml
cyphase has joined #ocaml
<flux> is there a way to make ctrl-c reliably raise an exception in the main thread, instead of potential other threads?
<mrvn> flux: clear the bit in the sigmask in all other threads?
<flux> well, I don't create the other threads. the issue is while using sdl..
<flux> but a good idea, thanks
<flux> maybe I can access the thread id of the sdl thread
<flux> hmm, or somehow have SDL run my code
<flux> the id probably wouldn't help anyway
<mrvn> flux: block it before sdl_init() and set the handler after?
<flux> yeah, that should work. unless sdl_init is called before my code.. although probably it's being called implicitly by my first Sdl call?
<mrvn> It's called by Sdl.init [`VIDEO; `TIMER];
<flux> which I don't call
<flux> but maybe I should
<mrvn> you aren't using the ocaml bindings for sdl?
<flux> I am
<flux> apparently it's not strictly required
<mrvn> then you should
<flux> yeah, I forgot about that
<wmeyer```> thelema_: ping
hcarty has quit [Ping timeout: 245 seconds]
hcarty has joined #ocaml
<wmeyer```> how to add -use-ocaml-find flag for ocamlbuild in _oasis?
eikke has quit [Ping timeout: 260 seconds]
eikke has joined #ocaml
Yoric has quit [Ping timeout: 264 seconds]
Yoric has joined #ocaml
phao_ has joined #ocaml
phao has quit [Read error: Connection reset by peer]
phao_ has quit [Ping timeout: 248 seconds]
eni has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
Tobu has quit [Quit: No Ping reply in 180 seconds.]
Tobu has joined #ocaml
sepp2k1 has joined #ocaml
sepp2k has quit [Ping timeout: 260 seconds]
Reventlov has quit [Quit: Lost terminal]
Reventlov has joined #ocaml
Reventlov has quit [Changing host]
Reventlov has joined #ocaml
phao has joined #ocaml
<wmeyer```> pippijn: ping
eni has quit [Ping timeout: 260 seconds]
<pippijn> wmeyer```: pong
<wmeyer```> pippijn: I might have something interesting for you
<wmeyer```> I parse LLVM IR :-)
<wmeyer```> so perhaps there are new oppurtunites
<wmeyer```> for frontend and the backend
munga has quit [Ping timeout: 245 seconds]
<pippijn> sounds good
eikke has quit [Ping timeout: 252 seconds]
<wmeyer```> i will work on type checking of LLVM IR in the meantime, once I am done with the AST part
<wmeyer```> that will show robustness of the AST + it will be a standalone tool
munga has joined #ocaml
<wmeyer```> i thought that lowering your C AST to LLVM ast and then pretty printing would be good
<pippijn> yes, definitely
<wmeyer```> basically then one could use llvm-as to compile it to native code
<pippijn> I first need to finish the type check
<wmeyer```> ok, no hurry, i am also working still on that
<wmeyer```> i will let you know after I will have a taste of type checking the IR
phao has quit [Read error: Connection reset by peer]
phao has joined #ocaml
munga has quit [Ping timeout: 246 seconds]
munga has joined #ocaml
iZsh has quit [Remote host closed the connection]
iZsh has joined #ocaml
munga has quit [Ping timeout: 245 seconds]
munga has joined #ocaml
phao has quit [Quit: Not Here]
avsm has quit [Quit: Leaving.]
<wmeyer```> deriving is great
milosn has quit [Read error: Connection reset by peer]
milosn has joined #ocaml
Yoric has quit [Ping timeout: 245 seconds]
Reventlov has quit [Quit: leaving]
Reventlov has joined #ocaml
Reventlov has quit [Changing host]
Reventlov has joined #ocaml