systems changed the topic of #ocaml to: Archive of Caml Weekly News http://pauillac.inria.fr/~aschmitt/cwn/ | ICFP Programming Contest 2003 http://www.dtek.chalmers.se/groups/icfpcontest/ | A tutorial http://merjis.com/richj/computers/ocaml/tutorial/ | Good free book http://cristal.inria.fr/~remy/cours/appsem/ | Mailing list (best mailing list ever for any computer language) http://caml.inria.fr/bin/wilma/caml-list
brwill_zzz is now known as brwill
brwill is now known as brwill_nearby
buggs is now known as buggs|afk
Vincenz has quit []
Kinners has joined #ocaml
brwill_nearby is now known as brwill
brwill is now known as brwill_coffee
brwill_coffee is now known as brwill
polin8 has quit [Read error: 104 (Connection reset by peer)]
jdrake has quit ["Oops. This machine just fell asleep"]
__buggs has joined #ocaml
buggs|afk has quit [Read error: 54 (Connection reset by peer)]
brwill is now known as brwill_zzz
foxster has quit [Client Quit]
Kinners has left #ocaml []
Nate75Sanders has quit ["using sirc version 2.211+KSIRC/1.2.4"]
Nate75Sanders has joined #ocaml
Nate75Sanders has quit [Read error: 104 (Connection reset by peer)]
foxster has joined #ocaml
clog has joined #ocaml
Demitar has quit ["Bubbles everywhere!"]
whiskas has joined #ocaml
<whiskas> hello
mrvn has joined #ocaml
whiskas has quit ["Good bye, blue sky"]
mrvn_ has quit [Read error: 110 (Connection timed out)]
srv has joined #ocaml
__buggs is now known as buggs
Kinners has joined #ocaml
Nate75Sanders has quit [Read error: 104 (Connection reset by peer)]
srv has quit ["Bye"]
foxster has quit [Client Quit]
srv has joined #ocaml
polin8 has joined #ocaml
Kinners has left #ocaml []
srv has quit [Remote closed the connection]
<Maddas> hugh
<Maddas> I don't understand this problem that I'm encountering. Anybody mind looking at my code?
<mattam> yep
<Maddas> ok, I'll put it on the web
<Maddas> it always dies with Exception: Invalid_argument "String.get".
<Maddas> I do a if a > b comparison to stop that from happening, but it never gets executed!
<Maddas> http://tnx.nl/scribble/1325KJHK is the output of the program
<Maddas> after the last line, the if test should succeed and the thing should just return l and quit
<Maddas> any ideas why?
mattam_ has joined #ocaml
<mattam_> hmm, did you read what i wrote ?
<Maddas> no, nothing arrived.
<Maddas> :-)
mattam has quit [Nick collision from services.]
<mattam_> i can be = slen
<mattam_> the (i-1) >= slen should be replaced with i >= slen
mattam_ is now known as mattam
<Maddas> are you sure?
<Maddas> but if i = slen then s.[i] would fail, wouldn't it?
<Maddas> as slen starts from one, while the indices start from zero
<mattam> yep
<Maddas> oh, duh
<Maddas> :)
<mattam> slen can be 0
<mattam> too
<Maddas> Ah.
<mattam> maybe reindenting would help you
<Maddas> Why? :)
<mattam> f (i-1) >= slen then l else
<mattam> let j = i + 1 in
<mattam> if is_sep s.[i] then
<mattam> that is not clear :)
<Maddas> hm
<Maddas> did you find out why my program doesn't terminate before getting an exception then? :-)
<mattam> and, BTW, using Str.split (Str.regexp " \|'\|...") whould be better :)
<Maddas> Duh. Oh well, this is just an exercise :-)
<mattam> Maddas: when i = 15, (i-1) >= slen is false and you try to access str.[15]
<mattam> which causes the exception
<Maddas> I see
<Maddas> oh, I forgot to re-define the subroutine after doing the change
<Maddas> yay
<Maddas> Stupid mistake. I was thinking the wrong way around all the time
* Maddas slaps himself
<Maddas> Thanks a lot :)
<mattam> np
<Maddas> l :: (String.sub s ws (i-ws)) or (String.sub s ws (i-ws)) :: l, the second is more efficient, isn't it?
<Maddas> I read something about that once, but I forgot where :-)
<Maddas> never mind, the first is a syntax error.
<mattam> yep, and the second is more efficient (adding a cell is better than concatenating two lists)
Nate1975 has joined #ocaml
foxster has joined #ocaml
brwill_zzz is now known as brwill
brwill is now known as brwill_nearby
TachYon has joined #ocaml
TachYon has quit [Remote closed the connection]
bk_ has quit ["Terminated with extreme prejudice - dircproxy 1.0.5"]
bk_ has joined #ocaml
Xcalibor has joined #ocaml
<Xcalibor> hi
<phubuh> hi
<Riastradh> hi
<phubuh> is it possible to craft a function that takes a list of objects and an identifier for a method common to all the objects, and invokes the method on every one?
<phubuh> actually, never mind. that would be horrible.
<teratorn> there's no reason to use a function
<teratorn> just interate the list
<teratorn> *iterate
<Smerdyakov> Why don't you just pass a closure per object, where each closure calls the appropriate method on the appropriate object?
<phubuh> yeah
foxster has quit [Client Quit]
TachYon has joined #ocaml
TachYon has quit [Client Quit]
bk_ has quit ["I'll be back"]
Nate1975 has quit ["using sirc version 2.211+KSIRC/1.2.4"]
<phubuh> is it just me, or can tuareg-mode just barely handle string literals?
<Xcalibor> dunno...
<Xcalibor> mostly use gvim and ledit on a separate window...
* Xcalibor uses emacs for haskell mode and hugs98 of ucb logo, though
<mattam> tuareg has problems with string literals, but reindenting the line should get things right
<phubuh> ah
<phubuh> i'll try that the next time i get it
malc has joined #ocaml
buggs|afk has joined #ocaml
<Xcalibor> time for bed laters!
Xcalibor has quit ["Terminando cliente"]
buggs has quit [Read error: 110 (Connection timed out)]
jdrake has joined #ocaml
__DL__ has joined #ocaml
jdrake has quit ["Oops. This machine just fell asleep"]