ayrnieu changed the topic of #ocaml to: OCaml 3.08.4 available! Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
SeSe has quit []
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
<KrispyKringle> Hmm. So I'm trying to use this little CGI library (http://www.lri.fr/~filliatr/ftp/ocaml/cgi/), and I installed it with the makefile, but what with the lack of documentation and my unfamiliarity with OCaml, I'm unable to figure out how to use it. It doesn't explicitly declare a module; when the cgi.{cmi|cmo|cmx|mli|o} files are in my library path, do I refer to them as CGI.foo? cgi.foo?
<KrispyKringle> Thanks.
<KrispyKringle> Or do I just compile against it with camlopt and that's it?
<KrispyKringle> ah, got it
<KrispyKringle> So is it not possible to use the Str library at the toplevel?
Smerdyakov has quit [Read error: 110 (Connection timed out)]
teiax has joined #ocaml
<pango> KrispyKringle: ocaml str.cma
<KrispyKringle> ah, aha
<KrispyKringle> thanks
ptolomy has quit [Read error: 110 (Connection timed out)]
foomeister has joined #ocaml
<foomeister> I can pass a .cma file to ocamlc but not ocamlopt, what is the equivalent for ocamlopt? Do i have to convert the .cma to another format first, or use something else? im confused
<foomeister> the man pages helped confuse me
<foomeister> being new to ocaml, i find many new file types... cma,cmi,mli,ml,cmx.cmxa...
<foomeister> solved it... the library i wanted to build against didnt build a .cmxa and thats what i needed..
foomeister has quit ["Leaving"]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
brx has quit [Remote closed the connection]
brx has joined #ocaml
Smerdyakov has joined #ocaml
vezenchio has quit ["I could see how [James Randi] comes off as a bit abrasive, as he uses terms like "gobbledigook" and "woo-woo" when referring ]
pango_ has joined #ocaml
aegray has joined #ocaml
pango has quit [Read error: 148 (No route to host)]
ramkrsna has joined #ocaml
nowl has joined #ocaml
brx_ has joined #ocaml
brx has quit [Read error: 110 (Connection timed out)]
<aegray> what is the difference between [x] @ list and x::list ?
<Smerdyakov> I don't know what you mean by "_the_ difference".
<Smerdyakov> The first one is a function call and the second is a constructor application.
<aegray> the first one is a function?
nowl has quit ["Leaving"]
<Smerdyakov> There are other differences, like the first one starts with the '[' character and the second doesn't.
<aegray> heh
<Smerdyakov> No, the first one is a function _call_.
<aegray> sorry thats what i menat
<aegray> @ is a function though?
<aegray> is it recursive?
<Smerdyakov> I think (@) is non-tail recursive.
<Smerdyakov> Stack space proportional to 1st argument.
<aegray> ok
brx_ has quit [Remote closed the connection]
<Smerdyakov> Same as List.concat
<aegray> thanks
<Smerdyakov> Oops. List.concat is fancier.
<Smerdyakov> Should have said: Same as List.append
<aegray> whats the difference?
<aegray> appending and concating are the same aren't they?
<Smerdyakov> That should be obvious from the manual.
<aegray> k
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
noj has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has joined #ocaml
noj has joined #ocaml
mflux has quit [Read error: 104 (Connection reset by peer)]
mflux has joined #ocaml
mflux has quit [Read error: 54 (Connection reset by peer)]
gim has quit [Read error: 110 (Connection timed out)]
aegray_ has joined #ocaml
mflux has joined #ocaml
teiax has quit [Read error: 110 (Connection timed out)]
aegray has quit [Read error: 110 (Connection timed out)]
aegray_ has quit []
aegray has joined #ocaml
ramkrsna has quit [Read error: 110 (Connection timed out)]
aegray has left #ocaml []
Snark has joined #ocaml
cmeme has quit [Remote closed the connection]
cmeme has joined #ocaml
pango_ has quit [Remote closed the connection]
Skal has joined #ocaml
pango has joined #ocaml
MisterC has joined #ocaml
Skal has quit [Read error: 110 (Connection timed out)]
Revision17 has quit [Read error: 110 (Connection timed out)]
vodka-goo has joined #ocaml
vodka-goo has quit []
Demitar has quit [Read error: 110 (Connection timed out)]
Demitar has joined #ocaml
KrispyKr1ngle has joined #ocaml
KrispyKringle has quit [Remote closed the connection]
brx has joined #ocaml
threeve has joined #ocaml
quamaretto has quit [Read error: 110 (Connection timed out)]
ChipsterOne has joined #ocaml
vezenchio has joined #ocaml
juri has joined #ocaml
<juri> any suggestions how to convince the compiler this is ok, i can't see why it wouldn't be:
<juri> This expression has type (?iflags:Pcre.irflag -> ?flags:Pcre.rflag list -> ?rex:Pcre.regexp -> ?pos:int -> ?callout:Pcre.callout -> string -> string) list but is here used with type (string -> string) list
<Smerdyakov> Labeled arguments make me cry. :(
<juri> i went around this by wrapping the calls in anonymous functions of type string -> string, but it seems a bit silly
<juri> oh, and another thing: i'm fairly certain i had ctags generating tags for ocaml files but now exuberant ctags denies any knowledge of ocaml. was i just dreaming?
_fab has joined #ocaml
<pango> juri: are you sure you didn't had to use otags ?
<mflux> juri, aren't you missing one 'string'?
<juri> pango, maybe i did - i couldn't find it on my machine, but now i realize i had some file system trouble in between and it might have disappeared then
<juri> let's reinstall
<juri> mflux, am i? where? :-)
<mflux> what does your calling code look like?
<mflux> hmm, actually, never mind
<mflux> I missed the parenthesis
<mflux> I think I've seen that problem before, I don't recall how I fixed it though ;)
<pango> juri: there's something in ocaml manual about labels and HOF
<juri> ok :-)
<mflux> ..but labeled (and optional) arguments are sooo nice..
<mflux> (sometimes)
<pango> I wonder if that's what you're hiting
<pango> "But beware that functions like ListLabels.fold_left whose result type is a type variable will never be considered as totally applied."...
<juri> yeah, sounds plausible
<juri> so maybe i'll live with the wrapper solution
<pango> that's what I'd say... :/
brx has quit [Remote closed the connection]
brx has joined #ocaml
brx has quit [Remote closed the connection]
brx has joined #ocaml
brx has quit [Read error: 104 (Connection reset by peer)]
brx has joined #ocaml
ramkrsna has joined #ocaml
pango has quit ["Leaving"]
_JusSx_ has joined #ocaml
__DL__ has joined #ocaml
pango has joined #ocaml
ramkrsna has quit [Connection timed out]
Bigb[a]ng is now known as Bigbang
brx has quit [Remote closed the connection]
brx has joined #ocaml
exa has quit [Remote closed the connection]
<ChipsterOne> bonne nuit tous le monde
ChipsterOne has quit [Remote closed the connection]
Schmurtz has joined #ocaml
Revision17 has joined #ocaml
brx has quit [Read error: 104 (Connection reset by peer)]
vodka-goo has joined #ocaml
monochrom has joined #ocaml
brx has joined #ocaml
brx has quit [Connection timed out]
brx has joined #ocaml
smimou has joined #ocaml
MisterC has quit [Remote closed the connection]
brx has quit [Remote closed the connection]
brx has joined #ocaml
Skal has joined #ocaml
Bigbang is now known as Bigb[a]ng
brx has quit [Connection timed out]
mattam has quit [Read error: 104 (Connection reset by peer)]
mattam has joined #ocaml
Banana has quit [Read error: 104 (Connection reset by peer)]
Banana has joined #ocaml
Snark has quit ["Leaving"]
__DL__ has quit [Remote closed the connection]
romildo has joined #ocaml
<romildo> Hello.
<romildo> I am having problems reading a large file on Linux.
<romildo> I am getting a segfault when reading a text file, line bye line.
_JusSx_ has quit ["leaving"]
<romildo> The file has 500000 lines.
<romildo> The segfault happens at around the line number 170000.
<romildo> The machine as an Athlon64. I have tried with Gentoo Linux amd64, Gentoo Linux x86 and Fedora Core 4 amd64.
<romildo> Any clues?
<Submarine> no idea
<Submarine> version of ocaml?
<romildo> With the 64bits version of the OS, the error is a segfault. With the 32bits version, the error is a "Fatal error: exception Stack_overflow"
<pango> your reading routine must not be tail recursive
<romildo> I have tried both versions 3.08.4 and 3.08.3.
<romildo> It is tail recursive :(
<romildo> But I am not sure.
threeve has quit []
<ulfdoz> Hooray, it type checks. :)
<romildo> Probably it is not, although it seems to be. Thre is try expression in its body.
vodka-goo has quit []
<pango> romildo: could you paste your code, or a simplified version of your code that exhibit the problem ?
<pango> romildo: a bad use of try ... with is indeed often then problem
<romildo> Any problem pasting the code here? Or shuld I upload it somewhere?
<romildo> (16 lines of code)
<smimou> use this : http://rafb.net/paste/
<pango> eh ;)
<smimou> :p
<smimou> romildo: try putting the try with around "aux 0"
<romildo> "readtable file_name f" should read each line of a text file, and apply the function f to each line.
<smimou> (it should make aux really tail recursive)
<pango> s/really//
<romildo> That was the problem. Putting the "try ... with ..." construct outside of the recursive function solved the problem.
<romildo> Thanks very much for the clue.
<pango> it's a usual mistake
romildo has quit ["leaving"]
KrispyKr1ngle is now known as KrispyKringle
threeve has joined #ocaml
<pango> hopefully 64 bit versions will handle stack overflow case better, and display a meaningful error message...
bernardo has joined #ocaml
Skal has quit ["Client exiting"]
threeve has quit []
Submarine has quit ["Leaving"]
smimou has quit ["?"]
monochrom has quit ["good morning, sweet dream"]
_fab has quit [Remote closed the connection]