flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
alexyk has joined #ocaml
astro is now known as astronut
alexyk has quit []
Camarade_Tux has quit ["Quitte"]
knubbli__ has joined #ocaml
<knubbli__> check this out http://tinyurl.com/rolfxd lol
knubbli__ has left #ocaml []
prime2 has quit [Read error: 60 (Operation timed out)]
<maxote> @src dfs
bluestorm has quit [Remote closed the connection]
alexyk has joined #ocaml
vuln has quit ["leaving"]
lintrippz has quit [Remote closed the connection]
sbok has quit [Remote closed the connection]
sbok has joined #ocaml
lintrippz has joined #ocaml
AxleLonghorn has joined #ocaml
alexyk has quit []
ched_ has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
ChrisRoland has joined #ocaml
ChrisRoland has quit ["Java user signed off"]
angerman has joined #ocaml
angerman has quit []
tonyIII__ has quit [Read error: 110 (Connection timed out)]
tonyIII has joined #ocaml
AxleLonghorn has left #ocaml []
astronut has left #ocaml []
tonyIII has quit [Read error: 110 (Connection timed out)]
tonyIII has joined #ocaml
tonyIII has quit [Read error: 110 (Connection timed out)]
tonyIII has joined #ocaml
BordrGuy108 has joined #ocaml
tonyIII has quit [Operation timed out]
BordrGuy108 has left #ocaml []
angerman has joined #ocaml
angerman has quit []
kaustuv_` is now known as kaustuv_
_zack has joined #ocaml
slash_ has joined #ocaml
Camarade_Tux has joined #ocaml
Fulax has joined #ocaml
Snark has joined #ocaml
marmottine has joined #ocaml
slash__ has joined #ocaml
itewsh has joined #ocaml
kaustuv_ has left #ocaml []
slash_ has quit [Read error: 110 (Connection timed out)]
slash__ is now known as slash_
ttamttam has joined #ocaml
<flux> when using pcre with utf8 strings, pcre gives me byte offsets. is there a function to convert these kind of offsets back to utf8 offsets?
<flux> I actually have a crude function to do that, but I'm just wondering if there's a standard solution :)
bluestorm has joined #ocaml
ttamttam has left #ocaml []
<bluestorm> ertai_: my comprehension extension use [? ... ], but I can't easily use [? ... ?] because "?" does not belong to the Lexer.mll "delims" set
<bluestorm> (it works fine with eg. [& ... &])
<bluestorm> should I rather come up with a stream parser hack to have the ?] part or change to another delimiter ?
<bluestorm> additionnally, the test_patt_lessminus (skipping enclosed expressions in a pattern to get the "<-") of Camlp4ListComprehension, wich I reuse in pa_comprehension, does not handle exotic delimiters such as "[&" "&]"
marteo has joined #ocaml
<bluestorm> so it seems the "["; "?"; ... hack might actually be more solid to syntax changes
yasuto has joined #ocaml
yasuto has left #ocaml []
_zack has quit ["Leaving."]
alexyk has joined #ocaml
itouch has joined #ocaml
<mrvn> % ls -lhd tmp
<mrvn> unique: 6, opcode: GETATTR (3), nodeid: 1, insize: 40
<mrvn> # caml_fuse_getattr_stub()
<mrvn> ### getattr 1
<mrvn> ### fs_getattr 1 unique: 6, error: 0 (Success), outsize: 112
<mrvn> # fuse_reply_attr_stub(): ino = 1, mode = 040755, nlink = 2, uid = 0, gid = 0, size = 4096, blocks = 1
<mrvn> drwxr-xr-x 2 root root 4.0K Jan 1 1970 tmp/
<mrvn> JUHEY.
Cheshire has joined #ocaml
<mrvn> My fuse bindings work. Now I need to patch libfuse for concurrent processing while single threaded.
itewsh has quit [Read error: 110 (Connection timed out)]
<flux> ah, so there were some backend issues
jeremiah has quit [Read error: 104 (Connection reset by peer)]
alexyk has quit []
slash_ has quit ["leaving"]
slash_ has joined #ocaml
verte has quit ["http://coyotos.org/"]
jeremiah has joined #ocaml
alexyk has joined #ocaml
Alpounet has joined #ocaml
alexyk has quit []
ttamttam has joined #ocaml
ttamttam has left #ocaml []
Fulax has quit ["Out of Memory: Killed process [9823] xchat."]
Fulax has joined #ocaml
stevan has joined #ocaml
<ertai_> bluestorm: the problem with '?' is with optional arguments
<ertai_> ?foo: is a single token in the camlp4 lexer
<stevan> hi, im reading some ocaml code and run into something i don't quite get; let rec foo x = match x with [...] | Bar(y) as x when [...], what does the "as x" part do? thanks.
<Cheshire> it means x = Bar(y)
<ertai_> stevan: it introduce an alias name for the Bar y
<stevan> but isn't x = Bar(y) already?
<Cheshire> yes
hkBst has joined #ocaml
<mrvn> imagine "as z"
<bluestorm> ertai_: I understand that but as optional arguments never begin expressions, i could probably safely allow [? foo ... ]
<bluestorm> (or ... foo ?] )
<bluestorm> at the parser level
Snark has quit ["Ex-Chat"]
<mrvn> bluestorm: don't put double meaning on operators.
<mrvn> or rather tokens
<bluestorm> mrvn: so you think i should rather change for [% , [&, [/, [@ or [^ ?
<bluestorm> (i'd prefer not to use [^ wich is Yoric's choice for lazy lists iirc.)
<mrvn> ^ is in use already too
<mrvn> [_ since that looks like L for lazy?
<bluestorm> how is ^ in use ?
<mrvn> # (^);;
<mrvn> - : string -> string -> string = <fun>
<mrvn> concatenation
<mrvn> [^"foo"^"bar"^"baz"^] looks bad.
_zack has joined #ocaml
Snark has joined #ocaml
Camarade_Tux has quit ["Quitte"]
thelema has joined #ocaml
ehird has left #ocaml []
ehird has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
Alpounet has quit [Read error: 110 (Connection timed out)]
<ertai_> bluestorm: right, but I don't really want to change the lexer yet again
<bluestorm> that's ok
<bluestorm> mrvn: well [|a|b|] already exists
<mrvn> so it is OK to add more?
<ertai_> bluestorm: so you have to use at least one of them ['%' '&' '/' '@' '^']
<bluestorm> mrvn: all the delimiter characters are also infix characters there will be a possibility for that anyway
<ertai_> mrvn: the OCaml syntax is quite busy, if want add more syntax one have to accept this kind combinations
<mrvn> How about [:?
<bluestorm> already used mrvn
<mrvn> by what?
<bluestorm> streams in revised syntax
<mrvn> Does that free [<?
<bluestorm> i could use [%: though, but that's heavy as hell :]
<mrvn> [[?
<bluestorm> can't, that's nested lists
<mrvn> 8-P
<bluestorm> mrvn: [%, [&, [/, [@ or [^
<mrvn> bluestorm: or [$
jeremiah has joined #ocaml
<ehird> [[
<ehird> oh, mrvn said that :P
<ehird> bluestorm: []
* ehird cackles
<mrvn> ehird: [[1;2];[3;4]] is used too often
<ehird> it was a joke, both of them :)
marteo has quit ["Quitte"]
stevan has left #ocaml []
Fulax has quit [Remote closed the connection]
<bluestorm> mrvn: i'm discussing the comperhension syntax, not the lazy list
<bluestorm> and in the current state of the lexer, no, [$ wouldn't be practical
vpalle has joined #ocaml
Fulax has joined #ocaml
<kaustuv> Is just [ expr | x <- e ; ... ] ambiguous?
<bluestorm> kaustuv: no it isn't
<bluestorm> i've tried to do something different than list simple brackets because comprehensions are enumerations by default, not lists
<bluestorm> and moreover the current Camlp4ListComprehension use this syntax and lists
<bluestorm> (so using that could theorically break existing code, though I doubt there is much using it out there)
<kaustuv> do you have any inline syntax for enumerations?
<bluestorm> inline syntax ?
<bluestorm> ah, no
<bluestorm> Yoric has been considering re-using [< ... >] are Streams are really a deprecated form of enumeration
<kaustuv> can that coexist with code that uses camlp[45]?
<bluestorm> yes it can
angerman has joined #ocaml
Fulax has quit ["Connexion switch"]
cloudowind has joined #ocaml
cloudowind has left #ocaml []
Alpounet has joined #ocaml
itouch has quit [Read error: 110 (Connection timed out)]
Camarade_Tux has joined #ocaml
love-pingoo has joined #ocaml
itewsh has joined #ocaml
bluestorm has quit [Remote closed the connection]
angerman has quit []
yziquel_ has joined #ocaml
_zack has quit ["Leaving."]
itewsh has quit [Read error: 110 (Connection timed out)]
<Camarade_Tux> does anyone have liblzma or libxz on his system ?
itewsh has joined #ocaml
<mrvn> /usr/bin/lzma
<mrvn> /usr/bin/unlzma
<mrvn> /usr/lib/apt/methods/lzma
marmottine has quit ["mv marmotine Laurie"]
<ehird> what does
<ehird> Error: File type.cmx
<ehird> was not compiled with the `-for-pack Sexplib' option
<ehird> mean?
<ehird> when compiling sexplib
<flux> ehird, do you have sufficiently recent sexplib?
<Camarade_Tux> =/ I fear relying on a lzma de/encoding library is impossible
vpalle has quit ["Leaving"]
<ehird> flux: sexplib310-release-4.2.6
<ehird> ocaml 3.11
<flux> hmm..
<ehird> sexplib released 2008-09-30 apparently
<flux> I've compiled it recently only via godi, so I don't remember how that goes
<ehird> should I be using godi?
<kaustuv> from the sexplib CHANGES file:
<kaustuv> > 2008-10-18: Fix for upcoming OCaml release 3.11.
<ehird> ah
<kaustuv> You might need a newer one
<ehird> where could I get a newer one? :)
<kaustuv> apt-get source type-conv
<kaustuv> or google Markus Mottl's
<ehird> OK.
<ehird> Hmm, it seems GODI doesn't support 3.11.
<Camarade_Tux> ehird, use -section 3.11
<Camarade_Tux> (or is it --section)
<ehird> huh, kaustuv, my CHANGS goes to 2009-01-20: Automatically add S-expression pretty-printers to toplevels.
<ehird> but doesn't have your entry
<Camarade_Tux> and the full invocation is ./bootstrap --section 3.11
<ehird> Camarade_Tux: OK. So is it what most people use? New to ocaml...
<Camarade_Tux> 3.11 on godi is still considered beta iirc
<kaustuv> It works fine for me
<ehird> i mean, godi in general
<Camarade_Tux> ehird, depends : on debian and fedora, it's most probably distribution packages, on other distributions it's through godi or self-compiled
<ehird> yeah, I've been self-compiling
<ehird> it is a bit irritating
* thelema self-compiles ocaml
* Camarade_Tux used to self-compile ocaml
* ehird wipes out ocaml, installs with godi
<Camarade_Tux> actually I compiled everything myself except ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<ehird> [[It is recommended to install at least tcl/tk]]
<ehird> hmm, maybe not as useless as I thought :-)
<yziquel_> http://paste.lisp.org/display/76329 Hi, i've been trying to compile a findlib package, but i get this weird error. I do not really understand why netsys is unavailable. It should even be available by only requiring ocamlnet... Any ideas?
smimou has quit ["bli"]
jeremiah has joined #ocaml
jeremiah has quit [Connection reset by peer]
chicco has quit ["WeeChat 0.2.6"]
<ehird> hmm
<ehird> how can i install a package with godi without using curses?
<yziquel_> I've looked into the META file of netsys. There's archive(byte), archive(native), but no mt tag. Does that mean that netsys is unavailable in a multithreaded environment? That would be a pain!
<mrvn> if you don't curse like a drunken sailor then you have to sacrifice a chicken instead.
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Amorphous has quit [Success]
Amorphous has joined #ocaml
<yziquel_> http://paste.lisp.org/display/76329#1 netclient doesn't seem to be available in a multithreaded environment. How weird...
jeremiah has joined #ocaml
<ehird> Hmmm.... godi-bin-prot-1.2.9godi1 fails with 'type_class.mli syntax error', at line 93 (char 15-16) :-(
<ehird> The line is MK_BASE(unit) ... which is expanded various times with macros ..
jeremiah has quit [Read error: 104 (Connection reset by peer)]
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
Camarade_Tux has quit ["Leaving"]
jeremiah has joined #ocaml
jeddhaberstro has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
Yoric[DT] has joined #ocaml
smimou has joined #ocaml
<Yoric[DT]> hi
vuln has joined #ocaml
itouch has joined #ocaml
itewsh has quit [Connection timed out]
<ehird> anyone have godi-bin-prot working on ocaml 3.11...?
<flux> is it just me, or does godi's calendarlib (2.0.4) not work? touch foo.ml; ocamlfind ocamlopt -linkpkg -package calendar -o foo foo.ml will spit errors on a fresh godi install (3.10)
<flux> I mean the native compilation, byte code works ok
<flux> well, modifying the META file to not use .cmx seems to work (or atleast link)
<olegfink> by the way, are there any plans on making ocamlbuild the standard build tool?
<olegfink> godi makes installing ocaml libraries bearable, but in the presence of hackage that's not too much.
<yziquel_> Anyone knows why, in the toplevel, #use "topfind";; #thread;; #require "netsys";; #require "netclient";; works, but not #use "topfind";; #thread;; #require "netclient";; does not work? Could someone have a try at it to see if it's just me?
Snark has quit ["Ex-Chat"]
<flux> fails for me
<flux> I'd guess a missing dependency in the META file
<flux> but, now I'm off to sleep
<yziquel_> flux: good night.
<thelema> yziquel_: I get same as you. I can't explain it other than a failed dependency.
<yziquel_> thelema: are you using GODI or Debian packages, or something else?
<yziquel_> http://paste.lisp.org/display/76339 here are the META files. I changed the netclient to replace unix by netsys (which, by the way, requires unix...). Still no luck.
<thelema> self-compiled
<yziquel_> thelema: urgh!
<thelema> yziquel_: fixed. Just put netsys at beginning of list (equeue seems to require it too)
<yziquel_> thelema: thank you so much. i will report it.
<ehird> :\
_zack has joined #ocaml
<yziquel_> ehird: GODI is a nice tool, but Debian packages are nice too. You could perhaps try them, if you use Debian.
<ehird> I don't :)
<ehird> it seems to be a problem with the package, but batteries depends on it
<yziquel_> ehird: what's line 93 of type_class.mli?
<thelema> ehird: I use 3.11, and my bin-prot works... I had to find version... 1.0.5
<ehird> MK_BASE(unit), the first usage of MK_BASE.
<ehird> there's a lot of macro expansions
<ehird> also, same error on same line with same macros (but code, not types) in the .ml
<ehird> I'll pastebin the macros
<ehird> hm, wait
<ehird> val bin_writer_##NAME : ('a, 'b, ('a, 'b) TP) S2.writer \
<ehird> val bin_reader_##NAME : ('a, 'b, ('a, 'b) TP) S2.reader \
<ehird> is it because there's no newline there in the macroexpansion?
<ehird> hmm, no
<thelema> newlines aren't really necessary in ocaml code.
<ehird> yeah, my brain slipped :-)
itouch has quit [Read error: 110 (Connection timed out)]
itouch has joined #ocaml
<ehird> odd.
<thelema> ehird what version of bin-prot are you using?
<ehird> godi tries to install godi-bin-prot-1.2.9godi1
hkBst has quit [Read error: 104 (Connection reset by peer)]
<ehird> I wonder if I can tell it to install the right version
<ehird> [ 73] godi-bin-prot 1.2.9#1 Library for automated convers
<ehird> guess I'll have to compile it manually?
* thelema doesn't know about godi
<ehird> ok :)
<thelema> I just keep a dir with folders for everything I have to recompile when I upgrade ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
yziquel_ has quit ["http://www.mibbit.com ajax IRC Client"]
jeremiah has joined #ocaml
itouch has quit ["There are only 10 kinds of people: those who understand binary and those who don't"]
seafood has joined #ocaml
sgnb` has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
<ehird> i'm thinking it's a problem on my end as I find it hard to believe people use godi&ocaml3.11 without batteries
<ehird> aha, it's due to preprocessor changes in 3.11 :-(
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<ehird> yet, the thread says it's fixed...
Yoric[DT] has quit ["Ex-Chat"]
sgnb` is now known as sgnb
seafood has quit []
kaustuv_ has joined #ocaml
seafood has joined #ocaml
seafood has quit [Client Quit]
jeremiah has joined #ocaml
<ehird> :\
alexyk has joined #ocaml
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb` has joined #ocaml
alexyk has quit []
authentic has left #ocaml []
<ehird> anyone using ocaml3.11 + godi been able to compile batteries?
ched_ has quit [Remote closed the connection]
Alpounet has quit ["Ex-Chat"]
<mfp> ehird: works for me (GODI -section 3.11), both installing through GODI and compiling manually
<ehird> I get an error when it compiles the dependency bin-prot
<ehird> syntax error on line 93 of type_class.ml{,i} which is a preprocessor line, google saidi t's due to 3.11 preprocessor changes,
<ehird> but google also said it's fixed now
<mfp> which version? I have godi-bin-prot 1.2.9#1
<ehird> [ 73] godi-bin-prot 1.2.9#1 Library for automated convers
<ehird> How odd.
<ehird> I wonder why...
<mfp> that code is preprocessed with cpp, not camlp4o
<mfp> ... maybe a problem with your cpp?
<ehird> > ocamlfind ocamlc -package type-conv -c -pp "cpp $ARCH_FLAGS " -I +camlp4 type
<ehird> _class.mli
<ehird> > File "type_class.mli", line 93, characters 15-16:
<ehird> > Error: Syntax error
<ehird> I guess I'll process it with cpp and see
<ehird> The offending line, preprocessed:
<ehird> val bin_writer_##unit : unit writer val bin_reader_##unit : unit reader val bin_##unit : unit t
<ehird> So. My cpp is failing at ##.
<ehird> % cpp --version
<ehird> i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5490)
<ehird> mfp: what's your cpp? maybe it's an incompatibility there
<ehird> ... although I can't think why ##would be left in
<mfp> cpp (Debian 4.3.2-1) 4.3.2
<ehird> Huh. #define test(a,b) a##b\ntest(1,2) through my cpp gives 1##2.
<ehird> That can't be right.
<ehird> ... makes no sense at all
<mfp> can hardly believe Apple could ship such a broken GCC
<ehird> I'm hoping there's a reasonable explanation for this breakage but my mouth is gaping right now.
_zack has quit ["Leaving."]
<ehird> mfp: does that sanity test work at your end? I _may_ be 100% wrong about the whole nature of cpp's input language, so...
<mfp> ehird: it expands to 12
<ehird> Yep.
<ehird> aha
<ehird> mfp: 'cpp' is broken, but 'cc -E' gets it right
<ehird> which is... even more ridiculous
<kaustuv_> gcc 4.0.1 is a bit long in the tooth isn't it?
<mfp> indeed
<ehird> mm
chicco has joined #ocaml
<ehird> i'll see if I can upgrade gcc
alexyk has joined #ocaml
<ehird> nope
<ehird> OK, would it be possible to configure godi to use gcc -E as cpp?
gaze__ has joined #ocaml
angerman has joined #ocaml
angerman has quit [Client Quit]
alexyk has quit []
<kaustuv_> I think you'd have to change bin-prot's Makefile to effect that.
<ehird> darn
Camarade_Tux has joined #ocaml
<kaustuv_> of course you can always hack it by replacing cpp with a shell script
<ehird> ouch
authentic has joined #ocaml