<georgerb>
Can you guys tell me about any official Ruby certificate? (sorry for my english btw)
<epitron>
the Epitron School of Ruby would be happy to certify you
<epitron>
our certificates run anywhere from --- $900 for basic ruby, to $5000 for a full rails certification
<georgerb>
epitron, thanks for the fast reply, I will check it out ^_^
<rue>
:D
<lianj>
^^
<epitron>
no problemo!
<petercooper>
Yeah, the Epitron school is one of the best
<georgerb>
xD
<epitron>
it's a very prestigious and selective institution, so there is no website
<rue>
epitron: You need to work on your trolling
<georgerb>
hehehe
<petercooper>
I heard they also offer a masters degree in bullshit
<epitron>
we don't want to get overrun with applicants
<envygeeks>
oh shhi
<rue>
Your pricing implies Rails is a rarer skill than Ruby, and that's obviously incorrect
tenderlo_ joined #ruby-lang
<petercooper>
I wondered that but then realized it's because the median Rails dev is stupid enough to pay it.
<rue>
Ah, true
<epitron>
;)
<petercooper>
I say median because you are all awesome, of course
<epitron>
also, companies pay for this stuff
<epitron>
and companies want rails sites
<epitron>
i'm using the same system as microsoft
<envygeeks>
What did I say about using rails? Life is meant to be hard, so build everything from the ground up, rewrite it 30 times and stop using new relic
tenderlo_ joined #ruby-lang
* epitron
revokes envygeeks' certificate
<georgerb>
epitron, xD
saLOUt joined #ruby-lang
StevenRingo joined #ruby-lang
georgerb left #ruby-lang
<rue>
epitron: Great disrupt/pivot idea: revocable certificates
<rue>
Universities'll love it.
andrewvos joined #ruby-lang
<andrewvos>
omfg
<andrewvos>
My irssi instance crashed apparently
<andrewvos>
First time in like 6-8 months
<epitron>
in -2 months
<andrewvos>
epitron: how so?
<epitron>
infix operator
<andrewvos>
epitron: You lost me
<drbrain>
6 - 8 = -2
replore_ joined #ruby-lang
* epitron
gives drbrain a gold star
<epitron>
hah.. i was reading something about teaching the other day, and apparently boys and girls need different rewards
<rue>
Days without a restart: -60
<Asher>
different rewards b/c we tell them that boy rewards don't plug into girls and vice versa
<epitron>
girls tend to be a bit insecure, so you have to be supportive and encouraging
<Asher>
gender is programmed
<andrewvos>
sexist
<epitron>
while boys tend to be egotistical, so support makes that worse
<epitron>
they need to be brought down to earth a bit
<steveklabnik>
boy/girl is a false dichotomy. ;)
<epitron>
butch/femme
<epitron>
whatever you wanna call it
<Asher>
haha
<envygeeks>
what happens if I have both parts?
<andrewvos>
magic?
<steveklabnik>
parts have nothing to do with gender.
<steveklabnik>
;)
<epitron>
parts do have a little to do with gender
<steveklabnik>
nope
<steveklabnik>
zero.
<andrewvos>
Pretty sure they do?
<epitron>
yeah, they kinda do
<steveklabnik>
gender is about presentation
<steveklabnik>
sex is about parts.
<rue>
Really, just label everything top/bottom and let people switch :/
<steveklabnik>
totally separate axes
<epitron>
gender: n. the properties that distinguish organisms on the basis of
<epitron>
their reproductive roles;
<Asher>
top/bottom/versatile makes way more sense than male/female :P
<Asher>
but really it's waht male/female come down to
<Asher>
that and babies :P
<steveklabnik>
Gender is a range of characteristics used to distinguish between males and females, particularly in the cases of men and women and the masculine and feminine attributes assigned to them.
<Asher>
gender is what we get when we map political relations by the uterus
<steveklabnik>
Depending on the context, the discriminating characteristics vary from sex to social role to gender identity.
<rue>
Gender is a grammar thing.
<steveklabnik>
;)
phlipper joined #ruby-lang
Heimidal_ joined #ruby-lang
<epitron>
wow
<epitron>
you're putting a lot of shit into that one word
<Asher>
grammar?
<epitron>
i hope it can hold it
<rue>
Asher: Sex is biology, gender is grammar
<Asher>
grammar is what holds
<Asher>
rue - nah sex is the immanence of desire, gender is its grammar
<Asher>
biological is a product of gender
<Asher>
biology rather
<andrewvos>
immanence?
<envygeeks>
sweet, I started a war
<Asher>
immanence = like sun flares
<envygeeks>
I've been planning this carefully all day
<Asher>
energy welling up
<Asher>
biology is the systematization of the grammar of vital processes
<Asher>
vital processes are instances of negative entropy
<jensn>
All great languages have at least four genders.
<Asher>
four?
<rue>
And lots of sex!
<jensn>
Asher: Four, yes.
cjs226 joined #ruby-lang
<Asher>
masculine, feminine, neuter sometimes, waht would be the fourth
<envygeeks>
Male, Female, Unicorn and Wizard?
<Asher>
i mean i know there are languages that have like 17 genders (thai i believe it is)
<jensn>
masculine, feminine, neuter, uter.
<Asher>
uter?
<envygeeks>
what is uter?
<andrewvos>
fuck
<andrewvos>
I don't even
<steveklabnik>
lol
<jensn>
Asher: Thai doesn't even inflect for genders.
<Asher>
right they aren't grammatical genders
<Asher>
they are genders of bodies
<samuelkadolph>
I thought this was #ruby-lang and not #lang
<steveklabnik>
ActiveGender
<Asher>
language theory is always relevant
<steveklabnik>
::Inflector
<steveklabnik>
;)
<andrewvos>
I don't understand how I come here, say that my irssi session has died, and then this.
<Asher>
you didn't gather that we were talking about you?
<steveklabnik>
hahahahahahah
<envygeeks>
Are you a wizard?
<jensn>
I wish I was.
<andrewvos>
Yes. Yes I am envygeeks.
<andrewvos>
I can magic up some crazy shit in a chatroom in seconds.
<erikh>
drbrain: I'm interested to see what your append method is like
<drbrain>
but, I think (dircproxy | znc) > ec2
<erikh>
* > ec2
<drbrain>
dircproxy or znc on ec2 + local IRC is better
<andrewvos>
drbrain: How so?
<drbrain>
andrewvos: it's easier and more efficient to get IRC running on a random device than a shell
<andrewvos>
hmm
<andrewvos>
ok :0
lightcap joined #ruby-lang
<andrewvos>
:0=:)
<andrewvos>
typing one handed
<erikh>
that is a man with a very odd top hat
<drbrain>
erikh: it's the head of his greatest enemy
<erikh>
dark
<erikh>
it must be beer:30
uniqanomaly joined #ruby-lang
<drbrain>
with SSH I need to type in a huge-ass password or get public keys moved around everywhere
<drbrain>
with IRC I connect with a stupid dumb password
<rue>
IRC > SSH
<erikh>
I think znc can do the oftc cert thingy
<erikh>
and sasl if you're feeling masochistic
looopy joined #ruby-lang
kalleth joined #ruby-lang
wyhaines joined #ruby-lang
sulo joined #ruby-lang
magicbeef joined #ruby-lang
magicbeef left #ruby-lang
ryanf_ joined #ruby-lang
imajes joined #ruby-lang
resetexistence joined #ruby-lang
reset joined #ruby-lang
andrewhl joined #ruby-lang
jkyle joined #ruby-lang
yfeldblum joined #ruby-lang
marcostoledo joined #ruby-lang
macmartine joined #ruby-lang
Pip joined #ruby-lang
Pip joined #ruby-lang
<imperator>
ffi and solaris, just not getting along :(
<mitchty>
heh, solaris is never easy
looopy joined #ruby-lang
sulo joined #ruby-lang
headius joined #ruby-lang
wyhaines joined #ruby-lang
jkyle joined #ruby-lang
looopy joined #ruby-lang
gregmoreno joined #ruby-lang
magicbeef joined #ruby-lang
magicbeef left #ruby-lang
curtism joined #ruby-lang
artOfWar joined #ruby-lang
looopy_ joined #ruby-lang
macmartine joined #ruby-lang
<mitchty>
i'm drawing a blank, what was the gem that inserted comments after you feed it stupid simple ruby files with the lines output?
<mitchty>
as comments iirc
jkyle joined #ruby-lang
<drbrain>
irb ?
jkyle joined #ruby-lang
livinded joined #ruby-lang
<mitchty>
https://gist.github.com/1441323 no like that basically, only just throw the comments into the file, and not read on $stdin for example
<mitchty>
i thought there was a gem already that basically did that and updated the ruby file with comments after it, it might just be me smoking something though
<whitequark>
I don't see anything in pathname lib which would help me
srbaker joined #ruby-lang
amerine joined #ruby-lang
<drbrain>
whitequark: ignore all relative paths
<drbrain>
whitequark: or, add the website root to the user path then ignore if it's not still under the website root
<envygeeks>
if I was brave enough to accept something as dangerous as that url I would record my root path and then expand_path the accepted input and compare the starts with starts_with
<envygeeks>
or create a glob of accepted files in the folder you want and check against that glob
x0F_ joined #ruby-lang
Kichael joined #ruby-lang
* imperator
though chroot calls and/or jails made that sort of crap impossible anyway
<postmodern>
imperator, adding significantly annoying post_install_message, to hopefully people will migrate off
rohit joined #ruby-lang
<imperator>
postmodern, excellent
<postmodern>
imperator, try installing it now
simon_weber joined #ruby-lang
<imperator>
postmodern, so, you're saying it's deprecated? :-P
<postmodern>
imperator, do you think i should copy/paste those lines some more :)
<shevy>
"[...] we both agreed that Ruby's blocks are amazing design but for many reasons don't work that well in Python in its current design."
<roadkith>
whats "the direction python is heading"?
<shevy>
not sure
<shevy>
but I think other languages can learn from that
<shevy>
the python2 to python3 transition seems to be more pain than ruby 1.8 to 1.9 transition
<shevy>
"Obviously the big change in Python 3 is how Unicode is being handled. While it appears that forcing Unicode on everybody is great, it's also a very unrealistic view of the world."
<shevy>
Hah!
<shevy>
Encodings!
<shevy>
take that lianj !!!
<shevy>
:P
<roadkith>
In fact if you go back in time and look at some of the first versions of Python it's a very, very ugly language and it does not come as a surprise that not too many people took notice of Python in the early days. <--hahaha :D
<shevy>
well actually...
<shevy>
perl5 to perl6 also seems to have many people who don't want to switch to perl6
<shevy>
I had a perl developer say that. He continues to contribute to the perl 5 codebase and just does not care about perl 6 at all. He said it was like a different language (for him)
<roadkith>
oh there will always be those ppl that condemn new technology as evil :D
<shevy>
roadkith I often wonder what early ruby looked like :)
<roadkith>
anyone who doesnt care for future technology is going to not cut it anymore at some point :D
<steveklabnik>
The catch - implicitly invoking a block from within another block does not work
<heftig>
yield is associated with methods.
<heftig>
procs don't have that "invisible" proc variable
<heftig>
s/proc variable/block variable/
krz joined #ruby-lang
<Wardrop_>
I'm sure I've seen DSL which seem to make this work.
<Wardrop_>
Unless they were using #define_method
Guest35080 joined #ruby-lang
mksm joined #ruby-lang
jensn joined #ruby-lang
JosephRuby joined #ruby-lang
<JosephRuby>
anyone step a unix noob thru getting gnome2/gtk2 installed w/ rvm on ubuntu?
<JosephRuby>
or have a good link?
<JosephRuby>
I am drawing blanks on google :(
mark_locklear joined #ruby-lang
malev joined #ruby-lang
KU0N joined #ruby-lang
<KU0N>
hello
<KU0N>
I've been googling for a bit now, but I can't find how to call a method with current bindings. like def foo; puts a;end a = 4; foo ; #which should print 4
Pip joined #ruby-lang
Natch| joined #ruby-lang
<steveklabnik>
KU0N: you'd have to pass the binding in.
<steveklabnik>
JosephRuby: telling us your errors (in pastie) would help
<KU0N>
steveklabnik: yea, but how?
<steveklabnik>
KU0N: one second, lemme whip up an example
<KU0N>
steveklabnik: thanks a lot. I've been hitting the wall for a while now.
<shevy>
KU0N so that was that odd noise in the other house!
<shevy>
roadkith dunno, sometimes when I write code, I don't think. When I am not in front of the computer though, I think much better suddenly
<yango>
how to do so?
<KU0N>
I'll try to figure out another solution
<roadkith>
shevy: same here
<steveklabnik>
yango: one second
<KU0N>
steveklabnik: thanks a lot for the help. At least you convinced me not to do it this way
<JosephRuby>
steveklabnik: my error is that I don't have gtk2 installed, which I need for a project, Ive googled rvm + gtk2 and everything that comes up is other people asking the same question w/o results.
<shevy>
hehe
<shevy>
JosephRuby ruby-gtk works
<shevy>
but perhaps people should consider stop using rvm
<yango>
I would like :do_a and :do_b to be selectors of the items the user is interested in. So a yield for the interesting items looks like a right thing to try
<erikh>
it won't take very large arrays to get that to explode
<erikh>
also it'll blow up first hit because there's no defaulted arguments
<yango>
steveklabnik: you aren't using selector anywhere
<erikh>
but that's trivial to fix
<yango>
erikh: it's currently working for small arrays
<erikh>
horseshit
<steveklabnik>
yango: yeah, just giving you a start. you can then use selector inside the enumerator.new call
<erikh>
anyhow, gone
<yango>
erikh: okay, but it is...
<erikh>
you have an arity mismatch
<yango>
erikh: depends on where
<yango>
steveklabnik: okay
<erikh>
you never hit the second block and you're on 1.9 then
<erikh>
anyhow, I need to get work done
<erikh>
err, 1.8
robbrit joined #ruby-lang
sepp2k joined #ruby-lang
wyhaines joined #ruby-lang
<yango>
I am in 1.8 indeed, where is the arity mismatch?
tommyvyo joined #ruby-lang
mksm joined #ruby-lang
Manhose_ joined #ruby-lang
Manhose__ joined #ruby-lang
dRbiG left #ruby-lang
Natch| joined #ruby-lang
<erikh>
in your call to iterate()
Manhose_ joined #ruby-lang
dRbiG joined #ruby-lang
<jtoy>
whats a nicer way to create a string of x 1k times? i do this now: (1...1000).collect{|x| "hi " }.join(" ")
mdel joined #ruby-lang
<steveklabnik>
"x * 1000
<steveklabnik>
"x " * 1000
<steveklabnik>
really
<shevy>
hehe
<jtoy>
cool
<jtoy>
reakky?
<jtoy>
really?
<erikh>
yep
<shevy>
jtoy also you should use irb
<erikh>
there's an off by one in that range too I think
<jtoy>
shevy: i do, i meant "what was meant by really earlier", not "does that really work"
<steveklabnik>
i didnt notice your example had a space
<steveklabnik>
and i'm still finishing cup of coffee #1
<jtoy>
ic
<jtoy>
i practically live in irb all day long
workmad3 joined #ruby-lang
tomzx joined #ruby-lang
Manhose__ joined #ruby-lang
<andrewvos>
jtoy: That's nice. I live in HELL
jensn joined #ruby-lang
<workmad3>
andrewvos: sounds nice and warm
aleksi joined #ruby-lang
<jtoy>
andrewvos: how so? java?
Austin__ joined #ruby-lang
boodle joined #ruby-lang
<aleksi>
Hello. Why "a = a", where "a" is undefined, is a valid Ruby code?
<Austin__>
It's a bit of a parsing behaviour that's held over for years.
slyphon joined #ruby-lang
<yango>
is that the only place where autovivification occur¡s?
<Austin__>
Sort of.
<Austin__>
in irb, type: b = a
<Austin__>
then b
<yango>
yes b is nil
<Austin__>
you'll see that b is nil.
<Austin__>
so it's not that a = a is special, but that assignment is special.
<workmad3>
'a = ...' defines a
<yango>
but defines it to an undefined value
<yango>
it could perfectly error out
<workmad3>
yango: it defines a and defaults it to nil
<workmad3>
but yes, things can then error out in the ... and leave a as nil :)
saLOUt joined #ruby-lang
thrcka joined #ruby-lang
<aleksi>
thanks!
outoftime joined #ruby-lang
Manhose joined #ruby-lang
Manhose_ joined #ruby-lang
MistyM joined #ruby-lang
duckinator joined #ruby-lang
rippa joined #ruby-lang
<yango>
http://pastie.org/2980838 <--- I don't mind entering an infinite loop, I just want that if an exception is raised, to retry (done is initted above). I'm sure this can be written in better Ruby
dnjaramba joined #ruby-lang
<workmad3>
yango: you mean maybe with 'until done' ?
<yango>
okay, okay
<yango>
but I'm looking for more deep improvements :)
<yango>
yes, and that's deeper, not more deep
<yango>
:)
<workmad3>
yango: well, you can pull some parts out... you start off with 'done=false' before the loop, right?
<yango>
yes
<workmad3>
yango: then you don't need to set it to false again in the rescu
<yango>
ideally, I'd like to abstract this construct to put whatever Proc I want in it to be retried
wyhaines_ joined #ruby-lang
niklasb joined #ruby-lang
stepnem joined #ruby-lang
Manhose joined #ruby-lang
imajes joined #ruby-lang
jkyle joined #ruby-lang
macmartine joined #ruby-lang
cristian joined #ruby-lang
leonL joined #ruby-lang
niklasb_ joined #ruby-lang
shevy joined #ruby-lang
kmeehl joined #ruby-lang
RomD` joined #ruby-lang
<shevy>
hmm
andrewhl joined #ruby-lang
Silowyi joined #ruby-lang
<rue>
yango: How about retry?
<rue>
def foo; yield; rescue Blah; retry if meh; end
arooni-mobile joined #ruby-lang
<rue>
Unless you have some external condition, though, you'll still need a counter or something for the retry
kmeehl joined #ruby-lang
arooni-mobile joined #ruby-lang
heppy joined #ruby-lang
retro|cz joined #ruby-lang
oilpastels joined #ruby-lang
KU0N joined #ruby-lang
looopy joined #ruby-lang
slyphon joined #ruby-lang
nofxx joined #ruby-lang
<andrewvos>
jtoy: No, php :)
petercooper joined #ruby-lang
workmad3 joined #ruby-lang
srbaker joined #ruby-lang
beiter joined #ruby-lang
<yango>
rue: total ruby newbie, so not familiar with many idioms/libs
kitallisii joined #ruby-lang
<erikh>
while yield
<erikh>
return nil to stop the loop
<erikh>
(or false, I suppose)
<erikh>
the only advantage I see over the exception based approach is that you're not using exceptions for flow control
<erikh>
depending on who you talk to, that matters
<yango>
I want it to retry until it either succeeds or the process dies
<erikh>
while !yield
<erikh>
:P
<erikh>
anyhow, there are some options there
<erikh>
use what you think is best
<rue>
erikh: That assumes you've control over what the block returns
Dreamer3 joined #ruby-lang
<rue>
Which would probably be a reasonable assumption
<rue>
yango: How do you know if the “process dies”?
<rue>
I've not followed far up if you mentioned that before
<rue>
Generally, def retry_until_success; yield; rescue WhateverError; retry; end
Z3RO_ joined #ruby-lang
<rue>
If you're dealing with exceptions, that is, not return values
<yango>
rue: the process itself doesn't know
<yango>
it's actually an infinite loop if it always fails
<petercooper>
Thank you Mario, but our process is in another server!
<MistyM>
Aha! It's a MatchData object, not a string.
<MistyM>
You can #to_s it to get the matched string.
singpolyma joined #ruby-lang
<spyvrsspy>
lol
<spyvrsspy>
cool awesome thanks
Pupeno- joined #ruby-lang
benanne joined #ruby-lang
<shevy>
MistyM, how long have you been using Ruby?
<MistyM>
shevy: Since, like... April? I guess?
<shevy>
whoa
<shevy>
that's not that long
<spyvrsspy>
ruby is tough
<spyvrsspy>
I just started less then a month ago
<MistyM>
Yeah, I feel like I've been learning pretty quickly. Ruby's my first "real" programming language.
<rippa>
as opposed to what?
<MistyM>
I dabbled in QBasic as a kid? :b
<shevy>
:(
<MistyM>
I did a little bit of Photoshop scripting and (ugh) AutoIt, but I approached them just from the angle of doing specific tasks, so I muddled through the syntax without really getting an understanding of a lot of what I was doing.
<shevy>
I started with perl, then PHP ... and even after all the years in Ruby, I am just barely better than newcomers
<rippa>
MistyM: I did Spectrum BASIC a bit as a kid
<rippa>
BASIC is cool as a first language
<rippa>
Pascal too
<MistyM>
shevy: If you grok perl, I don't think you have to worry about your coding bona fides. ;)
<MistyM>
rippa: Yeah, it was great that computers actually came with something kids could get started with back in The Day.
<rippa>
I also tried assembler
<rippa>
but it was too hard
<rippa>
for 7 y.o. me
saysjonathan joined #ruby-lang
<yango>
as they say, you can have either ten years of experience or one year of experience relived 10 times
<MistyM>
rippa: I think asm is beyond most 7 year olds!
<shevy>
hmm
<shevy>
I think the better language makes it easier to learn and understand
<rippa>
MistyM: I only managed to copy several programs and output something on screen
cynosure joined #ruby-lang
sepp2k1 joined #ruby-lang
<rippa>
*copy from book by hand
heppy joined #ruby-lang
butchanton joined #ruby-lang
<Caius>
https://gist.github.com/1443973 <- From my understanding of the method dispatching in ruby, I'd expect that to throw two NoMethodErrors. Any ideas why it doesn't?
leonL joined #ruby-lang
ttilley joined #ruby-lang
<Caius>
nm, remembered about eigenclass of class being a super
<Caius>
and it makes sense
solars joined #ruby-lang
rayners joined #ruby-lang
<shevy>
hehe
<shevy>
I so hate the word eigenclass
Defusal joined #ruby-lang
ttilley joined #ruby-lang
heftig joined #ruby-lang
geoffw8_ joined #ruby-lang
lightcap joined #ruby-lang
slackstation joined #ruby-lang
shivamib joined #ruby-lang
Weems joined #ruby-lang
<workmad3>
shivamib: what do you have against eigenclasses?
<workmad3>
shevy: ^^
<workmad3>
(tab-complete #fail)
<shevy>
workmad3 the word "eigen", it means self in german
<shevy>
so its always selfclass
<shevy>
so if I translate Caius ... he said ... "eigenclass of class being a super"
<shevy>
wtf :D
<shevy>
sorry
<shevy>
"selfclass of class being a super"
<shivamib>
heh
<workmad3>
shevy: in a way, it makes sense though :)
<workmad3>
shevy: and it's certainly less confusing than singleton class
<shevy>
singleton exists only once or?
<shevy>
a singleton class could have an eigenclass or?
<workmad3>
shevy: singleton class is another term (the one actually in ruby now, annoyingly) for eigenclass
<shevy>
oh man
<workmad3>
shevy: some_object.singleton_class
<workmad3>
that gives you the eigenclass
<shevy>
can't I do object.eigenclass_class
<shevy>
well ok
<shevy>
still on 1.8.7 here :\
<workmad3>
shevy: I suppose you could alias singleton_class to eigenclass
hahuang65 joined #ruby-lang
<shevy>
what is some_object.singleton_class returning?
<workmad3>
shevy: it's the same as doing class << some_object; self; end
<shevy>
you know what we need
<shevy>
a simplified ruby for kids
<shevy>
Alan Kay should have promoted that, rather than smalltalk :)
<workmad3>
heh
<shevy>
hmm
<shevy>
"object.singleton_class" is the same as "class << some_object; self; end" ?
<shevy>
oh wait
<shevy>
"object.singleton_class" is the same as "class << object; self; end" ?
<shevy>
sorry, I had to get rid of "some_"
<workmad3>
shevy: yeah :)
<shevy>
hmm
<shevy>
interesting
<shevy>
it actually is more readable to my old eyes
looopy_ joined #ruby-lang
darkf joined #ruby-lang
queequeg1 joined #ruby-lang
nuclearsandwich joined #ruby-lang
Pip_ joined #ruby-lang
Pip_ joined #ruby-lang
lightcap joined #ruby-lang
jasox joined #ruby-lang
jmontross joined #ruby-lang
imperator joined #ruby-lang
workmad3 joined #ruby-lang
lsegal joined #ruby-lang
retro|cz joined #ruby-lang
robbrit joined #ruby-lang
sodani joined #ruby-lang
<sodani>
if I have a Nokogiri::XML::Element, that contains a particular attribute, which is {name = "id", value = "bar" }, does anyone know how I can pull out the value?
<steveklabnik>
[]
<rue>
elem[:value], in particular. I never remember if it only accepts symbols or if I'm cargo-culting that
<steveklabnik>
it's not very much like a hash
<steveklabnik>
i tried to use #fetch the other day, didnt work, i was bummed.
<rue>
Also, it's not *actually* called value, is it? :/
<sodani>
in the Nokogiri::XML::Element object, it's called value
macmartine joined #ruby-lang
<sodani>
in the html it looks like id="bar"
<steveklabnik>
right
<steveklabnik>
so it's [:id]
<steveklabnik>
then.
<sodani>
hmm, but [:id] is returning nil
<steveklabnik>
"id"
<steveklabnik>
?
<sodani>
same thing
<sodani>
actually [] works but only for the child element
<sodani>
not decendents
<rue>
Well, maybe they don't have the attribute?
<steveklabnik>
right.
<sodani>
not sure if I'm following. I can see that there's a decendent attribute named "id"
solars joined #ruby-lang
<sodani>
in the output
<rue>
I'm not sure what that means. What's the XML look like?
<steveklabnik>
and DeveloperWorks is usually pretty good
<rue>
That one's quite reasonable
thrcka joined #ruby-lang
<sodani>
i'll take a look
Jake232 joined #ruby-lang
ttilley joined #ruby-lang
ttilley joined #ruby-lang
robbrit left #ruby-lang
ttilley joined #ruby-lang
ttilley joined #ruby-lang
Dreamer3 joined #ruby-lang
roha joined #ruby-lang
Aphelion joined #ruby-lang
queequeg1 joined #ruby-lang
towski joined #ruby-lang
wallerdev joined #ruby-lang
Weems joined #ruby-lang
Pupeno joined #ruby-lang
RomD` joined #ruby-lang
kyrylo joined #ruby-lang
srbaker joined #ruby-lang
Pupeno joined #ruby-lang
Pupeno joined #ruby-lang
yfeldblum joined #ruby-lang
senj joined #ruby-lang
yfeldblum joined #ruby-lang
<zenspider>
rawr
workmad3 joined #ruby-lang
roha joined #ruby-lang
saLOUt joined #ruby-lang
<dreinull>
the biggest joke in writing tests is that I have to fix my test once I get to test my code.
<dreinull>
hi zenspider, is autho.me still being worked on?
<dreinull>
the website was kinda unresponsive when I tried yesterday
<zenspider>
dreinull: I have no idea what you're talking about
<dreinull>
zenspider: sorry, that was zed shaw
<shevy>
hehe
<rue>
dreinull: zedas, not ^
<shevy>
they all start with ze
<dreinull>
for some reason I mixed you up...
<dreinull>
anyway, I do use minitest right now
ivanthuja joined #ruby-lang
<dreinull>
so thanks for that zenspider!
<zenspider>
I _love_ being confused with zed
<dreinull>
:)
<yfeldblum>
write the tests and then write the code to make the tests pass (no matter how crazy the tests); in case the tests do not compile, first write the compiler to make the tests compile ... Test Driven Dumb
towski joined #ruby-lang
<ReinH>
...
<rue>
Dumb-driven testing?
<ReinH>
don't confuse a problem with TDD with your own incompetence
<shevy>
hehe
<andrewvos>
Some of the people I work with are forced to do TDD, and they hate it. I call it Hate Driven Development
<shevy>
real men don't need to test
<ReinH>
that again is not a problem with TDD
<ReinH>
it's a problem with forcing people to do things
<andrewvos>
ReinH: Who me? I'm not arguing that it is.
<andrewvos>
ReinH: That's a human problem.
<ReinH>
right
<andrewvos>
The problem only exists till they have their first testing epiphany.
<shevy>
what epiphany is that?
<dreinull>
testing is good. I don't argue against that but tests do consist of error prone code.
<shevy>
hmmm
<shevy>
how would one go about trying to do something like Microsoft's PowerShell with ruby?
<shevy>
most specifically... to pipe objects rather than text
<steveklabnik>
you dont.
<rue>
Been there
<steveklabnik>
l2unix
<steveklabnik>
otherwise, Marshall.dump
<steveklabnik>
;)
<shevy>
hmm
<rue>
I figure the best way to do it is to allow plugins to transform i/o
nuclearsandwich joined #ruby-lang
<rue>
For anything that doesn't support anything but text i/o, that is. That's where I was taking rs but meh.
fayimora joined #ruby-lang
outoftime joined #ruby-lang
<rue>
So effectively ls | meh becomes meh(objectify(ls))
<andrewvos>
steveklabnik: l2unix hahaha
<rue>
Well, except it's still as stream, not a single object
<rue>
BUT ANYWAY
<andrewvos>
shevy: That TDD is faster, and better.
<shevy>
rue hmmm
<shevy>
andrewvos I think I still have to wait for an epiphany related to piping objects :(
<shevy>
time to eat and ponder
gix joined #ruby-lang
<lupine_85>
shevy, r, w = IO.pipe ; w.puts(random_object.to_json) ; JSON::parse(r.gets)
<lupine_85>
om nom nom :)
<drbrain>
may as well use Marshal
kyrylo joined #ruby-lang
<rue>
May as well just not pipe it
postmodern joined #ruby-lang
tenderlove joined #ruby-lang
<andrewvos>
If in doubt, pipe it
livinded joined #ruby-lang
Manhose joined #ruby-lang
lightcap joined #ruby-lang
singpolyma joined #ruby-lang
retro|cz joined #ruby-lang
outoftime joined #ruby-lang
Pip joined #ruby-lang
wallerdev joined #ruby-lang
macmartine joined #ruby-lang
headius joined #ruby-lang
geoffw8_ joined #ruby-lang
hagabaka joined #ruby-lang
Manhose_ joined #ruby-lang
nofxx joined #ruby-lang
woollyams joined #ruby-lang
scottschecter joined #ruby-lang
<zenspider>
rawr
<zenspider>
headius: oi!
<headius>
hey there!
<zenspider>
I've committed my test excludes code
<zenspider>
seeing if it's pushed out yet
<zenspider>
yup
<headius>
sweet, I'll have a look
<headius>
I just got most of our CI builds clean and green again, so I'm looking to mess them up with a new influx of tests
QaDeS joined #ruby-lang
fragrant joined #ruby-lang
fragrant left #ruby-lang
<zenspider>
heh
<zenspider>
looks good to go. take a whack at it. I'd like to release soon
<zenspider>
I just forced my sync scripts to push the rest of my commits up
petercooper joined #ruby-lang
<headius>
ok
<zenspider>
time to take my kittens back to the shelter... bbl
fragrant joined #ruby-lang
macmartine joined #ruby-lang
<rue>
headius: Hopefully your tests are up to snuff now ;)
<fragrant>
Hi, i have to ask a newbie question , obj[:key] , is it a array or hash ? How can i check whether it's empty or not , blank or not has an element or not ?
<rue>
fragrant: An Array is indexed by integers
<zenspider>
fragrant: ri Array
<zenspider>
ri is your friend (tm)
<zenspider>
ri Hash
<headius>
rue: you can never have enough tests
<rue>
headius: You can have too many tests, if they're not well-made
<rue>
Well-known fact, better to have none
<jmontross>
better to have tests. that is not a fact.
<rue>
Too
<headius>
hey, no tests, no bugs
<headius>
no users no bugs
<rue>
Everybody wins!
<fragrant>
obj[:key] , here key is not integer, rather a string, so is it array or hash ?
<headius>
that's why I strongly recommended that other ruby impls never have any users
<headius>
it's so much easier that way
<srbaker>
jmontross: better to have no tests at all than to have poor tests
<fragrant>
I can't understand what do after ri Array , zenspider
<jmontross>
if you were going to have poor tests…. maybe you aren't writing code for others to read and improve very easily
macmartine joined #ruby-lang
<fragrant>
It's confusing, is there any function named .blank? ?
<steveklabnik>
fragrant: in rails there is
<steveklabnik>
part of activesupport
<fragrant>
.empty? and .blank? , are they same ?
<manveru>
fragrant: sometimes
<manveru>
why do you need it?
wallerdev joined #ruby-lang
<steveklabnik>
no.
<manveru>
it's mostly (a && a.empty?)
<fragrant>
.nil? , .empty? , are they same ?
<manveru>
no
<manveru>
they define .blank? on NilClass as well, so nil.blank? returns true
<manveru>
on String, Hash, and Array it calls empty? afaik
<manveru>
anyway, it's just some silly railism, no need to use it
<headius>
zenspider: so is this the way you picture it being run: EXCLUDE_DIR=blah/excludes jruby -Ilib -rminitest/excludes blah/test_bad_thing.rb
<headius>
or the equivalent in rake
<headius>
I have a working sample here
<rue>
fragrant: Array is only indexed by integers, so if it's indexed by something other than integers, it's not an Array :)
<fragrant>
Thank You.
<headius>
zenspider: I'm going to POC using this for a couple MRI tests in our build and get back to you (shortly, I hope)
tomzx joined #ruby-lang
<fragrant>
Why are there two different channels ? #ruby and #ruby-lang
<fragrant>
What's the difference?
JosephRuby joined #ruby-lang
<headius>
zenspider: for some reason my brain keeps wanting the env var to match the .rb file and be "EXCLUDES_DIR"