Yurik 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
docelic has quit ["Client Exiting"]
mattam_ has quit ["zzzzZZZZZZzzzzz"]
mrvn_ has joined #ocaml
j_bravo has quit ["Trillian (http://www.ceruleanstudios.com)"]
mellum has quit [Read error: 110 (Connection timed out)]
mrvn has quit [Read error: 110 (Connection timed out)]
mellum has joined #ocaml
gl has quit [Read error: 54 (Connection reset by peer)]
gl has joined #ocaml
MegaWatS has quit ["Don't you hate it when chicks get mad at you for staring at their asses? It's not my fault that they have stuff written there]
jemfinch has joined #ocaml
<whee> haha
<whee> someone broke the line counting code in the cvs compiler :(
<whee> I'm siting looking at this error on line 1 when line 1 is a comment and has nothing to do with the error
<jemfinch> open the file in Python or something.
<jemfinch> see if a non-printable character slipped in there somehow.
<whee> no, it's the compiler, sure of it :)
<whee> well either that or camlp4 decided to do something funky
<jemfinch> oh, you might know this.
<jemfinch> mind if I paste about 10 lines here?
<whee> go for it
<jemfinch> functor% ocaml
<jemfinch> Objective Caml version 3.06
<jemfinch> # List.fold_left;;
<jemfinch> - : ('a -> 'b -> 'a) -> 'a -> 'b list -> 'a = <fun>
<jemfinch> # List.fold_right;;
<jemfinch> - : ('a -> 'b -> 'b) -> 'a list -> 'b -> 'b = <fun>
<jemfinch> # ^D
<jemfinch> functor% sml
<jemfinch> Standard ML of New Jersey v110.41 [FLINT v1.5], July 05, 2002
<jemfinch> - foldl;
<jemfinch> val it = fn : ('a * 'b -> 'b) -> 'b -> 'a list -> 'b
<jemfinch> - foldr;
<jemfinch> val it = fn : ('a * 'b -> 'b) -> 'b -> 'a list -> 'b
<jemfinch> - ^D
<jemfinch> why do O'Caml's fold_left and fold_right have different signatures?
<whee> that's certainly interesting
<jemfinch> fold_right takes the initial argument *after* the list it operates on.
<jemfinch> I have no earthly clue how such behavior can be useful.
<whee> hrmm I never noticed the fiference and I don't think there's a real reason other than maybe to help people remember what the difference is
<whee> s/fiference/difference/
<jemfinch> that difference through me completely off last night when I was was writing that ["123", "45", "7890"] -> [1;2;3;4;5;6;7;8;9;0] function.
<whee> you could use listLabels if it's a problem
<jemfinch> I whipped it up in SML in no time flat, but it took me a LONG time to figure out the problem with O'Caml's fold_right.
<whee> and specify the initial value with init:blah instead
<jemfinch> I was remotely runnign it, though -- I would paste the code into AIM, my friend would run it, tell me the types, and so on :)
<whee> heh
<jemfinch> it was also rather surprising that (a) there is no explode or implode, and (b) Strings have no folding operations.
<whee> the explode/implode thing gets me sometimes too, I don't know why there isn't one
<whee> not that it's particularly hard to write
<jemfinch> if O'Caml provided explode/implode and/or proper string folds, you wouldn't have people writing crap code like that as much.
<jemfinch> no, it's certainly not hard, but it's annoying.
<whee> heh
<whee> folding in caml light is the same way with the arguments swapped
<jemfinch> I can't understand why it's done that way. I know the authors of Caml aren't stupid, so they had to be thinking *something*
<whee> it's definately like that for understanding what it does better
<jemfinch> I doubt I'll agree with that something, but I'm still curious what it is.
<whee> in caml light, fold_lefft is it_list
<whee> so it takes the initial value first, then the list
<whee> fold_right is list_it, so list then initial
<jemfinch> those are crazy names.
<whee> they made that decision a long time ago, too late to change that now
<jemfinch> but anyway, I think I see what they were thinking.
<whee> providing labels is a nice way around that though
<jemfinch> fold_left goes from left to right, and starts with the initial value, thus (init list) -- fold_right goes right to left, and starts with the initial value, thus (list init)
<jemfinch> but I don't think that's a really good reason.
<jemfinch> it seems oftentimes they made things different from SML simply to be different from SML.
<whee> works for me :)
<whee> timne to track down this compiler bug :\
<jemfinch> have fun.
<jemfinch> remember, Caml wasn't originally an ML at all.
<jemfinch> it originally stood for "Categorical Abstract Machine Language"
<jemfinch> it wasn't until around Caml-light that they wanted it to be an ML.
<jemfinch> ah, great! my mail went through to the O'Caml list.
<jemfinch> it's a more efficient, cleaner version of a solution to that dude's problem.
<whee> heh
* jemfinch prefers the explode/implode versions despite their inefficiency since they're easier to read.
<jemfinch> last night writing that really reaffirmed my preference in languages, though.
<whee> just depends on what you're used to
<jemfinch> hmm...not totally. Remember, I learned O'Caml first.
<jemfinch> to this day I've still written far more lines in O'Caml than in SML -- 30k more, in fact.
<whee> gah
jemfinch` has joined #ocaml
jemfinch has quit ["Client Exiting"]
* jemfinch` hasn't had his question answered in comp.lang.ml yet.
<whee> hrmpf I have no idea where this is going wrong
jemfinch` has quit [Read error: 104 (Connection reset by peer)]
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
graydon has quit ["xchat exiting.."]
<lament> fuck
<lament> has anyone tried compiling Join Calculus?
<lament> oops, nevermind. I can't read.
gl has quit [Read error: 54 (Connection reset by peer)]
gl has joined #ocaml
mattam has joined #ocaml
whee has quit ["Leaving"]
lament has quit ["mental mantle"]
mellum has quit [forward.freenode.net irc.freenode.net]
mellum has joined #ocaml
mellum has quit [Read error: 60 (Operation timed out)]
two-face has joined #ocaml
<two-face> hi
SoreEel has quit [forward.freenode.net irc.freenode.net]
jao_away has quit [forward.freenode.net irc.freenode.net]
emu has quit [forward.freenode.net irc.freenode.net]
SoreEel has joined #ocaml
jao_away has joined #ocaml
emu has joined #ocaml
skylan has quit [forward.freenode.net irc.freenode.net]
xtrm has quit [forward.freenode.net irc.freenode.net]
mattam has quit [forward.freenode.net irc.freenode.net]
engstad has quit [forward.freenode.net irc.freenode.net]
Torquemada has quit [forward.freenode.net irc.freenode.net]
mmc has quit [forward.freenode.net irc.freenode.net]
lam_ has quit [forward.freenode.net irc.freenode.net]
Segora has quit [forward.freenode.net irc.freenode.net]
smkl has quit [forward.freenode.net irc.freenode.net]
mattam has joined #ocaml
engstad has joined #ocaml
skylan has joined #ocaml
mmc has joined #ocaml
xtrm has joined #ocaml
Torquemada has joined #ocaml
smkl has joined #ocaml
lam_ has joined #ocaml
Segora has joined #ocaml
two-face has quit ["Client Exiting"]
jao_away is now known as jao
* jao is back (gone for 74:46.39)
xtrm has quit [forward.freenode.net irc.freenode.net]
skylan has quit [forward.freenode.net irc.freenode.net]
engstad has quit [forward.freenode.net irc.freenode.net]
mattam has quit [forward.freenode.net irc.freenode.net]
Torquemada has quit [forward.freenode.net irc.freenode.net]
lam_ has quit [forward.freenode.net irc.freenode.net]
Segora has quit [forward.freenode.net irc.freenode.net]
smkl has quit [forward.freenode.net irc.freenode.net]
mmc has quit [forward.freenode.net irc.freenode.net]
mattam has joined #ocaml
engstad has joined #ocaml
skylan has joined #ocaml
mmc has joined #ocaml
xtrm has joined #ocaml
Torquemada has joined #ocaml
smkl has joined #ocaml
lam_ has joined #ocaml
Segora has joined #ocaml
two-face has joined #ocaml
two-face has left #ocaml []
gl has quit [Read error: 104 (Connection reset by peer)]
gl has joined #ocaml
zack has joined #ocaml
two-face has joined #ocaml
<two-face> hi
<mattam> I've got a type defined as 'type my = A of char | B of char' is there a way to match both in one instruction like 'match x with ?? ch -> use ch...' ?
<two-face> non
<two-face> no
<two-face> because otherwise you cannot be sure about types
<two-face> but
<two-face> i think you could use:
<two-face> match x with
<two-face> _ ch ->
<two-face> (not sure)
<mattam> i'll try that.
<mattam> it would be better to just have 'type my = A | B' then a (A * char)... i'll do that
<two-face> yes
<two-face> bye
two-face has left #ocaml []
j_bravo has joined #ocaml
docelic has joined #ocaml
docelic has quit [Read error: 104 (Connection reset by peer)]
two-face has joined #ocaml
<two-face> re
MegaWatS has joined #ocaml
<two-face> hi MegaWatS
<MegaWatS> hi
two-face has left #ocaml []
<j_bravo> hi evert
<j_bravo> hi everybody
<j_bravo> i have one little question...
<j_bravo> let stud1 : student = {number = 4564654; lastname = Jackson; name = "Micheal"};;
<j_bravo> how do i access on element of this tupel?
<j_bravo> *record
nkoza has joined #ocaml
<MegaWatS> stud1.number ?
<MegaWatS> also you don`t need to declare it`s type
<MegaWatS> let stud1 = { ... } should be sufficient
whee has joined #ocaml
two-face has joined #ocaml
<two-face> hi zack
<zack> hi two-face
<two-face> how doing ?
<zack> fine
<two-face> zack: i wonder for some time if it was necessary to provide both byte and non-byte for just one package, i.e. zoggy
gl has quit [Read error: 60 (Operation timed out)]
<zack> two-face: it depends on what you mean with "necessary"
<zack> two-face: it's good(TM), not vital, but good IMHO
<two-face> zack: i meant with the -custom option, like i did so far
<two-face> zack: but it cannot be arch: all in that case
<zack> uhm ... sorry but I don't remember the quid, is -custom necessary?
<two-face> well, no, but it embeds the interpreter in the code
<two-face> so you have no dependency on ocaml-base
<zack> two-face: yes but this imply that the executable is no more portable, depending on ocaml-base it can be arch: all
<two-face> zack: yes
Yurik has joined #ocaml
<two-face> Yurik: !
<Yurik> re
<Yurik> two-face: hi!
<two-face> Yurik: how doing man?
<Yurik> two-face: so-so :)
<two-face> zack: i'll put the cameleon packaging on quantz as soon as it is back
Yurik has quit [Read error: 54 (Connection reset by peer)]
<zack> ack
<two-face> zack: currently it is doing because of a failure
<zack> what about lablgtk?
<two-face> zack: sven is busy, i'm waiting for the snapshot
Yurik has joined #ocaml
<two-face> zack: i'm also considering using colin's build system which looks nice
<zack> two-face: WOOOOH! you are going to experiment! :-)
<Yurik> re
* Yurik got disconnected
<two-face> zack: yes, i like the idea
<two-face> Yurik: so you don't have a good internet access ?
<Yurik> two-face: I have *very* bad one
<two-face> Yurik: are you at home or at work?
<Yurik> two-face: @ home
<Yurik> due to the IT crisis it is hard to find good job now
<Yurik> and it is mostly one source of all my problems, like dialup internet, problems w/ my own seminar and so on
<two-face> Yurik: so you are unemployed?
<Yurik> two-face: yes, for few months now
<two-face> Yurik: :(
<two-face> Yurik: if you need some CDs of some linux distro, I can send some if you need
<Yurik> that is really bad, especially now I feel it, when trying to find extra $50-$70 for the visit of my seminar :-)))
<Yurik> two-face: wow! if this is possible, that could be good
<two-face> Yurik: this would be burned CDs of course
<whee> hrmf
<whee> are streams good for doing basic parsing?
<Yurik> two-face: i understand
<Yurik> whee: i think it depends on what you want to parse
<whee> well, brainfuck
<whee> heh
Yurik has quit [Read error: 104 (Connection reset by peer)]
<whee> character stream should be insanely easy to handle
zack is now known as zack_away
zack_away is now known as zack
<two-face> I'm going to eat Spagetti à la Bolognèse
<zack> two-face: good choice!, but remove the accent on the first e of "bolognese"
<two-face> zack: :-)
<two-face> zack: I was wrong , it is "Spagetti à la Bolognaise" in French :)
<zack> two-face: ok, but I'm really worried about french "spaghetti alla bolognese" :-)
<two-face> zack: we'll never do better that italians
<zack> two-face: or at least not with pasta-like dishes
<zack> BTW, it's dinner time ... bye :-)
zack has left #ocaml []
<whee> man, this is annoying
<whee> something is wrong somewhere and all the errors are being reported by ocaml as being on line 1
<two-face> ?
<whee> File "bin.ml", line 1, characters 575-576:
<two-face> where?
<whee> eh?
<two-face> how can i check ?
<whee> dunno, I'm using cvs ocaml
<whee> I think they broke something recently
<two-face> i'm not using ocaml cvs version
MegaWatS has quit ["Don't you hate it when chicks get mad at you for staring at their asses? It's not my fault that they have stuff written there]
MegaWatS has joined #ocaml
jemfinch` has joined #ocaml
jemfinch` is now known as jemfinch
<two-face> hello jemfinch
two-face has quit ["Client Exiting"]
jemfinch has quit [Read error: 54 (Connection reset by peer)]
MegaWatS has quit ["Don't you hate it when chicks get mad at you for staring at their asses? It's not my fault that they have stuff written there]
MegaWatS has joined #ocaml
jemfinch has joined #ocaml
jemfinch has quit [Read error: 104 (Connection reset by peer)]
<whee> hoorj
<whee> can't do any ocaml work until this compiler gets fixed :\
<MegaWatS> or you simply use the current stable verson? 8)
<MegaWatS> instead of the cvs version
<whee> pfft
<whee> heh
<whee> also would be nice if there were examples of using streams :\
* MegaWatS listens to Loreena McKennitt - Bonny Portmore
<MegaWatS> there are?
<MegaWatS> I mean it`s not like it is complicated or anything :)
<MegaWatS> Stream.get s
<MegaWatS> Stream.peek s
<MegaWatS> Stream.junk s
<whee> with the parser syntax, not that
<MegaWatS> ah that
<MegaWatS> I never used that , sorry
<SoreEel> The Camlp4 manual probably has examples.
<whee> not really :|
<SoreEel> I remember reading a pdf document which implemented a simple language parser using streams and destructive matching.
<SoreEel> Hmm..
<whee> all I need to do is have a parser that turns the stream into a list
<MegaWatS> I don`t even knw why you invest all that effort into a simple parser for bf
<whee> these examples in the tutorial don't help heh
<MegaWatS> I mean, all you need is something like
<MegaWatS> match Stream.get with
<whee> I want to learn streams
<MegaWatS> | '+' -> Add :: parse_again
<whee> and this seems easy
<MegaWatS> | '-' -> ...
<MegaWatS> etc
<MegaWatS> ic
<SoreEel> It's written for Caml Light, but would probably be informative anyways.
<SoreEel> Chapter 12 would likely be helpful as well.
mattam_ has joined #ocaml
mattam has quit [Read error: 60 (Operation timed out)]
Yurik has joined #ocaml
<Yurik> re
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
docelic has joined #ocaml
docelic has quit ["Client Exiting"]
Yurik has quit [Read error: 54 (Connection reset by peer)]
jemfinch has joined #ocaml
jemfinch has quit ["Client Exiting"]
jemfinch has joined #ocaml
TimFreeman has joined #ocaml
TimFreeman has left #ocaml []
<whee> haha oops
<MegaWatS> ?
<whee> I wrote my parser like an idiot so I need to rewrite
<whee> I went and just converted the stream to a list for some odd reason, then realized I could really use the whole destructive update of a stream
lyn has joined #ocaml
jemfinch has quit ["Client Exiting"]
jemfinch has joined #ocaml
<whee> woo this is insanely confusing