dylan changed the topic of #ocaml to: OCaml 3.09.1 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/
mrsolo has quit [Read error: 104 (Connection reset by peer)]
Skal has quit [Remote closed the connection]
bohanlon has quit ["It is sleepy time for my computer."]
mrsolo has joined #ocaml
bohanlon has joined #ocaml
mikeX has quit [""zzz""]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
vigor has joined #ocaml
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml
bohanlon has quit [Success]
bohanlon has joined #ocaml
khaladan has joined #ocaml
piggy_ has joined #ocaml
ski has quit [Connection timed out]
ski has joined #ocaml
bronaugh has left #ocaml []
pango_ has joined #ocaml
quamaretto has joined #ocaml
quamaretto has left #ocaml []
pango has quit [Read error: 110 (Connection timed out)]
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml
khaladan has quit [Connection timed out]
bohanlon has quit ["It is sleepy time for my computer."]
vigor has quit [Read error: 110 (Connection timed out)]
bohanlon has joined #ocaml
Anarchos has joined #ocaml
Revision17 has quit [Remote closed the connection]
piggy_ has left #ocaml []
<Anarchos> ocaml 3.09.1 bootstrapped on a i586-pc-beos :)
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
Revision17 has joined #ocaml
bronaugh has joined #ocaml
<bronaugh> hmm.. what's wrong with this?
<bronaugh> let rec strexpr = function
<bronaugh> Var of foo -> foo
<bronaugh> error is at "of"
<bronaugh> oh, don't need the "of". heh.
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml
<bronaugh> joy, lack of understanding of ocaml Hashtbl
slipstream has joined #ocaml
Snark has joined #ocaml
slipstream-- has quit [Connection timed out]
__DL__ has joined #ocaml
Smerdyakov has quit ["Leaving"]
_DL_ has joined #ocaml
__DL__ has quit [Read error: 110 (Connection timed out)]
_DL_ has quit ["Bye Bye"]
pango_ has quit [Remote closed the connection]
gim has joined #ocaml
pango has joined #ocaml
lix-goo has joined #ocaml
Revision17 has quit [Read error: 110 (Connection timed out)]
Snark has quit ["Leaving"]
<bronaugh> uhh, how do you handle catching multiple exceptions.
<lix-goo> what do you mean ?
<lix-goo> catching many possibilities ?
<bronaugh> yeah.
<bronaugh> I did figure out that you can just put in _
<bronaugh> and that works
<lix-goo> you can put multiple patterns
<lix-goo> try .. with Not_found -> ... | Failure _ -> ... | _ -> ...
<bronaugh> ohh.
<bronaugh> ok.
<bronaugh> so that's the syntax
<lix-goo> yeo
<lix-goo> yep
<bronaugh> don't suppose you're good with ocamlyacc?
<bronaugh> trying to figure out how to implement comments.
<lix-goo> ocaml-style comments ?
<lix-goo> that's tricky
<bronaugh> Perl-style.
<bronaugh> just line beginning with #
<bronaugh> not middle-of-line or anything.
<lix-goo> OK so just skip #.*\n in the lexer
<lix-goo> rule token = parse
<lix-goo> | '%' [^'\n'] * '\n' { token lexbuf }
<lix-goo> | blank { token lexbuf }
<lix-goo> | '\n' { token lexbuf }
<lix-goo> | "." { DOT }
<lix-goo> here's an example, just s/%/#/
<lix-goo> it just tells the lexer to skip comments (and blanks, newlines) and lex again after
<bronaugh> cool.
<bronaugh> well, that works.
gim_ has joined #ocaml
mikeX has joined #ocaml
dozer has joined #ocaml
Skal has joined #ocaml
rossberg has quit ["Leaving"]
pango is now known as pangoafk
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml
bluestorm has joined #ocaml
bohanlon has quit ["It is sleepy time for my computer."]
<dozer> If I have a pair (a, b), is there a built-in that lets me extract a, or extract b?
<dylan> yes, check Pervasives.
<dylan> hint: fst and snd
* dozer embarased
<dozer> how many times have I scanned up and down this, and seen the List operations heading, but not Pair operations
<dylan> Heh. :)
<dylan> This is why it's good to ask people; people are better at certain types of information retrieval. :)
<dozer> :-)
<dylan> Like, for a while I thought I had to use the unix module, mtime, and a try ... with statement to test if a file existed...
<dylan> until I stumbled upon Sys.file_exists
<mikeX> ouch
Snark has joined #ocaml
Anarchos has joined #ocaml
<Anarchos> glad to annonuce the bootstrapping ofthe ocaml 3.09.1 compiler on BeOS !! (i586-pc-beos architecture)
<bluestorm> again ? :)
<zmdkrbou> :D
<Anarchos> bluestorm hmm yes :) cause nobody noticed it :(
* zmdkrbou doesn't any body using beos ...
<bluestorm> it seems you're looking for an ocaml developper or something like that
<bluestorm> why don't you send them a mail ?
<Anarchos> yes i will do that
<bluestorm> but if you want some congratulations, i do congratulate. I personally have no idea of how difficult it is, but nevertheless i appreciate the performance :)
bohanlon has joined #ocaml
bohanlon has quit [Client Quit]
<Anarchos> it is not difficult, just disabling some functions of the Unix library, some changes in the configure files, and adding some be-specific include files in the source
<Anarchos> i also added some directives to be able to use the source of ocaml with a c++ compiler, avoiding the mangling of names
bohanlon has joined #ocaml
bohanlon has quit [Remote closed the connection]
ski has quit ["NMI"]
<dozer> are there any situations where the content of a (* *) comment is parsed by ocamlc?
<zmdkrbou> nope
<dozer> then I am very confused
<dozer> File "metaGrammar.ml", line 72, characters 27-28:
<dozer> Syntax error
<dozer> but line 72 is commented out
<dozer> and if I insert a space in line 72 within the comment before char 27, the error changes to 28-29
<dozer> (* output_string out "'"; *)
<zmdkrbou> # (* output_string out "'"; *) 42 ;;
<zmdkrbou> - : int = 42
<zmdkrbou> i can't believe ocamlc reads into the comment
<dozer> If I paste my offending code into a pastebin, would you mind running it through ocamlc?
<dozer> just to see if you get the same strangeness
<zmdkrbou> ok
<zmdkrbou> but :
<zmdkrbou> | "(*"
<zmdkrbou> { comment_start_loc := [Location.curr lexbuf];
<zmdkrbou> comment lexbuf;
<zmdkrbou> token lexbuf }
<zmdkrbou> when looking at the compiler source, i don't think it's possible
<zmdkrbou> erf, syntax error
<zmdkrbou> hey !
<dozer> it does the same for you?
<zmdkrbou> the string on line 68 is not terminated
* zmdkrbou handles syntaxic coloration to dozer
<dozer> ah - that would explain it
<zmdkrbou> yup, just a "(' instead of "(" :)
<dozer> something to be said for string literals not being allowed to span more than one line
<dozer> thanks
<Anarchos> dozer try to put a backslash on the end of the first line
pangoafk is now known as pango
<dozer> fixing that quote solves the problem
<dozer> of course, now I have other problems :-)
<zmdkrbou> it wouldn't be funny if not :p
<Anarchos> dozer of course ;)
ski has joined #ocaml
<dozer> should all the functions defined in that big let/and block be able to see each other, or do I need to define them as rec?
<zmdkrbou> let bla ... and bli ... doesn't exist
<zmdkrbou> you must use let rec
<dozer> oh
<zmdkrbou> (i mean let rec bla ... and bli ...)
<dozer> let rec bla ... and bli ...;;;
<zmdkrbou> yup
<dozer> ok
<dozer> trying to think back to what a text book told me fix did...
<bluestorm> hum
<bluestorm> zmdkrbou,
<zmdkrbou> ?
<bluestorm> i thought let bla .. and bli ... worked
<bluestorm> when there were no reference of bla in bli
<bluestorm> (s/where/was/)
<zmdkrbou> oh yes
<zmdkrbou> but let ... and makes me think we're talking about mutual recursion :)
<bluestorm> ha
<bluestorm> i sometimes write let x = 4 and y = 3 in
<bluestorm> for example
<zmdkrbou> yep, me too, for aesthetic reasons :p
<dozer> which in this case is equivalent to let x = 4 in let y = 3 in ...?
<zmdkrbou> dozer: yes
<dozer> ok
<dozer> th
<Anarchos> this is different of a let rec, as in x you cannot reference y
<Anarchos> but with a let rec you can
<dozer> understood
<dozer> as a style issue - if I have an option constructor that uses two words, do I call it Foo_Bar, Foo_bar or FooBar?
<Anarchos> FooBar is kind of java style
<Anarchos> for the two others i don't know
* zmdkrbou would say Foo_bar or Foobar
* zmdkrbou doesn't like useless uppercase
<bluestorm> dkz
<bluestorm> dozer, i'ld use Foo_bar
lix-goo has quit ["Leaving"]
<bluestorm> and the doc uses it
<bluestorm> Not_found for example
<dozer> fine - using that now
<Anarchos> bluestorm i always found this Not_found counter-intuitive :)
<bluestorm> hum
<bluestorm> i personally can't bear java style
mikeX has quit ["leaving"]
<Anarchos> bluestorm i too : underscores are nice to mimic spaces
<dozer> well, you code to the style of the language - in java use camelHumps - in ml use underscores
<Anarchos> dozer of course but i don't like to see capitalized letters everywhere , that is ridiculous for a typography-aware programmer ;)
ski_ has joined #ocaml
Snark has quit ["Leaving"]
<bluestorm> dozer,
<bluestorm> ExceptionArrayIndexOutOfBounds
<bluestorm> haha
<bluestorm> even in a Java code this is ugly
<dozer> not such a bad case - things go realy wrong when you have to make choices like processUriToString vs processURIToString
ski has quit [Nick collision from services.]
ski_ is now known as ski
Smerdyakov has joined #ocaml
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
bluestorm has quit ["Parti"]
bluestorm has joined #ocaml
bohanlon has joined #ocaml
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml
jo_l_apache has joined #ocaml
Revision17 has joined #ocaml
Demitar has joined #ocaml
mikeX has joined #ocaml
samberstein has joined #ocaml
smimou has joined #ocaml
Anarchos has joined #ocaml
Oatmeat|umn has quit ["Leaving"]
Oatmeat|umn has joined #ocaml
bohanlon has quit ["It is sleepy time for my computer."]
pango has quit ["Leaving"]
pango has joined #ocaml
mrsolo has joined #ocaml
bohanlon has joined #ocaml
bluestorm has quit ["Parti"]
Anarchos has quit ["Vision[0.8.5-0418]: i've been blurred!"]
jo_l_apache has quit ["leaving"]
bohanlon has quit [Read error: 104 (Connection reset by peer)]
bohanlon has joined #ocaml
samberstein has left #ocaml []
JosephRivers has joined #ocaml
<JosephRivers> Is there a standard function that converts a float to a string?
<dylan> float_of_string
<JosephRivers> Thanks.
kral has joined #ocaml
<pango> string_of_float :)
cjeris has joined #ocaml
cjeris has left #ocaml []
bluestorm has joined #ocaml
Oatmeat|umn has quit [Read error: 110 (Connection timed out)]
Oatmeat|umn has joined #ocaml
Revision17 has quit ["Leaving"]
mikeX has quit ["leaving"]
bd__ has joined #ocaml
bd_ has quit [Read error: 104 (Connection reset by peer)]
kral has quit [""In girum imus nocte et consumimur igni.""]
_JusSx_ has joined #ocaml
bluestorm has left #ocaml []
bohanlon has quit ["It is sleepy time for my computer."]
_JusSx_ has quit ["leaving"]
bohanlon has joined #ocaml
bohanlon has quit ["It is sleepy time for my computer."]
bohanlon has joined #ocaml