smkl changed the topic of #ocaml to: OCaml 3.07 ! -- Archive of Caml Weekly News: http://pauillac.inria.fr/~aschmitt/cwn, A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/, A free book: http://cristal.inria.fr/~remy/cours/appsem, Mailing List (best ml ever for any computer language): http://caml.inria.fr/bin/wilma/caml-list
steele has quit [Ping timeout: 14400 seconds]
kinners has joined #ocaml
<Smerdyakov> drworm, that depends on the context. I use 'when' when it saves duplication of code.
cjohnson has quit ["Drawn beyond the lines of reason"]
kinners has quit ["leaving"]
yeoh has joined #ocaml
yeoh has left #ocaml []
jdmarshall has joined #ocaml
buggs|afk has joined #ocaml
buggs^z has quit [Connection timed out]
musasabi has joined #ocaml
<musasabi> Does ocaml support variable length argument lists?
<Smerdyakov> There are default argument values and labeled arguments.
<musasabi> yes I know... But for a variable length list just pass a list?
<Smerdyakov> That would be one way to get a similar effect.
jdmarshall has quit ["ChatZilla 0.9.52B [Mozilla rv:1.6/20040113]"]
bk_ has joined #ocaml
musasabi has left #ocaml []
lam has quit ["leaving"]
<pattern> "In the tenth century...the Grand Vizier of Persia, Abdul Kassem Ismael, in order not to part with his collection of 117,000 volumes when travelling, had them carried by a caravan of four hundred camels trained to walk in alphabetical order."
kinners has joined #ocaml
lam has joined #ocaml
lam has quit [Read error: 60 (Operation timed out)]
lam has joined #ocaml
lam has quit [Client Quit]
<Maddas> pattern: haha
<pattern> :)
<Maddas> Sounds much more interesting than just using a computer
lam has joined #ocaml
gim has joined #ocaml
wazze has joined #ocaml
systems has joined #ocaml
systems has left #ocaml []
kinners has quit ["leaving"]
phj has joined #ocaml
<phj> How to create a thread in ocaml 3.07 ?
<mattam> Thread.create ? has it changed ?
<phj> mattam: error msg :"Unbound value threads"
<phj> Should load anything before I use threads?
<mattam> you've got to tell ocaml you use threads somehow
<mattam> ocamlc -thread for ex. iirc
<phj> I use sharpload "threads/threads.cma" in toplevel of ocaml.
<mattam> hmm, i didn't ever use threads in the toplevel, i'm sorry i've got no idea about this issue.
<phj> mattam: I tested it with command: ocamlc -thread unix.cma threads.cma some_file.ml
<phj> it function.
<phj> Isn't there thread support in toplevel?
<mattam> probably not, i really don't know.
<phj> I used ocamlmktop -thread -custom -o threadtop unix.cma threads.cma -cclib -lthreads to generate a new toplevel which "support" threads.but it didn't function.
The-Fixer has quit [Read error: 60 (Operation timed out)]
base_16 has joined #ocaml
bk_ has quit ["I'll be back"]
<phj> Demitar: thank you
<phj> Demitar: solved! just use command "ocaml -I +threads" ,then load unix.cma and threads.cma into toplevel would do.
<Demitar> Yes I suspected you were simply missing the -I part.
phj has quit [Read error: 110 (Connection timed out)]
The-Fixer has joined #ocaml
derfy has joined #ocaml
bk_ has joined #ocaml
lus|wazze has joined #ocaml
wed has joined #ocaml
wazze has quit [Read error: 110 (Connection timed out)]
lus|wazze has quit ["blubb"]
maihem has joined #ocaml
wed has quit ["Bye all."]
derfy has quit []
karryall has joined #ocaml
bernard__ has joined #ocaml
bernard has quit [Read error: 60 (Operation timed out)]
skylan has quit [Operation timed out]
skylan has joined #ocaml
ejt has quit [Read error: 60 (Operation timed out)]
ejt has joined #ocaml
base_16 has quit ["Client exiting"]
The-Fixer has quit [saberhagen.freenode.net irc.freenode.net]
cmeme has quit [saberhagen.freenode.net irc.freenode.net]
Smerdyakov has quit [saberhagen.freenode.net irc.freenode.net]
The-Fixer has joined #ocaml
cmeme has joined #ocaml
Smerdyakov has joined #ocaml
Riastradh has quit ["Changing server"]
Riastradh has joined #ocaml
Riastradh has quit [Nick collision from services.]
Riastradh has joined #ocaml
wazze has joined #ocaml
Baumstruktur has joined #ocaml
reltuk has joined #ocaml
<reltuk> oh yeah, doin' the ocamllex ocamlyacc thang...
<drworm> fun :)
<reltuk> does ocamlyacc allow single character symbols?
<drworm> why wouldn't it?
<reltuk> like '(' expression ',' expression ')' { PairExp ($2, $4) }?
<reltuk> because '(' isn't a token...
<drworm> ah, i used tokens for that
<reltuk> hmm..
<drworm> like LEFT_PAREN exp COMMA exp RIGHT_PAREN
<drworm> characters are for the lexer
<reltuk> see, I think the '(' { LPAREN }, ')' { RPAREN } are going to mess with '()' { UNIT }
<Smerdyakov> What was your last line to mean?
<Smerdyakov> Was that code for the lexer or the parser?
<drworm> you lost me :)
<reltuk> Smerdyakov: lexer
<drworm> it's some sort of mix, like a pexer og a larser
<drworm> or*
<reltuk> Smerdyakov: all 3 there for the lexer...I think they'll conflict or something :-p
<Smerdyakov> So check if a '(' has a ')' next to it, and make it UNIT in that case.
<reltuk> Smerdyakov: will the lexer handle that for me if I have the "()" rule before "(" or ")"?
<Smerdyakov> I believe so.
<reltuk> oh, ok...good stuff
<drworm> it will try to match the longest possible unless you tell it otherwise, i believe
<reltuk> can I match the $#'s?
<reltuk> like, $2 holds a VarExp of string...
<reltuk> and I need the string...
bernard__ is now known as bernard
<reltuk> hmm...how do you write a null action for a rule?
<reltuk> like option_list_expressions: | { [] }?
bk_ has quit ["I'll be back"]
<drworm> it has to return something of the right type or raise an exception
<reltuk> but I want it to match black....
<reltuk> blank rather...
<drworm> oh
<drworm> well i'm no expert, but it has to match *something* i'm sure?
<reltuk> hmm...well the original intention was that it not...
<reltuk> because it's optional...
<reltuk> list_expression : LBRACKET optional_list_expressions RBRACKET...
<reltuk> optional_list_expressions can either be there, or it can be empty
<drworm> then you need a seperate rule for LBRACKET RBRACKET i suppose
<reltuk> nah, the above works...it's in the ocaml source
<reltuk> | /* empty */ { [] }
<drworm> hm, would be neat if it worked somehow :)
<reltuk> what do you mean?
<drworm> just thinking aloud, never mind
<reltuk> *shrug*, it does work...very useful since you see epsilon's in a lot of EBNF stuff
<drworm> yes, but i always thought you had to go EBNF -> BNF before writing a yacc/ocamlyacc parser
<reltuk> ...I don't know enough about ocamlyacc
<reltuk> or yacc...
<drworm> or eliminate epsilon productions at least
<reltuk> I'm just writing a really crappy parser :-p
<drworm> yes, me too
<reltuk> well...that exact line appears in the ocaml parser...I'm assuming it's valid...
<drworm> oh
<reltuk> I don't have a makefile for the project yet...so I can't test anything :-p
<drworm> you really need that or you'll go crazy with all the ocamllex/ocamlyacc/ocaml commands ;)
<reltuk> hehe
mattam_ has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
<reltuk> is "expression PLUS expression"'s right most terminal "PLUS"?
<Smerdyakov> It only has one terminal symbol, and PLUS is it.
<reltuk> good stuff