systems changed the topic of #ocaml to: http://icfpcontest.cse.ogi.edu/ -- OCaml wins | http://www.ocaml.org/ | http://caml.inria.fr/oreilly-book/ | http://icfp2002.cs.brown.edu/ | SWIG now supports OCaml| Early releases of OCamlBDB and OCamlGettext are available | Caml Weekly news http://pauillac.inria.fr/~aschmitt/cwn/
giedi has joined #ocaml
rox has quit ["Rebooting .... gonna try out BeOS"]
giedi has quit [Read error: 104 (Connection reset by peer)]
giedi has joined #ocaml
__DL__ has quit [Remote closed the connection]
giedi has quit [Read error: 104 (Connection reset by peer)]
stefp has quit [Read error: 60 (Operation timed out)]
stefp has joined #ocaml
lament has joined #ocaml
giedi has joined #ocaml
stefp has quit [Read error: 60 (Operation timed out)]
stefp has joined #ocaml
lament has quit ["I AM NOT A MENSA MEMBER"]
stefp has quit [Read error: 60 (Operation timed out)]
stefp has joined #ocaml
jao has quit ["leaving"]
mattam has quit [Read error: 113 (No route to host)]
Kinners has joined #ocaml
platypus__ has joined #ocaml
mattam has joined #ocaml
lament has joined #ocaml
platypus_ has quit [Read error: 113 (No route to host)]
TachYon26 has joined #ocaml
TachYon76 has joined #ocaml
TachYon76 has quit [Read error: 54 (Connection reset by peer)]
Kinners has left #ocaml []
platypus__ has quit [calvino.freenode.net irc.freenode.net]
platypus__ has joined #ocaml
lament has quit ["I WILL NOT DO MATH IN CLASS"]
reltuk has joined #ocaml
two-face has joined #ocaml
skylan has joined #ocaml
TachYon26 has quit ["bez ki³y nie ma zaliczenia (z prawd studentek AM)"]
phubuh has quit ["leaving"]
two-face has quit ["Client exiting"]
Vincenz has joined #ocaml
<Vincenz> Riastradh?
<Riastradh> Yes?
<Vincenz> I know why it didn't compile
lus|wazze has joined #ocaml
<Vincenz> urgh
<Vincenz> sml seems to allow reuse of labels in different records, Ocaml doesn't :/
<lus|wazze> yup
<Vincenz> one wonders why
<lus|wazze> but on the other hand, you have to explicitly type records in sml
<Vincenz> hmm?
<Vincenz> in ocaml too, no?
<lus|wazze> no
two-face has joined #ocaml
* Vincenz is converting some code from sml to ocaml
* Vincenz doesn't know sml and just a bit of ocaml
<Vincenz> I have this sumtype
<Vincenz> exp
<Vincenz> which is built up of many records
<Vincenz> and many of these records have a field "pos"
<Vincenz> but now I have to differentiate them :/
<Vincenz> yicky
<lus|wazze> :|
<Riastradh> In a type 'rt' defined as a record type, I always prefix the fields with 'rt_' -- I don't think you lose readability or anything, and you don't have to worry about name clashes.
<Vincenz> I know
<Vincenz> that's what I'm doing right now
<Vincenz> but it was handy to just refer to pos
<Vincenz> instead of let_pos
<Vincenz> or while_pos
<Vincenz> besides
<Riastradh> What code are you translating?
<Vincenz> assignexp becomes ass_pos
<Riastradh> Or rather, what does it do?
<Vincenz> AST
<Vincenz> well the definition of the types
Zadeh has quit [Read error: 60 (Operation timed out)]
<Vincenz> hmm
<Vincenz> let's say I have module A
<Vincenz> which defines some type =... | Plop of plop
<Vincenz> and plop = {a : int }
<Vincenz> in another module I do A.Plop {a = 2}
<Vincenz> and it complains it can't bind the record field a
<Vincenz> doh!
<Vincenz> I have to use {A.a = 2}
* Vincenz sees his code bloat and bloat
* Vincenz notes more idiosyncrasies : parser says : %token <string*int> STRING ......then STRING -> {StringExp $1} (because StringExp expects string*int)....that doesn't work so I have to do StringExp (fst $1, snd $1)
<Vincenz> odd, isn't it?
<Vincenz> :/
<Vincenz> | exp{[$1], snd $1}
<Vincenz> | exp COMMA explist{$1::(fst $3), snd $1}
<lus|wazze> i have frankly no idea what you're talking about :)
<Vincenz> where exp = SomExp * int
<Vincenz> it complains on the first definition :/
<Vincenz> never mind, I've got it :)
two-face has quit ["Client exiting"]
<taw> mmm
<taw> maybe some automatic sml 2 ocaml ?
<taw> in camlp4
<taw> or sth
<Vincenz> not quite sure, some things are not that straightforward
<taw> it should be able to do most of work
<taw> s/=>/->/ and all that
<Vincenz> ah
<taw> most differences are trivia like keywords and functions with other names
<Vincenz> true
* Vincenz wishes he knew how to do optional elements in yacc
<taw> 10-line perlscript would save human editor at least half of work
<taw> optional ?
<Vincenz> yes
<Vincenz> like
<Vincenz> fields :
<Vincenz> | field [fields]
<taw> foo: foo_obligatorypart foo_optionalpart
<Vincenz> or....
<taw> fields: field | field fields
<Vincenz> I know
<Vincenz> but when you have more than optional field
<Vincenz> you get a lot of redundant crap
<taw> foo_optionalpart: /* */ | xxx
<taw> no, you need lot of _optional
<Vincenz> yes
<Vincenz> but!
<Vincenz> take these two :
<Vincenz> | exp{[$1], snd $1}
<Vincenz> | exp COMMA explist{$1::(fst $3), snd $1}
<taw> procdef:
<taw> TK_PROC TK_ID params valuesopt varsopt procs pbody { $2,$3,$4,$5,$6,$7 }
<Vincenz> ack!
<Vincenz> | FUNCTION ID LPAREN RPAREN EQ exp{()}
<Vincenz> | FUNCTION ID LPAREN tyfields RPAREN EQ exp {()}
<Vincenz> you see?
<Vincenz> tyfields
<taw> valuesopt varsopt procs are opional elements
<Vincenz> I can't make tyfields empty
<taw> no ?
<Vincenz> so I need two cases
<taw> why not ?
<Riastradh> Hmm...
<Riastradh> ocamldoc is complaining that it can't find two constructors that are referenced, but those constructors are defined in one of the files it's processing.
<Riastradh> Oh, never mind.
lus|wazze has quit ["\o/ www.minibosses.com \o/"]
lus|wazze has joined #ocaml
systems has joined #ocaml
systems has left #ocaml []
lowks_ has quit [Read error: 104 (Connection reset by peer)]
platypus__ has quit ["Client exiting"]
<Vincenz> Yay, my parser to generate AST is finished :)
<mellum> Vincenz: so you're close to making gcc obsolete? ;)
<Vincenz> mellum: heh I wish, it's not for C though (and I'm not touching that icky subject with crap like preprocessor)
<mellum> Yeah, C is pretty annoying to parse...
<mellum> I really wonder why people always insist C is such a "simple" language...
<taw> mmm
<taw> c should not be used
<taw> universities are guilty
<taw> they should give negative points for c programs that have security holes
<taw> and immediately everyone would program ocaml ;)
<mellum> Really? I thing C is rarely taught any more
<taw> well, c++ nowadays
<taw> but they completely ignore security
<Vincenz> my univ taught in scheme and later java
<Vincenz> we only used C when we were handoptimizing mp3-decoders
<taw> here every course choses language it wants but usually lefts choice up to student
<taw> some basic c and sml is expected
mattam_ has joined #ocaml
<taw> how to read whole file and put it into string ?
mattam has quit [Read error: 60 (Operation timed out)]
<Vincenz> I used to know this :)
<Vincenz> wait up
lament has joined #ocaml
phubuh has joined #ocaml
<phubuh> what's going on with efuns nowadays?
<phubuh> i can't seem to compile it
<phubuh> i get a syntax error on the [< part of this function:
<phubuh> let rec parse_gwmlrc = parser
<phubuh> [< id = parse_id; 'Kwd "="; v = parse_option ;
<phubuh> eof = parse_gwmlrc >] -> (id, v) :: eof
<phubuh> | [< >] -> []
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
<phubuh> but it looks alright to me :/
<mellum> I think the parser keyword was kicked. You need to compile with the preprocessor.
<phubuh> oh, really?
<phubuh> camlp4?
Smerdyakov has joined #ocaml
<phubuh> can't ocamlc call the preprocessor? i'm not very excited about hacking this makefile too much :/
<mellum> I think there's some flag for that
<phubuh> ah, there is! -pp
<phubuh> progress!
<phubuh> okay, now it's complaining about the 'Kwd "=" part being a 'a Stream.t instead of [? `Kwd of string]
taw has quit [Excess Flood]
taw has joined #ocaml
taw has left #ocaml []
taw has joined #ocaml
<phubuh> =( =(
stef_ has joined #ocaml
kawsy has joined #ocaml
stefp has quit [Read error: 110 (Connection timed out)]
asquii has joined #ocaml
asqui has quit [Read error: 104 (Connection reset by peer)]
asquii is now known as asqui
asquii has joined #ocaml
mattam_ is now known as mattam
asqui has quit [Read error: 104 (Connection reset by peer)]
asquii is now known as asqui
asqui has quit [Read error: 54 (Connection reset by peer)]
asqui has joined #ocaml
kawsy has quit ["Client Exiting"]
giedi has quit [Read error: 60 (Operation timed out)]
giedi has joined #ocaml
stef_ has quit [Read error: 60 (Operation timed out)]
stef_ has joined #ocaml
neski has joined #ocaml
neski has left #ocaml []
Smerdyakov has quit [Read error: 104 (Connection reset by peer)]
Smerdyakov has joined #ocaml
stef__ has joined #ocaml
stef_ has quit [Read error: 110 (Connection timed out)]
stef__ is now known as stefp
phubuh has quit ["i love c++ and no oblique did not fake this quote"]