gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml Meeting 2011 http://bit.ly/eaZi1C | OCaml 3.12.0 http://bit.ly/aNZBUp
dnolen has quit [Quit: dnolen]
arubin has joined #ocaml
avsm has joined #ocaml
smerz has quit [Quit: Ex-Chat]
Modius has quit [Ping timeout: 240 seconds]
Modius has joined #ocaml
avsm has quit [Quit: Leaving.]
philtor has quit [Ping timeout: 240 seconds]
avsm has joined #ocaml
joewilliams is now known as joewilliams_away
avsm has quit [Quit: Leaving.]
ymasory_ has joined #ocaml
lopex has quit []
impy has quit [Read error: Connection reset by peer]
coucou747 has joined #ocaml
eelte has quit [Ping timeout: 248 seconds]
myu2 has quit [Remote host closed the connection]
ymasory_ has quit [Quit: Leaving]
vivanov has joined #ocaml
<vivanov> is oasis in debian?
enthymeme has joined #ocaml
<vivanov> it is in sid
arubin has quit [Quit: arubin]
shachaf has quit [Ping timeout: 246 seconds]
shachaf has joined #ocaml
vivanov has quit [Quit: Lost terminal]
khia0 has joined #ocaml
khia0 has left #ocaml []
ymasory has quit [Remote host closed the connection]
khia0 has joined #ocaml
khia0 has left #ocaml []
dnolen has joined #ocaml
ulfdoz has joined #ocaml
dnolen has quit [Quit: dnolen]
impy has joined #ocaml
vivanov has joined #ocaml
ygrek has joined #ocaml
coucou747 has quit [Read error: Operation timed out]
ulfdoz has quit [Ping timeout: 250 seconds]
coucou747 has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
Yoric has joined #ocaml
rien has quit [Remote host closed the connection]
rien has joined #ocaml
ftrvxmtrx has quit [Read error: Connection reset by peer]
enthymeme has quit [Ping timeout: 276 seconds]
rien has quit [Ping timeout: 276 seconds]
rien has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
edwin has joined #ocaml
vivanov has joined #ocaml
Yoric has quit [Quit: Yoric]
ikaros has joined #ocaml
deavidsedice has joined #ocaml
thomasga has joined #ocaml
Cyanure has joined #ocaml
larhat has joined #ocaml
deavid has quit [*.net *.split]
Cyanure has quit [Remote host closed the connection]
Tianon has quit [Read error: Operation timed out]
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
eikke has joined #ocaml
ftrvxmtrx has joined #ocaml
Yoric has joined #ocaml
Cyanure has joined #ocaml
myu2 has joined #ocaml
edwin has quit [Remote host closed the connection]
Associ8or has quit [Quit: Associ8or]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
thomasga has quit [Quit: Leaving.]
myu2 has quit [Remote host closed the connection]
Modius has quit [Read error: Connection reset by peer]
Modius has joined #ocaml
rien has quit [Ping timeout: 240 seconds]
rien has joined #ocaml
ikaros has quit [Quit: Leave the magic to Houdini]
myu2 has joined #ocaml
myu2 has quit [Remote host closed the connection]
boscop_ has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
myu2 has joined #ocaml
sepp2k has joined #ocaml
vivanov has quit [Ping timeout: 276 seconds]
ygrek has joined #ocaml
Kakadu has joined #ocaml
vivanov has joined #ocaml
<vivanov> can't install oasis in debian -- it has uninstallable dependencies -- is it installable?
kaustuv has joined #ocaml
thomasga has joined #ocaml
myu2 has quit [Remote host closed the connection]
myu2 has joined #ocaml
thomasga has quit [*.net *.split]
larhat has quit [*.net *.split]
yroeht has quit [*.net *.split]
diml has quit [*.net *.split]
joewilliams_away has quit [*.net *.split]
pheredhel has quit [*.net *.split]
rproust has quit [*.net *.split]
lopex has joined #ocaml
myu2 has quit [Remote host closed the connection]
larhat has joined #ocaml
bbc has joined #ocaml
thomasga has joined #ocaml
yroeht has joined #ocaml
diml has joined #ocaml
joewilliams_away has joined #ocaml
pheredhel has joined #ocaml
rproust has joined #ocaml
avsm has joined #ocaml
thomasga has quit [Quit: Leaving.]
avsm has quit [Quit: Leaving.]
<sgnb> vivanov: we are in the middle of a transition... try later
<vivanov> sgnb: ok :)
boscop_ has quit [Ping timeout: 246 seconds]
boscop_ has joined #ocaml
boscop__ has joined #ocaml
boscop_ has quit [Ping timeout: 250 seconds]
edwin has joined #ocaml
boscop__ has quit [Read error: Connection reset by peer]
boscop__ has joined #ocaml
boscop__ has quit [Ping timeout: 250 seconds]
bbc has quit [Quit: leaving]
ygrek has quit [Ping timeout: 246 seconds]
dnolen has joined #ocaml
jamii has joined #ocaml
boscop has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
boscop has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
<flux> soo, once GADTs get in, will we get even cooler SQL DSLs in objective caml?-)
avsm has joined #ocaml
boscop has joined #ocaml
boscop has quit [Ping timeout: 240 seconds]
boscop has joined #ocaml
<orbitz> what do GADTs let me solve that i can't without them that I care about?
bzzbzz has joined #ocaml
vivanov has quit [Quit: Lost terminal]
<flux> typed ast interpreters seem to be the basic example
ygrek has joined #ocaml
<flux> but I guess it's difficult to see what it might allow without more compelling examples..
boscop has quit [Ping timeout: 246 seconds]
<flux> I'd say it allows some dynamically typed things to now be statically typed. but it's difficult to say what things :).
boscop has joined #ocaml
<flux> here's the haskell article on those, btw: http://en.wikibooks.org/wiki/Haskell/GADT
<orbitz> Yeah the haskell article didn't really scream "practical" to me :)
<flux> I wonder how one actually generates such trees in a type-safe manner.. I guess you just push the errors closer to the generator part. maybe it's good.
boscop has quit [Ping timeout: 246 seconds]
mcclurmc has quit [Ping timeout: 248 seconds]
ygrek has quit [Ping timeout: 246 seconds]
ikaros has joined #ocaml
pheredhel` has joined #ocaml
joewilliz has joined #ocaml
yroeht_ has joined #ocaml
vivanov has joined #ocaml
rproust_ has joined #ocaml
bzzbzz_ has joined #ocaml
joewilliams_away has quit [Ping timeout: 240 seconds]
pheredhel has quit [Quit: ZNC by prozac - http://znc.sourceforge.net]
yroeht has quit [Ping timeout: 240 seconds]
diml has quit [Ping timeout: 240 seconds]
rproust has quit [Ping timeout: 240 seconds]
bzzbzz has quit [Ping timeout: 240 seconds]
rproust_ is now known as rproust
Cyanure has quit [Remote host closed the connection]
Cyanure has joined #ocaml
Kakadu has quit [Quit: Page closed]
myu2 has joined #ocaml
<sgnb> vivanov: oasis should become installable at next mirror push
vivanov has quit [Quit: Lost terminal]
Cyanure has quit [Remote host closed the connection]
yezariaely has joined #ocaml
dnolen has quit [Quit: dnolen]
Snark has joined #ocaml
jderque has quit [Quit: Leaving.]
<kaustuv> orbitz: GADTs can allow you to reflect "computations" as data, which can let you do lots of interesting things such as partial evaluation.
<kaustuv> For example (notation is not precise):
<kaustuv> type _ monad with
<kaustuv> Return : 'a. 'a -> 'a monad
<kaustuv> Bind : 'a 'b. 'a monad * ('a -> 'b monad) -> 'b monad
ccasin has quit [Quit: leaving]
ymasory has joined #ocaml
rien has quit [Ping timeout: 260 seconds]
rien has joined #ocaml
<kaustuv> I guess I mean s/reflect/reify/ to be accurate
<orbitz> are you sayin gi can get first class continuations with GADTs?
ccasin has joined #ocaml
<kaustuv> No, the computations that you can reify this way must already have good algebraic properties (such as purity or monad/comonad laws), so you can't turn arbitrary OCaml computations into data
<orbitz> ok
<kaustuv> Well, I don't actually know what I'm talking about. It's just an idea I've been trying, so far unsuccessfully, to get to work in Haskell
Associat0r has joined #ocaml
jonafan has joined #ocaml
thomasga has joined #ocaml
yezariaely has left #ocaml []
rien has quit [Ping timeout: 252 seconds]
rien has joined #ocaml
andreas1 has joined #ocaml
<andreas1> Hi!
<andreas1> I've been playing around with BatInt.Safe_int for a bit.
<andreas1> And it seems to break other code, it is not a drop-in replacement.
<andreas1> before using Safe_int, I get:
<andreas1> # (=);;
<andreas1> - : 'a -> 'a -> bool = <fun>
<andreas1> After # open BatInt.Safe_int;;
<andreas1> # (=);;
<andreas1> - : BatInt.Safe_int.t -> BatInt.Safe_int.t -> bool = <fun>
<andreas1> Now there is code that uses = to compare instances of char.
<andreas1> Any idea on what to do to avoid this breakage?
<mfp> open BatInt.Safe_int let (=) = Pervasives.compare
<andreas1> Will that break my ability to compare integers?
<mfp> no, int is a particular case of 'a ;-)
<mfp> # Pervasives.compare;;
<mfp> - : 'a -> 'a -> int = <fun>
<andreas1> So much for the theory.
<andreas1> In practice, it breaks code.
<andreas1> Just tried...
<mfp> what does it break?
<mfp> oops brainfart
<mfp> of course, it must be let (=) x y = Pervasives.compare x y = 0
joewilliz is now known as joewilliams
joewilliams has quit [Changing host]
joewilliams has joined #ocaml
<andreas1> Ha! Works like a charm!
<andreas1> Thanks!
<andreas1> (but why does Safe_int define (=) at all, if that is neither needed nor working?)
<mfp> I suppose it's defined monomorphically for performance reasons
diml has joined #ocaml
<andreas1> Isn't the type checker supposed to resolve the polymorphism at compile time anyways?
boscop has joined #ocaml
avsm has quit [Quit: Leaving.]
<mfp> well, the original functions are polymorphic, but Safe_int defines monomorphic operators that only work on Safe_int.t (BatInt does the same btw)
joewilliams is now known as joewilliams_away
boscop has quit [Ping timeout: 250 seconds]
joewilliams_away is now known as joewilliams
<andreas1> mfp: I just don't understand why one would make it monomorphic. But anyways, that might be a discussion for a later time, I need to run. Thanks again.
andreas1 has quit [Quit: Leaving.]
<kaustuv> calling caml_int_compare instead of %compare is measurably faster?
vivanov has joined #ocaml
<sgnb> kaustuv: yes (same holds for caml_string_compare)
Tianon has quit [Ping timeout: 260 seconds]
ftrvxmtrx has quit [Quit: Leaving]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
<thelema> batteries should have an openable module that makes ints safe without replacing (=)
eikke has quit [Ping timeout: 246 seconds]
jderque has joined #ocaml
jderque has quit [Client Quit]
ygrek has joined #ocaml
Yoric has left #ocaml []
andreas has joined #ocaml
thomasga has quit [Quit: Leaving.]
Hyper-Core has joined #ocaml
vivanov has quit [Ping timeout: 240 seconds]
ulfdoz has joined #ocaml
larhat has quit [Quit: Leaving.]
vivanov has joined #ocaml
Hyper-Core has left #ocaml []
ftrvxmtrx has joined #ocaml
lopex has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
boscop has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
avsm has joined #ocaml
jamii has quit [Ping timeout: 246 seconds]
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
Associat0r has joined #ocaml
DimitryKakadu has joined #ocaml
Associat0r has quit [Quit: Associat0r]
Associat0r has joined #ocaml
Snark has quit [Quit: Ex-Chat]
<vivanov> how to avoid error "When using -syntax, the META variable 'preprocessor' must be set" when running $ocamlfind ocamldep -package threads -package batteries -syntax camlp4o -modules foo.ml
<hnrgrgr> vivanov: remove "-syntax camlp4o" or add a package that is a syntax extension
<hnrgrgr> for example -package batteries.syntax
<vivanov> doing now
<vivanov> hnrgrgr: thanks -- that worked -- but now another error appeared Uncaught exception: DynLoader.Error ("pa_llist.cmo", "file not found in path")
myzt has joined #ocaml
rien has quit [Ping timeout: 276 seconds]
rien has joined #ocaml
boscop has joined #ocaml
kakadu has joined #ocaml
avsm has quit [Quit: Leaving.]
ymasory has quit [Quit: Leaving]
jamii has joined #ocaml
<thelema> vivanov: is there a pa_llist.cmo file installed by batteries?
<thelema> hmm, maybe we're forgetting to install that. Good catch.
philtor has joined #ocaml
<thelema> try copying your batteries/_build/src/syntax/pa_llist/pa_llist.cmo to `ocamlfind query batteries`
<vivanov> thelema: you're right -- it's not there
<thelema> I just pushed the change to install it on make install
<vivanov> thelema: yes -- that fixed that
<thelema> thanks for reporting the bug
<vivanov> :) thanks for help with that
<thelema> vivanov: if you're not planning on using the syntax extensions (as you may guess, many batteries devs don't), you can omit the -syntax camlp4o
Kakadu|2 has joined #ocaml
Kakadu|2 has quit [Client Quit]
strlen has quit [Ping timeout: 248 seconds]
<vivanov> thelema: ok
<andreas> Hmmm. I"m having trouble making simple things work. Like printf from Batteries.
<andreas> What I can do is opening the top level, and saying:
<andreas> #use "topfind";;
<andreas> #require "batteries";;
boscop has quit [Ping timeout: 246 seconds]
<andreas> Then I can go on with:
<andreas> open BatPrint;;
<andreas> printf then is bound.
<andreas> However, the syntax for format string args, i.e. p"foo", is not.
<andreas> When trying to compile a file, I can't use the topfind magig.
<andreas> And so it doesn't work there at all.
<thelema> use the ocamlinit file included in batteries to fully integrate batteries and all its syntac extensions into your toplevel
<andreas> ah!
strlen has joined #ocaml
<thelema> for compilation, use ocamlfind ocamlopt -package batteries.syntax -syntax camlp4o ...
<andreas> Thanks!
<thelema> you're welcome.
<thelema> it is troublesome that what works on the command line doesn't work in the top level and vice versa
<andreas> Yep.
<andreas> But hey, there's documentation and help in this channel, no reason to complain. :)
<thelema> the documentation needs much more work, and this channel is often quiet.
<thelema> but we're working on improvements
ymasory has joined #ocaml
kakadu has quit [Remote host closed the connection]
mnabil has joined #ocaml
andreas has quit [Quit: Leaving.]
andreas has joined #ocaml
Yoric has quit [Ping timeout: 260 seconds]
ymasory has quit [Quit: Leaving]
Yoric has joined #ocaml
DimitryKakadu has quit [Remote host closed the connection]
philtor has quit [Ping timeout: 252 seconds]
<andreas> What is the difference between use Batteries and use Batteries_uni, and why does one work with the toplevel, but only the other with the compiler?
eikke has joined #ocaml
lopex has joined #ocaml
edwin has quit [Remote host closed the connection]
<alpounet> iirc uni is the unicode version
<andreas> That makes it arbitrarily weird.
jamii has quit [Ping timeout: 240 seconds]
ygrek has quit [Ping timeout: 246 seconds]
ulfdoz has quit [Read error: Operation timed out]
<eikke> does ocaml have something like hoogle (including the type-based search)?
lopexx has joined #ocaml
lopex has quit [Ping timeout: 246 seconds]
ikaros has quit [Quit: Leave the magic to Houdini]
philed has quit [Remote host closed the connection]
boscop has joined #ocaml
<andreas> Ok. So Batteries printf works for me from the top level.
<andreas> It won't work from a compiled program.
<andreas> Compilation error is:
<andreas> Error: Unbound value char_printer
<andreas> .ocamlinit contains a line:
<andreas> #install_printer Batteries_print.print_uchar;;
<andreas> What's the right thing to do for compilation?
<thelema> alpounet: uni = uni-thread - no threads
<andreas> I take that back, it doesn't work on the toplevel either.
<andreas> thelema: ah!
<alpounet> ohhh
<alpounet> right
<thelema> andreas: there's no equivalent for #install_printer for compilation - there's no return value being auto-printed
<andreas> I see.
<andreas> # printf p"{%{char}}" 'a';;
<andreas> # Error: Unbound value char_printer
<andreas> This is my problem.
<thelema> andreas: the closest there is is Char.print / Uchar.print
<thelema> I'm surprised by the "unbound value", as char_printer should be defined in BatPervasives, which is opened by default
<thelema> andreas: thanks for the bug report on the pa_llist install filename
<andreas> btw., in the Getting Started in the Wiki, it suggests to use "ocamlfind ocamlc -package batteries.syntax", where in fact I had to use "ocamlfind ocamlc -package batteries -package batteries.syntax"
<andreas> Hmm. batPervasives.ml defines a "output_char", not "char_printer".
<thelema> andreas: can you edit?
<andreas> Yes.
<thelema> use your best judgement to fix things. If you get the p"{%{char}}" thing working, put it on that page as an example with syntax extensions
pantsd has quit [Ping timeout: 260 seconds]
<andreas> oh. batPervasives.mli defines a bunch of *_printer. There's bool_printer, int_printer, etc.
<andreas> But no char_printer. :)
<thelema> Well, if it's actually useful, you're welcome to send a patch. It's probably a pretty trivial patch.
<andreas> I guess so. I'll make it work (even if not tonight anymore).
<andreas> Thanks for your help!
<thelema> you're welcome
mnabil has quit [Read error: Operation timed out]
Amorphous has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Yoric]
mnabil has joined #ocaml
Amorphous has joined #ocaml
lopexx has quit []
sepp2k has quit [Quit: Leaving.]
wagle has quit [Read error: Connection reset by peer]