JustinCampbell has quit [Ping timeout: 260 seconds]
bfreeman_ has quit [Quit: bfreeman_]
ilyam has quit [Ping timeout: 245 seconds]
ilyam_ is now known as ilyam
tenderlove has quit [Remote host closed the connection]
ilyam has quit [Quit: ilyam]
iamjarvo has joined #ruby-lang
imperator has quit [Quit: Leaving]
akira989 has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
<zenspider>
YAY! laptop couldn't run a script because it took too much memory so I moved it to my server and ran it there to completion! yay for brute force still working!
<seanstickle>
That's crazy
<seanstickle>
What kind of server has more memory than a desktop?
gregmoreno has quit [Read error: No route to host]
<zenspider>
desktop? who uses desktops anymore?
gregmoreno has joined #ruby-lang
<zenspider>
hell... who uses desks anymore?
tenderlove has joined #ruby-lang
<seanstickle>
zenspider: you just hover?
<zenspider>
no office. no desk. no desktop.
<zenspider>
yesterday's hacking was done by a lake. saturday's was near a lighthouse. today is in my favorite cafe
<seanstickle>
a lighthouse cafe on a lake?
<seanstickle>
Now I've pinned you down!
<seanstickle>
There are only 3 of those!
<Spaceghostc2c>
Desks are mostly for convincing myself I need to get work done.
<seanstickle>
Desks are for sitting at and propping up my feet, like an old time steel magnate
akira989 has joined #ruby-lang
heftig has quit [Ping timeout: 245 seconds]
wpaulson has joined #ruby-lang
Sambalero has joined #ruby-lang
<erikh>
I still prefer a desk and a desktop
<erikh>
nice partitioned area where I get shit done
towski has quit [Remote host closed the connection]
fayimora has joined #ruby-lang
gokul has joined #ruby-lang
gokul has quit [Read error: Connection reset by peer]
awwaiid has quit [Ping timeout: 248 seconds]
concernedcitizen has quit [Remote host closed the connection]
Nisstyre has quit [Read error: Connection reset by peer]
yours_truly has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
yours_truly has quit [Read error: Connection reset by peer]
concernedcitizen has joined #ruby-lang
concernedcitizen has quit [Changing host]
concernedcitizen has joined #ruby-lang
awwaiid has joined #ruby-lang
heftig has quit [Ping timeout: 246 seconds]
dc5ala has joined #ruby-lang
JohnBat26 has joined #ruby-lang
neoesque has quit [Ping timeout: 264 seconds]
scientes has quit [Ping timeout: 240 seconds]
fayimora has quit [Quit: Busy…..zzzzz]
<rue>
davidbalbert: I can’t attest to accuracy, but they look good for the most part in the literary sense :)
Sambalero has joined #ruby-lang
<rue>
davidbalbert: You’ve an extra comma in the very first ‘Takes,’, and I think it would be good to clarify the options, since the IS.compile doc says it takes a Hash, but the options can be something other than a Hash
concernedcitizen has quit [Read error: Connection reset by peer]
<rue>
davidbalbert: And you could perhaps combine the disasm docs into one, but it works as-is
JustinCampbell has joined #ruby-lang
workmad3 has joined #ruby-lang
gregmoreno has quit [Read error: Connection reset by peer]
savage- has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
gregmoreno has joined #ruby-lang
Sambalero has quit [Remote host closed the connection]
savage- has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<lzhz>
I'm using Builder::XmlMarkup to generate XML documents with Ruby 1.9.3. I specify UTF-8 encoding, and my source data is encoded as UTF-8 as well, but I get ISO-8859-1 encoded numeric entities in the output, like ø => ø for example. How come?
s0ra_h is now known as sora_h
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<lzhz>
Looks like we're running Builder 2.1.2, should be fixed in 3.0.0, I will try that.
neoesque has quit [Quit: Bye!]
postmodern has quit [Quit: Leaving]
_br_ has quit [Excess Flood]
sora_h is now known as s0ra_h
s0ra_h is now known as sora_h
_br_ has joined #ruby-lang
<lzhz>
meh, gem request_exception_handler depends on builder 2.1.2, this is getting painful
_br_ has quit [Excess Flood]
_br_ has joined #ruby-lang
_br_ has quit [Excess Flood]
_br_ has joined #ruby-lang
wpaulson has joined #ruby-lang
<lzhz>
as do rails 3.0.9 used by this particular app.
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
pajama has quit [Remote host closed the connection]
<banisterfiend`>
lzhz: move your rails babbling to a rails channel
<andrewvos>
+1
<lzhz>
sorry, didn't know bundler and builder were off-topic here
wpaulson_ has joined #ruby-lang
sora_h is now known as s0ra_h
wpaulson_ has quit [Client Quit]
wpaulson has quit [Ping timeout: 264 seconds]
<shevy>
rails spawned the creationg of a big ecosystem
areil_ has quit [Remote host closed the connection]
<lzhz>
yeah, some of which are used in many non-rails project. but I don't intend to start a discussion about that here, so I will try the rails channel.
VegetableSpoon has quit [Remote host closed the connection]
justinmcp has joined #ruby-lang
s0ra_h is now known as sora_h
heftig has quit [Quit: leaving]
heftig has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
agile has joined #ruby-lang
chaitanya__ has joined #ruby-lang
doitdistributed has quit [Remote host closed the connection]
cantonic has quit [Ping timeout: 248 seconds]
DefV has quit [Ping timeout: 272 seconds]
Jan_ has joined #ruby-lang
Jan_ has left #ruby-lang [#ruby-lang]
DefV has joined #ruby-lang
cantonic has joined #ruby-lang
kvirani has joined #ruby-lang
kain has quit [Quit: quit]
mwjcomputing has joined #ruby-lang
dejongge has joined #ruby-lang
chrismcg is now known as zz_chrismcg
rolfb has joined #ruby-lang
agile has quit [Remote host closed the connection]
JustinCampbell has quit [Remote host closed the connection]
JustinCampbell has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
<Defusal>
sigh
dhruvasagar has joined #ruby-lang
ik6 has joined #ruby-lang
<Defusal>
somewhere, somehow, some part of my serialization is wrapping an origional object in a proxy object in place :(
workmad3 has joined #ruby-lang
<Defusal>
i can see this taking the whole day, if not longer to figure out
<manveru>
set_trace_func ftw :)
<manveru>
also debuggers help sometimes
<Defusal>
never heard of set_trace_func, will look into it
<Defusal>
i have like 10 pages of debug print outs
<Defusal>
not helping in the slightest
<apeiros>
rewrite it from scratch. that always solves it for me.
* apeiros
hides
<Defusal>
set_trace_func looks to be too general, theres gonna be far too much output manveru
<Defusal>
apeiros, har har...
<Defusal>
i hate having no clue about an issue
<Defusal>
no place to start, no clue what could be causing it
<Defusal>
bleh
stardiviner has joined #ruby-lang
<certainty>
start at the obvious. Set a breakpoint right where you see it misbehave the first time. Then walk up the callchain
futurecode has quit [Remote host closed the connection]
hynkle has quit [Quit: Computer has gone to sleep.]
solars has quit [Read error: Operation timed out]
wallerdev has quit [Quit: wallerdev]
diegoviola has joined #ruby-lang
dejongge has joined #ruby-lang
indstry has joined #ruby-lang
butchanton has joined #ruby-lang
sora_h is now known as s0ra_h
towski has joined #ruby-lang
carloslopes has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
fgomez has joined #ruby-lang
wallerdev has joined #ruby-lang
iamjarvo has joined #ruby-lang
tommyvyo has joined #ruby-lang
felipe has joined #ruby-lang
xmesg has joined #ruby-lang
rippa has joined #ruby-lang
z3r00ld has joined #ruby-lang
z3r00ld has left #ruby-lang [#ruby-lang]
indstry has quit [Remote host closed the connection]
iamjarvo has quit [Quit: Computer has gone to sleep.]
headius has joined #ruby-lang
codewrangler has joined #ruby-lang
lsegal has joined #ruby-lang
Weems|test has quit [Read error: Connection reset by peer]
Weems|test has joined #ruby-lang
Weems|test has quit [Changing host]
Weems|test has joined #ruby-lang
mrsolo has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
Xzyx987X_ has joined #ruby-lang
face has joined #ruby-lang
codewrangler has quit [*.net *.split]
towski has quit [*.net *.split]
jtoy has quit [*.net *.split]
znz_v has quit [*.net *.split]
rhodee has quit [*.net *.split]
alexkane has quit [*.net *.split]
banisterfiend` has quit [*.net *.split]
kaz_ has quit [*.net *.split]
Xzyx987X has quit [*.net *.split]
neocoin_ has quit [*.net *.split]
cldwalker has quit [*.net *.split]
Defusal has quit [*.net *.split]
chendo_ has quit [*.net *.split]
tubbo has quit [*.net *.split]
faces has quit [*.net *.split]
levifig has quit [*.net *.split]
kennyvb has quit [*.net *.split]
segy has quit [*.net *.split]
flebel has quit [*.net *.split]
ged has quit [*.net *.split]
_ko1 has quit [*.net *.split]
tallship has quit [*.net *.split]
knu has quit [*.net *.split]
musl has quit [*.net *.split]
jmcphers has quit [*.net *.split]
pabs has quit [*.net *.split]
mrsolo has quit [Quit: This computer has gone to sleep]
iamjarvo has joined #ruby-lang
codewrangler has joined #ruby-lang
towski has joined #ruby-lang
jtoy has joined #ruby-lang
rhodee has joined #ruby-lang
znz_v has joined #ruby-lang
alexkane has joined #ruby-lang
banisterfiend` has joined #ruby-lang
Xzyx987X has joined #ruby-lang
kaz_ has joined #ruby-lang
neocoin_ has joined #ruby-lang
faces has joined #ruby-lang
Defusal has joined #ruby-lang
tubbo has joined #ruby-lang
chendo_ has joined #ruby-lang
levifig has joined #ruby-lang
flebel has joined #ruby-lang
_ko1 has joined #ruby-lang
tallship has joined #ruby-lang
knu has joined #ruby-lang
musl has joined #ruby-lang
jmcphers has joined #ruby-lang
pabs has joined #ruby-lang
segy has joined #ruby-lang
ged has joined #ruby-lang
levifig has quit [Read error: Operation timed out]
flebel has quit [Max SendQ exceeded]
joooooo has quit [Quit: Leaving]
mrsolo has joined #ruby-lang
flebel has joined #ruby-lang
Xzyx987X has quit [Ping timeout: 255 seconds]
faces has quit [Ping timeout: 255 seconds]
ged is now known as Guest32931
setmeaway has joined #ruby-lang
virunga has joined #ruby-lang
nazty has quit [Read error: Connection reset by peer]
levifig has joined #ruby-lang
kennyvb has joined #ruby-lang
kennyvb has quit [Client Quit]
hynkle has joined #ruby-lang
kennyvb has joined #ruby-lang
alexkane has quit [Remote host closed the connection]
alexkane has joined #ruby-lang
cldwalker has joined #ruby-lang
future_chimp has quit [Quit: Leaving]
dc5ala has quit [Quit: Ex-Chat]
ryanf has joined #ruby-lang
Weems|test has quit [Ping timeout: 240 seconds]
Weems2 has joined #ruby-lang
Weems has quit [Ping timeout: 244 seconds]
jtoy has quit [Ping timeout: 255 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
bburcham has joined #ruby-lang
scientes has joined #ruby-lang
brianpWins has joined #ruby-lang
Leeky is now known as Leeky_afk
jtoy has joined #ruby-lang
Axsuul has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
deryl has quit [Quit: deryl]
jtoy has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby-lang
singpolyma has quit [Quit: Lost terminal]
naz has joined #ruby-lang
tbuehlmann has quit []
cantonic has quit [Ping timeout: 248 seconds]
dejongge has quit [Ping timeout: 240 seconds]
chimkan_ has joined #ruby-lang
dejongge has joined #ruby-lang
yxhuvud has quit []
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
dejongge1 has joined #ruby-lang
dejongge1 has quit [Client Quit]
solars has joined #ruby-lang
kvirani has joined #ruby-lang
yxhuvud has joined #ruby-lang
dv310p3r has quit [Ping timeout: 248 seconds]
<davidbalbert>
rue: thanks for the feedback. I posted a second version of the patch
kain has joined #ruby-lang
<davidbalbert>
I wasn't sure what you meant by combine the disasm docs. One of them is a class method and the other is an instance method. I think they work better as separate entities, but I also don't know if it's possible to combine the docs in a way that works for rdoc.
macmartine has joined #ruby-lang
<kristofferrr>
I'm getting 'undefined method `each' for "a":String' when I do '%w(a b c).each do |key| etc.' even though the same code works fine in another file. Any ideas what I've done wrong?
Criztian has quit [Remote host closed the connection]
Criztian has joined #ruby-lang
qpingu has left #ruby-lang [#ruby-lang]
Axsuul has quit [Read error: Connection reset by peer]
Axsuul has joined #ruby-lang
Criztian has quit [Ping timeout: 248 seconds]
jbwiv has quit [Remote host closed the connection]
dv310p3r has joined #ruby-lang
singpolyma has joined #ruby-lang
slyphon has joined #ruby-lang
mrsolo has quit [Quit: This computer has gone to sleep]
mrsolo has joined #ruby-lang
<apeiros_>
kristofferrr: it's not complaining about that each
<apeiros_>
%w() is an Array
<apeiros_>
but ruby complains about you calling each on a String
mrsolo has quit [Read error: Connection reset by peer]
rhodee has left #ruby-lang [#ruby-lang]
<kristofferrr>
That's what I was thinking, but the error is talking about that line. Guess I'll dig deeper and find the next loop then :P
tenderlove has quit [Remote host closed the connection]
jbwiv has joined #ruby-lang
jtoy has joined #ruby-lang
butchanton has quit [Quit: Leaving.]
jperry2 has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby-lang
sepp2k1 has quit [Remote host closed the connection]
aef has joined #ruby-lang
br4ndon has joined #ruby-lang
br4ndon has left #ruby-lang ["Lorem ipsum dolor sit amet"]
banisterfiend` has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
tonni_ has left #ruby-lang [#ruby-lang]
tonni has joined #ruby-lang
zoidfarb has joined #ruby-lang
zrail has left #ruby-lang [#ruby-lang]
<zoidfarb>
I'm new to ruby and I'm trying to build an XML document using REXML. Does anyone know how to create a CData node as a child of another node?
<ryanf>
except that alphabetical sorting is a pretty well-established and useful concept
<ryanf>
sorting a list of numbers not so much
<rue>
davidbalbert: I meant that if the usage and functionality is the same, you could just put a “See theothermethod for details”
<apeiros_>
ryanf: it's the same concept
<ryanf>
uh I mean
<ryanf>
sorting two lists of numbers
<ryanf>
well yes, you could use the same algorithm
<apeiros_>
ryanf: also, you can have non-alphanumeric bytes in the string too
<ryanf>
but it's much less obvious that that's the most useful way of doing it
<apeiros_>
ryanf: it *does* use the same algorithm
<rue>
davidbalbert: That way you don’t have to maintain it in two places. If they’re different, that’s a different matter of course
<ryanf>
apeiros_: I mean, you could define the ordering of an array of arrays to be the same as the ordering of an array of strings
<ryanf>
but one is a lot more intuitive, since people sort arrays of strings all the time and there's a general expectation of roughly how that will work
<RickHull>
er wait
<apeiros_>
ryanf: you compare individual elements until you either find one that differs or until one runs out of elements - if both run out of elements at the same time they're equal
<apeiros_>
ryanf: that's exactly what Array#<=> already does
<RickHull>
ryanf: i pasted your thing into irb wrong. those are comparable
<ryanf>
oh haha
<ryanf>
ok fine
<ryanf>
but if it weren't defined, that would be why ;)
<RickHull>
heh
<apeiros_>
ryanf: that's why you can use sort_by { |person| [person.first_name, person.last_name, …] }
<apeiros_>
because the resulting array of the block can be compared
<ryanf>
yeah, that looks handy actually
<RickHull>
so: unless there are two arrays that actually fail on the comparison operator, shouldn't Arrays include Comparable?
<apeiros_>
what you *can't* do is ary < ary, since Array#< is not defined. and Comparable is not mixed in (which would use <=> to provide <, <=, ==, >=, >)
<apeiros_>
RickHull: IMO it should
<ryanf>
oh I see
<apeiros_>
<=> is allowed to return nil
<ryanf>
yes, that's weird
<ryanf>
is returning nil the same thing as returning 0?
<apeiros_>
cf. 5 <=> "hi"
<apeiros_>
no
<apeiros_>
nil means "not comparable"
<ryanf>
oh
<apeiros_>
0 means ordering-equal
<RickHull>
interesting though
<ryanf>
yeah your example made that clear
<RickHull>
<=> can return TypeError
<apeiros_>
i.e., a <=> b means a == b
<RickHull>
er raise TypeError
<RickHull>
[3,4] <=> 5
<RickHull>
that's what i put into irb
<apeiros_>
RickHull: um
<apeiros_>
returns nil here
<RickHull>
ok, 1.8.7
<apeiros_>
good. improvement then IMO :)
mistym_meeting is now known as mistym
cczona has joined #ruby-lang
nazty has joined #ruby-lang
nazty has quit [Client Quit]
yxhvuud has joined #ruby-lang
cczona has left #ruby-lang [#ruby-lang]
tubbo has quit [Read error: Operation timed out]
musl has quit [Read error: Connection reset by peer]
knu has quit [Ping timeout: 255 seconds]
Axsuul has quit [Ping timeout: 255 seconds]
Axsuul has joined #ruby-lang
chendo__ has joined #ruby-lang
nazty has joined #ruby-lang
knu has joined #ruby-lang
chendo_ has quit [Read error: Connection reset by peer]
carloslopes has quit [Quit: Leaving.]
flebel has quit [Read error: Operation timed out]
yxhuvud has quit [Ping timeout: 255 seconds]
bassir has joined #ruby-lang
rhodee_ has joined #ruby-lang
tallship has quit [Ping timeout: 255 seconds]
musl has joined #ruby-lang
hynkle has quit [Read error: Operation timed out]
banisterfiend has quit [Read error: Connection reset by peer]
hynkle has joined #ruby-lang
banisterfiend has joined #ruby-lang
agile has joined #ruby-lang
igotnolegs has joined #ruby-lang
Bassir192 has joined #ruby-lang
kennyvb has quit [Read error: Operation timed out]
neocoin_ has quit [Ping timeout: 255 seconds]
Bassir192 has quit [Client Quit]
flebel has joined #ruby-lang
<bassir>
hey guys
<bassir>
I'm trying to write some code where the script looks at each column of a spreadsheet and i do something like a=0, until row(1).column(a).split().length==3, a+=1, end … but some rows are blank thus giving me an error because I can't perform split() on nil…
<bassir>
[4:13pm]
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
jperry2 has joined #ruby-lang
neocoin has joined #ruby-lang
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
rhodee_ has left #ruby-lang [#ruby-lang]
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
<bassir>
is anyone here?
tallship has joined #ruby-lang
bassir has left #ruby-lang [#ruby-lang]
bassir has joined #ruby-lang
<bassir>
I'm trying to write some code where the script looks at each column of a spreadsheet and i do something like a=0, until row(1).column(a).split().length==3, a+=1, end … but some rows are blank thus giving me an error because I can't perform split() on nil…
akira989 has quit [Remote host closed the connection]
shevy has left #ruby-lang ["I'll be back ... maybe"]
<RickHull>
make the split conditional
<RickHull>
e.g. split unless row is blank
akira989 has joined #ruby-lang
<rue>
Also, maybe CSV?
<bassir>
i did it
<bassir>
by adding the condition
<bassir>
row(1).column(a) !=nil && as a condition
<bassir>
That works, right?
Guest32931 has quit [Quit: WeeChat 0.3.8]
<RickHull>
keep in mind that nil is logically false
<RickHull>
so you often don't need to test that it is nil. row(1).column(a) is logically true if it's not false or nil
jarib has quit [Excess Flood]
<RickHull>
i.e. row(1).column(a) && ...
jarib has joined #ruby-lang
<bassir>
ah .okay
ryanf has quit [Quit: leaving]
<bassir>
what is the ruby word for abort?
<bassir>
like if. ____ else abort() ?
<bassir>
is it abort()
<bassir>
It would abort the script
<bassir>
and return an error
<bassir>
abort("Whoops!")
towski has quit [Remote host closed the connection]
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
<banisterfiend>
bassir: abort() is a strange word, honestly it barely sounds english to me, and somehow makes me see a spaceship in my minds eye
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
tooky has quit [Remote host closed the connection]
<drbrain>
davidbalbert: my only comment on your patch is that arguments should be +source+ (not _source_) and class and method names should be bare (for linking in HTML output)
<drbrain>
davidbalbert: I'll make these changes when I apply it
<davidbalbert>
cool
<davidbalbert>
i'm not sure i understand what you meant about bare method and class names
<davidbalbert>
in the call-seq? or elsewhere in the docs?
<davidbalbert>
drbrain: ^
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
92AAA88YQ has joined #ruby-lang
92AAA88YR has joined #ruby-lang
DEac- has quit [Ping timeout: 245 seconds]
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
hibariya has quit [Read error: Connection reset by peer]
hibariya has joined #ruby-lang
<drbrain>
for .compile, I'm changing "Takes _source_, a +String+ …" to "Takes +source+, a String …"
<davidbalbert>
i got that, i was confused by "class and method names should be bare (for linking in HTML output)"
<drbrain>
… no markup around "String"
diegoviola has quit [Read error: Connection reset by peer]
<drbrain>
sorry, I jammed a bunch of stuff together
<davidbalbert>
oh ok, got it
<davidbalbert>
should have read closer
DEac- has joined #ruby-lang
burgestrand has joined #ruby-lang
Criztian has joined #ruby-lang
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
kennyvb has joined #ruby-lang
kennyvb has quit [Max SendQ exceeded]
Sambalero has quit [Remote host closed the connection]
<burgestrand>
bassir: come again? I don’t get you I’m afraid.
<RickHull>
val = true; u.each { |i| val = false unless condition(u) and z == 2 }; val
<RickHull>
*condition(i)
slyphon has quit [Quit: WeeChat 0.3.7]
<RickHull>
you could write it using #inject/reduce to be fancy
<bassir>
If function(x) && something for x =[1,2,3]… in words, if something and something for all values of another something
chimkan___ has joined #ruby-lang
<davidbalbert>
and the last one is the IRB ticket from a while ago. I heard back from Keiju who said he's going to commit it at some point, but I'll ping him again if it sits for too long
chimkan___ has quit [Client Quit]
<drbrain>
davidbalbert: yeah, some maintainers are very slow
<davidbalbert>
oh btw, is there a public list of maintainers somewhere?
<drbrain>
I've got a 3 line patch on Net::SMTP waiting for a few months now
<davidbalbert>
heh
<bassir>
I want to do something like this,
<bassir>
if get_cell(2,u).split()[0] == "Summary" && get_cell(2,u) for u=[4,5,6]
<davidbalbert>
In the meantime, I'd like to see if I can add a "srcdir" property to RbConfig that holds the path to the ruby source from where the running ruby was compiled
<davidbalbert>
thx
<drbrain>
it's in the "version independent topics" section of the wiki
chimkan_ has quit [Read error: Operation timed out]
<drbrain>
I can imagine some uses for that
<davidbalbert>
i'd like to get pry-doc to compile the docs from your local install if the source exists
<davidbalbert>
(i talked with banisterfiend about this a few weeks ago)
<davidbalbert>
and knowing the source location would help quite a bit
* drbrain
nods
<davidbalbert>
it's also an excuse to learn autoconf/automake which i don't know nearly as well as I should
<RickHull>
bassir: truly, if you want to start with a collection of several values and arrive at a single result (e.g. true/false), you should just #inject or #reduce
<RickHull>
but my example above should be easier to understand at first
dju has joined #ruby-lang
<RickHull>
coverting to #inject should be trivial once you understand #inject
<RickHull>
reduce is an alias for inject
<bassir>
Well, what I'm ultimately trying to do is get 3 conditions under the same block of code, so I don't have to copy and paste the same code under 3 different elseif's
<RickHull>
did you understand what i provided?
mistym has quit [Remote host closed the connection]
<RickHull>
where val has the final result of applying the condition to all array members
<RickHull>
it assumes that all array members have to pass the condition, to yield a positive result
<bassir>
what's with the semicolon?
<bassir>
: val = true; u.each { |i| val = false unless condition(u) and z == 2 }; val
<RickHull>
multiple statements per line
<RickHull>
it's because of IRC netiquette
solars has quit [Ping timeout: 248 seconds]
<RickHull>
i would put each statement on its own line, but it's rude to dump so many lines into IRC
<RickHull>
also, remember i had a typo: should be condition(i)
dhruvasagar has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
<drbrain>
davidbalbert: looks like I can't shuffle any of these along ☹
RickHull has left #ruby-lang [#ruby-lang]
jackhammer2022 has joined #ruby-lang
sora_h is now known as s0ra_h
<bassir>
I'm writing a script to count words in cells of a spreadsheet. Is there any way I can get around errors that come up when trying to split().length nil and floats?
Criztian has quit [Ping timeout: 255 seconds]
hinbody has quit [Ping timeout: 244 seconds]
<drbrain>
only split if it's a String?
<bassir>
yes
<drbrain>
only split if it responds to split?
<bassir>
yes
<drbrain>
ok, so do it?
<bassir>
The problem is with the until loop that I'm running across an entire row.
<drbrain>
bassir: so also loop over the cells in a row
dv310p3r has quit [Ping timeout: 264 seconds]
bglusman has quit [Remote host closed the connection]
<drbrain>
bassir: or select the cells that you can split
<bassir>
x+=0, until cell(x,y).split().length =3; x+=1; end
<bassir>
but I get an error because I can't split() a nil
<bassir>
or a floating point
<drbrain>
bassir: you can use "next" to skip a cell if it is not splittable
<bassir>
I got it, nevermind.
<bassir>
By the way, how many elsif's are you allowed to have?
<drbrain>
bassir: how much memory does your machine have?
<bassir>
Ah, okay.
<virunga>
42
<bassir>
lol 42
<virunga>
ahaha
<davidbalbert>
drbrain: that's okay i think both of them probably should belong to _ko1. I can ping him at some point once they've sat there for a little longer
akira989 has quit [Remote host closed the connection]
<drbrain>
_ko1 is sometimes busy, so bugging him in a week or so may help
akira989 has joined #ruby-lang
agilob has quit [Ping timeout: 252 seconds]
Sambalero has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
agilob has joined #ruby-lang
kennyvb has joined #ruby-lang
tooky has joined #ruby-lang
<drbrain>
dammit, I had an idea and now I've lost it
workmad3 has quit [Ping timeout: 246 seconds]
zoidfarb has quit [Quit: Leaving.]
tooky has quit [Remote host closed the connection]
tooky has joined #ruby-lang
hinbody has joined #ruby-lang
tooky has quit [Ping timeout: 276 seconds]
kvirani has quit [Remote host closed the connection]
rue_XIV has joined #ruby-lang
towski has joined #ruby-lang
beawesomeinstead has quit [Max SendQ exceeded]
beawesomeinstead has joined #ruby-lang
rue has quit [Ping timeout: 248 seconds]
chendo_ has joined #ruby-lang
TylerGillies has left #ruby-lang [#ruby-lang]
kain has quit [Quit: quit]
mistym has joined #ruby-lang
towski has quit [Remote host closed the connection]
akira989 has quit [Remote host closed the connection]
seanstickle has joined #ruby-lang
yxhvuud has quit [Ping timeout: 264 seconds]
akira989 has joined #ruby-lang
htroyack has joined #ruby-lang
chendo_ has quit [Quit: Computer has gone to sleep.]
wpaulson has quit [Read error: Connection reset by peer]
wpaulson_ is now known as wpaulson
<jtoy>
silly question, what is wrong with the syntax here: ruby -rjson -e "ARGF.each_line{|l| j=JSON.parse(l) rescue nil; if j && !j['verified']; puts j['statuses']; else; puts 0; end }"
<jtoy>
it is getting interpreted as bash: -bash: !j['verified']: event not found
woollyams has quit [Quit: Computer has gone to sleep.]
<postmodern>
jtoy, escape the !
virunga has quit [Quit: Sto andando via]
<erikh>
don't double-quote your code
<erikh>
single quote it
<erikh>
and double quote the fields inside of the single quotes
<erikh>
pro tip (tm)
<drbrain>
jtoy: or, put single quotes on the outside and double quotes on the inside
<erikh>
^
<jtoy>
what is the difference between " '' " vs " '' " ?
S1kx has quit [Read error: Connection reset by peer]