#ruby-lang - Tue 10 Apr 2007 between 14:35 and 15:52

NY Lost Funds



apeirosteferi, I know of it. that doesn't change anything I said
teferiapeiros: sometimes you want to treat a string as a stream you can read from, thugh
apeirospluesch0r, do you mean: how can I *split* a string into chunks of 20bytes length?
pluesch0rapeiros: that might also be a valid question.
apeirosteferi, yes. that's what stringio is there for. I still stand by what I said :)
pluesch0rapeiros: so .. how do i tell split to split my string?
AriaYou probably want string.scan /.{1,20}/
teferipluesch0r: mystring.split(delimiter)
Ariasplit is for delimited chunks, not length chunks.
teferiahyes
sorry
apeirosalso string#[], but scan is faster iirc (and easier)
xybrehttp://www.ruby-doc.org/core/classes/String.html#M000858
ceeghttp://pastie.caboo.se/52838 - am i doing this right? :]
oenonehow can i view the version of the yaml module?
ceegthere's gotta be a better way of multiple condition statements
Catfishceeg: Case statements?
apeirosceeg, use an option-parser
there is at least one in stdlib and there are dozens out in the wild
check rf and raa
ceegthanks apeiros
CatfishOptionParser is in the standard library, isn't it?
ceegCatfish: a = "abc"; case a; when a.include?("a"); a1 = true; when a.include?("b"); b1 =true; end;
i want both conditions to come out true. but it breaks out of the case
once any one of them is true
actionbranstrom is away: minimized
branstromis away: minimized
actionbranstrom is back (gone 00:00:00)
branstromis back (gone 00:00:00)
actionbranstrom is away: minimized
branstromis away: minimized
actionbranstrom is back (gone 00:00:08)
branstromis back (gone 00:00:08)
actionbranstrom is away: minimized
branstromis away: minimized
actionbranstrom is back (gone 00:00:20)
branstromis back (gone 00:00:20)
apeirosbranstrom, stop that please.
oGMohyperion-1.0.2b(381). niven.freenode.net iMZ dncrTS/v4
haven't seen that one
branstromapeiros, sorry, disabled the stupid autoaway
shevyhehe
ceegapeiros: that doesnt work because its basically evaluating when true, right? so i tried matching a, like when /a/; b = 1; when /b/; c = 1; and it still only got to the first one it came to
knight_hey all!
ceeghey knight_, i remember you ;)
want to help me wrap my sleep deprived feeble brain around a certain case statement? :p

Page: 2 9 16 23 30 37 44 51 

IrcArchive

NY Lost Funds