Alpounet changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.1 out now! Get yours from http://caml.inria.fr/ocaml/release.html
Submarine has quit [Read error: 110 (Connection timed out)]
ikaros_ has quit ["Leave the magic to Houdini"]
ikaros has quit [Read error: 110 (Connection timed out)]
Narrenschiff has quit [Read error: 110 (Connection timed out)]
tmaedaZ is now known as tmaeda0
maskd has joined #ocaml
trav has joined #ocaml
<trav> I am using ocamlmakefile and have done a "make dc" to turn on debugging compile and link options (including -g). When I use Printexc.get_backtrace (), though, I get an empty string. How do I get an actual backtrace?
trav has quit [farmer.freenode.net irc.freenode.net]
trav has joined #ocaml
<julm> trav: not sure about what you want, but you may try export OCAMLRUNPARAM=b
<julm> (man ocamlrun)
tmaeda0 is now known as tmaedaZ
Alpounet has quit [Read error: 60 (Operation timed out)]
Nepomuk has quit [Remote closed the connection]
joewilliams has quit [Remote closed the connection]
valross has joined #ocaml
Pimm has quit [Read error: 60 (Operation timed out)]
maskd has quit ["leaving"]
onigiri_ has quit []
yakischloba has quit ["Leaving."]
peper has quit [Read error: 60 (Operation timed out)]
peper has joined #ocaml
treesapsatchel has joined #ocaml
thrasibule has quit [Read error: 60 (Operation timed out)]
thrasibule has joined #ocaml
jeddhaberstro has quit [Client Quit]
yakischloba has joined #ocaml
caligula__ has joined #ocaml
caligula_ has quit [Read error: 60 (Operation timed out)]
Modius_ has joined #ocaml
thrasibule has quit [Read error: 60 (Operation timed out)]
tmaedaZ is now known as tmaeda0
Modius has quit [Read error: 110 (Connection timed out)]
Modius_ has quit ["I'm big in Japan"]
Modius has joined #ocaml
joewilliams has joined #ocaml
flux has quit [Remote closed the connection]
<palomer> 50% of my gmail ads are from jane street
palomer has quit ["Leaving"]
_JFT_ has joined #ocaml
_JFT_ has quit [Client Quit]
ulfdoz has joined #ocaml
joewilliams has quit [Remote closed the connection]
mjsor has joined #ocaml
flux has joined #ocaml
Alpounet has joined #ocaml
ikaros has joined #ocaml
mjsor has quit []
ikaros has quit ["Leave the magic to Houdini"]
Alpounet has quit [No route to host]
yakischloba has quit ["Leaving."]
Mr_Awesome_ has joined #ocaml
Mr_Awesome_ has left #ocaml []
Alpounet has joined #ocaml
Yoric[DT] has joined #ocaml
<Yoric[DT]> hi
Associat0r has joined #ocaml
Associat0r has quit [Client Quit]
ttamttam has joined #ocaml
munga_ has joined #ocaml
struktured has quit [Read error: 60 (Operation timed out)]
ulfdoz has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has quit ["Ex-Chat"]
sgnb has quit [Read error: 104 (Connection reset by peer)]
ygrek has joined #ocaml
demitar has joined #ocaml
avsm has joined #ocaml
dmentre has joined #ocaml
sgnb has joined #ocaml
treesapsatchel has quit ["Leaving"]
_unK has joined #ocaml
Yoric has joined #ocaml
Pimm has joined #ocaml
munga_ has quit ["Ex-Chat"]
fabjan has quit [Read error: 110 (Connection timed out)]
ikaros has joined #ocaml
valross has quit [Remote closed the connection]
avsm has quit ["Leaving."]
avsm has joined #ocaml
maskd has joined #ocaml
_andre has joined #ocaml
tab_ is now known as tab
_zack has joined #ocaml
ygrek has quit [Remote closed the connection]
_unK has quit [Remote closed the connection]
spicey has quit [Read error: 110 (Connection timed out)]
ygrek has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
Submarine has joined #ocaml
Alpounet has quit ["Leaving"]
thrasibule has joined #ocaml
tmaeda0 is now known as tmaedaZ
thrasibule has quit [Read error: 60 (Operation timed out)]
trav has quit [Nick collision from services.]
tmaedaZ is now known as tmaeda0
Pimm has joined #ocaml
_unK has joined #ocaml
eldragon has joined #ocaml
_zack has quit ["Leaving."]
Nepomuk has joined #ocaml
joewilliams has joined #ocaml
dark has joined #ocaml
Snark has joined #ocaml
dmentre has quit ["Leaving."]
tvn2009 has joined #ocaml
Pimm has quit [Read error: 110 (Connection timed out)]
tvn2009 has quit [Remote closed the connection]
Narrenschiff has joined #ocaml
yakischloba has joined #ocaml
ttamttam has quit ["Leaving."]
itewsh has joined #ocaml
<Leonidas> I am trying to write a parser for gzip/zlib/deflate, what would be the best way to parse the binary data?
<Leonidas> I created also some types for the sections of the data (header, etc) but this is my first "real" ocaml code, so I have no idea where to start
<Camarade_Tux> there's a module by rwmjones which should help you for that
<Camarade_Tux> I've *completely* forgotten the name though
<Leonidas> bitstring?
<Camarade_Tux> yup :-)
<Leonidas> oh, nice, it is even in debian testing
<Camarade_Tux> ok, gotta leave, be back later
<Camarade_Tux> bitstring should be quite easy to use hopefully
ulfdoz has joined #ocaml
<Leonidas> thanks
<dark> I would the plain string type :(
Yoric has quit []
Nepomuk has quit [Read error: 104 (Connection reset by peer)]
det has quit [Remote closed the connection]
<rwmjones> Leonidas, yeah, bitstring should help out
* Leonidas tries it
<Leonidas> how do it hook the neccessary camlp4 run into omake?
_andre has quit [Read error: 60 (Operation timed out)]
<Leonidas> or can I get without syntax extensions?
<Leonidas> *go
det has joined #ocaml
Submarine has quit ["Leaving"]
<Leonidas> And I think debian misses the bitstring.cma ...
<det> Leonidas, you are aware there is already a zip/zlib/deflate module ?
<det> libzip-ocaml-dev
_andre has joined #ocaml
<Leonidas> det: yep, I know. but that is a binding to zlib, and I want to implement deflate my myself, to prove myself that I can do it :)
<det> oh, ok
<Leonidas> hmm, ocamlfind really seems to be unable to find the package "bitstring".
<det> libbitstring-ocaml-dev
<det> you have that ?
ikaros has quit ["Leave the magic to Houdini"]
<Leonidas> no, not yet. good idea.
<dark> wow, bitstring is powerful
<dark> (reading the page)
<Leonidas> http://paste.pocoo.org/show/163007/ <- what is wrong with that?
<Leonidas> Parse error: ":" expected after [patt] (in [patt_field])
<det> what are you trying to do ?
<orbitz> Leonidas looks like you ened antoehr : for the type
<det> what is bits ?
<det> are you trying to pattern match on a record ?
<det> oh, this looks like some camlp4 thing that I have no knowlefge of
<Leonidas> det: bits is Bitstring.bitstring_of_string bytestring.
<orbitz> det: it's camp4 thing
<orbitz> Leonidas: did my suggestion fix your error?
<Leonidas> orbitz: the examples here don't use the type: http://people.redhat.com/~rjones/bitstring/html/Bitstring.html
<Leonidas> orbitz: and even after I add : littleendian, I still get the same error
<det> how are you compiling ?
<orbitz> k
<Leonidas> det: using omake & ocamlfind, with -syntax bitstring.synax
<rwmjones> Leonidas, have you loaded the camlp4 extension?
maskd has quit [Read error: 104 (Connection reset by peer)]
<rwmjones> lemme check what the syntax is, just a sec
<rwmjones> Leonidas, have a look at how I did it in this makefile: http://git.annexia.org/?p=virt-df.git;a=blob;f=lib/Makefile.in;h=b508016a5599560113fb92f6ae2bdc1388686e14;hb=HEAD
<rwmjones> it was something like ocamlfind -package bitstring.syntax
<rwmjones> you don't need the -syntax parameter
* rwmjones tries it
<rwmjones> actually no, you need both
<Leonidas> rwmjones: yep, I added both.
<Leonidas> rwmjones: ocamlfind ocamldep -syntax bitstring.syntax -package bitstring,bitstring.syntax -modules inflate.ml
<rwmjones> hang on a sec, just trying to get to my machine
<rwmjones> Leonidas, this works for me:
<rwmjones> ocamlfind ocamlc -package bitstring.syntax -syntax bitstring.syntax unix.cma bitstring.cma test.ml -o test
<rwmjones> in Fedora we ship the following META file:
<Leonidas> the one in debian looks nearly the same
<Leonidas> the ocamlfind call is missing unix.cma and bitstring.cma, though, but I doubt that they are needed for the ocamldep step
<rwmjones> shouldn't be .. let me try ocamldep also
<Leonidas> and I installed camlp4of, which gets used.
<rwmjones> works for me here:
<rwmjones> $ ocamlfind ocamldep -syntax bitstring.syntax -package bitstring,bitstring.syntax -modules test.ml
<rwmjones> test.ml: Bitstring
<rwmjones> this is on Fedora mind you
<rwmjones> Leonidas, try using -verbose, it prints out the actual command
<rwmjones> for me I see:
<rwmjones> $ ocamlfind ocamldep -verbose -syntax bitstring.syntax -package bitstring,bitstring.syntax -modules test.ml
<rwmjones> Effective set of preprocessor predicates: preprocessor,syntax,bitstring.syntax
<rwmjones> + ocamldep.opt -modules -pp camlp4of '-I' '/usr/lib64/ocaml/bitstring' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' test.ml
<rwmjones> test.ml: Bitstring
maskd has joined #ocaml
<rwmjones> you can always try running that command directly, or adjusting things
<ulfdoz> hat mal jemand ein sauberes Partitioning mit Postgres gebaut?
<ulfdoz> ewin, sorry
<Leonidas> Unrecognized ocamldep output: + ocamldep -modules -pp camlp4of '-I' '/usr/lib/ocaml/bitstring' 'unix.cma' 'bitstring.cma' 'bitstring_persistent.cma' 'pa_bitstring.cmo' inflate.ml
_andre has quit ["*puff*"]
<Leonidas> Unrecognized ocamldep output: ocamldep returned with exit code 2
<Leonidas> when I add -verbose to OCAMLFINDFLAGS
Submarine has joined #ocaml
<Leonidas> it does not work even if I only do the
<Leonidas> | { _ } -> 42
<Leonidas> case
safire_ has quit [Client Quit]
<jonafan> rwmjones, how goes the functional reactive programming tutorial?
ikaros has joined #ocaml
rwmjones has quit [Read error: 101 (Network is unreachable)]
_unK has left #ocaml []
Amorphous has quit [Read error: 110 (Connection timed out)]
_unK has joined #ocaml
Yoric has joined #ocaml
Amorphous has joined #ocaml
anders^^_ has quit [Read error: 60 (Operation timed out)]
<mfp> Leonidas: try ocamlfind ocamldep -syntax camlp4o -package bitstring,bitstring.syntax -modules inflate.ml
<mfp> it's -syntax camlp4o, not -syntax bitstring.syntax
ttamttam has joined #ocaml
<Leonidas> mfp: that did now work either
<Leonidas> the same parse error
<Leonidas> s/now/not/
<mfp> that's probably an actual parse error then :)
<Leonidas> hmm, I'll commpit and push it.
<Leonidas> *commit
<Leonidas> http://github.com/Leonidas-from-XIV/escalate - maybe someone finds out what I'm doing wrong.
<thelema> Leonidas: well, it looks like it should be ok to me.
<thelema> but I confirm your camlp4 error
<thelema> I get the same error trying to compile one of the example files, elf.ml in the same way.
quelqun_dautre has quit [Read error: 60 (Operation timed out)]
quelqun_dautre has joined #ocaml
<thelema> huh, the example compilation command uses "-syntax bitstring.syntax"
<thelema> and even it doesn't work on the elf.ml example. Maybe a bug in the package?
<thelema> oddly enough, if I run [make examples] from the bitstring tarball, I get the same error
<thelema> because it's using the same preprocessor - maybe broken somehow
Snark has quit ["Ex-Chat"]
<Gert`m> is there an IMAP lib for OCaml?
<thelema> I'm pretty sure there isn't. ocamlnet has some clients, but no IMAP AFAIK
<thelema> HTTP, Telnet and FTP
<thelema> Pop, SMTP
<thelema> SSL, various RPC
<Camarade_Tux> you may want to have a look at gaml, while you may have nightmares because of the code, it supports imap iirc
<Camarade_Tux> j/k ;-)
<Camarade_Tux> (and imap is close to s-expressions iirc too)
<Gert`m> thanks
Gert`m is now known as Gertm
<Camarade_Tux> forgot to give the link ^^
rwmjones_lptp has joined #ocaml
<det> Does Ocaml allow you to declare infix data constructors ?
<rwmjones_lptp> thelema, Leonidas, maybe it's a bug in the debian package then?
<rwmjones_lptp> it definitely does work fine in the fedora package
ski_ has joined #ocaml
ttamttam has quit ["Leaving."]
<det> datatype ('a, 'b) pair = $ of 'a * 'b
<det> infixr $
<det> f (1 $ 2 $ 3)
<det> I can do this in SML
<det> Is it possible to pattern match on an infix constructor in Ocaml?
<det> fun f (a $ b $ c) = a + b + c
<det> forgot that line :-)
<Camarade_Tux> Basile STARYNKEVITCH
<Camarade_Tux> <bleh, select+click fail ><
fabjan has joined #ocaml
<mrvn> det: # let ( $ ) a b = (a, b);;
<mrvn> val ( $ ) : 'a -> 'b -> 'a * 'b = <fun>
<mrvn> det: operators are functions and not constructors. You can't match on functions.
<det> But I cant pattern match on a function
<det> argh :<
<det> Maybe I can work this using currying instead
<mrvn> or match on (a,b)
<det> I cant use a tuple
<mrvn> but you are
<det> nope
<det> nested pairs arent the same
<det> oh, I see
<det> you mean
<det> (a, (b, c))
<det> yeah, that can work
<det> but isnt very nice
_unK has quit [Remote closed the connection]
ygrek has quit [Remote closed the connection]
ygrek has joined #ocaml
Alpounet has joined #ocaml
<Leonidas> rwmjones_lptp: that's possible, I could file a bug report
<Leonidas> maybe I should try building it from source first.
slash_ has joined #ocaml
ulfdoz_ has joined #ocaml
ulfdoz has quit [Read error: 60 (Operation timed out)]
ulfdoz_ is now known as ulfdoz
Yoric has quit []
itewsh has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
<Leonidas> rwmjones_lptp: have you seen the debian patches: http://git.debian.org/?p=pkg-ocaml-maint/packages/ocaml-bitmatch.git;a=tree;f=debian/patches;h=c479239ffc5590fc64594b3b155e0fe889a27bae;hb=dbc41e4e0a3e27e064d79c1bea580d8fa5c359f9 Maybe they break something?
<Leonidas> at least the dynlink patch is neccessary, otherwise the library does not even compile for me
yakischloba1 has joined #ocaml
<Leonidas> rwmjones_lptp: after I applied that patch and built the library, the make test fails, with Parse error: ":" expected after [patt] (in [patt_field])
<Leonidas> (which is the same I get from the normal debian package)
<Asmadeus> Gertm: I'm the author of gaml, the file imap.ml of the project is a lib that works quite well for at least gmail's imap; I haven't tried it with dovecot or others, but it should be easily ajustable
<Asmadeus> If you have any question, feel free to ask :)
<thelema> I've heard Gmail's IMAP is as minimal an IMAP as can be
<Asmadeus> well, won't cost me much to try with dovecot as I have a server; will try later today
* Leonidas has a dovecot server available, so if you need something to test against...
<Asmadeus> I've got a couple, thanks though :)
tmaeda0 is now known as tmaedaZ
<Gertm> Asmadeus: thanks, I'll keep that in mind! I'm planning to write something that will use IMAP. I'll ask for help when I need it :)
yakischloba has quit [Read error: 110 (Connection timed out)]
ulfdoz has quit [Read error: 60 (Operation timed out)]
yakischloba1 is now known as yakischloba
slash_ has quit [Client Quit]
<Submarine> mmh
Narrenschiff has quit []
<Asmadeus> Gertm: it works out of the box with any imap server, you should be fine using it :)
<Asmadeus> (well, any being a dovecot and gmail :P)
jeddhaberstro has joined #ocaml
ygrek has quit [Remote closed the connection]
ikaros_ has joined #ocaml
Submarine has quit ["Leaving"]
avsm has quit ["Leaving."]
<orbitz> latest DDJ email is about F#
<orbitz> and why people need to get good at functional programming
demitar has quit ["Ex-Chat"]
thrasibule has joined #ocaml