apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
otters has joined #ruby
otters has joined #ruby
conor_ireland has joined #ruby
kevinbond has joined #ruby
ryanf has joined #ruby
kevinbond has joined #ruby
chimkan has joined #ruby
kevinbond has joined #ruby
engineerkp has joined #ruby
ryanf has joined #ruby
looopy has joined #ruby
engineerkp has joined #ruby
wallerdev has joined #ruby
<jrhorn424> hm. breaking out of an explicit block (ruby 1.9.3, irb, iTerm2, Lion) doesn't seem to work.
jhunter has joined #ruby
Drewch has joined #ruby
fermion has joined #ruby
gurugeek_ has joined #ruby
<gurugeek_> hello any gem that can write on an .ods file (open office calc) ? roo doesn't write and google doesn't return anything valuable :S
gomix has joined #ruby
* gomix waves hi...
<gurugeek_> any taker on the open office challenge? : D
<gurugeek_> don't be shy ;)
c0rn has joined #ruby
banisterfiend has joined #ruby
strife25 has joined #ruby
species has joined #ruby
ryanf_ has joined #ruby
fixl has joined #ruby
aknewhope has joined #ruby
husimon___ has joined #ruby
prometheus has joined #ruby
<gomix> im having some troubles using Base64.encode64 and/or Base.b64encode to mimic base64 linux utility for the same input
shevy has joined #ruby
<gomix> any pointers? (ruby version 1.8 converts using lines, while base64 does not, i must get rid off so many \n's"
mikeycgto has joined #ruby
mikeycgto has joined #ruby
netrealm has joined #ruby
rock-n-rolla has joined #ruby
rock-n-rolla has quit [#ruby]
savage- has joined #ruby
nif_ has joined #ruby
tingo has joined #ruby
Nathandim has joined #ruby
tingo has joined #ruby
[Keith] has joined #ruby
luckman212 has joined #ruby
[Keith] has quit [#ruby]
tingo has joined #ruby
c0rn has joined #ruby
MrGando has joined #ruby
dotnull has joined #ruby
gtuckerkellogg has joined #ruby
nif has joined #ruby
baroquebobcat has joined #ruby
gurugeek_ has quit [#ruby]
luckman212_ has joined #ruby
<davidcelis> why is it hard to get rid of the
<davidcelis> line breaks
<davidcelis> thats easy, it's a single gsub
<gomix> david yes did that.. but i was expecting base64 module to do that
<ryanf> the
<ryanf> line breaks
VegetableSpoon has joined #ruby
<davidcelis> ryanf: get it??
<gomix> davidcelis: yes
<davidcelis> gomix: No, what if someone wants to encode a linebreak in base64?
<davidcelis> gomix: Module shouldn't expect what input its getting. You should make sure you're passing the input you want it to encode. Thats not its responsibility
seanstickle has joined #ruby
<ryanf> i think he might be saying encode64 adds line breaks to the encoded output? is that right?
<davidcelis> Sounds like he's saying that he wants his \n's stripped out of his input
<ryanf> but if so, yeah, just a gsub
<gomix> hmm davidcelis, well yes, but maybe some kind of args on base64 methods to make it easier
<davidcelis> Dude, it's a gsub. It really doesn't get much easier than that.
<gomix> i was looking at base64 ruby 1.9... and it does have some...
<gomix> davidcelis: done ;)
<gomix> that way
<davidcelis> Lol
<gomix> but im still on 1.8
Nathandim has joined #ruby
senthil has joined #ruby
tommyvyo has joined #ruby
robdodson has joined #ruby
Progster has joined #ruby
indeterminate has joined #ruby
<wroathe> If autoload lazy loads dependancies only when they are needed why would anyone ever use require?
chimkan_ has joined #ruby
igotnolegs has joined #ruby
Cyrus has joined #ruby
<heftig> wroathe: because if you're going to use it anyway, might as well load it now
<heftig> autoload also needs some ugly locking
<wroathe> Yeah, I just started reading about the thread safety issues
<wroathe> Was a stupid question :P
chimkan has joined #ruby
nari has joined #ruby
banisterfiend has joined #ruby
<richardlxc> hello
Sailias has joined #ruby
RORgasm has joined #ruby
mikepack has joined #ruby
banisterfiend has joined #ruby
moshee has joined #ruby
ZachBeta has joined #ruby
liluo has joined #ruby
richardlxc has joined #ruby
shtirlic_ has joined #ruby
richardlxc has joined #ruby
jimeh has joined #ruby
natemcguire has joined #ruby
radic_ has joined #ruby
zeroeth has joined #ruby
pac1_ has joined #ruby
<robdodson> what's the term for this operator =~
Teddy2steper has joined #ruby
nerdy_ has joined #ruby
<robdodson> match?
richardlxc has joined #ruby
<ryanf> match i guess. i think i call it that
sbanwart has joined #ruby
sacarlson has joined #ruby
<robdodson> k thanks :)
jiangle has joined #ruby
looopy has joined #ruby
iamjarvo has joined #ruby
brngardner has joined #ruby
<richardlxc> hello
<fowl> SUP
ryanf_ has joined #ruby
<fowl> welcome to #ruby , where the sex flows like wine
kennyd has joined #ruby
kennyd has quit [#ruby]
nvez has joined #ruby
mdhopkins has joined #ruby
freeayu has joined #ruby
richardl1c has joined #ruby
d2dchat has joined #ruby
Drewch has joined #ruby
nif has joined #ruby
Teddy2steper has joined #ruby
VegetableSpoon has joined #ruby
richardl2c has joined #ruby
ZachBeta has joined #ruby
liluo has joined #ruby
jimeh has quit ["WeeChat 0.3.7"]
gtuckerkellogg has joined #ruby
h4mz1d has joined #ruby
mxweas_ has joined #ruby
gift has joined #ruby
BSaboia__ has joined #ruby
kazin_ has joined #ruby
aknewhope has joined #ruby
sacarlson has joined #ruby
mlevin_ has joined #ruby
aknewhope has quit [#ruby]
Brasdof has joined #ruby
<delinquentme_> anyone here happen to know how I might append a nodeset to a nodeset?
<delinquentme_> more appropriately .. combine nodesets?
<fowl> delinquentme_, it is very possible that the universe would collapse in on itself
<delinquentme_> O_o
<delinquentme_> nope tried it .. didnt collapse ;D
alx- has joined #ruby
hrs has joined #ruby
ben225 has joined #ruby
silverhand has joined #ruby
riyonuk has joined #ruby
<riyonuk> Can someone tell my why the last variable is never increased? :/ - http://pastie.org/3753391
<fowl> riyonuk, because you output remaining_months
<fowl> instead of current_date
Gekz has joined #ruby
advorak has joined #ruby
seanstickle has joined #ruby
<riyonuk> LOL
<riyonuk> Wow
<riyonuk> That's just sad.
Osek has joined #ruby
<fowl> lol i make errors like that all the time, but im dyslexic, what's your excuse? :p
silverhand has quit [#ruby]
nif has joined #ruby
RORgasm has joined #ruby
cobragoat has joined #ruby
<riyonuk> How can I get todays month, add to it, and then turn that value back into a month?
sam113101 has quit [#ruby]
sacarlson has joined #ruby
<fowl> riyonuk, my only suggestion is to do it in pry
<riyonuk> cause I'm doing time.new.month but it's getting really confusing
<riyonuk> and then what happens when the month goes into the new year? how does it know it's 2013 and not 2012? :/
<riyonuk> is this supposed to happen? :/ http://cl.ly/0G1f0o0S2n0a0A0w1k2A
<ryanf_> riyonuk: you're just seeing the .inspect output for the objects
<ryanf_> time has a custom one, and date is using the default
<riyonuk> Which to use? Date I assume, since months are dates?
Boohbah has joined #ruby
ThewyBread has joined #ruby
Guest35859 has joined #ruby
<sgronblom> Is the use of close_write here crucial even when you use popen3 which gives you separate input and output streams? Doesn't a regular IO#close on the stdin have the same effect? http://devver.wordpress.com/2009/10/12/ruby-subprocesses-part_3/
chson has joined #ruby
nif has joined #ruby
mcwise has joined #ruby
tommyvyo has joined #ruby
mikepack has joined #ruby
rippa has joined #ruby
ben225 has joined #ruby
Teddy2steper has joined #ruby
<riyonuk> Ughh date/datetime/time is just plain difficult
sam113101 has joined #ruby
artOfWar has joined #ruby
nari has joined #ruby
sterNiX has joined #ruby
sterNiX has joined #ruby
jayne has joined #ruby
Bonkers has joined #ruby
artOfWar has joined #ruby
lkba has joined #ruby
alx- has joined #ruby
jgrevich_ has joined #ruby
jgrevich_ has joined #ruby
fayimora has joined #ruby
liluo has joined #ruby
KL-7 has joined #ruby
shadoi has joined #ruby
gtuckerkellogg has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
zemanel has joined #ruby
MrGando has joined #ruby
My_Hearing has joined #ruby
deobald has joined #ruby
CheeToS has joined #ruby
wookiehangover has joined #ruby
robdodson has joined #ruby
gokul has joined #ruby
zeroeth has joined #ruby
<hemanth> how does one check if require was successful or not ?
<banseljaj> use a simple test method?
<banseljaj> then remove it later?
<hemanth> was doing something like @test.methods.grep()
<hemanth> but rather puts "Did not happen" unless require "/lib/test/blah" would be useful?
<hemanth> Cos i'm not getting the methods even after requiring
RORgasm has joined #ruby
c0rn has joined #ruby
richardlxc has joined #ruby
<wolgo> require returns true if the require word right?
<ryanf> no
<ryanf> it returns true if it actually loaded the file. it returns false if the file was already loaded
<ryanf> but neither of those are failures
<ryanf> it raises a LoadError if it actually fails
akemrir has joined #ruby
gtuckerkellogg has joined #ruby
<wolgo> ahh right
araujo has joined #ruby
araujo has joined #ruby
JohnBat26 has joined #ruby
<hemanth> ryanf, there is no load error, but still i'm able to access any of the methods :/
<hemanth> I have extended a module
eldariof has joined #ruby
dubios has joined #ruby
mikepack has joined #ruby
MrGando has joined #ruby
rippa has joined #ruby
x0F__ has joined #ruby
nfluxx has joined #ruby
<jrhorn424> is Arr#uniq with block guaranteed to remove secondary occurences? In other words, I'm looking to keep the first occurrence within each array, since I'm sorting before applying uniq.
<kish> You don't have write permissions into the /var/lib/gems/1.8 directory.
<kish> should i make the 1.8 directory writable by all?
mikepack_ has joined #ruby
<jrhorn424> kish, are you using `gem install`? have you tried `sudo gem install`
<fowl> jrhorn424, [1,2,3,4,1,1,1,4,5,6,2,3,32,23,23,23,2,2,3,4,].uniq
<fowl> => [1, 2, 3, 4, 5, 6, 32, 23]
KL-7 has joined #ruby
<jrhorn424> fowl: that didn't look clear at first, but I see what you mean. I've been switching back and forth between arrays and hashes all night.
<jarred> For something I'm working on, I need to parse Nginx's config file. Has anyone heard of a gem or C library that does this? (Besides Nginx itself)
<advorak> When I create a new class, #inspect is a clone of #to_s, correct? Then how do I maintain the functionality of #inspect and create my own #to_s without impacting #inspect?
RangerMauve has joined #ruby
<fowl> advorak, when you alias a method in ruby it copies, not links
c0rn has joined #ruby
<advorak> fowl, When I create a new class and override #to_s, #inspect seems to want to do whatever #to_s does ...
<advorak> I want #inspect to do what it did before I overrode it with #to_s
cheok has joined #ruby
Morkel has joined #ruby
yxhuvud has joined #ruby
djdb has joined #ruby
kaneda has joined #ruby
vectorshelve has joined #ruby
djdb has joined #ruby
a_a_g has joined #ruby
<fowl> advorak, you're right!
<fowl> idk, that's weird
<fowl> generally you write your own inspect so you can put your own information in it
MrGando has joined #ruby
<advorak> oh! I get it ..
nari has joined #ruby
<advorak> class Andy; alias :inspect :s; def to_s; 'my to_s';end;end
<advorak> :-)
<advorak> That does what I want it to ..
<advorak> thanks for your hint that "alias makes a copy of the method"
schovi has joined #ruby
surfprimal has joined #ruby
MasterIdler_ has joined #ruby
<advorak>
looopy has joined #ruby
banisterfiend has joined #ruby
etehtsea has joined #ruby
Sigma00 has joined #ruby
LMolr has joined #ruby
francisfish has joined #ruby
flaggy has joined #ruby
cola_zero has joined #ruby
kiwnix has joined #ruby
gokul has joined #ruby
c0rn has joined #ruby
c0rn_ has joined #ruby
<fowl> advorak, alias is also syntax
<fowl> you can do `alias inspect to_s`
<fowl> no commas, bare methods, its weird
guardian has joined #ruby
<advorak> *nods*
<shevy> it's pretty!
<shevy> alias_method :ack, :yuck!
<shevy> ^^^ ugly!
<shevy> alias ack much_better
<shevy> ^^^ nicer!
<jrhorn424> how would you pass in symbols from the command line?
<shevy> ARGV has only strings as its array members but you can convert them into symbols if you really must, in your .rb script
<jrhorn424> shevy: yeah, i want to selectively keep some keys in a large hash, but I'd like to do that dynamically from the command line
<shevy> yeah, impossible from your shell alone. it is all strings at that point
<jrhorn424> shevy: i could do ARGV.to_sym, though
<shevy> yes, you can do everything IN-side your .rb script
<jrhorn424> shevy: oh, i see your point
<shevy> you could use a ruby shell perhaps :)
<jrhorn424> :D
<jrhorn424> shevy: is there an idiomatic way to pull in all command line arguments after a certain position? I have ARGV[0] and ARGV[1] used as filenames, for example, but it would be nice to do `ruby myscript.rb file1 file2 symbol1 symbol2 symbol3`
<jrhorn424> some splat magic, perhaps?
<shevy> well
<shevy> I usually handle all ARGV stuff after doing a:
<shevy> if __FILE__ == $PROGRAM_NAME
<shevy> _ = MyClass.new
<shevy> hmm
<shevy> actually
<shevy> _ = MyClass.new(ARGV)
<fowl> jrhorn424, *ARGV ?
<shevy> usually like this
<rking> Hrm. Does "_" have any special meaning?
<shevy> and then, inside my class, I act on that input
<fowl> *ARGV[2..-1]
<jrhorn424> i was expecting ARGV[2:] to work
<jrhorn424> fowl: that's it...
<shevy> rking, nah, it is just a local variable without a real name
<shevy> ohhhh
<rking> K.
<shevy> you come from python?
<jrhorn424> shevy: yep
<jrhorn424> my google-fu doesn't help me when I don't know what I'm looking for. thanks.
<jrhorn424> (FWIW, octave/matlab works the same way with array ranges)
<shevy> oh yeah, googling for splat is not easy when one does only know the syntax name *
<rking> shevy: Is that the custom... "foo"/"_"?
<jrhorn424> shevy: :D
<fowl> jrhorn424, you can also do [1,2,3,4,5][1,2] to start at index 1, length 2
<shevy> rking dunno. I like _ ... it is short ... it never needs a name... I used to use things like x or y in the past, but those always have a name... I like things to have no name if they are not really important
<rking> Yeah.
<shevy> I also used to use things like _tmp but this is a dark time that I'd rather not refer to anymore... :P
<epitron> is there a way to stream one IO into another IO?
<jrhorn424> fowl: helpful tip, though have mercy if I want to add more positional arguments after a range
<rking> For some reason that makes me think of device driver programming.
<fowl> NO
<epitron> without writing a loop? :)
zodiak has joined #ruby
<fowl> epitron, ruby doesnt handle IO, sorry
* epitron pushes fowl into the mud
<shevy> jrhorn424 I think it is better to handle the ARGV logic from within a method
* fowl drags epitron with him and starts 'wrestling' ;)
<shevy> omg
<Quadlex> Aww, I love this channe;
<jrhorn424> Quadlex: +1
<epitron> so like, if i had a 10 gajillion byte file, and i wanted to write it to another file
<epitron> with ruby IO objects
<epitron> how would i do it so as to not require 10 gajillion bytes of ram?
<shevy> hmm
<shevy> you want to use files rather than IO objects?
<fowl> epitron, IOStream?
<fowl> streamIO or something like that
<epitron> the files are already IO objets :D
<fowl> i think
<epitron> i'm actually just writing a general purpose method that lets you write files or strings to a file
<epitron> and if it's an IO object, it streams it
<Quadlex> Does anyone else find it hard to reason through different patterns?
richardlxc has joined #ruby
<rking> shevy: Hehe.. I happened to stumble on this... interesting use of "_". _, *unquoted, _ = '"quoted"'.split(//)
<banisterfiend> Quadlex: no, everyone is smarter than you
<Quadlex> I doub it
<Quadlex> Can't be so
<banisterfiend> rking: you could call _ anything there ;)
<Quadlex> Lots of people watch Reality TV
<rking> banisterfiend: I'd call it bad_idea, but yeah.
rubyninja has joined #ruby
<shevy> rking, hmm... I suppose he throws away those variables anyway?
<rking> banisterfiend: It's funny that you spotted that snippet, btw. =)
<shevy> though I wonder how ruby assigns to two times the same variable
<rking> shevy: It's only a demonstration of how splat works.
<banisterfiend> rking: why's that
<rking> banisterfiend
<rking> January 21, 2011 at 2:22 pm
richardlxc has joined #ruby
<rking> That paste didn't come out right. Anyway, it's from a web page you posted on.
<banisterfiend> rking: cool, link?
<shevy> banisterfiend: you got a follower
d3c has joined #ruby
<rking> banisterfiend: Actually, since I have you here, what did you mean by, "I use the def meth(*) end syntax when calling super in a subclass: def meth(*) puts "subclass"; super; end "
<banisterfiend> rking: well it means you dont have to fill out the arg list or resort to *args and pass it up
<rking> banisterfiend: Oh. "super" defaults to passing the same args?
<banisterfiend> rking: yeah
<rking> I didn't expect that.
<fowl> super()
<rking> fowl: That's how you get it to pass nothing?
<shevy> yeah, the parser here knows that nothing is passed
qakka has joined #ruby
<rking> Hrm. Before that, I would have said "x == x()"
<fowl> i think super is the only case like that
<fowl> its more for convenience
deobald has joined #ruby
<fowl> x == x() unless x is a local
<rking> And what happens when it is?
RORgasm has joined #ruby
<banisterfiend> rking: local gets priority
<shevy> rking we train you to think like the ruby parser itself!!!
<fowl> if x is a local than `x` is that local, `x()` would still refer to the method (or `x arg, etc`)
<rking> OK.
<rking> So what does Integer(1) do?
<banisterfiend> rking: calls Integer() method
<shevy> I suppose it makes an Integer ... x = Integer(2)
<shevy> oops I meant
<shevy> x = Integer("2")
<rking> But, I mean, syntactically.. there's a parens pair following an object.
<shevy> hmm it looks kinda odd yeah
timonv has joined #ruby
<banisterfiend> rking: no, it's a method call
<fowl> hehe
<banisterfiend> rking: there's a method called Integer()
<rking> oooOOOOoh
<banisterfiend> rking: and just as fowl said, you invoke the method Integer() by using (), if you just put Integer by itself (with no ()) you'd get the Integer class
<rking> So.. how do Integer the method and Integer the class coexist?
<banisterfiend> rking: different namespace i guess
<shevy> I would assume there is no problem as class Integer already namespaced it, and def foo is within that namespace
* rking =\-faces.
<shevy> please notice the return value :)
<fowl> lol
<rking> I don't understand this namespace concept.
<fowl> its nothing to do with namespaces
<rking> So there are separate buckets for names of classes and functions?
<banisterfiend> fowl: haha that guy who runs that site reminds me of you
<fowl> rking, methods can be uppercased
<shevy> X() is always a method call
<banisterfiend> fowl: ef*kt
<fowl> how
<shevy> and I think all functions are methods, attached to a class in ruby
<shevy> hmm
<rking> shevy: I agree with that much.
<shevy> I dont think I like that Foobar() thingy much
<rking> But the part I don't get is how this pastebin works. Seems like the def X() should overshadow the class X altogether.
<shevy> it's not as intuitive as object.foo()
<shevy> why
<shevy> def anything never conflicts with class anything
<shevy> oh let me test something
<rking> Oh, because you're actually defining Object.X
<rking> No wait, "class X" would be "Object::X"?
<My_Hearing> If it can be parsed as a constant access, it will be parsed like that and not as a method call
<rking> I'm so confused. =(
<Mon_Ouie> (i.e. no arguments, no parens, no receiver)
<shevy> I get confused too
<Mon_Ouie> And the constant namespace just isn't the same as the method one
<rking> I'm not even to the part where it can parse the call.. I'm stuck at the declaration.
<rking> Mon_Ouie: How can we see this?
<Mon_Ouie> See what?
<fowl> listen to Mon_Ouie , he is wise beyond his years
<fowl> seriously tho, kids a genius
<rking> Like constants() vs. methods()
<rking> Whoa, those actually both exist.
<Mon_Ouie> Except you probably meant instance_methods
<fowl> rking, most of the time you dont even need to worry about this, I can't even think of a time i've seen Integer() used
<fowl> a lot of times it is for convenience, ie calling JSON() instead of JSON.parse()
<shevy> rking, dont worry, i am confused too now
<fowl> oh and whoever asked about _ earlier, in pry it is used to get the last value returned, and i think it might be that way in IRB too
<shevy> how do you define something like Integer() ?
<fowl> now shevy is being dumb
<Mon_Ouie> def Integer(obj, base = 10); …; end
<shevy> hmm
<rking> fowl: OK, yeah, I've seen it like that. (And I was the one who asked.)
<Mon_Ouie> In this particular case, it is defined within Kernel as a module_function
<shevy> ohhhhh
ewemoa has joined #ruby
tewecske has joined #ruby
<shevy> hmm
<shevy> this kinda shakes up the foundation of my belief in Constants
<rking> Is there a simple way to describe Kernel vs. Object?
<shevy> perhaps I should want to make all methods start with an upcased letter like in C#
<shevy> def Add
<shevy> World.Add Planet.new
<rking> Not Planet.New ?
<shevy> oh man
<fowl> do that and i will shoot you in the leg shevy
<shevy> rking now you see how confusing this is
snearch has joined #ruby
<fowl> wtf
ephemerian has joined #ruby
<fowl> how can you be confused shevy
<fowl> how does this information change anything you previously knew
<irmbrady> C# should be AddNewPlanetToWorld(Planet planet, null, null, null, null);
twinturbo has joined #ruby
<rking> I hope to someday sit down with some C# enthusiast and understand where they are coming from. Same thing with NASCAR.
mikeric has joined #ruby
<shevy> fowl I am not sure ... that def Integer thing kinda changed my world today
<rking> Perhaps both activities can only be explained in the context of drunkenness, I don't know.
<irmbrady> I use C# at work - I think you would be more interested in speaking to VB enthusiasts; they are a great bunch
<fowl> ew i didnt know VB existed still
<shevy> rking humans are weird. there are those who believe the world will end at XYZ. even when it becomes more and more unlikely, they start to believe more and more into this date, because of their earlier investments into it
nemesit has joined #ruby
<fowl> btw
<fowl> X = method(:X)
<fowl> now what
<fowl> :P
<rking> Haha
<banisterfiend> fowl: similar sense of humor
berserkr has joined #ruby
<shevy> hmmm
<rking> OK, X = instance_methods(:X) simply warns you about the overwriting of a constant, then yeah, makes the X constant the method.
<shevy> I am unfunny :( I dont like this at all
<shevy> yeah that warning should be dropped
<shevy> it would instantly eliminate several hundred lines of warnings in my code :)
gen0cide_ has joined #ruby
<fowl> rking, constants aren't constants in ruby, you can overwrite them and just get a warning
<fowl> or do $VERBOSE=nil then do it, and get no warning :P
<fowl> but yeah, they're not really constants, lul
<vectorshelve> shevy: How you ?
<vectorshelve> We last ended on an afghan note :) remember !!
<shevy> not sure I remember
<shevy> my IRC brain has like a remember-history of about 2 days :\
<shevy> like the guy in the movie Memento
<shevy> I am doing the same thing every day, again and again, and I dont remember having done them before
<vectorshelve> shevy: afghanistan has got a lot of beatiful women... :) Thats what I said last somalia and afghan are the two most volatile nations today
trivol has joined #ruby
cezar has joined #ruby
sgmac has joined #ruby
sgmac has quit [#ruby]
ukwiz has joined #ruby
<vectorshelve> shevyennu
shiroginne has joined #ruby
blacktulip has joined #ruby
davidpk has joined #ruby
roolo has joined #ruby
knopkodav has joined #ruby
<shevy> there are lots of volatile nations
<shevy> mali lately
<shevy> abchasia and georgia some years ago
<shevy> it's always the big nations that wanna wage their wars through proxy states
<shevy> Integer() somehow makes me sad :(
workmad3 has joined #ruby
<rking> LOL
<shevy> I guess with ruby one has to accept the good bits with the bits that stink
<vectorshelve> shevy: :)
<shevy> at least it's better than in PHP
<shevy> hmm on another note
<shevy> mailing lists confuse me
jfelchner has joined #ruby
<rking> shevy: That's a(nother) strange thing to say.
<shevy> rking hmm there is only one fantasy author I still read books, and it seems he will stop to do so soonish
<shevy> been following him since 18 years, the last one... wanted to say something, but that would require of me to subscribe to a mailing list. hate hate hate, so I decided to not write anything...
shiroginne has joined #ruby
<shevy> I mean, I hate this subscribe thing
rubyninja has joined #ruby
<shevy> ah well, everything fades anyway
gokul has joined #ruby
<fowl> shevy, you aren't on the gobo list are you
<shevy> fowl hmm no
<shevy> but it's dead anyway :(
<fowl> nah its low-volume
<shevy> I think mhomer got too much into the project, it was much better even when hisham had less time, with jonas still around...
<shevy> everything fades
dhruvasagar has joined #ruby
<shevy> but I am still going to have RBT be 100% compatible with the gobolinux scripts one day!
<fowl> wat u mean homer got too much into it
<fowl> hes like the only one doing anything aside from the occasional package updates from hisham
mneorr has joined #ruby
bier has joined #ruby
<shevy> yeah hmm
<shevy> it's a shaky theory I have for sure
<vectorshelve> shaky shevy
<shevy> sometimes when other people take over a project, the whole nature of the project changes significantly
<shevy> the golden years were from like 2004 to 2008
<shevy> :(
timonv has joined #ruby
<shevy> rubyX / Heretix had two maintainers
<shevy> the guy who wrote most of it, and the guy who tried to push it forward
<shevy> when the first one had less and less time, the other one also had less time due to reallife/university
<vectorshelve> shevy: IT industry is boring... after long
<shevy> yeah, but there are ideas which are important and cool
apeiros_ has joined #ruby
<vectorshelve> shevy: yes but you cant spoil this wonderful life by spending a good part of it sitting in front of a computer and coding :(
<vectorshelve> I seek salvation :'(
<shevy> oh I dont like computers anyway
<shevy> it's also not so much the coding that is nice, it's the creativity that is what I like
<shevy> you build on ideas on ideas on ideas on ideas
wilmoore has joined #ruby
<shevy> it's like evolution in some way. sometimes an idea branch dies out, sometimes not
<shevy> I am sure when _why decided to die his virtual death, some of that creativity in his idea branches died
<vectorshelve> shevy: if you dont like computers.. u r using one at this point of time right ?
<vectorshelve> shevy: I wanna disappear into the depths of silence and peace... cuddle to my love and sleep for eternity :0
lolsuper_ has joined #ruby
bpalmer has joined #ruby
tobago has joined #ruby
<banisterfiend> vectorshelve: do u have vectors on your shelf, do u keep it beside the cornflakes
rohit has joined #ruby
<vectorshelve> banisterfiend: that's philosophical :)
seoaqua has joined #ruby
Asebolka has joined #ruby
jcromartie has joined #ruby
gokul has joined #ruby
schovi has joined #ruby
rubyninj_ has joined #ruby
<hemanth> 1.9.3 will not allow symbols in case?!
<apeiros_> of course it does allow them.
_ack has joined #ruby
<hemanth> [] : can't convert symbol into Integer
<fowl> you're using an array
<apeiros_> that means you're passing a Symbol to []
d34th4ck3r has joined #ruby
<apeiros_> which is a method
<apeiros_> probably - as fowl says - an array
<apeiros_> nothing to do with case/when.
<hemanth> yup, true, worked well on irb
<yxhuvud> or it means he is relying on symbols being integers, which they are not anymore
<fowl> you get that error if you do [][:hi]
<fowl> or [].[] :hi
<fowl> lol
<hemanth> hmm in testrunner.rb
<hemanth> test-unit gem
dhruvasagar has joined #ruby
Indian has joined #ruby
<apeiros_> I don't know what you're trying to tell us, hemanth
a_a_g has joined #ruby
a_a_g has joined #ruby
<vectorshelve> hemanth: kya bol raha hai yaar ?
xanaru has joined #ruby
<hemanth> ok...
<hemanth> in 1.9.3
<hemanth> Test::Unit::UI::Console.TestRunner.run(TS_my_test_case, outputlevel=14) is bombing ; 'test/unit/testsuite' and 'test/unit/ui/console/testrunner' are the gems that are required
<hemanth> bomb -> [] : can't convert symbol into Integer
<hemanth> apeiros_, vectorshelve ^
a_a_g has joined #ruby
<vectorshelve> hemanth: put some code out on gist and show
<fowl> how do you call a method with named args
<fowl> o.o
<hemanth> fowl, initialize has suite,options={}
Floydzy has joined #ruby
<fowl> then you want to send :outputlevel => 4 or outputlevel: 4
<hemanth> vectorshelve, @listeners = @options[:listeners] || [] is where it's bombing
<fowl> outputlevel = 4 is an assigment
<fowl> so @options is probably 4
<hemanth> oh :/ gosh!
<fowl> :)
* hemanth shudders for silly mistakes and takes a small break
<vectorshelve> :)
RORgasm has joined #ruby
<hemanth> i'm porting a automation framework from watir to watir-webdriver
<hemanth> with latest ruby and it's gems
<hemanth> phew
falena has joined #ruby
sacarlson has joined #ruby
latrommi has joined #ruby
Pip has joined #ruby
<vectorshelve> COol One --- Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby -> http://www.brpreiss.com/books/opus8/
kirun has joined #ruby
<shevy> it's surprising that fowl knows quite a lot of ruby
<shevy> soon he'll be a channel guru here
EzeQL has joined #ruby
<fowl> im in here every night helping neophytes
a_a_g has joined #ruby
<Pip> Any news from Ruby?
shruggar has joined #ruby
<shevy> Pip not much. there are still folks who use ruby 1.8.x
richardlxc has joined #ruby
<Pip> Gee, why?
<fowl> republicans
<apeiros_> shevy: by folks, you mean… you?
<shevy> apeiros_ folks implies plural. I am among them.
<shevy> I am going to wait for Ruby 2.0
<shevy> !!!!!!!!!!!!!!!!!!
sterNiX has joined #ruby
<shevy> It will be much better than Ruby 1.0
<fowl> shevy, your shit probably loads 20x faster in 1.9.3
<fowl> compare starting pry on 1.8 to 1.9.3
<shevy> fowl yeah, there is a definite speed improve from 1.8.x to 1.9.x
gokul has joined #ruby
<Pip> :D
<Pip> Ruby 2.0?
<shevy> I always like to make a quiz
<fowl> ruby 2.0 will have lazy enumators :)
<shevy> quick Pip without running the code on your own, which one is faster:
<fowl> what a weird benchmark, they do completely different things >_>
<shevy> :<
<Pip> Is that the cutting-edge technology in programming language?
sterNiX has joined #ruby
<shevy> Pip it's the current buzzword. everything that is lazy is good
randym has joined #ruby
<Mon_Ouie> fowl: They all evaluate to something true-ish!
<Pip> Wait a second, is Matz here?
<fowl> lol
<Pip> Well, once I was asking if Stallman was present in #GNU
<fowl> Pip, one time i thought i had to fart, ended up shitting my pants
sterNiX has joined #ruby
<Pip> lol
<fowl> true story
<Pip> That's possible
<Pip> Shit happens
johndbritton has joined #ruby
<Mon_Ouie> I think Matz used to be on IRC, actually
gokul has joined #ruby
<vectorshelve> Every time I start lving ruby's beauty.. rails dominance disturbs me :'( I need sanity in ruby :)
sterNiX has joined #ruby
sgmac has joined #ruby
<vectorshelve> Pip: shit happens... just flush it and move on :)
<shevy> Pip I think matz used to be on #ruby-lang a long time ago
<shevy> but he said it's eating time or something like that and has given up on it
<shevy> vectorshelve, what works for me is to ignore rails
<Pip> Well, I think he is busy designing and improving Ruby
<shevy> Pip, dunno... sometimes I feel as if nobu is doing more work, and matz is doing just some theoretical thinking for the future now :P
<vectorshelve> shevy: thats unfortunately my bread and butter... what to do unless someone gives me salvation.. I am trying for it.. amen... :)
<shevy> I see
iocor has joined #ruby
iocor has joined #ruby
<Pip> So Ruby has been standardized?
spencerward has joined #ruby
<shevy> hehe
<shevy> where!
qakka has joined #ruby
<Pip> JIS
<Pip> Japan Industrial Standard
rushed has joined #ruby
dordo has joined #ruby
sgmac has joined #ruby
bpalmer has quit ["ERC Version 5.1.2 $Revision: 1.796.2.6 $ (IRC client for Emacs)"]
<shevy> hmmm
alup has joined #ruby
gokul has joined #ruby
<Pip> So we are using the CRuby as the mainstream implementation right?
<gogiel> hello. is there better way to do inject([]) { |s,x| s.concat some_array } ?
<shevy> not sure who is we Pip . I use the ruby you can download from the official ruby site. And I always will
<Pip> Does Ruby support arbitrary number of parameters for methods?
<banisterfiend> Pip: Yeah, do u?
<Pip> :D
<gogiel> Pip: of coure
<Pip> Is there any design program in Ruby?
<Pip> *problem
<gogiel> Pip: yes, it's slow :D
<Pip> Wow~~~ that's impressive
<Pip> I mean that's the common problem for many languages, not just Ruby
<Pip> So no other problems?
<gogiel> Ruby for me is the greatest and the most flexible language ever made. And it's slow because of it.
<banisterfiend> Pip: it's not very lazy, but that's being fixed in 2.0
<Pip> How fast do you want it to be?
<gogiel> reading good Ruby code is pleasure. you can open any file and you can understand what's going on. that's beautiful
<banisterfiend> anyone here subscrbe to railscasts?
aibo has joined #ruby
rohit has joined #ruby
<shevy> Pip every language has problems
<shevy> ruby has significantly less problems than PHP though
gokul has joined #ruby
<Pip> How is Ruby's parallel feature?
sgmac has quit [#ruby]
<shevy> it has two rails
<shevy> perfectly parallel
<gogiel> Pip: it had problem with real threading, GIL
<shevy> there are so many problems
<shevy> I am glad you are not into programming Pip
<Pip> lol
<Pip> How do you know that I'm not into programming?
<Pip> Because I am asking nerd questions?
<gogiel> is there real threading now in Ruby?
davidcelis has joined #ruby
<gogiel> AFAIK interpreting is still blocked by GIL, but it has improved concurrency IO
<gogiel> am i right?
<Pip> Okay, what kind of GC is Ruby equipped right now?
<shevy> Pip nah, but because your questions are kinda like "what if the world would be perfect" and "what do you like about [insert any programming language here]" interview style
daed has joined #ruby
<Pip> Right
sgmac has joined #ruby
<shevy> GC 10.0 Steroid
<shevy> it beats every other GC out there
<shevy> it runs 525.203 miles / hour
<shevy> in fact, ruby is soon as fast as C
<gogiel> GC in Ruby has been rewritten, it's a lot better now
<shevy> then we will have a rubyOS :)
sgmac has quit [#ruby]
<Pip> :O
<shevy> gogiel, simple answers to simple questions eh ;)
<shevy> everything is better now!
<gogiel> shevy: but it really is, it has been rewritten some time ago actually ;)
<shevy> yeah
<shevy> we kinda answered all of Pip's questions that way too
<Pip> "Lazy Sweep GC is one of his works for CRuby's GC. You can use it since Ruby 1.9.3!"
<banisterfiend> shevy: http://imgur.com/r/funny/3NKA4
<Pip> "CRuby adopts Mark Sweep GC Algorithm now."
chiklazy has joined #ruby
<chiklazy> Rigg ass graggan Arewenoo.. Arwenoo zee-oo zaya. Chinna 2olombia adaa wella shrek raflood lool. Ground rearing some groans. I'm huff tuff reffa leffa lurf nords. I'm just like... vanilla ice foe davvity wheel barow Exparly ex preggo Is anyone out there a rig ass graggan? lelly in mah kellar WRESTLING'S FAKE!
<chiklazy> Pargastian wildly nig nargs. smeggalty dellets Far foo faqqin Digital damage. Where wally niqqs. It's coast to coast night. Hoke a lup! Free faq fornag! Puck a leek a lup to lup round tround. Wormser marrial niqs. El delphin trilaxal. Blanking bluck to the black a lickel bleck narge.
<chiklazy> Puggy muggle maggity ass riggle ma hole. Buck a waath ess wheel wall! Bustin' room past tin! Buckin' room past in! A harnaly scrary o mep. Rons raplaisher pa noans rebble dibby dump dimp gabble dak. A wristafiable pluckin' Blacking it up to the reng teng blickhole. I kleb to the sand of the blicka rickin time.
<chiklazy> Rekkal theh mick thuck the rep tep taistral. Wallif ma wallis wallets. Is anyone here a jelly-o shkrapper? Bam glacky I'm mega man! Has anyone here ram baisted before? The koost a heeckil pludgeon. Feathers round rick gring air! Liquid cereal's good for you. The mummified goblin. Pallaj oh plex.
<chiklazy> Moomassu desu, niddle the bair bons with caution Belgabble wolf waffy. Is anyone here a rubberty duggger? Is anyone a reggy dick plegger? Shoody spalooj moojer! Mella murtasTcM. Is this happy hour at the retard shack again? ron ron reggatoon. Walla julie malerf luck. Weggerty wing yaing plucking time!
<shevy> omg
<fowl> sigh
<chiklazy> Gotta set up for the suicide slide Gamma mareenmon. I've got more scrap ass shit than you can balieve with. Sally McDuffo whip. after secv on a sp00ky stream F/\gga foo regga makegg mahoun. Its all fun and games until the power goes out. Mennima Pay Street. rubbbity dib dadge pickard. Lelly in ma kellar.
<shevy> spam attack
<chiklazy> I'm on recky o gregor street. Miggity ass raggan. Boyar bod. Pellicka pool wiss wall. Watching bynum bukkake the smelts Haggity ass mahown. Trukkity rep roon, the kitz a kickel plujin. Trellalickers and burb street. Huck a dickin' dime.
<chiklazy> Float a pelly plaack ass. You're a digital dumbass. Smuggy jaloo meff jillahole. Dick, dick, dick dickaloo! Dick dickaloo my darling. Haggity ma heggal hole. nuriggerdy diggal. Visi blurb cage. O melon man mist meluhn mijohn. Oh man mellajoram. Hebble oh babble.
<chiklazy> Two guns and a ruck roog. Turned into a hollow loop. scritch scratch the happy fog. Is anyone here a fudge plucker. I'm talking bout a rastal marry yo map. Too many ruggerty dag datoes Or are you fuck wappys out for kill gore!
<chiklazy> The curmudgeonly pearl; ask and you might be answered. Finger with a whop top tinger. Rig tig tigger. I'm ram bastin' I'm feelin' clean! Pricey bad ass, a whop winger! Gullable dick waffer. Miggity mahoming beacon. Nick lickal novice. Your remenance. Square juice miknuller. Permio plather.
<fowl> apeiros_,
<chiklazy> Where does master words eat pies for shells? Trenna ma lilla manole. A rargy barg ark. Shockity strip with the rectify guy. Clockity rep with the rectify fly. Hebble o babble. Rudda nah neh noo. HEP TEP ROGGY! I'm thinkin' about greckin' the rummified coin! Let's look at Amenhotep 4's mummified groin!
<chiklazy> Ploona lefflie ludge picking! Haggy smith heddal, marry oh dettal. Hannabalist, no cannibalist, no hannibalist balievar. Ban dackoo. Put on weight! Wherr wiss fall, nudge plucking. too many |\|igg/\s, that's my line. I'm squirt with the worth of the mother plucking fine. Hoomee missee Mic daisy too. Davey oh doubt. Meggie mahoo middle.
<chiklazy> Too many Romulan potatoers. Matoonal dakkal. Helly muhp, melly muhp, runna minuck taste-rum. Wack ass weight! Hellamanorf weg watthal. I think I'll just start to try my .smuretsaTcN rubbbity boom ducking. Hitchaleval exasht romice. Up with jelly my humpfrins. Uva devil miss tee pie. She can't poo!
<shevy> HELP
<chiklazy> Shniqqen munuh lik leggal perritolma penis pran chella maloney day breeze Paahster jam ban wikkle. Hella mah lun mick hella malole. Hella minull mic mella manoh. The roadline, it's illegal. Trully mulla mih nole. I'm a relladge-o-melladge-o-ram. Come on you fuckin dag asses.
<shevy> KILL HIM
<Pip> :D
<fowl> lmao
<Pip> My links got flushed
<shevy> were they important? :D
<Pip> Not to most people
<linduxed> the almighty k-line struck hard
<Quadlex> Bitch got K-lined
<Quadlex> Such a "Gangsta" term for something so geeky as IRC
<shevy> man Quadlex
<shevy> from where are you from!
ukwiz has joined #ruby
<fowl> https://www.google.com/search?rlz=1C1CHFX_enUS478US478&sourceid=chrome&ie=UTF-8&q=The+roadline%2C+it';s+illegal.+Trully+mulla+mih+nole.+I'm+a+relladge-o-melladge-o-ram.+Come+on+you+fuckin+dag+asses.
<Quadlex> Brisbane
frishi has joined #ruby
<shevy> oh damn
<shevy> bigger town than mine :(
<Quadlex> -_^ Something wrong with that?
<Quadlex> Bigger town then any
<Quadlex> World's biggest Local Government Area
tk__ has joined #ruby
spencerward has joined #ruby
mattyoho has joined #ruby
<apeiros_> fowl: yeah, would have q'ed him, but wasn't at the computer
<vectorshelve> what is the fullform of co in a subdomain... is it corporate or company
<vectorshelve> like abcd.co.uk ?
<apeiros_> co? curious object
<vectorshelve> apeiros_: :)
<fowl> .com = commerical
<fowl> commercial*
rohit has joined #ruby
<vectorshelve> fowl: I was asking for .co = ?
burgestrand has joined #ruby
<fowl> well wouldn't you think that .co which is just a shortening of .com would mean the same thing
sgmac has joined #ruby
<fowl> come on -_-
sgmac has quit [#ruby]
<vectorshelve> fowl: got it -> http://en.wikipedia.org/wiki/.co
trivol has joined #ruby
<Mon_Ouie> You had the one for www.foo.co, not www.foo.co.something
<vectorshelve> apeiros_: commercial... thanks
<fowl> lol apparently .co is used in cook islands (.co.ck)
<linduxed> ...
<linduxed> what a combination
<vectorshelve> lol
_ack has joined #ruby
Shrink has joined #ruby
Shrink has joined #ruby
<rohit> haha!
jbw has joined #ruby
iamjarvo has joined #ruby
mikeycgto has joined #ruby
mikeycgto has joined #ruby
mattyoho has joined #ruby
mattyoho has joined #ruby
nanderoo has joined #ruby
nlc has joined #ruby
bgfbghnbgh has joined #ruby
krusty_ar has joined #ruby
<bgfbghnbgh> hi
seanstickle has joined #ruby
RORgasm has joined #ruby
arvidkahl has joined #ruby
sgmac has joined #ruby
sgmac has quit [#ruby]
<bgfbghnbgh> hi
maasha has joined #ruby
<maasha> hi
webguynow has joined #ruby
<maasha> I am profiling code to locate an evil bottleneck
<maasha> Array#each is the culprit according to profile and ruby-prof. But there is more than one Array#each in the code. So which one?
<Pip> What is an evil bottleneck?
krusty_ar has joined #ruby
<bgfbghnbgh> maasha how many yers as a prorammer
* maasha is ponders todays counter questions
fearoffish has joined #ruby
SphericalCow has joined #ruby
<shevy> hahaha
<shevy> this is great :)
<shevy> we have evil bottlenecks and good bottlenecks now
d34th4ck3r has joined #ruby
RubyPanther has joined #ruby
<bgfbghnbgh> shevy
<bgfbghnbgh> how are you
<linduxed> if i see this kind of line
<linduxed> content = ore_contents.build(:mineral_id => mineral.id)
<linduxed> what does the "build" method do?
<Mon_Ouie> It builds something?
<linduxed> yeah, i guess so
<linduxed> can't find it in the ruby api
<Mon_Ouie> I mean, you can't really know more without having more context…
<linduxed> or the rails one
<linduxed> hmmm wait
<linduxed> lemme check around the code a bit more
saster has joined #ruby
<sacarlson> linduxed: it depends on what created the object ore_contents
dshdsgdfdf has joined #ruby
<linduxed> collection.build(attributes = {})
<linduxed> Returns a new object of the collection type that has been instantiated with attributes and linked to this object through the join table, but has not yet been saved.
<linduxed> found it
slonimsky has joined #ruby
d34th4ck3r_ has joined #ruby
adac has joined #ruby
slonimsky has joined #ruby
vdv has joined #ruby
<vdv> hi all
<bgfbghnbgh> hi
<bgfbghnbgh> a/s/l?
<bgfbghnbgh> jk
jbw has joined #ruby
<vdv> if i read from url with content = open(url, ua).read, how can i then pipe that content to exteral prog?
nari has joined #ruby
pu22l3r has joined #ruby
<apeiros_> vdv: popen
thecreators has joined #ruby
<Spaceghostc2c> I am very fond of popen, I tend to mispronounce it in my head and call it pippin, like in LOTR
<sacarlson> seems I've lost the gpg decryption/encryption method plugin that was available in gedit when I ran ubuntu 10.04, now in ubuntu 11.10 it seems no longer exists. what is a replacement for this?
<apeiros_> vdv: also, use &:read: content = open(url, ua, &:read)
<fowl> sacarlson, look on launchpad?
<sacarlson> fowl: what am I looking for gedit plugins ?
Synthead has joined #ruby
<sacarlson> fowl: I've been googleing it without finding anything yet
LMolr has joined #ruby
<fowl> sacarlson, look for some way to contact the gedit devs
<Synthead> how do I iterate through all files (not directories) in a directory?
<fowl> Synthead, you're going to get directories in the list, sort it out with File.directory?
<fowl> Dir['*'] or Dir.entries('.')
<sacarlson> fowl: I'm not sure the gedit devs and gedit plugin devs are in the same group but I'll keep tring wether it be gedit or not
<vdv> apeiros_, seems with popen it's not possible to pass something to called process via stdin
<fowl> sacarlson, still they would be the most likely to know about this, or maybe someone on #ubuntu
<apeiros_> vdv: I don't know what docs you read, but that's exactly the purpose of popen
<vdv> ah sorry
<vdv> runs the specified command as a subprocess; the subprocess’s standard input and output will be connected to the returned IO object.
<apeiros_> to be able to write to stdin and read from stdout of a process.
<sacarlson> fowl: oh wow I had the tab set on the wrong place I thought this was #ubuntu sorry
<Synthead> fowl: that's the correct syntax for File.file? if I want to check if it's not a file?
<fowl> Synthead, File.directory? and File.file? are what you need then
<Synthead> fowl: what?
<fowl> durr?
<Synthead> fowl: how can I check if it is not a file?
<fowl> what did you not understand -- from what i said two times
<fowl> holy shit guy
<fowl> are you slow or something
<apeiros_> Synthead: fowl told you how
<fowl> i'll write your code for you, 30$/hr is the going rate
<Synthead> fowl: do I use ! File.file? ? I don't want to use File.directory? because not all items on a filesystem that aren't files are directories.
<apeiros_> fowl: I hope you at least bill only full hours…
liluo has joined #ruby
<apeiros_> I mean, partial hours as full hours
Indian has joined #ruby
<apeiros_> meh, how the fuck do you say that in english?
<fowl> lol
fr0gprince_mac has joined #ruby
<Synthead> good support guys :p
S1kx has joined #ruby
SphericalCow has joined #ruby
<bgfbghnbgh> u guys work at home?
nlc has joined #ruby
yalue has joined #ruby
d34th4ck3r_ has joined #ruby
philcrissman has joined #ruby
dql has joined #ruby
ukwiz has joined #ruby
fmcgeough has joined #ruby
_ack has joined #ruby
<vdv> apeiros_, how can i suppress output from call to popen?
fr0gprince_mac has joined #ruby
<vdv> i.e. if i do out = popen(...)... result of the executed program is printed
Progster has joined #ruby
<apeiros_> vdv: that means your program prints to stderr
<apeiros_> either redirect it or use open3 instead
tommyvyo has joined #ruby
<vdv> apeiros_, popen("command > 2&> /dev/zero") ?
<apeiros_> o0
bglusman has joined #ruby
bglusman_ has joined #ruby
<vdv> command 2&> /dev/zero
<vdv> apeiros_, what dou mean under redirect?
richardlxc has joined #ruby
gift has joined #ruby
<apeiros_> popen('cmd 2> /dev/null')
<apeiros_> don't know why you do > 2&>, don't know why you'd use /dev/zero either
<vdv> ok, thanks :)
chico has joined #ruby
Sailias has joined #ruby
strife25 has joined #ruby
td123 has joined #ruby
tommyvyo has joined #ruby
richardlxc has joined #ruby
bgfbghnbgh has quit [#ruby]
Drewch has joined #ruby
Eldariof-ru has joined #ruby
sbanwart has joined #ruby
tomzx has joined #ruby
tommyvyo has joined #ruby
zeroeth has joined #ruby
fr0gprince_mac has joined #ruby
richardl1c has joined #ruby
Squarepy has joined #ruby
d34th4ck3r has joined #ruby
Squarepy has joined #ruby
guardian has quit [#ruby]
kpshek has joined #ruby
vereteran-x has joined #ruby
askTheUser has joined #ruby
geekbri has joined #ruby
linoj has joined #ruby
moshef has joined #ruby
Yu\2 has joined #ruby
seanstickle has joined #ruby
sbanwart has joined #ruby
mstratman has joined #ruby
nacengineer has joined #ruby
theRoUS has joined #ruby
pu22l3r has joined #ruby
EvanR has joined #ruby
EvanR has joined #ruby
vereteran has joined #ruby
sacarlson has joined #ruby
crankycoder has joined #ruby
pu22l3r_ has joined #ruby
mdhopkins has joined #ruby
crankycoder has joined #ruby
Bauer has joined #ruby
Sailias has joined #ruby
moshee has joined #ruby
moshee has joined #ruby
bgfbghnbgh has joined #ruby
frontendloader has joined #ruby
<any-key> I need to create a /dev/one
looopy has joined #ruby
<any-key> Okay, so say I want to use pry as a replacement for script/console in a rails 2 app
<any-key> but I don't want to add it to my gemfile, since my coworkers wouldn't appreciate that
RORgasm has joined #ruby
<any-key> is there a way I can make that happen?
pu22l3r has joined #ruby
<fowl> any-key, ask in #pry
<any-key> it's more of a bundler question, I suppose
<any-key> but I'll hop over there
<fowl> any-key, why do you think you coworkers wouldn't appreciate pry? :)
dfibre has joined #ruby
lorandi has joined #ruby
<any-key> hehe we have a fairly large gemfile...I'm an intern so I don't really get the freedom to add dependencies without consulting with a bunch of peoples :P
kevinbond has joined #ruby
<fowl> ah
<fowl> lol @ RORgasm
<fowl> thats a fan
gtuckerkellogg has joined #ruby
Teomari has joined #ruby
bgfbghnbgh has quit [#ruby]
alx- has joined #ruby
kennyd has joined #ruby
kennyd has quit [#ruby]
rbanffy has joined #ruby
zeroeth has joined #ruby
sgmac has joined #ruby
brngardner has joined #ruby
krusty_ar has joined #ruby
sectionme has joined #ruby
sgmac has quit [#ruby]
dv310p3r has joined #ruby
chson has joined #ruby
Kiall_ has joined #ruby
bbttxu_ has joined #ruby
RORgasm has joined #ruby
axl_ has joined #ruby
frontendloader has joined #ruby
thone has joined #ruby
<msch> what's the canonical way to fix this rake issue? i remember having it all the time in the past, now it seems it's back: .rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/rake/version.rb:2: warning: already initialized constant VERSION
netrealm has joined #ruby
sahli_ has joined #ruby
<JohnBat26> I am developing ruby and rails applications and want to use good logging gem. What do you can advice me ?
mikeycgto has joined #ruby
mikeycgto has joined #ruby
sahli_ has joined #ruby
dbgster has joined #ruby
<twinturbo> hey
<twinturbo> if I start a new Thread and I don't join back to the parent, will the child be killed when the parent exits?
fudanchii has joined #ruby
hrs has joined #ruby
nif has joined #ruby
phantasm66 has joined #ruby
niku4i has joined #ruby
dfamorato_ has joined #ruby
<apeiros_> twinturbo: ruby only waits until the main thread is finished
<apeiros_> other threads will be just killed when the main thread is finished
zakwilson has joined #ruby
dfamorato has joined #ruby
emmanuelux has joined #ruby
surfprimal has joined #ruby
td123 has joined #ruby
headius has joined #ruby
dfamorato_ has joined #ruby
mdw has joined #ruby
mikepack has joined #ruby
dql has joined #ruby
barometz has joined #ruby
sinusss has joined #ruby
flagg0204 has joined #ruby
andrewhl has joined #ruby
sinussss has joined #ruby
pen has joined #ruby
apeiros_ has joined #ruby
wataken44 has joined #ruby
froy has joined #ruby
barometz has quit [#ruby]
kvirani has joined #ruby
abstrusenick has joined #ruby
mikepack_ has joined #ruby
sinusss has joined #ruby
pastjean has joined #ruby
luckman212 has joined #ruby
luckman212 has joined #ruby
nricciar has joined #ruby
KL-7 has joined #ruby
statarb3 has joined #ruby
rippa has joined #ruby
natemcguire has joined #ruby
nlc has joined #ruby
Drewch has joined #ruby
<vdv> i do following call of popen: IO.popen("sox -t mp3 - -t mp3 - silence 1 0.1 -40d reverse silence 1 0.1 -40d reverse", "w+")
<vdv> sox command supports in data on stdin and out data on stdout
<vdv> i've tested command separately
mikepack has joined #ruby
<vdv> and i become output if i pipe input
<vdv> but IO.open returns empty
chimkan has joined #ruby
<vdv> i.e. after data = IO.popen(), data is empty
<Mon_Ouie> I think I lost you at "i become output"
<Mon_Ouie> popen returns an IO object when you don't pass a block to it
<Mon_Ouie> (Or it raises an exception)
<vdv> replace become with get
sgmac has joined #ruby
<Mon_Ouie> Ah
sgmac has quit [#ruby]
<vdv> Mon_Ouie, but how can i get contents of stdout?
<Mon_Ouie> You can't read from stdout : it's a write-only stream
<vdv> ah, i forgot read
<Mon_Ouie> Oh, or do you mean read the output of the command you called?
<vdv> yep
<vdv> i should call read
<Mon_Ouie> Yeah, that's IO#read
carlyle has joined #ruby
albemuth has joined #ruby
jgarvey has joined #ruby
mcwise has joined #ruby
<vdv> Mon_Ouie, hmm.. interesting. i've added pipe.read, but still get empty: http://pastebin.com/TrMwgy6B
headius has joined #ruby
<vdv> Mon_Ouie, sox exit code is zero
uris has joined #ruby
<vdv> which is normal exit i think
<Mon_Ouie> Right, not sure what could be wrong. If I replace the command by something like "cat -", it works just fine
<Mon_Ouie> (I don't have that sox program installed to test ;)
<vdv> Mon_Ouie, now it works
<Mon_Ouie> I would use pipe.write instead of puts, though
<vdv> and i don't know why )
ckrailo has joined #ruby
<Mon_Ouie> Unless there should be a new-line at the end of the input, but I somehow doubt it
<Mon_Ouie> Isn't it because sox outputs to /tmp/outt.mp3 instead of using stdout?
quest88 has joined #ruby
fbernier has joined #ruby
Morkel has joined #ruby
nlc has joined #ruby
bozhidar has joined #ruby
Emmanuel_Chanel has joined #ruby
punkrawkR has joined #ruby
ananthakumaran has joined #ruby
rsgd has joined #ruby
a_a_g has joined #ruby
luckman212 has joined #ruby
ziggles has joined #ruby
workmad3_ has joined #ruby
rtdp has joined #ruby
nif has joined #ruby
mdw has joined #ruby
workmad3_ has joined #ruby
adac has joined #ruby
MasterIdler has joined #ruby
nemesit|osx has joined #ruby
blueadept has joined #ruby
blueadept has joined #ruby
zeroeth has joined #ruby
mikepack has joined #ruby
Proggy has joined #ruby
Progseter has joined #ruby
baroquebobcat has joined #ruby
eywu has joined #ruby
d34th4ck3r has joined #ruby
Araxia has joined #ruby
davidcelis has joined #ruby
lobak has joined #ruby
wilmoore has joined #ruby
mmokrysz has joined #ruby
`brendan has joined #ruby
nif has joined #ruby
lorandi has joined #ruby
Bartzy has joined #ruby
<Bartzy> In an array, can I specify a string element that is lower and uppercase ?
<Bartzy> It's for capistrano, it's for excluding files:
<Bartzy> set :copy_exclude, ['.git', '.gitignore', '.gitmodules', 'README.md']
<Bartzy> I want README.md to specify both README.md, and readme.md, and readME.md, without specifying them all - is that possible ?
<Bartzy> without changing capistrano code ?
zemanel has joined #ruby
<Mon_Ouie> No, if that program doesn't support some kind of regexps, you have to pass an array that contains all valid combinations
<apeiros_> if it supports globs, you can at least reduce your work a bit: '[Rr][Ee][Aa][Dd][Mm][Ee].[Mm][Dd]'
io_syl has joined #ruby
mdw has joined #ruby
<Bartzy> Mon_Ouie: And how do I use regexps if it does support it ?
<shevy> Readme.md!
MrGando has joined #ruby
<Bartzy> is it /readme.md/i ?
<Mon_Ouie> /\Areadme\.md\z/i
<Bartzy> What is \A and \z ?
<shevy> pinkie and brain
<Mon_Ouie> Beginning and end of string, respectively
<shevy> pinkie at the beginning, brain at the end!
cloke has joined #ruby
<Bartzy> and what is readme.md! :p
andrewhl has joined #ruby
a_a_g has joined #ruby
<Mon_Ouie> . has a special meaning too, so don't forget to escape it too
bawer has joined #ruby
savage- has joined #ruby
<Mon_Ouie> (It means "any character", your regexp would match "readmeamd" too)
mikepack_ has joined #ruby
awtnw has joined #ruby
Morkel has joined #ruby
<adac> Guys does one of you have experience with nokogiri and xml parsing?
mxweas_ has joined #ruby
nfluxx has joined #ruby
Eiam has joined #ruby
sgmac has joined #ruby
bpgoldsb has joined #ruby
sgmac has quit [#ruby]
<Mon_Ouie> I suggest you ask your real question right away, you'll see if someone can answer yourself
luckman212_ has joined #ruby
<adac> From this example https://gdata.youtube.com/feeds/api/videos/r_YOG3jMlV4?v=2 I would need to parse out the 'url' from <media:thumbnail> but only the one where 'yt:name="hqdefault"'
<adac> Mon_Ouie, ^
<adac> Ths namespaces make it complicated
bpgoldsb has joined #ruby
<adac> all thumbanils I do get like that:
<adac> doc.xpath('//media:thumbnail', 'media' => 'http://search.yahoo.com/mrss/')
kenperkins has joined #ruby
rramsden has joined #ruby
luckman212 has joined #ruby
<nw> doc.xpath('//media:thumbnail[@yt:name = "hqdefault"]', 'media' => 'http://search.yahoo.com/mrss/')
mikepack has joined #ruby
<shevy> hmm
<shevy> to interface with a webform
<shevy> without browser, only ruby. is there a minimal way to do that?
jgrevich has joined #ruby
jgrevich has joined #ruby
<shevy> in the past I used mechanize but it required hpricot. now it requires nokogiri. that is too much for my use case
<Veejay> `curl etc.`
mikepack has joined #ruby
<Veejay> The backticks are the key component here
twock has joined #ruby
johnmilton has joined #ruby
Eldariof-ru has joined #ruby
<nw> adac: sorry, that should be: doc.xpath('//media:thumbnail[@yt:name = "hqdefault"]', 'media' => 'http://search.yahoo.com/mrss/', 'yt' => 'http://gdata.youtube.com/schemas/2007')
<Synthead> I'm doing a lot of string comparison, and it's pretty unreadable having a one-liner of this or this or this or ... you get the idea. can I break this up into multiple lines?
adeponte has joined #ruby
<adac> nw, let me try this out :)
luckman212_ has joined #ruby
<fowl> Synthead, if you leave the expression open (&& ||, something like that) you can just carry over to the next line
Tachyon has joined #ruby
<fowl> if in doubt, end the line with \
<Tachyon> hi
<nw> adac: or if you just want the url, doc.xpath('//media:thumbnail[@yt:name = "hqdefault"]/@url', 'media' => 'http://search.yahoo.com/mrss/', 'yt' => 'http://gdata.youtube.com/schemas/2007')
workmad3 has joined #ruby
<Tachyon> can you tell me, if this https://tach.me/pastebin/view/25890362 should take about 4 seconds to execute on 15 MB file ?
<Synthead> fowl: ah, that did it. I was trying 'or' right after a newline before :)
<Synthead> thanks!
fayimora_ has joined #ruby
n1x has joined #ruby
joaoh82 has joined #ruby
<adac> nw, yes its basically about the url. Works like a chanrm! Thank you now i becomes clearer to me
<adac> *it becomes
SegFaultAX|work has joined #ruby
<fowl> Tachyon, more important than it taking X time
<fowl> is that you close your files
<Tachyon> O.o
<fowl> you aren't right there
<fowl> File.read() or File.readlines() is what you want
<fowl> unless you plan on doing f = File.open; f.read(); f.close
<Tachyon> ok
<Tachyon> i try it
<workmad3> fowl, or File.open() do |f|; f.each do |...|
<fowl> yes
<fowl> using a block with File.open will close it for you also
<Tachyon> the file has 151 000 lines
cwang has joined #ruby
<fowl> it takes 4 seconds to complete? doesnt seem too bad to me..
<Tachyon> it seems absolutlely totaly horrific
<Tachyon> the file has 15 mb
williamcotton has joined #ruby
<workmad3> tachyon: 15mb is a lot of text data to process
<Tachyon> O.o
<Tachyon> i'll try c program to process it
<Tachyon> i doubt it'll take more than a milisecond
cespare has joined #ruby
<Tachyon> hm
<Tachyon> actually 0.5 second is minimum according to my disk speed
rking has joined #ruby
rking has joined #ruby
wmoxam has joined #ruby
\1gn0tus has joined #ruby
<Tachyon> exactly what i expected
<Tachyon> hm
<Tachyon> maybe not mmnt
flaggy has joined #ruby
<fowl> well gl with that
<fowl> idk why anybody would say "i cant spare these 4 seconds, gotta rewrite in c"
\1gn0tus has quit [#ruby]
<fowl> but have fun lol
sohocoke has joined #ruby
<workmad3> tachyon: assuming you get max throughput, and don't forget that you're dealing with more overhead in ruby than just plain string processing... 151000 lines means that you're creating 151000 string objects to start with, plus an extra 4 or so per line...
<workmad3> tachyon: you could look at using something like the CSV lib with a tab delimiter to read the file btw
<Tachyon> so it is the speed of ruby
<Tachyon> hmm
<Tachyon> csv could do that
<Tachyon> i'll try it
<Tachyon> thanks
<workmad3> tachyon: it's not the 'speed of ruby', it's understanding what's happening... and what's happening is that you're creating massive amounts of objects, which has overhead
Teddy2steper has joined #ruby
<Tachyon> i'm not much used to it
<Tachyon> i hoped that there is some clever oraculum that knows that these objects are temporary and optimize it somehow
<workmad3> tachyon: and don't forget that you're doing about 300000 string comparisons there too, which aren't the cheapest operations in the world ;)
<Tachyon> well i used to have there regex
<Tachyon> and the speed was comparable
Ionic has joined #ruby
<Tachyon> the main bottleneck is the loop
<fowl> you sure about that?
<Ionic> Hi. I'm having a rather weird and difficult problem
<Tachyon> File.readlines("tags").each { |line|
<Tachyon> print line
<Tachyon> }
<Tachyon> this is comparable with the previous code
<Ionic> I'm using ruby via apache httpd and mod_fcgid, but nowadays the interpreter segfaults whenever a script is started
natemcguire has joined #ruby
<Tachyon> even this is problem
<Tachyon> File.readlines("tags");
<Tachyon> so there is bottleneck in the ruby handling the files
<Ionic> Not sure where to start. As ruby in general is not having any problems and I *can* start an fcgid script via a FcgidWrapper script, I suspect fcgid is doing something wrong, probably spawning the process in a wrong way
<shevy> Tachyon pls dont make the ;
<Tachyon> ok :)
<Ionic> (the wrapper I'm talking about is just a shell script with 'exec /usr/bin/ruby1.9.1 foo.rbx')
<shevy> File.readlines can become slow if the files are large
nerdy_ has joined #ruby
tommyvyo has joined #ruby
<shevy> there is a "trick" to read in snippets or something... I remember that manveru used it but I forgot what it was... hmm ... File.read ... in 1024 bytes or something... and repeat something else... hmm hmm hm
<shevy> helpful what I write isn't it :P
adamkittelson has joined #ruby
<shevy> trying to remember if I have a snippet
<Tachyon> shevy: i try some optimalization like that
<Tachyon> the size should be 4 MB
<Tachyon> no
stenno has joined #ruby
<Tachyon> 4 KB
<Tachyon> :)
<shevy> f.write(tempfile.read(2**16)) until tempfile.eof?
<shevy> ewwww
<shevy> that is kinda ugly
ghvandoorn has joined #ruby
<Tachyon> i try this
<Ionic> Not sure if you really wanna use 2**16
<shevy> hehe
<Ionic> Depending on how ruby handles constant values
<apeiros_> Tachyon: don't know what you do wrong, but reading 15MB of data takes 0.25s here
cha1tanya has joined #ruby
td123 has joined #ruby
<Tachyon> apeiros_: and what code do you use ?
<apeiros_> File.readlines(path)
<Ionic> if it's really calculating 2^16 "by hand" everytime it gets ugly
<apeiros_> just as you
<Tachyon> O.o
<Ionic> if it's bit shifting... well ok
<Tachyon> i try it on my server
<Ionic> if it's bit shifting once and using the constant result, even better
<shevy> hmm
<Ionic> well 1 << 16 isn't really a big deal
<apeiros_> oh, d'oh - sorry Tachyon - I know what I did wrong
<apeiros_> I wrote 15KB instead of 15MB of data into the file. my fault
aphyr_ has joined #ruby
* apeiros_ tries again
<Tachyon> :D
<Ionic> Sorry, I'm uninteresting
<shevy> Ionic it's ok as long as you are a girl and good looking!
aphyr has joined #ruby
<aphyr> What's the idiomatic way to remove a method from a class which its superclass defines?
<Ionic> shevy: I'm a guy, fat and ugly
rtdp has joined #ruby
<shevy> Ionic I would not know how to solve your problem though, never used Fcgid ... dont have a wrapper script either... and dnot use .rbx myself
<shevy> Ionic :(
<Ionic> .rbx is just my personal extension for a ruby fcgi script
<shevy> aphyr idiomatic hah :D
<Ionic> could well be just .rb
<shevy> remove_method(:foo)
pastjean has joined #ruby
<apeiros_> hm, ok, while writing the file was fast, reading it is horribly slow. that's odd…
<Ionic> dunno seems like I'll be having a lot of fun debugging mod_fcgid...
<apeiros_> 25s? wtf?
apok has joined #ruby
<Tachyon> O.o
<Tachyon> apeiros_: how many lines ?
<Tachyon> IO.read("tags")
<Tachyon> this is relatively fast
<bawer> ionic: this proably isn't helpful, but sometimes good to hear: how about doing it another way? use nginx or passenger+apache or pure thin?
<apeiros_> Tachyon: I wrote 60 chars per line
<apeiros_> so around 256000
<Tachyon> hmm
<apeiros_> s/around/exactly/
<apeiros_> and it took 25s with File.read. I interrupted File.readlines
<apeiros_> that's unreasonably slow…
<fowl> lol
<fowl> i said you should be happy with 4 secs :)
CrazyGangster has joined #ruby
<shevy> yeah
zakwilson_ has joined #ruby
<apeiros_> this is an SSD, so the storage media shouldn't be the limiting factor
<bawer> IO.readlines: "Reads the entire file specified by name as individual lines, and returns those lines in an array. Lines are separated by sep."
DPP has joined #ruby
<apeiros_> hm
<Tachyon> apeiros_: i have faster code i think
<apeiros_> ok, this makes it even odder - I ran the same code via `time ruby -e`, and there it took 0m0.204s
<apeiros_> what in the world would make it so much slower in irb?
<bawer> how are you guys measuring the code?
nfluxx has joined #ruby
schaerli has joined #ruby
<Tachyon> apeiros_:
<Tachyon> lines=IO.read("tags").split("\n")
<Tachyon> lines.each { |line| print line+"\n" }
<apeiros_> bawer: in irb using Benchmark.measure to get both, real and cpu time
<apeiros_> bawer: and outside irb: `time ruby -e`, as said
<Tachyon> this goes about 1 sec
c0rn has joined #ruby
<DPP> I'm having issues getting net/http to use https.
<DPP> i'm setting a Net::HTTP object to use_ssl=true but then the request returns with " wrong status line: "
<DPP> Net::HTTPBadResponse from deep within http.rb
<apeiros_> oooh… my… I forgot my bench{} method has a default of 1000 runs :-S
<apeiros_> shiit, stupid :)
mxweas_ has joined #ruby
<Tachyon> :DD
<bawer> Tachyon: how about IO.foreach("tags","\n") { |t| puts t}
<DPP> I can see that it is asking for a non SSL connection on 443, which is... wrong.
<apeiros_> I thought my pbench & mbench used that default and that bench was raw with a single run… my fault. so: now with the file being cached, I'm at 0.02s for File.read
<fowl> lol apeiros_
<Tachyon> bawer: it is slow as before
<apeiros_> and 0.18s with File.readlines
<Tachyon> ok i'm going to test it no my server
<Tachyon> apeiros_: what is the syntax of bench ?
<apeiros_> fuck, 2 fuckups in a benchmarks… first only 15KB, then wrong number of runs :)
<apeiros_> Tachyon: you don't have bench. You can use `require 'benchmark'; Benchmark.measure { …code… }`
riyonuk has joined #ruby
<shevy> wait what are you testing now
<shevy> IO.foreach ?
<riyonuk> Can I not do puts "You have" + method() + "pieces of cake"?
natemcguire_ has joined #ruby
<shevy> riyonuk __method__.to_s I think or #{__method__} or something like that but if you mean any method() then also, just return a STRING
<fowl> riyonuk, what do you expect that to do
<apeiros_> hm, gist can't mark lines like rest of github can? too sad…
<apeiros_> Tachyon: https://gist.github.com/923616#L355-402 (Line 355 - 402)
<Tachyon> heh :D
* apeiros_ just noticed that this irbrc has an older def of password…
<apeiros_> the newer definition returns a String whose inspect returns "[PASSWORD]"
<apeiros_> so it doesn't show up in irb :)
<fowl> irbrc, how ruby 1.8
<fowl> hyuck hyuck hyuck
<apeiros_> fowl: yeah, I started using pry
<shevy> long live ruby 1.8 !!!
<apeiros_> just gotta move a couple of things from my irbrc
<riyonuk> To run the method, since it returns a number
<riyonuk> :/
<shevy> riyonuk so what
<shevy> method().to_s
<riyonuk> I just keep getting undefined method
<shevy> then this method does not exist!
<fowl> stty -echo, why didnt i think of that
matt312 has joined #ruby
<riyonuk> It does!
<riyonuk> It's below the code
<fowl> i had some getch() loop that put ansi codes so it erased input >_>
<shevy> riyonuk what code. I dont see any code.
<riyonuk> I dont' want to show it to the public. It's not ready D:
<fowl> riyonuk, you can't do puts "sup #{coolmethod}" without coolmethod already defined
<riyonuk> but it's defined below it?
brngardner has joined #ruby
<fowl> yeah
<riyonuk> it has to be before?
<riyonuk> Ughhh
<shevy> riyonuk try it
<shevy> if it works, then you answered your question :>
<riyonuk> do people just put all their methods at the top?
joaoh82 has joined #ruby
<fowl> riyonuk, what do you expect, coolmethod doesnt exist at that point
<shevy> riyonuk, nah usually not
<riyonuk> I thought that was only with C++ >.>
<shevy> they go like
<shevy> class Fo
<shevy> def whatever
<riyonuk> I'm bout to rage.
<shevy> def yada
<fowl> since you can define/redefine methods as see fit, yeah riyonuk
My_Hearing has joined #ruby
<Tachyon> apeiros_: bawer: shevy: workmad3: It mus be the windows implementation of ruby. In linux server with the same file there is no performance problem.
<bawer> aaah.. gotta love winblows
<shevy> apeiros hehehe :D -> # Ok, I usually hate that and prefer plain requires, but due to begin/rescue for each of it, I'll do it this
<Tachyon> maybe 64 bit windows virtualization is messining it up
<Ionic> wtf...
<bawer> Tachyon: could be that
<Ionic> This is fucking bullshit
<shevy> \o/
<fowl> " 64 bit windows virtualization" god that sounds scary
<Ionic> If I start httpd -X -f debug_config my fcgid stuff is working fine
<shevy> I got 63 bit virtualization
<shevy> one bit got dropped
<Tachyon> 64 bit windows virtualization of 32 bit environment
<shevy> Ionic, problem solved!
<Ionic> shevy: ... no
<Ionic> shevy :/
Russell^^ has joined #ruby
wyhaines has joined #ruby
<riyonuk> Looks like it worked if I moved the method up
<apeiros_> shevy: whot?
<riyonuk> okay, with that said, is there a ruby equiv of a prototype?
<riyonuk> I like my functions at the bottom :
<fowl> riyonuk, generally your CLASSES are in separate files and included
<fowl> but if you want to have bare methods, do the same thing
<shevy> apeiros_ from your irbrc hehe
<fowl> s/included/required
<riyonuk> and can this only be variables? #{}?
<riyonuk> Can we do #{method}?
<shevy> Can we kill riyonuk?
<fowl> riyonuk, its more like #{expression}
<riyonuk> :<
<shevy> methods man, methods!
<fowl> ie "#{puts 'hi'; x = 4; x * 2}"
<shevy> and "prototype", it depends what you need. a Struct could help
<apeiros_> shevy: ah
<riyonuk> shevy: Oooooh, I thought that was only for string interpolation
<aphyr> Any tax stuff y'al
<aphyr> ™¡™££
<riyonuk> That's what the guy from Gowalla told me :/
<shevy> record = OpenStruct.new; record.name = "John Smith"
<fowl> riyonuk, you can literally do anything in there, "#{"#{"oh hi there"}"}"
<shevy> oops sorry that is OpenStruct not Struct
<fowl> "#{class Fu; def wut() :WUTWUT end; end; Fu.new.wut}"
<fowl> if you want to
<fowl> i dont recommend it
<fowl> but have fun lol
sgmac has joined #ruby
sgmac has quit [#ruby]
<shevy> riyonuk, prototype
<shevy> Sword = Struct.new(:length, :weight)
chimkan_ has joined #ruby
<shevy> sword = Sword.new(120, 4.5)
<shevy> sword.weight # => 4.5
<riyonuk> Ahh, nice. Cause I find it much more cleaning then "adding" things
<shevy> man, I should try to write a MUD just with structs alone one day
<fowl> structs are pretty awesome
<shevy> yeah
<fowl> you could use them to define a full class if you want
zeroeth has joined #ruby
<shevy> hmm perhaps I should write two MUDs... a classical one with classes... and one with only prototypic struct definitions
<stenno> that sounds totally reasonable
<fowl> dont write a mud shevy
<shevy> yeah I tried ... but it felt like too much work :(
<fowl> bbs's might be popular in germany but they're 30 yrs out of fashion everywhere else lol
<shevy> that is also true
<shevy> it kinda died 15 years ago ...
<fowl> would you dedicate it to angela merkel (sp) shevy ?
<shevy> nah Kaiser Merkel is annoying
<shevy> she behaves like the ruler of europe
<stenno> well she is
<fowl> does she look like a Reptilian Alien to you too?
<shevy> I envy the guys who started the french revolution
<shevy> fowl, dunno. she is ugly... but also kinda "normal" ugly.
<fowl> thats not a normal ugly
<shevy> hehehe
<fowl> reptilian features
<stenno> she looks as if she had snorted a gram of cocaine
<shevy> fowl but everyone looks uglier in front lookup, without photoshop http://www.npg.si.edu/exhibit/feature/images/06-02_full.jpg
strife25 has joined #ruby
<fowl> yeah he looks like curious george
sectionme has joined #ruby
Radium has joined #ruby
mattyoho has joined #ruby
<shevy> http://www.youtube.com/watch?v=mOympMtG5Dk old german song! also a funny song... but the thing with the singer is, Mike Kr
<shevy> he is ugly but looks very funny
<fowl> lol
<fowl> that's a nose
<shevy> oh man :(
<shevy> TV ... 30 years ago ...
<shevy> it was better than today
nif has joined #ruby
stkowski has joined #ruby
thoradam has joined #ruby
<shevy> hmm
<shevy> I think I am going to document my code less
<shevy> :\
luckman212 has joined #ruby
chimkan has joined #ruby
voodoofish430 has joined #ruby
havenn has joined #ruby
<Spaceghostc2c> shevy It's probably for the best. Then people can't say you have shit documentation.
luckyruby has joined #ruby
iury3 has joined #ruby
<aphyr> Aha, you have to define it *before* you can undefine it, even if its in the superclass
<iury3> hello
<iury3> can someone recommend a good ruby book for beginners?
headius has joined #ruby
ringotwo has joined #ruby
<fowl> _whys poignant guide
jrhorn424 has joined #ruby
CrazyGangster has quit [#ruby]
<iury3> i started reading that one but got bored in the middle with all the side storys
<shevy> Spaceghostc2c, well there still will be documentation. But it will be terse, and to the point. And I'll always have a tutorial how to use my things
<shevy> but up to now... I kinda was documentating every method
<aphyr> iury3: That's when you turn to the pickaxe book
<shevy> # Read file content into @foo
<shevy> def read_file_content
<shevy> :\
<Spaceghostc2c> shevy: You should just make only the methods you intend people to use public method.
<shevy> hmm
<Spaceghostc2c> Then only document those.
<Spaceghostc2c> Write us a haiku as well.
<shevy> lol
tomaw has joined #ruby
iury3 has quit [#ruby]
savage- has joined #ruby
foysavas has joined #ruby
mrsolo has joined #ruby
RubyRedGirl has joined #ruby
RubyRedGirl has joined #ruby
pen has joined #ruby
mikeric has joined #ruby
kpshek has joined #ruby
bigdc1 has joined #ruby
mxweas_ has joined #ruby
ghanima has joined #ruby
jakky has joined #ruby
jhowarth has joined #ruby
jhowarth has quit [#ruby]
sacarlson has joined #ruby
Eldariof59-ru has joined #ruby
mbreedlove has joined #ruby
rking has joined #ruby
thoradam has quit [#ruby]
newellista has joined #ruby
rramsden has joined #ruby
mutewinter has joined #ruby
<DPP> has anyone seen a gem for editing an apache config file?
<DPP> I've found a few that create them, but I'd rather just have it as a template of some sort
Guest52365 has joined #ruby
Guest52365 has quit [#ruby]
rking_ has joined #ruby
rking has joined #ruby
dhruvasagar has joined #ruby
gurugeek_ has joined #ruby
<shevy> DPP that seems a very small use case
CoderCR|work has joined #ruby
icecream has joined #ruby
aphyr has quit [#ruby]
<Guest70315> hi :)
<DPP> shevy: editing a config without generating from scratch? I wouldn't have thought so
<devnullsh> anyone can share some valuable help with this http://stackoverflow.com/questions/10076867/searching-google-spreadsheets-with-ruby please ?
<DPP> guess i'd settle for any gems that simply templating without doing tedious parsing
<ghanima> hey guys
<ghanima> quick question
<ghanima> how do I create a hash from another hash
<shevy> DPP yeah I think editing is slightly more complicated than generating a completely new one
<canton7> ghanima, expand?
<bawer> ghanima: clone?
gurugeek_ has joined #ruby
<DPP> I'm way more comfortable doing file parsing in perl than ruby.. not even sure why I wanted to do this in ruby other than being obstinate
startling has joined #ruby
<DPP> but here I am!
nif has joined #ruby
<ghanima> bawer: Clone works for what I need thank you
foysavas has joined #ruby
sarmiena_ has joined #ruby
<sarmiena_> is there a way to write to a fake in memory file?
CoderCR|work has joined #ruby
<shevy> sarmiena_ not sure. you could use a tempfile in ruby tho
<sarmiena_> shevy: thanks
<bawer> sarmenia_: IO.pipe
<sarmiena_> bawer: thanks
rushainem has joined #ruby
<ghanima> I am trying to use the Typhoeus gem to do HTTP GET request to an HTTP Auth page and pull metrics from a very generic page. I am trying to construct the following., request = Typhoeus::Request.new('http://xxx.xxx.xxx.xxx:7017',
<bawer> sarmenia_: like this "r, w = IO.pipe" then you get a read and a write pipe
<ghanima> I want to the :params => hash to be set from a another hash
<ghanima> but I keep getting the following error
<ghanima> (irb):27: syntax error, unexpected ')', expecting $end
<ghanima> from /usr/local/rvm/rubies/ruby-1.9.2-p318/bin/irb:16:in `<main>'
<sarmiena_> bawer: sweet! exactly what i need :)
<bawer> ghanima: put some code on pastebin
veronatii has joined #ruby
<savage-> anyone using redis master/slave setup in production?
abra has joined #ruby
CoderCR|work has joined #ruby
<bawer> ghanima ? try ' :params => jvm.clone'
<bawer> ghanima: should be a ">" after the equal-sign
Zolrath has joined #ruby
williamcotton_ has joined #ruby
nvez has joined #ruby
foysavas has joined #ruby
Evixion has joined #ruby
<ghanima> bawer: Thank you that worked great
RORgasm has joined #ruby
tatsuya_o has joined #ruby
KL-7 has joined #ruby
havenn has joined #ruby
Sailias_ has joined #ruby
Vert has joined #ruby
h4mz1d has joined #ruby
<rking> Anyone have a good equalprg for vim?
voodoofish430 has joined #ruby
conor_ireland has joined #ruby
atmosx has joined #ruby
Pip has joined #ruby
<Pip> Why is Ruby slower than Python?
<daed> is it? i wasn't aware that it was
<daed> nor did i realize that it was slower in every single case?
<rking> Farilly.
Eldariof59-ru has joined #ruby
<Boohbah> Pip: do you have any evidence to back up your assertion?
statarb3 has joined #ruby
statarb3 has joined #ruby
<Pip> Boohbah, Yes
internet_user has joined #ruby
headius has joined #ruby
<Boohbah> Pip: would you like to share?
<bawer> Pip: I would guess it could be because of it's highly dynamic nature.
<Boohbah> Pip: did you notice that is YARV and not MRI?
<headius> YARV is MRI
<Boohbah> YARV has become the official Ruby interpreter for Ruby 1.9
<Boohbah> right
<Sou|cutter> jruby is pretty sweet
<headius> jruby 1.7 (master) on Java 7 is considerably faster than that too
<Pip> JRuby is not faster than Python in every respect
<Sou|cutter> Pip: you can't benchmark every respect.
<headius> X is not faster than Y in every respect
RubyRedGirl has quit [#ruby]
<Pip> pidigits
<Pip> Ruby JRuby25.8125.8445,128242 1% 0% 0% 100%
<Pip> Python 32.872.875,348255 0% 0% 0% 100%
<bawer> depending on the usecase, cramming every lsat bit of clockcycle isn't the big issue
<havenn> Pip: You should prolly switch from Python to ADA then...: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=ats&lang2=python3
luckman212 has joined #ruby
<Sou|cutter> if you're doing heavy math calculations, hand tweaked assembly is probably faster
<Pip> lol
<headius> pidigits uses regular expressions and shit...it's a goofy benchmark
<Sou|cutter> but nobody wants to write assembly :P
<Pip> In front of Ada, Python is a damn snail
mikeycgto has joined #ruby
<bawer> Ada is the shiznits
<headius> actuallly I'm thinking of the DNA one
mikeycgto has joined #ruby
<headius> pidigits just creates a crapload of objects in the Ruby version
ruby_tester has joined #ruby
luckman212_ has joined #ruby
<Sou|cutter> I wonder if this is a troll
<Pip> Intel Fortran is faster than C gcc
<ruby_tester> is there a particular toolkit folks use to automate java applications?
<ruby_tester> the java is outside of the web
<any-key> jruby?
<Boohbah> Pip: you should probably switch to fortran then
robdodson has joined #ruby
<Boohbah> the python and ruby versions of pidigits are not the same
<Boohbah> a flawed benchmark
<bawer> Boohbah: where do you see the source-code for the tests?
krz has joined #ruby
Brainix has joined #ruby
mikeric has joined #ruby
<bawer> the python test looks far more optimized
<headius> Boohbah: right
<headius> some of the python benchmarks use numpy too
<headius> so they're really testing native C libraries, not python itself
<Boohbah> what a bunch of tards
<bawer> yeah, that test looks inconclusive
<Pip> I wish Ruby is the fastest dynamic language among the others
<Boohbah> well, i am going to rewrite pidigits ruby version today
<Pip> :D
<bawer> Pip: what is your usecase?
<apeiros_> Pip: you should use self then
<apeiros_> afaik the sun researchers got self quite close to C
chimkan_ has joined #ruby
<Pip> usecase? just general programming, mostly on math
davidpk has joined #ruby
<havenn> Pip: require 'mathn'
rushainem has joined #ruby
<Pip> I heard the Sciruby is under development, right?
enroxorz has joined #ruby
<Boohbah> headius: gmpy used in pidigits.py is also a C library
<headius> yeah, so there's the problem with the shootout
<headius> the jruby version could just call Java library to do shit too, but that's not useful
pingveno has joined #ruby
<apeiros_> I think it'd be nice to have 2 benches for each language
<apeiros_> one limited to core/stdlib
Sailias_ has joined #ruby
<apeiros_> and one where you can use everything you can
macmartine has joined #ruby
deception_ has joined #ruby
<TTilus> its gonna be "flawed" nevertheless
gomix has joined #ruby
robdodson has joined #ruby
<apeiros_> there's no such thing as a perfect benchmark
<bawer> yes, but there should at least be tests that do it closer to "as good as possible" than the one's we see
<apeiros_> but at least you get an idea
<apeiros_> there's also the difference between highly optimized native code vs. idiomatic native code
<apeiros_> but who decides what idiomatic code is?
<bawer> at the end of the day most of the lag in software that I need to write comes from the fact of actual physical bit's flying around the world and the waiting for them to make their roundtrip :)
<apeiros_> I mean at the company, we've some code in the ETL part which is quite ugly, but it performs good
tatsuya_o has joined #ruby
mattyoho has joined #ruby
<TTilus> shootout is a noneven and unfair comparison of a great number of random and partly irrelevant factors to the performance of a code snippet ... and damn great fun to read and argue about
tatsuya_o has joined #ruby
mattyoho has joined #ruby
<bawer> yep, prefereably while drinking beer
gurugeek_ has quit [#ruby]
simao has joined #ruby
* TTilus prefers tea
<bawer> each to his one, I guess. :)
gomix1 has joined #ruby
<TTilus> good beer will do too, sure
melba has joined #ruby
<bawer> each to his own? that's what I meant :)
* bawer thinks ruby is pretty
trivol has joined #ruby
cousine has joined #ruby
chico has joined #ruby
nlc has joined #ruby
<shevy> hmm
<shevy> if I have... module Foo; def bar ...
jgrevich_ has joined #ruby
jgrevich_ has joined #ruby
<shevy> and when I require that code ... I want to kinda treat this file as if "def bar" has been defined without being in module Foo namespace
<shevy> so that require automatically would mean include or extend
<shevy> (it's a one-method file. I am deciding whether it should be within a namespace or without right now.)
<shevy> ah screw it. one method, no namespace. is simpler.
melba has quit [#ruby]
d2dchat has joined #ruby
andrewhl has joined #ruby
mikeric has joined #ruby
Faris has joined #ruby
Jake232 has joined #ruby
wallerdev has joined #ruby
Bartzy has joined #ruby
<Pip> alrght
<Pip> I want to uninstall gem
<Boohbah> help! troubles installing sciruby
<Boohbah> ruby 1.9.3p125 (2012-02-16 revision 34643) [x86_64-linux]
<any-key> Pip: gem uninstall <gemname>
<Boohbah> i would guess i need an older ruby
<Pip> No, I want to uninstall the gem system itself
<Pip> As well as those installed gems
<Boohbah> rubygems is builtin to 1.9
<any-key> why exactly do you want to uninstall rubygems?
lifestream has joined #ruby
sacarlson has joined #ruby
<shevy> Pip kill the "gem" binary
<shevy> Pip then go to the gem sitedir and remove it
<any-key> but whyyyy
<any-key> I feel like that will break things
<shevy> for me the gem is at /usr/lib/ruby/gems
<shevy> any-key why would anything break?
<any-key> Pip: why do you want to get rid of rubygems?
<Pip> Well, I have got Ruby 1.9.3 installed
<Pip> But I see 1.9.1 here in the gem directory
<shevy> installed how
<any-key> that is normal
<shevy> oh
<any-key> Pip: nothing is wrong, don't mess with it
<shevy> it confuses people!
<Pip> Alright
<shevy> remove it all Pip
lifestream has quit [#ruby]
<shevy> then when you install new
<any-key> no
<shevy> RENAME THE DIRECTORY FROM 1.9.1 TO 1.9.3!!!
<any-key> don't do anything shevy says
Divinite has joined #ruby
* shevy presses any-key
<Pip> :D
<Pip> Alright
<shevy> look
trivol has joined #ruby
<shevy> you wont even FIND the any-key
<shevy> so ignore what he says
<shevy> until you have found the any-key
<Pip> any-key is what?
<shevy> yes
<shevy> it's not here
<shevy> perhaps one could press three keys
<shevy> "any"
<shevy> but I think it must be ONE key
<shevy> the any-key
* Pip is going to remove Ruby
<shevy> lol
<any-key> why
<any-key> meh do whatever you want
<shevy> any-key, he was the one asking interview questions
<any-key> I don't read scollback
<shevy> like "will ruby make me rich"
<Pip> Oh
<shevy> ok dont scoll back
<Pip> Any-key is the nick of a guy here
<Pip> :D
<any-key> ruby will make you rich
<shevy> hahaha :D
<any-key> just look at me
<shevy> he is also noisy Pip
* Pip stares at any-key
<shevy> only CAPS LOCK is worse
<shevy> "scripting question press any key to continue"
wyhaines has joined #ruby
<shevy> hmm
<shevy> stackoverflow is nice
looopy has joined #ruby
<Pip> WARNING: You don't have /root/.gem/ruby/1.9.1/bin in your PATH,
<Pip> gem executables will not run.
<shevy> hmm Launched August 2008
kjg has joined #ruby
<Pip> What is that?
<shevy> in some months, stackoverflow will be 4 years old
<shevy> Pip, remove ruby
<Pip> why?
Radium has joined #ruby
<shevy> also, that is an odd directory to have
<any-key> oh my gawd
<Pip> Oh
<any-key> both of you, be quiet
<shevy> you did not instally ruby to /usr prefix?
<Pip> :D
<any-key> Pip: you're perfectly fine
<any-key> nothing is wrong
<Boohbah> maybe $GEM_HOME is set for root
<any-key> so don't attempt to fix anything >.<
<Boohbah> that would be weird
<Pip> This Ruby is from the stock repo
<any-key> exactly
<any-key> you are fine
<Boohbah> Pip: are you using debian?
<shevy> how could stock repo assume to have your gem executable in your HOME dir???
<any-key> unless it is causing issues, it is working
<Pip> Archlinux
<shevy> that is so totally wrong
<Pip> Jesus
<any-key> no, it is not
<Boohbah> i am using arch too and mine doesn't do that
<shevy> that path is really odd: /root/.gem/ruby/1.9.1/bin
<Pip> Well, I did : sudo gem install <XXXXXX>
<Boohbah> but i need to install rvm now to get sciruby working, i think
<any-key> rvm makes installation easy
<shevy> sciruby? that sounds like... science ruby?
<Pip> it's a clone of scipy
<Pip> :D
router has joined #ruby
<router> hey yall
<Boohbah> hey router
<Boohbah> yes, i think i need an older ruby to run sciruby
<Boohbah> unless anyone can help me debug
<router> wait
<router> some ruby cant run some libraries?
<Pip> oh
<Boohbah> router: right
<router> omg
<Pip> $ gem install sciruby
<Pip> without sudo?
<router> those are breaking changes
<Boohbah> Pip: yes, i am installing into my user $GEM_HOME
<Boohbah> Pip: installing gems as root is generally not the way to do it
<Pip> You defined that variable yourself?
<Boohbah> Pip: i did, in my ~/.bashrc
<Pip> okay
ChampS666 has joined #ruby
<Pip> the default path is /usr/lib/ruby/gems/
<Boohbah> but yes
<Boohbah> it is
alexr2 has joined #ruby
alexr2 has quit [#ruby]
<router> are u suppose to code ruby on a mac?
<Boohbah> going to rm -rf $GEM_HOME and install rvm now
<shevy> Pip now that looks like a sane path to me
<any-key> router: you can code ruby on any platform
<router> on windows?
<shevy> router the rails folks, lot of them use a mac
<any-key> yes
<Boohbah> even windows
<shevy> but linux is more fun!
<any-key> for best results use OS X or linux
<deception_> Anyone here used Xvfb. About to take a stab at setting it up to run headless web app testing
<Boohbah> shevy += 1
<any-key> but it works just fine on windows
<matt312> linux since you're most likely to deploy to linux
<router> why is it best results ot use osx or linus
<Boohbah> router: because ruby was developed on linux
<any-key> don't program on Linus, he may not appreciate that :P
<Pip> shevy, very complex
<Boohbah> and it is usually deployed on linux servers
<router> does it matter?
<any-key> router: they're equal as far as I'm concerned
<shevy> matt312, well, all my ruby scripts will work on windows too (with perhaps 0.5% of them needing SMALL modifications i.e. path related things, or they only work on linux actually... but very small part altogether)
<any-key> router: linux or OS X will work great
<kjg> Is there a known issue with 1.9.3p125 installed via rvm on Lion and UTF-8 not working?
<matt312> shevy agreed, its that .5% that can waste time
<Boohbah> not sure, i don't have a Lion
<shevy> I have a Panther
<matt312> and windows lacks a unix shell
<shevy> in my pants!!!
<matt312> which makes it worhtless
<shevy> matt312, true, but you can use msys, all bash aliases will work, most unix commands will work too
<Boohbah> matt312: but what about PowerShell? :)
<shevy> though I think MSYS kinda died. I hate cygwin :(
Radium has joined #ruby
<matt312> imo, not the same shevy & boohbah
<matt312> but to each their own
<shevy> powershell I dont know
Radium has joined #ruby
<any-key> kjg: unicode seems to work here
<shevy> msys is ok though
<shevy> but windows as a whole goes on my nerves
<RubyPanther> by that logic, linux lacks a "unix" shell too
<any-key> linux is technically not posix compliant
<matt312> :P
<RubyPanther> linux and windoze are both (technically? wtf that does that mean) POSIX compliant
<any-key> but it uses all the POSIX apis
<any-key> windows is not posix compliant...
<any-key> hmm
<RubyPanther> Oh yes it is, and their POSIX compliance is what got them accepted for highly secure government installations. (true story)
pastjean has joined #ruby
<Boohbah> RubyPanther: umm, no
<shevy> well wikipedia does not list it there
<any-key> read the link I posted
<shevy> Fully posix compliant: AIX !!!!!
<shevy> ohhhh
<shevy> the soft word is ... "compliant"
<kjg> any-key: hm. When I type a unicode charater just outputs the the escaped values for me "\U+FFC3" I wonder if I'm missing a dependency of some sort
<shevy> "Without these features, they are usually noncompliant."
Radium has joined #ruby
<any-key> kjg: did you use .inspect or p to output it?
y3llow has joined #ruby
s0ber has joined #ruby
wyhaines_ has joined #ruby
<RubyPanther> If you actually read those links and understand what POSIX is, it is not a checklist on wikipedia. Windows is as compliant as any of the modern *nix OSes that are broadly considered "POSIX" such as Linux, FreeBSD, Solaris, etc
<kjg> any-key: nope. Just Typing it on the keyboard for example opt-r for registered symbol shows up as escaped values in irb prompt. And then putting it in quote just returns an empty string
<any-key> hmmm
<any-key> I'm not sure
<Boohbah> RubyPanther: are you serious?
<RubyPanther> Are parts of it optional and not always installed? Yeah, that's true on AIX too
linoj has joined #ruby
andrewhl has joined #ruby
deception_ has quit [#ruby]
<RubyPanther> I've been using only *nix since the 90s. I am indeed serious about *nix. POSIX is.
luckman212 has joined #ruby
y3llow has joined #ruby
<shevy> I hereby suggest to rename POSIX to PONIX
<Afal> Ponies! :D
<shevy> yeah Afal I see you are an attentive reader :)
<RubyPanther> And literally, like a decade or more ago, Windows got certified for various "secure" government installations. That stuff is why NT4 started adding POSIX in the first place. Without Windows POSIX we never would have seen an aircraft carrier dead in the water because it blue-screened
Radium has joined #ruby
schaerli_ has joined #ruby
Radium has joined #ruby
luckman212_ has joined #ruby
robdodson has joined #ruby
Radium has joined #ruby
y3llow has joined #ruby
<kjg> any-key: so doing puts [174].pack('U*') outputs the correct symbol, but just typing opt-r or copying and pasting to the irb prompt outputs escaped values. p0 works as expected. -head also seems to not work for me
Radium has joined #ruby
<any-key> better than nothing
Urthwhyte has quit [#ruby]
luckman212_ has joined #ruby
chico has joined #ruby
<kjg> haha
<Divinite> RubyPanther: And that's why Linux is here.
<any-key> the NT kernel is really robust
<Pip> weird
<any-key> having a microkernel will do that
y3llow has joined #ruby
<shevy> a microrubykernel
<any-key> but if you layer nothing but shit on top of that it's not going to be very good :P
<RubyPanther> a kernel better be robust, that is a rather small compliment
gen0cide_ has joined #ruby
<Boohbah> my methane gas output is also really robust
gomix has joined #ruby
<shevy> but it's bacteria that produce it, not you!
<Boohbah> shevy: where do i draw the line between me and bacteria? if i need the bacteria to survive, are they not part of me?
<RubyPanther> You don't need them to survive, it is just more pleasant with them
Radium has joined #ruby
<Divinite> RubyPanther: You do need bacteria to survive.
<any-key> is this a channel of biologists all of a sudden?
<shevy> well he is kinda right, if all bacterias would be dead, we couldn't digest food
Radium has joined #ruby
<shevy> any-key, it is ruby-philosophy!
<shevy> ruby extends into EVERYTHING
Radium has joined #ruby
<shevy> soon into the universe
<Divinite> And EVERYTHING is RUBY.
Radium has joined #ruby
<Boohbah> Pip: so, you removed rubygems and now you're trying to use it?
* Boohbah so confused
<RubyPanther> it is a channel of idiots who read some trivial pursuit, apparently. Some people actually have their bacteria killed off or have to take drugs to suppress them. It isn't deadly, but it certainly changes how you plan your diet.
<any-key> Boohbah: I fucking told him not to
Radium has joined #ruby
<any-key> but nooooooo
<Pip> I removed ruby and manually removed the entire directory /usr/lib/ruby
<Pip> And reinstalled ruby
Radium has joined #ruby
<Divinite> In the beginning there was a word. The word was....
<Pip> And got this
<Boohbah> Pip: why did you do that?
<Divinite> Ruby
<any-key> because I said the opposite
Radium has joined #ruby
Radium has joined #ruby
<Pip> Boohbah, I wanted to clean everything
<any-key> Pip: you should really really really set up rvm
<Boohbah> Pip: that was not the right way to do it
<Pip> :S
Radium has joined #ruby
bglusman has joined #ruby
<Pip> So what's going on on my computer?
<shevy> Pip why did you keep gem?
<Pip> it's messed up?
<Boohbah> who knows? you are doing strange and unsupported things to it
<Pip> shevy, some gems are shipped with ruby
<any-key> yes, you'll need to purchase a new one
<shevy> Pip no
<any-key> Pip: install rvm
<any-key> NOW
<Pip> How?
<Divinite> Or die.
<shevy> oh
<any-key> it will let you install/uninstall versions of ruby all day long
<Pip> :D
<shevy> you use 1.9.x so gem is part of your ruby version
<Boohbah> i gave you the dang wiki link earlier
<shevy> YOU ARE LOST MAN
<Pip> shevy, yes, and some gems are shipped with rubygem
<shevy> no!
<Boohbah> what
<Pip> Yes!
<shevy> no!!!
<shevy> name them!
<any-key> fastercsv
<Pip> json, rake, rdoc....
<shevy> what
<Pip> io-console
<bawer> geez.. my head hurts
<Pip> bigdecimal
<shevy> what are you guys talking about
luckman212 has joined #ruby
<any-key> 15:46 < shevy> my goal is to be the last person on #ruby-lang using 1.8.x
<any-key> I don't trust you
<shevy> yeah
<Pip> :D
<shevy> here I am cleverer but dont tell them
<shevy> I will secretly use ruby 1.9.x here :)
<any-key> 1.9 is when they started including things
<shevy> what
<shevy> so when I compile 1.9.x from source
<shevy> I have n numbers of gems installed?
<shevy> which i can uninstall?
<any-key> yes
<shevy> I am going to test this theory right now!
<any-key> some of them are packaged as part of the language, they may not appear as gems
<any-key> but they were at some point gems
<shevy> damn
<shevy> the theory is correct
<shevy> :(
<any-key> boooom
nif has quit ["Initiating backup..."]
<shevy> I still hate psych though
<Pip> Boohbah, so ....
Sailias has joined #ruby
<shevy> well, learned something today. latest ruby comes with 6 gems installed
<Boohbah> so...
<any-key> so what
<lectrick> Is "class << self" syntax?
<Pip> Why don't you have such problems like mine?
<any-key> lectrick: looks like syntax to me
<shevy> lectrick it is valid ruby syntax
ScottNYC has joined #ruby
<Boohbah> Pip: because i read and follow directions
<shevy> Pip, I had many more problems!
<lectrick> It would be cool if it wasn't, but... NO NO NO, I mean, is that special syntax or just regular Ruby syntax? (any-key/shevy)
<Pip> Boohbah, like what?
<shevy> Pip, I think Boohbah is just a lucky man
<any-key> lectrick: it's ruby
* Boohbah is lucky
<shevy> lectrick completely regular syntax, often found in .rb files too
<Pip> I don't believe that
<shevy> but I dont like it, visually
<Pip> This is science
<bawer> letrick: yes, it's metaprogramming..
<Pip> God doesn't play dies
<shevy> dies?
<any-key> class Foo << self creates a class with only class methods, correct? I don't run into that pattern very often
<shevy> one die... many dice?
<lectrick> shevy: I know, but if it's regular ruby then how can you append self to whatever the keyword "class" refers to? Or is << defined on class Class? I'm so confused
<Pip> Oh, sorry
<Pip> dice
<Boohbah> "God is dead!"
<shevy> lectrick, yeah that syntax confuses me too. I think you extend the current class... and allow uhm... something on it... class methods perhaps?
<Boohbah> -Nietzche
<Boohbah> welcome to #ruby-philosophy :)
<Pip> I don't buy it that your Arch is superior over mine
luckman212_ has joined #ruby
<shevy> ok ok
<shevy> he is smarter than you Pip
<bawer> lectrick: you are changing the meaning of 'self' to be the class itself
<shevy> :>
<Pip> :D
<Boohbah> it's true
<Pip> true what?
<Boohbah> Pip: remember when you posted those debian benchmarks earlier?
<shevy> it's ok, not everyone can be einsteins
<shevy> Pip is 13% einstein, Boohbah 35%
<Pip> Boohbah, Debian?
<Pip> Nothing to do with Debian
<bawer> lectrick: also, see http://yugui.jp/articles/846
<Pip> Damn, I see semicolon in ruby code
<Pip> def hoge; end
<bawer> Pip: it's because it's on one line
<Pip> Oh
<Boohbah> $ rvm install 1.9.3
<bawer> Pip: so the ; is separator
<shevy> Pip why are you not using C
<shevy> no wait
<shevy> perl!
<shevy> :)
<Boohbah> Pip: nothing to do with debian except that they are hosted on debian.org...
<any-key> ruby is perl 6
<Pip> lol
<Boohbah> hehe
<shevy> naaaaaah
<any-key> it is
<shevy> ruby can deliver, perl 6 is vapourware
<any-key> seriously
Radium has joined #ruby
<shevy> you even need perl to bootstrap perl 6!
<any-key> ruby and perl have more in common than people care to admit
<any-key> just look at globals
Radium has joined #ruby
<Pip> I can't accept it
strife25 has joined #ruby
<Boohbah> i see your point, any-key
<shevy> what can you not accept
Radium has joined #ruby
<Pip> Ruby is unique
<shevy> you UNINSTALLED ruby man
<shevy> the game is OVER
<Pip> :D
Radium has joined #ruby
<shevy> --- End of Pip's adventure into Ruby here
* Pip sighs
Radium has joined #ruby
<ScottNYC> is it standard practice to heavy mac terminal users to use iterm2 ?
<Boohbah> well, i linked the arch wiki on how to install RVM 3 times
<shevy> you can press the any-key if that cheers you up :)
<any-key> ScottNYC: the cool ones, yes
<Boohbah> but it seems Pip cannot read
<Pip> I don't need RVM
<shevy> lol
<any-key> Pip: just fucking do it
<shevy> I think he said that, he hates RVM
<any-key> please
* Pip has pacman
* Boohbah does too
<any-key> that's like completely different
<shevy> crapman
<any-key> Pip: rvm installs ruby locally to your user and lets you switch versions on the fly and whatnot
ben225 has joined #ruby
<Boohbah> pacman is not the way to manage ruby installs or gems
<shevy> in the morning it makes you breakfast
<Boohbah> i tried it; it sucked
<any-key> Pip: you can say "rvm install 1.9.3" and it will pull down and build 1.9.3 for you
<any-key> Pip: you can also tell it to completely get rid of different versions of ruby
* Pip has AUR helpers
<any-key> Pip: so it basically fixes all of your problems
<Boohbah> Pip: /me does too
<shevy> hehe
<shevy> Pip, please give up already
<Pip> I can do: cower -d <ABC> && makepkg --check
<Pip> and everything will be like automation
<any-key> did you not read a word I said
luckman212 has joined #ruby
<Pip> Alright
sebastian has joined #ruby
<any-key> I will destroy you
<shevy> caps lock is friendlier than any-key
<shevy> :(
<caps-lock> hi
<caps-lock> I will rescue you Pip
<caps-lock> first, click me
robbyoconnor has joined #ruby
<router> did google get rid of caps lock?
<Pip> caps-lock, How to click you?
<Boohbah> Pip: yes, cower is nice, but it doesn't have anything to do with ruby
<caps-lock> :(
<caps-lock> hmm
<caps-lock> perhaps I am not a key
<Pip> caps-lock, This is xchat
<caps-lock> lol
<caps-lock> hi xchat
<Pip> Jesys
<Pip> You're still on 2.6 kernel of Linux?
<caps-lock> I use xchat too
<Pip> Look at mine
<caps-lock> spy!!!
<Pip> pip@Thinkpip ~ % uname -r
<Pip> 3.2.14-1-ARCH
<Pip> lol
<RubyPanther> everybody uses xchat, it is true
<shevy> \o/
kjellski has joined #ruby
<Mon_Ouie> Caps lock is a key, but it's not the any key.
<shevy> damn any key
dfamorato has joined #ruby
<shevy> I'll never find it :(
<RubyPanther> I like mapping caps-lock to SUPER
Guedes has joined #ruby
Guedes has joined #ruby
dfamorato_ has joined #ruby
luckman212_ has joined #ruby
td123 has joined #ruby
kjg has joined #ruby
sohocoke has joined #ruby
kjg has joined #ruby
<Boohbah> Pip: you know linux 3.3.1-1 is in core now...
<Pip> Boohbah, I didn't know
<Boohbah> i have not tried it yet
engineerkp has joined #ruby
<Pip> not testing?
<Boohbah> nope, core
<Pip> core/linux 3.2.14-1 (base) [installed]
<Pip> The Linux Kernel and modules
tommyvyo has joined #ruby
<Boohbah> Pip: yes, you have not -Syu'd for a while, have you?
<Pip> I just did -Syy
<Pip> And nothing changed
sacarlson has joined #ruby
<Pip> look
<Pip> I have 3.3.1-2 in linux-ck repo
<Pip> Brain Fuck
havenn has joined #ruby
<Boohbah> core/linux 3.3.1-1 (base) [installed] The Linux Kernel and modules
<Pip> repo-ck/linux-ck-pentm 3.3.1-2 (ck-pentm) [installed]
<Pip> Linux Kernel and modules with the ck1 patchset featuring the Brain Fuck
<Pip> Scheduler v0.420. Intel Pentium M optimized.
<DPP> how does one use a variable in the match side of a ruby regex?
<apeiros_> #{}
<DPP> I have a var blah="hello" and I want to match "%blah"
<apeiros_> hu?
<DPP> so #{blah} ?
* Pip misses Ruby
<apeiros_> you want to match against the variable name?
<apeiros_> o0
<DPP> the content!
<DPP> oh sorry
<apeiros_> not entirely sure what you want, but probably: /%#{blah}/
<DPP> yeah /%hello/
<apeiros_> ok
<apeiros_> then the above.
<apeiros_> you may want to use /%#{Regexp.escape(blah)}/
<apeiros_> depends on whether you want blah to be treated as regex-expression or as plain string
luckman212 has joined #ruby
<DPP> i want the value of blah to be treated as a plain string
<apeiros_> then escape it
linoj has joined #ruby
sectionme has joined #ruby
<Pip> hahahahahhaha
arvidkahl_ has joined #ruby
<Pip> I made it
<Pip> rubygem rocks
stenno has joined #ruby
Johnny7892 has joined #ruby
<Johnny7892> Does anyone use Sublime Text 2?
<Johnny7892> I'm having trouble getting code intel to work :D
hackingoff has joined #ruby
luckman212_ has joined #ruby
mitchell has joined #ruby
Guedes has joined #ruby
RubyPanther has joined #ruby
<Boohbah> Johnny7892: eww, proprietary software, yuck
<Johnny7892> I know.
<Johnny7892> At least it's free to try forever
mengu has joined #ruby
<Pip> Boohbah, the "trick" is to add the command option: --no-user-install
<Pip> I didn't know gem has such option built-in
<Johnny7892> And by the way, will https://github.com/Kronuz/SublimeCodeIntel/ work for anyone?
<Pip> Alright, how to have colorful irb?
arvidkahl has joined #ruby
<shevy> Pip gem install wirble
<davidcelis> Or just use pry
<Pip> from gem?
<davidcelis> gem install pry
<davidcelis> $ pry
<davidcelis> it's a replacement for and improvement of irb
<davidcelis> includes colors by default, and is better all around
apok_ has joined #ruby
luckman212 has joined #ruby
<Boohbah> echo "gem: --no-ri --no-rdoc" > ~/.gemrc
<Boohbah> nobody needs local docs
<Boohbah> we have internet after all
<Johnny7892> Hmm, github not loading for me
canton7 has joined #ruby
Lievbuts has joined #ruby
<davidcelis> try harder
Lievbuts has quit [#ruby]
<shevy> bang head against screen
tjf has joined #ruby
albemuth has joined #ruby
tjf has quit ["Leaving"]
<Boohbah> shevy: mv /usr/lib/ruby/gems/ to a random location!
<Boohbah> :D
nimred has joined #ruby
<davidcelis> mv /usr/lib/ruby/gems /dev/null
kevinbond has joined #ruby
kvirani has joined #ruby
<shevy> hey my gems work!
<shevy> leave em alone
<shevy> they are good boys
luckman212_ has joined #ruby
tommyvyo has joined #ruby
headius has joined #ruby
gomix has joined #ruby
trebaum has joined #ruby
trebaum has joined #ruby
luckman212 has joined #ruby
looopy has joined #ruby
Radium has joined #ruby
<flagg0204> im trying to convert an array to a hash. the array elements looks like "key value" and im tring to convert this to a hash
<apeiros_> flagg0204: take a look at Hash::[]
<apeiros_> (that's the class method [])
<flagg0204> ok will give it a look. thanks
io_syl has joined #ruby
<flagg0204> aperios_ heh, wow i was making that more difficult than it needed to be
<flagg0204> thanks
<apeiros_> flagg0204: also, use tab completion for nicks in irc
<apeiros_> even though it is cute that you write it including the _, you still typoed :-p
<flagg0204> apeiros_: and thank you again
luckman212_ has joined #ruby
<Mon_Ouie> matti: For the record, your nick is still the worst one regarding autocompletion
<apeiros_> Mon_Ouie: we just need smarter auto-completion…
dfamorato has joined #ruby
<canton7> with fuzzy matching...
<apeiros_> with usage-stats + recent activity
<canton7> I always try api<TAB> and wonder why it doesn't complete to yours...
<apeiros_> maybe I should use my second oldest nick, shisohan, instead
<Mon_Ouie> My client can use the most recent activity, but I prefer not having it complete the word when there's more than one possibility
<apeiros_> lots of people have trouble with apeiros
<banisterfiend> you could always apply for nick sponsporship: ap[buy_coke]eiros
luckman212 has joined #ruby
<lectrick> I have a Regexp with an .encoding of US-ASCII but I am trying to use it on a string with a different encoding that is not UTF-8, how do I force it/
<lectrick> ?
apok has joined #ruby
ScottNYC has joined #ruby
decaf has joined #ruby
brngardner has joined #ruby
luckman212_ has joined #ruby
<lectrick> Figured it out. Have to add a /u switch to the end of the regex to make it utf8. Is there any way to tell Ruby to assume all code is UTF-8 without adding # encoding: UTF-8 to the top of each and every file?
<matti> Mon_Ouie: Haha ;-)
dwon has joined #ruby
<ScottNYC> whats the p0 mean in ruby 1.9.3 p0?
luckman212 has joined #ruby
<ScottNYC> I see all the versions have it
<banisterfiend> ScottNYC: patch level
<apeiros_> lectrick: no sane one, no
<apeiros_> using the encoding comment is IMO the best thing to do.
<ScottNYC> 1.9.3 p0 is latest stable right?
mattyoho has joined #ruby
jabre has joined #ruby
<td123> ScottNYC: no, http://www.ruby-lang.org/en/
<apeiros_> p125 afaik
luckman212_ has joined #ruby
VegetableSpoon has joined #ruby
<Pip> Finally
* Pip has finally mastered the rubygem
mxweas_ has joined #ruby
netogallo has joined #ruby
keymone_ has joined #ruby
luckman212 has joined #ruby
<Pip> :D
robbyoconnor has joined #ruby
<decaf> which game is this?
<rking> Hrm. How important is the behavior of ruby -w / $VERBOSE = true? In Perl it's pretty much non-optional.
robbyoconnor has joined #ruby
jgrevich has joined #ruby
jgrevich has joined #ruby
looopy has joined #ruby
runix__ has joined #ruby
eka has joined #ruby
ConstantineXVI has joined #ruby
<runix__> heyas. I have a response string from an API, it's encoded as ASCII-8BIT. I would like to log it for debug purposes, but my logging string is in UTF-8 (Padrino.logger.debug "Result #{response}") and I'm getting an encoding error. how can I do to log this?
Boohbah has joined #ruby
r0bby has joined #ruby
entrenador has joined #ruby
<rking> runix__: Maybe this questionable-sounding answer will get someone who knows to come out of the woodwork and say, "NOoo!1 Do it this way!" ... but you can call "asdf".force_encoding('UTF-8') on the ASCII string, and I can't imagine what harm would come of it (since ASCII is a subset of UTF-8)
voodoofish4301 has joined #ruby
r0bby_ has joined #ruby
<Pip> er...let me guess, rubygems.org is written in ruby right?
* rking hopes it's written in PHP.
<canton7> asp! come on, it's got to be asp
niku4i has joined #ruby
looopy has joined #ruby
<shevy> ewww
<rking> Pip: I don't know Rails well enough to say for sure, but it does seem to have a few tell-tale signs in the HTML source.
<shevy> the design looks typical rails design
<shevy> so I think it is written in rails
<rking> Hehe... shevy, what does that even mean?
<rking> A web page... with links and stuff. === Rails.
<Pip> fair enough
<shevy> well if you look at 100 different rails sites
<shevy> they share some common patterns
<rking> Such as?
<shevy> and it really looks extremely close to all those patterns
<shevy> http://beginrescueend.com/ <-- another example of rails rking
<shevy> http://www.yellowpages.com/ <--- rails
<rking> shevy: I donno, man.. I think that's more like the "Web2.0" look.
<shevy> http://www.blurb.de/ <-- rails
<rking> I'm more convinced by the "?234234" after the .css/.js includes.
<canton7> "Apparently you've been blocked for breaking one of the 3 Laws of Robotics" from www.yellowpages.com. wut?
<shevy> hehe
<Boohbah> http://twitter.com/ <--- rails?
<shevy> lol canton7
<rking> canton7: Haha, what did you do?
<shevy> that is hilarious :D
<canton7> I have no idea... Hang on, I'll screenshot
<shevy> Boohbah, nope. the design is super minimal
<shevy> it has like 3 mini widgets
<Pip> :D
<shevy> of course you can cripple your typical rails apps like that
<Pip> Rails: Fair Tale builder
<shevy> but the natural rails app will BLOAT up
<Pip> *Fairy
<shevy> just look at the average sinatra website
<rking> canton7: If you try another browser does it still do that?
wefawa has joined #ruby
<canton7> same page in chrome
bglusman has joined #ruby
<rking> canton7: Maybe it's something about your ISP/IP.
max_ has joined #ruby
r0bby_ has joined #ruby
<shevy> oh
<shevy> chrome :D
snip_it has joined #ruby
<canton7> ooh I think I know. For a cryptography courswork we had to try and find a site with a key which was vulnerable to that debian openssh vulnerability from a while back. I made a bot and set it loose findign domains. I think it may have found yellowpages...
<rking> Ahh, wow.
<rking> That's a cool course.
<canton7> aye, it's dastardly hard, but fascinating. I did put a max-number-of-pages-per-domain limit on the thing to stop it getting caught on sites like that, or google. Looks like it was too high
<canton7> awesome rejection page, anyway
pting has joined #ruby
<rking> I like that it ambiguously says "one of" the 3 laws. Not saying which.
r0bby_ has joined #ruby
<canton7> and my bot was following orders, and didn't harm anyone *innocent*
<canton7> unless a member of yellowpages staff gets shocked every times there's a page view
nari has joined #ruby
<VegetableSpoon> collateral damage
moshee has joined #ruby
moshee has joined #ruby
maahes has joined #ruby
wyhaines has joined #ruby
<lindenle> Hi guys, what version of ruby do i need for rubygems?
r0bby_ has joined #ruby
gurugeek_ has joined #ruby
<gurugeek_> anyone knows a good lib to write on an .ods open office spreadsheet? thanks
<bawer> lidenle: it should work for any ruby? it's actually bundled with 1.9.x.
<lindenle> <bawer> 1.8.1-7? On rhel4? Do I just need to install it?
Chryson has joined #ruby
axl_ has joined #ruby
mxweas_ has joined #ruby
<bawer> lindenle: I guess? http://rubygems.org/pages/download
<rking> gurugeek_: Do you need anything beyond CSV?
<gurugeek_> rking: I used http://roo.rubyforge.org/ the only problem is that it has no insert
<gurugeek_> rking: I need to be able to insert data inside the .ods file :X
<rking> gurugeek_: Yeah, write is always harder than read.
<rking> gurugeek_: Can you get away with reading it via roo then writing as .csv?
<rking> The roo.rubyforge.org background is... unique.
zeroeth has joined #ruby
<gurugeek_> rking: I guess but doesn't really help no ? :)
<rking> gurugeek_: I don't know what you're trying to do. OO.o will easily import .csv files.
<rking> In fact I wouldn't be surprised if you could do something wily like save CSV as .ods
<rking> Or else invoke oocalc or whatever on it.
<rking> gurugeek_: The only reason why I'd expect the CSV idea to fail is if you needed to do stuff beyond what CSV supports, like fancy formatting.
<gurugeek_> rking: thanks a lot for the hint… just I would need to use the .ods somehow like a db so if I pass through csv to write it makes it a bit complex but I guess it cannot be done easily :S
<gurugeek_> rking: will try to save on google spreadsheet..even thou it would be slower at least it does write on it :)
<rking> gurugeek_: Also, OO.o is scriptable, so you could write a layer that farms out to your Ruby and back.
<rking> gurugeek_: But the Google Spreadsheet idea sounds fine to me.
dv310p3r has joined #ruby
<gurugeek_> rking: out of interest which mvc do you use ?
<gurugeek_> rking: do you do freelance jobs? :P
<gurugeek_> rking: yes google spreadsheet works very well…can't find out how to search inside it yet but I will get there I guess
<rking> gurugeek_: If you knew the details of my day job you would laugh. Basically I'm using the next few months to get back into programming full-time.
andrewhl has joined #ruby
<gurugeek_> rking: hehe well you are very helpful so I am sure I wouldn't laugh !
<rking> gurugeek_: I'm a soldier in the U.S. Army, Infantry. =)
<gurugeek_> rking: wow that's so cool
<gurugeek_> rking: respect really for being able to do so many things well :)
<rking> \o/ <-- j/k. =)
r0bby_ has joined #ruby
icy` has joined #ruby
icy` has joined #ruby
danielvdotcom has joined #ruby
<rking> Wow. xnee just changed my life a bit.
<rking> Even for something as simple as automating the save-switch-to-browser-reload loop.
baroquebobcat has joined #ruby
<lindenle> So if require is not working in puppet, is that because I dont have ryubygems installed?
<lindenle> bawer: no go in ruby 1.8.1...
<VegetableSpoon> looks pretty cool indeed
<VegetableSpoon> I'll bookmark that
Emery has joined #ruby
<Emery> Having a problem with a blog i'm working on, can't figure out where i've gone wrong. http://pastebin.com/09EkMbs6 .. Any ideas ?
bglusman has joined #ruby
chico has joined #ruby
nopolitica has joined #ruby
<canton7> aha, this is presumably the fallout from the rails vulnerability which was used on github
chico has joined #ruby
Emery has joined #ruby
<nopolitica> cd #net
<Emery> yeah rails has failed me
<Emery> can't figure out what's wrong!
<canton7> I've no idea of the details of how it was fixed, but basically a mass-assignment was used to write to database fields which weren't supposed to be written to
<canton7> the "fix" looks like it was to stop you mass-assigning to some of the fields
<Emery> I'll ask in RoR see if I can get some sense
<canton7> I suspect there's probably a property or somesuch you can set in your model to allow mass-assigning to those fields
tatsuya_o has joined #ruby
<Emery> yeah i saw that fix
freeayu has joined #ruby
<Emery> but didn't have a clue where to put it
<gurugeek_> very n00b question but how do I can this method from inside my script ? :( http://gimite.net/gimite/rubymess/google-spreadsheet-ruby/GoogleSpreadsheet/Worksheet.html#method-i-list
<Emery> models.rb or something..
<canton7> in your model. You're specifying which of your model's fields can be mass-assigned to
luckman212_ has joined #ruby
<Emery> canton7 I don't have a model file, that's what was confusing me
ZachBeta has joined #ruby
<DPP> sigh. gsub and gsub! do different things.
<canton7> Emery, what does line 46 of posts_controller.rb look like
<Emery> sec
<Emery> @post = Post.new(params[:post])
<canton7> Emery, right, Post is your model. Where is that defined?
wilmoore has joined #ruby
<Emery> canton7 I'm not sure where that'd be .. (learning ruby)
<canton7> Emery, probably in models/ ?
<Emery> it's not there
<Emery> just comment.rb and post.rb
<canton7> post.rb! There we go
panpainter has joined #ruby
<Emery> class Post < ActiveRecord::Base
<Emery> has_many :comments
<Emery> end
<Emery> that's all that's in there.
Chryson has joined #ruby
<canton7> there we go. Try adding attr_accessible :title, :text before the has_many line
tatsuya_o has joined #ruby
<Emery> oh god
<Emery> undefined method `key?' for nil:NilClass
<Emery> run into that now
<Emery> NoMethodError in PostsController#index
<canton7> pastie the whole error?
<canton7> Emery, pastie the whole of posts_controller.rb ?
shadoi has joined #ruby
mxweas_ has joined #ruby
<canton7> nope, I have no idea where that one came from. #rubyonrails will know
* canton7 never got on with rails
stkowski has joined #ruby
<gurugeek_> sorry to bother again :) I get back something like #<GoogleSpreadsheet::List:0x1020ae558> how do I make this 0x1020ae558 into something like a readable array ? :) googled object to array or something but I thought this would return me an array (as per http://gimite.net/gimite/rubymess/google-spreadsheet-ruby/GoogleSpreadsheet/Worksheet.html#method-i-list)
<Emery> It was once I added a comment feature
<Emery> just everything went fubar
adac has joined #ruby
<Emery> think i'll just start again minus the comment feature
<shadoi> Emery: that's a normal ruby object, the 0x#### is the Object ID.
<shadoi> Emery: look up the documentation for the List class.
<Emery> Not knowing much ruby I wouldn't know where to start
<canton7> I think he meant to tag gurugeek_
<shadoi> ah woops
<Boohbah> http://www.ruby-doc.org is a good place to start :)
tomzx has joined #ruby
havenn has joined #ruby
xpot-mobile has joined #ruby
<gurugeek_> shadoi: thanks a lot just I don't get it I have like ws.list() and retuns me an object which is normal. The other method I can't call ws.list(index.hash) will dig further thou
<gurugeek_> ah I think I got it
<gurugeek_> thanks
kiwnix has joined #ruby
dfamorato_ has joined #ruby
tatsuya_o has joined #ruby
shadoi has joined #ruby
dfamorat_ has joined #ruby
* gurugeek_ slaps himself lol
chson has joined #ruby