adrien changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 4.00.1 http://bit.ly/UHeZyT | http://www.ocaml-lang.org | Public logs at http://tunes.org/~nef/logs/ocaml/
mal`` has joined #ocaml
mal`` has quit [Excess Flood]
mal`` has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
eikke has quit [Ping timeout: 265 seconds]
Yoric has joined #ocaml
madroach has quit [Ping timeout: 244 seconds]
madroach has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
Yoric has quit [Ping timeout: 252 seconds]
mye has quit [Quit: mye]
eni has quit [Ping timeout: 252 seconds]
weie has joined #ocaml
hongboz has joined #ocaml
lolcathost has joined #ocaml
Yoric has joined #ocaml
Yoric has quit [Remote host closed the connection]
Yoric has joined #ocaml
lolcathost has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
Yoric has quit [Ping timeout: 246 seconds]
myx has joined #ocaml
hcarty has quit [Ping timeout: 265 seconds]
lolcathost has joined #ocaml
hcarty has joined #ocaml
hongboz has quit [Read error: Operation timed out]
lolcathost has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
jewel has joined #ocaml
emmanuelux has joined #ocaml
asmanur has quit [Ping timeout: 248 seconds]
asmanur has joined #ocaml
emmanuelux has quit [Remote host closed the connection]
mattrepl has quit [Quit: mattrepl]
lolcathost has joined #ocaml
fayden has quit [Quit: Bye]
jewel has quit [Ping timeout: 265 seconds]
fayden has joined #ocaml
fayden has quit [Client Quit]
fayden has joined #ocaml
eni has joined #ocaml
fayden has quit [Quit: Bye]
fayden has joined #ocaml
eni has quit [Quit: Leaving]
gour has joined #ocaml
weie has quit [Quit: Leaving...]
ontologiae has joined #ocaml
rwmjones has quit [Ping timeout: 250 seconds]
Yoric has joined #ocaml
rwmjones has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
ontologiae has quit [Ping timeout: 252 seconds]
Kakadu has joined #ocaml
Snark_ has joined #ocaml
ikaros has joined #ocaml
weie has joined #ocaml
ontologiae has joined #ocaml
Yoric has joined #ocaml
ikaros has quit [Read error: Connection reset by peer]
ikaros has joined #ocaml
Snark_ is now known as Snark
xavierm02 has joined #ocaml
mcclurmc has joined #ocaml
leoncamel has joined #ocaml
tane has joined #ocaml
mcclurmc has quit [Ping timeout: 265 seconds]
mcclurmc has joined #ocaml
leoncamel has quit [Quit: WeeChat 0.3.9.2]
leoncamel has joined #ocaml
Yoric has quit [Ping timeout: 252 seconds]
Yoric has joined #ocaml
myx has quit [Ping timeout: 245 seconds]
leoncamel has quit [Client Quit]
leoncamel has joined #ocaml
mcclurmc has quit [Ping timeout: 260 seconds]
xavierm02 has quit [Quit: Leaving]
mye has joined #ocaml
ulfdoz has joined #ocaml
<orbitz> Hi
<Kakadu> hey
<orbitz> I can do val foo : [> `Foo ], but I can't do type t = [> `Foo ];; val foo : t. I have to do type t = [ `Foo ]. Are they semantically the same though?
tane has quit [Quit: Verlassend]
<Kakadu> orbitz: It seems you know about open and closed variant types
<Kakadu> why don't you want to write
<Kakadu> # (foo :> t);;
<Kakadu> - : t = `Foo
<Kakadu> ?
asmanur has quit [Read error: Operation timed out]
asmanur has joined #ocaml
* gour notices that the info @gmane about ocaml list is misleading 'cause it's not enough to reply to gmane's auth msg., but one has to do another confirm with the mailing list software
ulfdoz has quit [Ping timeout: 252 seconds]
<troydm> what's the difference between GADT and ADT ?
ulfdoz has joined #ocaml
<troydm> never minda i've just figured it out
<rwmjones> troydm: extlib has some ways to split strings
<rwmjones> gaaa
<rwmjones> sorry, I was scrolled back in the history a long way :-(
<troydm> rwmjones: no problem
<troydm> rwmjones: is extlib a part of core?
<troydm> or i should install it?
<rwmjones> no it's another library
<troydm> ic
<rwmjones> it was an initial attempt to do what core does much more broadly
<rwmjones> but it's still got useful stuff in it
leoncamel has quit [Ping timeout: 255 seconds]
ulfdoz has quit [Ping timeout: 245 seconds]
Neros has quit [Read error: Connection reset by peer]
<fasta> How can I output something in a given color?
<pippijn> output to where?
<Kakadu> It seems that to terminal emulator
<fasta> Terminal emulator.
<pippijn> ansi escape sequences then
<fasta> pippijn: isn't there some library to do this?
<pippijn> oh, there is ncurses
<fasta> That has much wider scope.
<fasta> I am not even sure whether it contains just a single function to output something in a given color.
<pippijn> no
<pippijn> it needs 2
<fasta> Moreover, it would be much nicer if one could annotate a pretty printer with color and then output than with a given renderer.
<pippijn> one to set the colour and one to write
<pippijn> yes, that would be nice
<fasta> Haskell already has such libraries.
<Qrntz> there was ANSITerminal and something else too
<Qrntz> I don't remember now
ikaros has quit [Quit: Ex-Chat]
<fasta> ansicolor seems to do it.
ulfdoz has joined #ocaml
<fasta> Can I lex/yacc utf-8 strings?
<fasta> (that is, using the OCaml tools)
tane has joined #ocaml
eikke has joined #ocaml
<fasta> ulex seems to do that.
mcclurmc has joined #ocaml
<pippijn> ulex, yes
<fasta> menhir is at least documented.
<fasta> However, how can I integrate menhir into an oasis build?
<pippijn> oasis has explicit support for menhir
<pippijn> it mostly just works
<pippijn> fasta: why do you need an utf-8 lexer?
<fasta> pippijn: well, I think it is utf-8, but it's a file which contains about 50 languages or so.
<pippijn> actually ulex is not an utf8 lexer, it's a unicode lexer
wmeyer` has joined #ocaml
<wmeyer`> hi
<pippijn> hi
<fasta> pippijn: how do you mean it just works?
<fasta> pippijn: don't I need to refer to it somewhere?
<pippijn> you put a .mly file into your source tree and add the module name to oasis
<pippijn> if you want to use menhir, you put true: use_menhir in your _tags
<wmeyer`> fasta: yes, that works for me too
<wmeyer`> actually oh sleepy - i thought tou say about mlypack feture
<pippijn> mlypack works fine, too
<pippijn> fasta: why is a byte lexer not good enough?
mcclurmc has quit [Ping timeout: 256 seconds]
<pippijn> because you never *need* a unicode lexer
<pippijn> utf-8 are bytes, too
<pippijn> unicode lexer generators like ulex are useful for unicode code point ranges
<fasta> pippijn: perhaps for the actual lexing it is good enough, but I do need to output utf-8 at some point.
<pippijn> but that's it, really
<fasta> If I wanted to match on some unicode code points, then I'd definitely need it, wouldn't I?
<pippijn> no
<fasta> Unless I wanted to manually turn characters into bytes.
<pippijn> if you want to match on ☺, then you can just put "☺"
<fasta> pippijn: ok, so then what is the point of ulex?
<pippijn> unicode code point ranges
<fasta> pippijn: yes, but ☺ is in the unicode code point range and outside ASCII.
<pippijn> no
<pippijn> I mean ranges
<pippijn> intervals
<fasta> pippijn: ok, I now understand what you mean.
<pippijn> ['☹' - '☺']
<pippijn> in my tests, ulex was quite a lot (2x) slower than ocamllex
<pippijn> of course the fastest lexer I know is re2ml (2x faster than ocamllex)
<pippijn> </shameless self-promotion>
<fasta> Where can I put that menhir stuff? I am seeing # OASIS_START (with a matching STOP)
<pippijn> and if wmeyer` continues his work on dragonkit, it can probably be 4x faster
<pippijn> fasta: at the end of _tags
<fasta> re2ml is rather impossible to find on Google.
<pippijn> fasta: yes, it's not out yet
<pippijn> wmeyer`: I am really curious how fast it can get with JIT
<fasta> Is there some way to incrementally develop a grammar with e.g. menhir?
<pippijn> fasta: menhir --interpret
<pippijn> or something
<fasta> In Haskell, I just start with part of the grammar and build my way up.
<pippijn> ah
<pippijn> yes, in menhir you can have multiple start symbols
<pippijn> so you can develop and test parts of the grammar
<pippijn> --interpret also supports multiple start symbols
<pippijn> sym: TOK_IF TOK_IDENTIFIER TOK_THEN TOK_ELSE TOK_IDENTIFIER
<pippijn> or "expr" for "sym"
<wmeyer`> re2ml rocks
<pippijn> re2ml has the advantage over ulex that it is (95%) compatible with ocamllex
<pippijn> re2ml also takes care of newlines for you and it is faster at doing that than a hand-written "\n" rule in ocamllex
<pippijn> it also tells you if a rule is unreachable
<pippijn> but submatches are not implemented yet
<fasta> Forgive me my lack of enthusiasm, but will you also document it?
<pippijn> basically: s/ocamllex/re2ml/g and you're done
<pippijn> but yes, I will :)
<fasta> Then it sounds like something nice :)
<companion_cube> is there a way, if I have f : ?foo:int -> bar, to make a partial application of f where ?foo is explicitely passed None ?
<companion_cube> like "f where ?foo is the default argument"
<flux> companion_cube, baz ?foo:None
<flux> companion_cube, you can obviously use any option value there
<companion_cube> oh
<pippijn> wmeyer`: I'm going to investigate regular expression submatching using partial derivatives
<companion_cube> neat
<companion_cube> usually I call ~foo:some_int
<flux> and if you're forwarding values, you can do just do baz ?foo
<companion_cube> perfect
<companion_cube> thank you
<flux> you're welcome.
<wmeyer`> pippijn: cool :-) I'd be so happy to see this greate stuff released soon
<pippijn> wmeyer`: martin sulzmann says his haskell implementation displays promising performance
ulfdoz has quit [Ping timeout: 260 seconds]
<wmeyer`> pippijn: sweet :-) now it's time to try it out in re2ml
<pippijn> I can't really imagine a more efficient way than what I implemented
<pippijn> it's read and jump
<pippijn> compare, jump, increment
cdidd has quit [Remote host closed the connection]
wmeyer` has quit [Ping timeout: 246 seconds]
Snark has quit [Quit: Quitte]
tane has quit [Quit: Verlassend]
tane has joined #ocaml
leoncamel has joined #ocaml
leoncamel has quit [Client Quit]
leoncamel has joined #ocaml
Kakadu has quit []
mattrepl has joined #ocaml
Siphonblast has quit [Read error: Connection reset by peer]
wmeyer` has joined #ocaml
<wmeyer`> sorry got disconnected
<wmeyer`> pippijn: and my 3G somewhat stopped working
Siphonblast has joined #ocaml
asmanur has quit [Ping timeout: 245 seconds]
asmanur has joined #ocaml
LeNsTR has quit [Read error: Connection reset by peer]
Siphonblast has quit [Read error: Connection reset by peer]
Siphonblast has joined #ocaml
jewel has joined #ocaml
Siphonblast has quit [Read error: Connection reset by peer]
Siphonblast has joined #ocaml
eni has joined #ocaml
ulfdoz has joined #ocaml
ulfdoz has quit [Ping timeout: 252 seconds]
Siphonblast has quit [Read error: Operation timed out]
Siphonblast has joined #ocaml
pango_ has joined #ocaml
ulfdoz has joined #ocaml
pango has quit [Read error: Operation timed out]
lolcathost has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ontologiae has quit [Ping timeout: 246 seconds]
alang_ has quit [Read error: Connection reset by peer]
leoncamel has quit [Ping timeout: 256 seconds]
eikke has quit [Ping timeout: 245 seconds]
wmeyer` has quit [Ping timeout: 244 seconds]
ulfdoz has quit [Ping timeout: 255 seconds]
emmanuelux has joined #ocaml
mcclurmc has joined #ocaml
hongboz has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ocaml
mcclurmc has quit [Read error: Connection reset by peer]
mcclurmc has joined #ocaml
weie has quit [Quit: Leaving...]
mcclurmc has quit [Quit: Leaving.]
mcclurmc1 has joined #ocaml
tane has quit [Ping timeout: 256 seconds]
fayden has quit [Quit: Bye]
tane has joined #ocaml
mcclurmc1 has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
fayden has joined #ocaml
<troydm> so caml gurus
<troydm> i want to save my bigarray data into file
<troydm> any suggestions of how to do it?
<troydm> i'm thinking of creating a file of the array size before saving
<troydm> then memory mapping this file to another bigarray
<troydm> and then copy data from my bigarray to memory mapped file array
<troydm> is it the way to do it/
<troydm> ?
<Qrntz> why can't you have just one file-mapped bigarray?
<companion_cube> you ca nuse Marshal
<companion_cube> can use*
<Qrntz> also I think you can marshal bigarrays
<Qrntz> yes
<troydm> marshal?
<troydm> hmm so Marshal supports bigarray
<troydm> i'll try it out
weie has joined #ocaml
weie has quit [Client Quit]
<companion_cube> I think it does
LeNsTR has joined #ocaml
<troydm> it worked, thx guys!
<troydm> so now i want to somehow compress that file
<troydm> i've decided to use camlzip
<troydm> but i can't find any documentation for it
mcclurmc has quit [Quit: Leaving.]
mcclurmc has joined #ocaml
eni has quit [Ping timeout: 252 seconds]
<troydm> well anyway i've found some examples in source code
tane has quit [Read error: Connection timed out]
tane has joined #ocaml
<troydm> does ocamlfind searches for libraries?
<troydm> i've installed camlzip using opam
<troydm> and now i'm trying to link it to my program
<troydm> apparently my program is compiling using ocamlfind ocamlopt
<troydm> if i open interp and type open Gzip;; it loads module
<troydm> however if i add it as my dependencies in omake
<troydm> it says unbounded value
<adrien> troydm: -linkpkg is required for linking
<adrien> when using ocamlfind
<troydm> ic, i'm trying to figure out how to specify it using omake
<troydm> apparently if i just do
<troydm> OCAMLFINDFLAGS=-linkpkg
<troydm> i get
<troydm> + ocamlfind ocamldep -linkpkg
<troydm> which means that it adds linkpkg flag to ocamldep instead of ocamlfind
<troydm> is it the right way?
<adrien> that's fine
<adrien> you can make it a flag for ocaml link
<troydm> OCAML_LINK_FLAGS += -linkpkg set it this way
<troydm> but still get unbounded value error :(
mattrepl has quit [Quit: mattrepl]
BiDOrD has joined #ocaml
BiDOrD_ has quit [Ping timeout: 260 seconds]
<troydm> now i have a delima
<troydm> open_out opens a standart output channel
<troydm> while Gzip.open_out opens specialized out_channel
<troydm> but Marshall.out_channel supports standart channel only
<troydm> so i need to somehow feed Marshal's output to Gzip
metasyntax has quit [Quit: Leaving]
eni has joined #ocaml
eni has quit [Read error: Connection reset by peer]
<troydm> http://pastebin.com/kDSTrHMH <- i get error for this
<troydm> Error: This kind of expression is not allowed as right-hand side of `let rec'
mcclurmc has quit [Ping timeout: 244 seconds]
eni has joined #ocaml
tane has quit [Read error: Connection timed out]
mcclurmc has joined #ocaml
mcclurmc has quit [Read error: No route to host]
mcclurmc has joined #ocaml
mcclurmc has quit [Ping timeout: 252 seconds]
Yoric has quit [Ping timeout: 246 seconds]
eikke has joined #ocaml
fraggle_ has joined #ocaml
eikke has quit [Ping timeout: 265 seconds]
<troydm> does ocaml do an tail call optimizations?
<troydm> on recursive functions?
<Qrntz> of course.
mcclurmc has joined #ocaml
<troydm> Qrntz: well apparently the method i've posted didn't do any optimizations
<troydm> the pastebin
<Qrntz> exception handling breaks TCO
<Qrntz> you could move the code between «try» and «with» into an auxiliary function that'd be properly tail-recursive and then handle the exception it terminates on
<Qrntz> (probably)
<troydm> yeah i did just that and it worked!
<troydm> thx
<troydm> and Merry Christmas! :)
mcclurmc has quit [Ping timeout: 264 seconds]
<Qrntz> happy holidays to you as well!
lamawithonel has joined #ocaml
gour has quit [Quit: WeeChat 0.3.8]
eni has quit [Ping timeout: 252 seconds]
gnuvince has quit [Quit: Remember when men were men and regular expressions recognized regular languages?]
jewel has quit [Ping timeout: 265 seconds]
hongboz has quit [Remote host closed the connection]
eni has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
lamawithonel has quit [Client Quit]
lamawithonel has joined #ocaml
mcclurmc has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel has joined #ocaml
eni has quit [Quit: Leaving]
lamawithonel has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
Yoric has joined #ocaml
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
Yoric has quit [Ping timeout: 252 seconds]
lamawithonel has joined #ocaml
tane has joined #ocaml
lamawithonel__ has quit [Read error: Connection reset by peer]
lamawithonel has quit [Ping timeout: 246 seconds]
cdidd has joined #ocaml
lamawithonel has joined #ocaml
fayden has quit [Ping timeout: 252 seconds]
lamawithonel has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
fayden has joined #ocaml
lamawithonel_ has joined #ocaml
lamawithonel has quit [Read error: Connection reset by peer]
itewsh has joined #ocaml
itewsh has quit [Quit: o/]
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Client Quit]
lamawithonel_ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel_ has joined #ocaml
lamawithonel__ has joined #ocaml
lamawithonel_ has quit [Read error: Connection reset by peer]
lamawithonel__ has quit [Read error: Connection reset by peer]
lamawithonel__ has joined #ocaml
lamawithonel has joined #ocaml
lamawithonel__ has quit [Read error: Connection reset by peer]
tane has quit [Read error: Connection timed out]
lamawithonel has quit [Ping timeout: 252 seconds]
tane has joined #ocaml
yezariaely has quit [Ping timeout: 240 seconds]
yezariaely has joined #ocaml
emmanuelux has quit [Quit: emmanuelux]
emmanuelux has joined #ocaml
wmeyer` has joined #ocaml
Nahra has joined #ocaml
yezariaely has quit [Ping timeout: 246 seconds]
yezariaely has joined #ocaml
Nahra has quit [Quit: leaving]
yezariaely has quit [Ping timeout: 245 seconds]
eikke has joined #ocaml
ontologiae has joined #ocaml
yezariaely has joined #ocaml
eikke has quit [Ping timeout: 265 seconds]
eikke has joined #ocaml
yezariaely has quit [Ping timeout: 245 seconds]
tane has quit [Quit: Verlassend]
yezariaely has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
eikke has joined #ocaml
fayden has quit [Quit: Bye]
fayden has joined #ocaml
ontologiae has quit [Ping timeout: 265 seconds]
emmanuelux has quit [Remote host closed the connection]
fusillia has joined #ocaml
ontologiae has joined #ocaml
ontologiae has quit [Ping timeout: 252 seconds]
mye has quit [Quit: mye]