apeiros_ changed the topic of #ruby to: Ruby 2.0.0-p0: http://ruby-lang.org (Ruby 1.9.3-p392) || Paste >3 lines of text on http://gist.github.com
<bean> lectrick, not sure if that is a bug.
daniel_- has quit [Ping timeout: 256 seconds]
XRPTrader2 has quit [Quit: XRPTrader2]
gabrielrotbart has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
arya has joined #ruby
<hamush> hi, quick newcomer ri question, if anyone happens to know: "ri --no-gems Array" fails on my ruby setup... is that expected or is my setup probably broken?
daniel_- has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
Arzaga has joined #ruby
ariedler has quit [Remote host closed the connection]
hogeo has joined #ruby
<bean> I hate using, ri, hamush
bricker_ has joined #ruby
<bean> i much prefer web docs
jon_w has quit [Read error: Connection reset by peer]
bricker has quit [Read error: Operation timed out]
arya has quit [Ping timeout: 255 seconds]
tootooroo has quit [Quit: brb]
<lectrick> bean: it's... a wrong expectation. We had a developer not realize that he was calling concat, a method that mutates its receiver, on a constant
<cupakromer> Does anyone know if there is something special about times created via Time.now?
<cupakromer> it doesn't seem to match times created other ways
wyhaines has quit [Remote host closed the connection]
<lectrick> cupakromer: Yes, Time.now times are always different. /ducks
<bean> lectrick, i can agree that its a wrong expectation :p
<majikbytes> lectrick: what makes that array a constant?
jon_w has joined #ruby
jon_w has quit [Max SendQ exceeded]
<hamush> bean: ri seems like it'd be much more my style if i could get it to work... those web docs on ruby-doc.org spend so much time consulting with disqus :/
<cupakromer> lectrick :-/ t = Time.now; f = Time.at t.to_f; t == f; #==> false
jon_w has joined #ruby
jon_w has quit [Excess Flood]
<lectrick> majikbytes: well, it's assigned in the class context, and it starts with a capital letter... and it should have been frozen, apparently... :O
jon_w has joined #ruby
<bean> hamush, well, "gem install rdoc rdoc-data", and then "rdoc-data --install" is what the internets say, I can see if it works for me if you want
XRPTrader2 has joined #ruby
<lectrick> cupakromer: Why would to_f'ing a time be equal to the time? That's silly
<majikbytes> is it just a ruby thing that when you define a class and an all uppercase identifier is automatically a constant?
SirFunk has joined #ruby
nezumi has joined #ruby
<lectrick> cupakromer: You are missing an understanding if you think that. Time.now is an object instance of Time. Time.now.to_f is a float. They cannot possibly be equal.
<hamush> bean: thank you, i bet that's just the push in the right direction i need!
<majikbytes> i see
<lectrick> cupakromer: Ah wait. misreading.
<cupakromer> lectrick I think you misread that. I'm using Time.at with the value returned from Time.now.to_f
<bean> hamush, np, i just tried it and it works.
<lectrick> cupakromer: OK that has to do with how a time object is made from a float. Probably imprecise.
arya has joined #ruby
<majikbytes> I have a question for the good Ruby Sirs:
<cupakromer> lectrick it seems silly that to compare times you have to re-cast them to floats just because you used Time.now and Time.at
<majikbytes> how does one define a constant, like in irb
jgrevich_ has joined #ruby
<majikbytes> so you're in IRB, and you want to create a constant
<lectrick> cupakromer: well fuck. you did find something interesting. Not sure then, man. Compare their to_f's then. :O
ShellFu is now known as ShellFu_AFK
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
danman has joined #ruby
moted has quit [Ping timeout: 260 seconds]
lewix has joined #ruby
brhelwig has quit [Remote host closed the connection]
<lectrick> cupakromer: ok now this has made me angry! Wow. Nice find. Damnit. :) The only thing that makes me angrier is that all Ruby methods that mutate receivers should end in a !. :)
<lectrick> Because I believe that is a significant enough behavior difference to merit a syntax change :O
jonathanwallace has quit [Quit: WeeChat 0.3.9.2]
<cupakromer> lectrick ;-p you say nice, I say head slamming into wall
<lectrick> sorry man. :/
<cupakromer> no worries, just glad i'm not going cray-cray
lewix_ has joined #ruby
<lectrick> cupakromer: comparing their to_f's works. i know that's still kind of shitty tho
freeayu has joined #ruby
<lectrick> GL
right1 has joined #ruby
nadirvardar has joined #ruby
jon_w has quit [Ping timeout: 256 seconds]
mithro-- has quit [Ping timeout: 245 seconds]
lewix has quit [Ping timeout: 240 seconds]
idkazuma has joined #ruby
timmow has joined #ruby
cyberarm has joined #ruby
Opettaja has joined #ruby
danman has quit [Quit: danman]
maletor has quit [Quit: Computer has gone to sleep.]
BSaboia has joined #ruby
pioz has joined #ruby
BSaboia has quit [Client Quit]
BSaboia has joined #ruby
rburton- has quit [Quit: Linkinus - http://linkinus.com]
kpshek has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
dmerrick has joined #ruby
tootooroo has joined #ruby
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
skattyadz has quit [Quit: skattyadz]
emanu has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
<JamieJ> ok
<JamieJ> question for my ruby folks
Mattix has joined #ruby
jonahR has joined #ruby
<JamieJ> ho w can i have a input file be read into a ruby script to run and produce output?
callmeivan_ has joined #ruby
netto has joined #ruby
brhelwig has joined #ruby
tootooroo has quit [Read error: Connection reset by peer]
mikurubeam has joined #ruby
JMcAfreak has quit [Ping timeout: 248 seconds]
justsee has quit [Ping timeout: 256 seconds]
mhf has quit [Remote host closed the connection]
dmerrick has quit [Ping timeout: 256 seconds]
mikurubeam has quit [Client Quit]
yshh has quit [Remote host closed the connection]
mhf has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
callmeivan has quit [Ping timeout: 264 seconds]
callmeivan_ is now known as callmeivan
<matti> JamieJ: What? ;]
idkazuma has quit [Remote host closed the connection]
tootooroo has joined #ruby
MehLaptop has quit [Remote host closed the connection]
<JamieJ> i have a ruby script and i want to have input taken from a separate file to be ran from the program. can i do that? if so how?
<JamieJ> matti: can you help?
<cupakromer> lectrick so it seems there is precision lost. i just had to go smaller. the nanoseconds are different.
<agent_white> quit
slainer68 has joined #ruby
<agent_white> meep
agent_white has quit [Quit: leaving]
<cupakromer> lectrick conversion needs to be done with to_r for the most accurate conversion / comparison
<lewix> File.read()
bigoldrock has quit [Ping timeout: 240 seconds]
<JamieJ> ok
<lewix> JamieJ: File.open('foo.txt') do blah end
tootooroo has quit [Ping timeout: 255 seconds]
tootooroo has joined #ruby
<JamieJ> and the text file? the script asks for the items. how do i format the text file to do so?
Ortuna has quit [Quit: Computer has gone to sleep.]
<lewix> JamieJ: dude you have to be more explicit; I have no idea what you're referring to
nari has quit [Ping timeout: 260 seconds]
tootooroo has quit [Client Quit]
<lewix> thats the worst period ever to learn rails; all books are outdated
mhf has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 252 seconds]
slainer68 has quit [Ping timeout: 260 seconds]
<lewix> im going straight to the online doc I guess
mhf has joined #ruby
one8zero has quit [Quit: one8zero]
<JamieJ> lewix: let me gist my code
benweint has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
tomsthumb has joined #ruby
megha has joined #ruby
huoxito has quit [Ping timeout: 256 seconds]
pyx has joined #ruby
ghanima has joined #ruby
beneggett has joined #ruby
baba has quit [Ping timeout: 245 seconds]
<ghanima> hello all
pyx has quit [Client Quit]
<lewix> hi
cbot_ has joined #ruby
<JamieJ> lewix: here is the code. again, i am trying to learn how to create an input file to go along with the code https://gist.github.com/SkoobySparksMIA/59a559e0f9d499569929
<ghanima> Is there a doc out there that explains how to use the ruby class Shell... I don't see any examples(including on google) other than ruby-doc and even that doesn't really explains how to spawn a process
mhf has quit [Remote host closed the connection]
adkron has quit [Ping timeout: 256 seconds]
<ghanima> The reason I am asking is because I am looking at someone's code who is executing a unix process by using the shell class but how they are using I can't find any reference to it, but it does work
<ghanima> any thoughts
<ghanima> I am usingruby 1.9
jnoob22 has joined #ruby
jumpei has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
ariedler has joined #ruby
marcdel has joined #ruby
Michael__ has joined #ruby
danman has joined #ruby
danman has quit [Client Quit]
<JamieJ> can any one help me wit that problem?
Michael__ has quit [Remote host closed the connection]
arya has quit []
Michael__ has joined #ruby
kristofers has quit []
havenwood has quit [Remote host closed the connection]
gabrielrotbart has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
ner0x has joined #ruby
<lewix> JamieJ: do you want output the result on a file
gabrielrotbart has joined #ruby
huoxito has joined #ruby
havenn_ has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
daniel_- has quit [Ping timeout: 264 seconds]
bricker_ is now known as bricker
<JamieJ> no just produce the output on the command prompt
tomsthumb has quit [Quit: Leaving.]
<lewix> JamieJ: what do you want to do then
<JamieJ> lewix: for the code to work, the program needs 3 values from the user. i want to make it where they can read those three values from an input.
<JamieJ> instead of the user
<JamieJ> lewix: how would i format the input file to do this?
<lewix> oh
mando has joined #ruby
<lewix> JamieJ: you could just type 3 value on three different lines
<lewix> and File.readlines("input.txt")
MehLaptop has joined #ruby
etcetera has quit []
Nuck has quit [Ping timeout: 258 seconds]
pioz has quit [Quit: This computer has gone to sleep]
Nuck has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
headius has quit [Quit: headius]
<JamieJ> ok
quazimodo has quit [Ping timeout: 255 seconds]
<JamieJ> lewix: and besides that read command, i wouldnt have to alter the program. currently it loops and ask the user if they wanna get another item
dqminh has joined #ruby
chrisnicola has joined #ruby
memborsky has quit [Read error: Connection reset by peer]
memborsky has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
twoism has quit [Remote host closed the connection]
i_s has quit [Quit: i_s]
Matip has joined #ruby
benlieb has quit [Quit: benlieb]
Hanmac has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
majikbytes has quit [Ping timeout: 240 seconds]
forced_request has joined #ruby
yshh has joined #ruby
<lewix> JamieJ: http://pastie.org/private/xtepd8kanlev5mwlxdwbg if you want to read it one line at the time
Hanmac2 has quit [Ping timeout: 256 seconds]
<lewix> and separate the variable by whatever - in this case I used |
<lewix> name | amount | cost
Mattix has quit [Ping timeout: 260 seconds]
<lewix> that's how the file would look like
<lewix> you could have as many lines as you want of name | amount | cost
mockra has quit [Remote host closed the connection]
fridim has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
dankest has quit [Remote host closed the connection]
<lewix> JamieJ: by the way you should really start using sting interpolation - my brain process it better =)
<lewix> JamieJ: now question for you - what does BigDecimal.new(0.0,2) do
<JamieJ> string interpolation? see? i dont even know what that is
<JamieJ> lewix: it supposed to take a float and round it to 2 decimal places
hamakn has joined #ruby
<JamieJ> but if a number is 10.50, itll just put 10.5
<JamieJ> which is why i used that ".2f%"
kofno has quit [Remote host closed the connection]
<JamieJ> it works
<JamieJ> the bigdecimal i mean
rh1n0 has joined #ruby
tomsthumb has joined #ruby
XRPTrader2 has quit [Quit: XRPTrader2]
tomsthumb has quit [Max SendQ exceeded]
_maes_ has joined #ruby
dhruvasagar has joined #ruby
tomsthumb has joined #ruby
tomsthumb has quit [Max SendQ exceeded]
rh1n0 has quit [Client Quit]
tomsthumb has joined #ruby
tomsthumb has quit [Max SendQ exceeded]
tomsthumb has joined #ruby
<lewix> huh
<lewix> hold on i brrb
<lewix> time to eat
banjara has quit [Quit: Leaving.]
SCommette has joined #ruby
<lewix> but string interpolation is basiccally puts "the number is #{3 +3}"
rcosta has quit [Remote host closed the connection]
<lewix> grr bad explanation. google brb
Dreamer3 has joined #ruby
tootooroo has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
hassans has joined #ruby
newtonianb has quit [Ping timeout: 245 seconds]
NiteRain has quit [Ping timeout: 264 seconds]
marcdel has quit [Ping timeout: 256 seconds]
alxscms has quit [Ping timeout: 245 seconds]
nari has joined #ruby
digital-ghost has quit [Ping timeout: 245 seconds]
emmanuelux has quit [Remote host closed the connection]
indyrl has left #ruby [#ruby]
johnjohn1011 has joined #ruby
tubbo has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
ariedler has quit [Remote host closed the connection]
rh1n0 has joined #ruby
<johnjohn1011> is ironruby a dead project?
cbot_ has quit [Ping timeout: 260 seconds]
indyrl has joined #ruby
Spooner has quit [Remote host closed the connection]
chrishough has joined #ruby
jbueza has quit [Quit: Leaving.]
JamieJ has quit [Ping timeout: 245 seconds]
lewix has quit [Remote host closed the connection]
bricker`LA has joined #ruby
macabhaird has quit [Ping timeout: 248 seconds]
Myconix has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
rickruby has joined #ruby
Davey has joined #ruby
robustus|Off has quit [Ping timeout: 255 seconds]
Proshot has quit [Quit: Leaving]
justsee has quit [Ping timeout: 256 seconds]
ehaliewicz has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 276 seconds]
ehaliewicz has joined #ruby
SCommette has quit [Quit: SCommette]
fmcgeough has quit [Quit: fmcgeough]
mando has quit [Remote host closed the connection]
bradleyprice has quit [Remote host closed the connection]
jdunck has quit [Ping timeout: 256 seconds]
randomautomator has quit [Ping timeout: 246 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
dhruvasagar has joined #ruby
tish has joined #ruby
banjara has joined #ruby
a_a_g has joined #ruby
etcetera has joined #ruby
ttt has joined #ruby
<RubyPanther> johnjohn1011: it was last time I checked it
netto has quit [Quit: netto]
RORgasm has joined #ruby
dqminh has quit [Remote host closed the connection]
crackfu has joined #ruby
dqminh has joined #ruby
rickruby has quit [Remote host closed the connection]
arya has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
RORgasm has quit [Ping timeout: 255 seconds]
forced_request has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 256 seconds]
jabbslad has quit [Quit: Leaving...]
dhruvasagar has joined #ruby
miso1337 has joined #ruby
XRPTrader2 has joined #ruby
chrishough has quit [Quit: chrishough]
marcdel has joined #ruby
dqminh has quit [Remote host closed the connection]
SCommette has joined #ruby
<bnagy> johnjohn1011: what do you need it for?
tish has quit [Quit: Leaving.]
forced_request has joined #ruby
bricker`1A has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
cuemin has joined #ruby
<cuemin> Hello
<cuemin> I'm looking for a resource on the difference between spec and unit testing
<johnjohn1011> bnagy, i use it for some apps i use as utilities.
banjara has quit [Quit: Leaving.]
<cuemin> can anyone recommend an article on why one would use spec vs unit testing? and what the scope of each is?
<cuemin> it seems like it's impossible to google because it's autocorrecting to rspec
bricker`LA has quit [Ping timeout: 246 seconds]
ttt has quit [Remote host closed the connection]
etcetera has quit []
gf3 has quit [Ping timeout: 245 seconds]
ttt has joined #ruby
gf3 has joined #ruby
mmitchell has joined #ruby
Guedes0 has joined #ruby
jekotia has joined #ruby
rh1n0 has quit [Quit: -- I'm out --]
<bean> cuemin, you may want to read this in general
newtonianb has joined #ruby
SCommette has quit [Quit: SCommette]
shevy has quit [Ping timeout: 246 seconds]
<cuemin> I'm familiar with the overview of software testing; does this go over the whole 'spec' vs 'unit test' thing?
bricker`LA has joined #ruby
Michael__ has quit [Remote host closed the connection]
ibash has joined #ruby
freeayu has joined #ruby
sailias has joined #ruby
Michael__ has joined #ruby
<bean> i don't think so, I've never heard of it being called "spec testing"
<[Neurotic]> do you mean TDD vs BDD?
<tubbo> cuemin: just the expectation vs. assertion syntax?
<bean> i bet thats what he means, tubbo
<cuemin> yes
<tubbo> it's really just 2 ways of saying the same thing, though the philosophy of BDD is way different from the philosophy of TDD
<tubbo> i reckon you could do both in rspec though
<cuemin> basically, why they have the two different syntaxes to do the same thing (more or less)
<tubbo> cuemin: choice. do you like beef?
<tubbo> do you also like steak?
<tubbo> actually that's a bad example HAHA
tootooroo has quit [Ping timeout: 260 seconds]
<cuemin> ah, I think I see what you're trying to say...
bricker`1A has quit [Ping timeout: 245 seconds]
<tubbo> anyway, the point is it's good because there's choice. you can write in expectation syntax and i'll write in assertion syntax and we'll be happy :)
MissionCritical has quit [Ping timeout: 258 seconds]
<tubbo> cuemin: ruby is a language of choices. test syntax is not the only time you'll be making quite arbitrary decisions for your code
<cuemin> ah okay, thank you. I was hoping to write in assertion style, but I can't find a minitest extention to deal with eventmachine in assertion style
<tubbo> cuemin: uhh, minitest does asserts by default
<tubbo> `assert_equal '1', a_string_with_the_value_of_one
timeout_ has joined #ruby
<cuemin> oh I'm aware, but there's no plugin for MiniTest::Unit::TestCase that will handle eventmachine; only MiniTet::Spec
bricker`LA has quit [Ping timeout: 276 seconds]
tjohnson has joined #ruby
Myconix has quit [Quit: Leaving.]
<tubbo> cuemin: why do you need a plugin to handle it?
wsterling has joined #ruby
<cuemin> EventMachine requires the reactor is running for EM classes to run
Michael__ has quit [Read error: Connection reset by peer]
<tubbo> cuemin: can't you start the reactor in the setup block?
<johnjohn1011> is ruby 2.0 faster than 1.93?
<tubbo> johnjohn1011: no it makes your computer shit out dinosaur babies
<cuemin> no, you can't, because the EM code has to be within the EM.run {} block
<tubbo> and then what do you have
<tubbo> a problem, that's what
<tubbo> a BIG problem.
lewix has joined #ruby
Michael__ has joined #ruby
<tubbo> cuemin: curses!
kofno has joined #ruby
<lewix> Jami: did you fix it
<tubbo> cuemin: well perhaps you could fork the code and write handlers that work in TestCase?
<cuemin> yeah! oh well, maybe I can just wrap the entire spec in EM.run
timeout has quit [Ping timeout: 264 seconds]
<cuemin> I think that's what I'll be doing
<johnjohn1011> nice tubbo
<tubbo> cuemin: check out the source, it could be as simple as `include EventMachine::TestCaseExtensions`
<tubbo> johnjohn1011: ;D
r0bby has joined #ruby
<tubbo> johnjohn1011: it *should* be faster in some areas but http://ruby-lang.org/ and the changelog of Ruby will help you solve that problem. also, i think there are some rubyconf talks on youtube about how ruby 2.0 improves some stuff like GC or something
<tubbo> i dunno though i haven't watched one of the talks fully yet
<johnjohn1011> was looking to see if i could get it on my ubuntu 12.04.
<cuemin> haha holy crap it does exactly that, just wraps the test in a block
<cuemin> a EM.run block that is
lupine has quit [Excess Flood]
bricker`LA has joined #ruby
<johnjohn1011> i see there is a ruby rvm. what is that?
io_syl_ has quit [Read error: Operation timed out]
<cuemin> rvm is ruby version manager
<bean> it is /not/ recommended by many people here
<cuemin> it's a tool to manage multiple versions of ruby/set of ruby gems on the same computer
<cuemin> woah woah woah, rvm isn't some godly tool here?
eka has quit [Quit: Computer has gone to sleep.]
<cuemin> why not?
* lewix uses rvm like everybody else
<bean> no, i can't say i'm a fan
shevy has joined #ruby
<johnjohn1011> wow, highly recommended.
<cuemin> so is that most people or just you?
<waxjar> rbenv :3
Opettaja has quit [Quit: WeeChat 0.4.0]
<johnjohn1011> i can uninstall 1.9.3 but not sure how to get 2.0 on machine
nezumi has quit [Ping timeout: 260 seconds]
<cuemin> 'rvm install ruby-2.0.0' should do it if you're using rvm
Nisstyre-laptop has quit [Quit: Leaving]
<johnjohn1011> so leave 1.9.3, make sure rvm is installed and then run that command?
lupine has joined #ruby
<cuemin> yeah, it'll deal with the system ruby when you install rvm
<bean> yeah if you ever want to use system ruby, when you're in rvm
<bean> you just "rvm use system"
BSaboia has quit [Ping timeout: 252 seconds]
* bean uses homebrew install of ruby on a mac
<bean> aka "brew install ruby"
dallasm_ has joined #ruby
<waxjar> can you run multiple versions that way bean?
<cuemin> ah, mac, that's why you don't prefer rvm :P
<bean> thats likley, cuemin
<bnagy> rvm is awful
<bnagy> they do not even unix, bro
<cuemin> works pretty well for linux, IMO
<bean> one of my coworkers like chruby i think
<bnagy> cuemin: by 'well' you mean overrides cd, is super slow, and start out by asking you to pipe curl into bash?
<tjohnson> any recommendations for testing command line utils? rspec + `?
<waxjar> i read rvm messes with your cd and sudo, i don't like that idea
<bnagy> and, and needs crazy .profile modifications
radic_ has quit [Ping timeout: 246 seconds]
MissionCritical has joined #ruby
<bnagy> it's just Bad.
<cuemin> the bash integration is actually pretty useful for my dev machine, but I agree that the curl | bash is sketchy
<bnagy> rbenv is ok but chruby is apparently the new hotness
<bnagy> rbenv is pretty damn simple, though, so that's what I still use
ckrailo has joined #ruby
ibash has quit [Remote host closed the connection]
<bnagy> depends if you want gemsets and frippery and if you don't know how to compile without someone holding your hand
<johnjohn1011> how do i use rbenv?
<bnagy> johnjohn1011: just go to their github and follow the instructions
Nisstyre-laptop has joined #ruby
<waxjar> i use rbenv, it's pretty great. but i think i'd go with chruby if i did a fresh install now
ibash has joined #ruby
<johnjohn1011> chruby has a git page?
<bnagy> also, yeah
end_guy has quit [Quit: leaving]
<bean> I like the "anti-features"
ibash has left #ruby [#ruby]
<johnjohn1011> thanks
<bnagy> chruby also knows how to unix
KingofMars has joined #ruby
tootooroo has joined #ruby
<bnagy> johnjohn1011: if you don't really have to, installing rubies as a user account is much less likely to lead to pain
<johnjohn1011> i really like the ruby language but after i did my 5 or so ironruby utilities, I never touched it again
KingofMars has left #ruby ["Leaving"]
<bnagy> as opposed to systemwide
<bean> *shudder* ironruby
<johnjohn1011> so have different logins for each user acct
cyong has joined #ruby
<johnjohn1011> bean: it wasn't that bad. a bit slow to start but usable
<bnagy> no, one account can flip between rubies, that's the idea
<johnjohn1011> ok
Rumsteak has joined #ruby
NiteRain has joined #ruby
sayan has joined #ruby
chrishough has joined #ruby
<bnagy> johnjohn1011: if you want Windows support then you should probably check out jruby
<bnagy> I mention this only because you said ironruby :P
<Rumsteak>
bradleyprice has joined #ruby
<johnjohn1011> it had potential. not sure why the project ended
ixti has quit [Quit: WeeChat 0.4.0]
<bnagy> I think some of the core guys were at MS and the got unfunded
<bnagy> but that's just rumour
<johnjohn1011> i had ideas of shipping a c# app and having screens as ironruby so that you ddin't have to compile the whole app to fix for a module
dhruvasagar has quit [Ping timeout: 256 seconds]
nezumi has joined #ruby
<johnjohn1011> yeah defunded would kill any project.
beneggett has quit [Quit: Computer has gone to sleep.]
<bnagy> anyway afaik jruby is the only real option on modern (x64) windows
robscomputer_ has joined #ruby
hassans has quit [Quit: hassans]
Rumsteak has quit [Client Quit]
newtonianb has quit []
<johnjohn1011> any serious development in gtk or qt or wx? or is it all rails and sinatra
MissionCritical has quit [Ping timeout: 256 seconds]
robscomputer_ has quit [Remote host closed the connection]
<bnagy> I think Hanmac1 does wx stuff
shevy has quit [Ping timeout: 245 seconds]
robscomputer_ has joined #ruby
<bnagy> but it's c++ bindings, I think, ask him when he waked up
<bnagy> *wakes
Rumsteak has joined #ruby
<bnagy> and I don't know where Shoes is up to, but I hear it's still kicking, so to speak
radic has joined #ruby
<bean> theres redshoes and greenshoes
<bean> i think
<johnjohn1011> seems to have a lot of user defined specs in the language ( can't remember what it's called)
<johnjohn1011> seriously red and green shoes.
<bean> ah
<bean> blue_shoes
<bean> not red
c0rn has quit [Quit: Computer has gone to sleep.]
<bean> green shoes is a thing though
idkazuma has joined #ruby
<johnjohn1011> ok DSL
gabrielrotbart has joined #ruby
<johnjohn1011> love the story of blue shoes
chrishough has quit [Quit: chrishough]
Skofo has joined #ruby
tomzx_mac has quit [Ping timeout: 245 seconds]
celestius has joined #ruby
nomadicoder has quit [Quit: Leaving]
dhruvasagar has joined #ruby
wsterling has quit [Remote host closed the connection]
<bean> re:ironruby: "In late 2010, Microsoft let go Jimmy Schementi, one of two remaining members of the core team and stopped funding the project." = The project was abandoned.
<johnjohn1011> well it was on .net
sambio has quit []
cyberarm has quit [Quit: Bye]
emocakes has quit [Quit: emocakes]
emocakes has joined #ruby
emocakes has quit [Client Quit]
jnoob22_ has joined #ruby
wsterling has joined #ruby
Mission-Critical has joined #ruby
shevy has joined #ruby
jnoob22__ has joined #ruby
rupee has quit [Quit: Leaving]
<johnjohn1011> i like the ruby world. lots of differnt tools and such
idkazuma has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
jnoob22 has quit [Ping timeout: 256 seconds]
pitzips has quit [Quit: Leaving]
jrajav has joined #ruby
jumpei has joined #ruby
end_guy has joined #ruby
jnoob22_ has quit [Ping timeout: 256 seconds]
jumpei has quit [Remote host closed the connection]
rdev5 has quit [Quit: Leaving...]
anonymuse has joined #ruby
jumpei has joined #ruby
JamieJ has joined #ruby
rickruby has joined #ruby
mattbl has joined #ruby
Michael__ has quit [Remote host closed the connection]
akam-it has joined #ruby
tommyvyo has quit [Quit:]
rdev has joined #ruby
Mission-Critical is now known as MissionCritical
Ontolog has joined #ruby
Guedes0 has quit [Read error: Connection reset by peer]
r0bby has quit [Ping timeout: 256 seconds]
dagnachew has joined #ruby
dagnachew has quit [Client Quit]
mithro-- has joined #ruby
tootooroo has quit [Read error: Connection reset by peer]
dagnachew has joined #ruby
bradleyprice has quit [Remote host closed the connection]
banister_ has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
dagnachew has quit [Client Quit]
jeebster has quit [Quit: Leaving.]
ehellman has quit []
kofno has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 256 seconds]
apok has quit [Quit: apok]
dallasm_ has quit [Ping timeout: 256 seconds]
c0rn has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
chandankumar has joined #ruby
c0rn has quit [Client Quit]
kofno_ has joined #ruby
MehLaptop has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
tootooroo has joined #ruby
rdev is now known as rdev5
jumpei has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
dagnachew has joined #ruby
jumpei has joined #ruby
ner0x has quit [Quit: Leaving]
chrishough has joined #ruby
tjohnson has quit [Ping timeout: 252 seconds]
tjohnson has joined #ruby
jeebster has joined #ruby
arya has quit [Ping timeout: 252 seconds]
sailias has quit [Quit: Leaving.]
jbueza has joined #ruby
chessguy has quit [Remote host closed the connection]
zeroeth has joined #ruby
mercwithamouth has quit [Ping timeout: 256 seconds]
akam-it has quit [Remote host closed the connection]
dagnachewa has joined #ruby
mercwithamouth has joined #ruby
etcetera has joined #ruby
arya has joined #ruby
dqminh has joined #ruby
dqminh has quit [Remote host closed the connection]
beneggett has joined #ruby
Quebert has quit [Quit: Linkinus - http://linkinus.com]
chessguy has joined #ruby
dagnachewa has quit [Quit: WeeChat 0.4.0]
ckrailo has joined #ruby
sayan has quit [Read error: Connection reset by peer]
v0n has joined #ruby
Ontolog has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
RORgasm has joined #ruby
cuemin has quit [Quit: Leaving]
freeayu has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
etcetera has quit []
SCommette has joined #ruby
RORgasm has quit [Ping timeout: 240 seconds]
Beoran__ has joined #ruby
etcetera has joined #ruby
reset has quit [Ping timeout: 256 seconds]
arya has joined #ruby
<shevy> guys
<shevy> for your directories in bash, on linux, what colour do you use?
<shevy> I am asking because I use ansi colour codes in ruby soon, and I want to have the same colours in my .rb script
<shevy> I use blue right now...
d3 has joined #ruby
freeayu has joined #ruby
rippa has joined #ruby
wsterling has quit [Remote host closed the connection]
Beoran_ has quit [Ping timeout: 246 seconds]
jumpei has quit [Remote host closed the connection]
ghanima has quit [Quit: Leaving.]
jumpei has joined #ruby
crackfu has quit [Remote host closed the connection]
<DesertFoxATX> that doesn't answer why you are asking.
crackfu has joined #ruby
<shevy> DesertFoxATX let's say you have a directory like "/tmp/foo/"
<shevy> and you want to display a message such as:
<shevy> "Asking to confirm the removal of directory /tmp/foo: [y/n]"
<shevy> hmm. if the user uses yellow for this... and I display green ... it's annoying for the user
dagnachew has quit [Read error: Connection reset by peer]
r0bby has joined #ruby
indyrl has quit [Quit: Leaving.]
<DesertFoxATX> Thats a assumption.
crackfu has quit [Ping timeout: 256 seconds]
<DesertFoxATX> And thiats not a programming question, more a design and marketing.
reset has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
<JamieJ> ugh (RAAAAAAAAAAAAAAAAAGE)
fridim has quit [Ping timeout: 246 seconds]
<bnagy> shevy: get the users term colours :)
r0bby_ has joined #ruby
<bnagy> I use no colours at all, and it irritates me when programs do ;)
r0bby has quit [Ping timeout: 256 seconds]
<RubyPanther> shevy: I use term-ansicolor gem
<DesertFoxATX> bnagy, ++
Fuzai has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
hiyakashi has joined #ruby
<shevy> bnagy oh? that is possible?
<RubyPanther> I agree no colors in a cli, but colors are awesome in logs especially ones you keep open with tail -f
<shevy> bnagy, yeah, I can totally understand that point of view
<shevy> DesertFoxATX when uthers use my scripts then for sure it is an important question, but just for you I'd code in bright pink colours :P
<shevy> oops. *others
<DesertFoxATX> rainbow or gtfo
<DesertFoxATX> i want my eyes to bleed when i read output.
<DesertFoxATX> as neon as you can get them.
<shevy> haha, if only I could blink you with it
sayan has joined #ruby
<shevy> it was my favourite html tag
<RubyPanther> I usually don't consume output, but when I do I like it rainbow or gtfo
<RubyPanther> shevy, ansi colors do have blink
<DesertFoxATX> RubyPanther, anything that has logs that i care about im probably going to have another system managing that
ngoldman has joined #ruby
<DesertFoxATX> instead of trying to build up my own notificaiton/monitoring junk, reinventing the wheel and what not.
generali_ has joined #ruby
<RubyPanther> I don't think some abstract "other system" being involved, if it is in management or implementation, is going to reduce the utility of tail -f or of shell colors there
jumpei has quit [Remote host closed the connection]
<RubyPanther> I'd go the other way and say that using standard tools you can add color with ANSI codes specifically _without_ reinventing the wheel, and any extra other "system" managing logs is going to be the re-invention
<DesertFoxATX> Sure, and it ultimiately will come down to the dev designing it, just stating my opinion and way of doing things.
<RubyPanther> It keeps the colors just as part of the data that you choose to log
jumpei has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
zeroeth has quit [Ping timeout: 264 seconds]
regedarek has quit [Ping timeout: 260 seconds]
dqminh has joined #ruby
io_syl has joined #ruby
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Quit: Leaving]
xll11 has left #ruby [#ruby]
xll11 has joined #ruby
celestius has quit [Quit: Textual IRC Client: www.textualapp.com]
<xll11> can anyone tell me why it doesnt enter my Case statement?
ckrailo has quit [Quit: Computer has gone to sleep.]
reset has quit [Ping timeout: 245 seconds]
jumpei has quit [Remote host closed the connection]
<waxjar> because your case statement is on the class level
dqminh has quit [Remote host closed the connection]
<xll11> ah
<xll11> lol.. so bad :p
MrZYX is now known as MrZYX|off
crackfu has joined #ruby
fixl has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Nisstyre-laptop has joined #ruby
gabrielrotbart has quit [Read error: Connection reset by peer]
mattbl has joined #ruby
jumpei has joined #ruby
kofno_ has quit [Remote host closed the connection]
lewix_ has joined #ruby
justsee has joined #ruby
gabrielrotbart has joined #ruby
regedarek has joined #ruby
<lewix_> xll11: gets.to_i is enought
kofno has joined #ruby
<lewix_> enough* you don't need chomp
lewix has quit [Disconnected by services]
generali_ has quit [Remote host closed the connection]
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
crackfu has quit [Remote host closed the connection]
crackfu has joined #ruby
a_a_g has quit [Quit: Leaving.]
<waxjar> xll11: consider making a Movie object and setting options on that (let it do the validation for you), give it an export method that gives you an object that you can pass to CSV.
justsee has quit [Ping timeout: 240 seconds]
jrajav has quit [Quit: I tend to be neutral about apples]
kofno has quit [Ping timeout: 256 seconds]
<xll11> like, movie add etc?
<xll11> Movie.add
regedarek has quit [Ping timeout: 245 seconds]
jumpei has quit [Remote host closed the connection]
crackfu has quit [Ping timeout: 256 seconds]
<waxjar> movie = Movie.new; movie.title = "pulp fiction"; movie.rating = 89; movie.to_a # => whatever CSV needs
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
<waxjar> a collection of movies would simply be an Array of movie objects
girija has joined #ruby
<waxjar> the file opening, closing and asking for values doesn't need to be in the class
freeayu has quit [Read error: Connection reset by peer]
mattbl has quit [Quit: This computer has gone to sleep]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
fixl has joined #ruby
arya has quit [Ping timeout: 264 seconds]
rickruby has quit [Remote host closed the connection]
generali_ has joined #ruby
nightfalcon has quit [Ping timeout: 256 seconds]
jekotia has quit [Quit: zzzzzzzzzzzz]
ghanima has joined #ruby
uris has quit [Quit: Leaving]
freeayu has joined #ruby
SCommette has quit [Quit: SCommette]
arya has joined #ruby
Villadelfia has quit [Ping timeout: 245 seconds]
jumpei has joined #ruby
zeroeth has joined #ruby
SeySayux has quit [Ping timeout: 264 seconds]
mengu has quit [Quit: This computer has gone to sleep]
jumpei has quit [Remote host closed the connection]
freakazoid0223 has quit [Ping timeout: 258 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
SeySayux has joined #ruby
regedarek has joined #ruby
Villadelfia has joined #ruby
tjohnson has quit [Quit: Lost terminal]
dhruvasagar has joined #ruby
<xll11> waxjar I see
girija has left #ruby ["Ex-Chat"]
cyong has quit [Quit: Leaving.]
codecop has joined #ruby
sayan has quit [Read error: Connection reset by peer]
yoshie902a has joined #ruby
tootooroo has joined #ruby
<xll11> Anyone has any experience developing games with ruby?
baroquebobcat has quit [Quit: baroquebobcat]
arya has quit [Ping timeout: 240 seconds]
mmitchell has quit [Remote host closed the connection]
jurassic has joined #ruby
Heero` has joined #ruby
ngoldman has quit [Remote host closed the connection]
aarkerio has joined #ruby
benlieb has joined #ruby
chrisnicola has joined #ruby
arya has joined #ruby
perun_ has quit [Ping timeout: 245 seconds]
<aarkerio> hi! why 7 * 10 = 70 but 7 / 10 = 0 ?
tootooroo has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
<Hanmac1> aarkerio: integer math
<tylersmith> aarkerio: 7 / 10 is using integer division. try 7 / 10.to_f
Rumsteak has quit [Read error: Operation timed out]
<Hanmac1> you need Float math
br4ndon has joined #ruby
kiwnix has quit [Ping timeout: 264 seconds]
dormoose has quit [Quit: ZNC - http://znc.in]
dormousy has quit [Quit: ZNC - http://znc.in]
JoeHazzers has left #ruby [#ruby]
dormousy has joined #ruby
pupoque has joined #ruby
lewix has quit [Remote host closed the connection]
dormoose has joined #ruby
sayan has joined #ruby
bonty_ssh has joined #ruby
jumpei has joined #ruby
mattbl has joined #ruby
tootooroo has joined #ruby
brianpWins has joined #ruby
v0n has quit [Ping timeout: 245 seconds]
ehaliewicz has quit [Remote host closed the connection]
<Hanmac1> xll11 look at gosu for 2D games ... (ps i am writing at a 3d engine but i dont have the time for that :'( )
lewix has joined #ruby
generali_ has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
wsterling has joined #ruby
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
rdev5 has quit [Quit: Leaving...]
idkazuma has joined #ruby
idkazuma has quit [Remote host closed the connection]
<xll11> just looking for projects i can make to dip my feet in the ruby water
<xll11> gonna install ubuntu on my laptop too today, hopefully ill have more luck with using databases there
gabrielrotbart has quit [Remote host closed the connection]
divout has joined #ruby
<shevy> xll11 and will you use ruby?
wsterling has quit [Ping timeout: 248 seconds]
io_syl has quit [Ping timeout: 252 seconds]
jbueza has quit [Quit: Leaving.]
nadirvardar has quit [Quit: Computer has gone to sleep.]
etcetera has quit []
io_syl has joined #ruby
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
chrisnicola has quit [Quit: This computer has gone to sleep]
Heero` has quit [Ping timeout: 264 seconds]
Heero has quit [Ping timeout: 256 seconds]
<lewix> xll11: wanna make a project together?
a_a_g has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
kofno has joined #ruby
mithro-- has left #ruby ["Leaving"]
anonymuse has quit [Quit: Leaving...]
yacks has quit [Read error: Operation timed out]
braoru has joined #ruby
benlieb has quit [Quit: benlieb]
tent405 has joined #ruby
kofno has quit [Ping timeout: 248 seconds]
chandankumar has quit [Ping timeout: 245 seconds]
sayan has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 260 seconds]
hiyakashi has quit [Quit: お前は知りすぎた]
agarie has quit [Read error: Connection reset by peer]
agarie has joined #ruby
dqminh has joined #ruby
gabrielrotbart has joined #ruby
<shevy> man, he is probably a loner
beneggett has quit [Quit: Computer has gone to sleep.]
<tent405> could anyone help me with a syntax error please
bonty_ssh has quit [Remote host closed the connection]
tootooroo has joined #ruby
arya has joined #ruby
<Hanmac1> tent405: line 16, use .sort_by {|o| o[0].id}
<tent405> thank you I will try that
ananthakumaran has joined #ruby
<Hanmac1> tent405: but the error is in line 3, remove the " out" there
gabrielrotbart has quit [Remote host closed the connection]
<tent405> yeah i don't know much about ruby but that looked quite weird
<tent405> a semicolon? a variable init?
nadirvardar has joined #ruby
dqminh has quit [Ping timeout: 256 seconds]
<Hanmac1> tent405: at this place its non of them, its invalid ruby
Mattykins has joined #ruby
rickruby has joined #ruby
aganov has joined #ruby
matayam has quit [Remote host closed the connection]
<lewix> shevy: lol
etcetera has joined #ruby
Loaft has joined #ruby
<lewix> shevy: i was saying that this is the worst time to learn rails; all the books are outdated and it's such a pain to keep up. I can only rely on the only doc
hamakn has quit [Remote host closed the connection]
<tent405> hmm, Hanmac1 i'm still getting syntax error, unexpected tIDENTIFIER, expecting keyword_end [... ] 2013-04-05T05:49:54+00:00 app[web.1]: FCSV.generate(:encoding => 'u') out do |csv|
<tent405> maybe there is an 'end' missing further on in the program?
perun_ has joined #ruby
<Hanmac1> tent405: i said remove it, so "(:encoding => 'u') out do |csv|" into "(:encoding => 'u') do |csv|"
etcetera has quit [Client Quit]
<shevy> lewix I always hated the rails book. and when I tried to install rails via bundler, bundler exploded into my face. since that day, I stopped caring about wanting to learn it
carraroj has joined #ruby
<lewix> lol
<lewix> shevy: so wait you dont know rails?
<tent405> omg Hanmac1 thanks you very much lots, that was a silly error
<tent405> i need to brush up on my intermediate syntax a bit more obviously
jurassic has quit [Quit: jurassic]
tagrudev has joined #ruby
pygmael has joined #ruby
RORgasm has joined #ruby
headius has joined #ruby
dmiller1 has quit [Ping timeout: 256 seconds]
thinkclay has quit [Quit: Leaving.]
tent405 has left #ruby [#ruby]
DesertFoxATX has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
DesertFoxATX has joined #ruby
nyuszika7h has quit [Excess Flood]
hemanth has joined #ruby
aarkerio has quit [Quit: Leaving]
nadirvardar has quit [Quit: Computer has gone to sleep.]
cantonic is now known as cantonic|away
RORgasm has quit [Ping timeout: 255 seconds]
nyuszika7h_ has joined #ruby
yashshah has quit [Remote host closed the connection]
<shevy> lewix I know a bit, I made a tutorial from one book, had things working back then in sqlite
<shevy> made/worked through
yashshah has joined #ruby
shock_one has joined #ruby
perun_ has quit [Ping timeout: 276 seconds]
pygmael has quit [Quit: pygmael]
pygmael has joined #ruby
headius has quit [Quit: headius]
rosster has quit [Ping timeout: 248 seconds]
ElderFain has joined #ruby
<ElderFain> I currently have two apps on the same server talking to each other via curb/curl bindings. I'm trying to read up on the difference between a request via curl, vs a socket connection to each other
<ElderFain> but my google is failing me, or I'm not really thinking of the question properly
jdunck has joined #ruby
jurassic has joined #ruby
<Hanmac1> ElderFain: #rubyonrails
<RubyPanther> ElderFain: I would start at "OSI network model" (even if it is not strictly used)
<ElderFain> these aren't rails apps =p
<shevy> RubyPanther is finally back
<RubyPanther> note that neither curl nor sockets have anything do with rails
<RubyPanther> I was here the whole time :)
rosster has joined #ruby
<ElderFain> nginix serves these two apps off different routes, /app1/ & /app2/
<ElderFain> i just feel silly from app1 saying curl.get(127.0.0.1/app2/my_data)
brhelwig has quit [Remote host closed the connection]
brhelwig has joined #ruby
<ElderFain> RubyPanther: okay, layer 5 vs layer 7
Pochacco has joined #ruby
<Hanmac1> the most failures are in layer 8 and beyond
<ElderFain> developer & user? =)
<RubyPanther> I usually use the GET script that comes with Perl lwp-download instead of CURL
<RubyPanther> ElderFain: what exactly about it seems silly?
<ElderFain> so if I open a socket to 127.0.0.1:443 its not going to help me much, because the data I need is behind :443/app2/my_data and I cannot make a 'socket' connection to that
kaffepanna has quit [Quit: Changing server]
rickruby has quit [Remote host closed the connection]
tvw has joined #ruby
<RubyPanther> ElderFain: yeah you'd have to implement HTTP. Or, you oculd require "open-uri" and then just pass the url to Ruby's open() and #read your data back. Or use Net::HTTP
kaffepanna has joined #ruby
<RubyPanther> Personally I always prefer to use Ruby's stdlib to an external tool
i_s has joined #ruby
<ElderFain> well Im already using curb
<ElderFain> so I'm not sure in the value in going backwards to open-air or net::http
brhelwig has quit [Ping timeout: 245 seconds]
<ElderFain> open-uri
yacks has joined #ruby
toekutr has joined #ruby
<ElderFain> actually, i think it seems fine now
<ElderFain> RubyPanther: well, in order to get rack to bypass auth for a local request
<ElderFain> it checks to see if the request comes from its own IP address
<ElderFain> which seems a bit eh
<RubyPanther> Seems a reasonable default, the scenario where you have hostiles on the same host is very rare these days thanks to VMs
IceDragon has quit [Quit: Space~~~]
dankest has joined #ruby
Vainoharhainen has joined #ruby
<JamieJ> hey ppl
<JamieJ> ruby doesnt seem as bad....but as some of you all see i need some practice
<JamieJ> any of you recommend any sites where i can do practice programs?
arya has quit [Ping timeout: 276 seconds]
mattbl has quit [Quit: This computer has gone to sleep]
<ElderFain> JamieJ: the ruby quiz
<ElderFain> has tons & tons of "practice" programs
<ElderFain> its up to #234 so..
Elhu has joined #ruby
<ElderFain> lots to start from =)
jumpei has quit [Remote host closed the connection]
grzywacz has joined #ruby
hamakn has joined #ruby
tomsthumb has quit [Quit: Leaving.]
arya has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
saimaz has joined #ruby
pygmael has left #ruby [#ruby]
kofno has joined #ruby
dmiller1 has joined #ruby
zigomir has joined #ruby
markalanevans has quit [Quit: markalanevans]
HecAtic has joined #ruby
nomenkun has joined #ruby
rickruby has joined #ruby
arietis has joined #ruby
kofno has quit [Ping timeout: 256 seconds]
dmiller1 has quit [Ping timeout: 246 seconds]
arya_ has joined #ruby
Morkel has joined #ruby
brhelwig has joined #ruby
arya has quit [Ping timeout: 240 seconds]
sayan has joined #ruby
quazimodo has joined #ruby
Matt has joined #ruby
tsipanov has joined #ruby
Matt is now known as Guest41870
chandankumar has joined #ruby
nomenkun has quit [Remote host closed the connection]
JamieJ has quit [Quit: Page closed]
arturaz has joined #ruby
pduin has joined #ruby
tylersmith has quit [Quit: tylersmith]
arya_ has quit [Ping timeout: 264 seconds]
zeroeth has quit [Ping timeout: 252 seconds]
rosster has quit [Ping timeout: 256 seconds]
idkazuma has joined #ruby
puppeh has joined #ruby
tsipanov has quit [Remote host closed the connection]
tootooroo has quit [Read error: Connection reset by peer]
tsipanov has joined #ruby
haxrbyte has joined #ruby
arya has joined #ruby
rosster has joined #ruby
i_s has quit [Quit: i_s]
chandankumar has quit [Ping timeout: 240 seconds]
filipe has joined #ruby
chandankumar has joined #ruby
ElderFain has quit [Quit: ElderFain]
kemist has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
Hanmac1 has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
quazimodo has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
jnoob22__ has quit [Remote host closed the connection]
brhelwig has quit [Ping timeout: 255 seconds]
chandankumar has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
beiter has joined #ruby
rezzack1 has joined #ruby
dhruvasagar has joined #ruby
akemrir has joined #ruby
x0F has joined #ruby
<shevy> dumdedum
<shevy> bored bored bored
JohnBat26 has joined #ruby
<shevy> I dont wanna code anymore
<shevy> I just want to create
rezzack has quit [Ping timeout: 256 seconds]
quazimodo has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
Hanmac has joined #ruby
rickmasta has joined #ruby
monkegjinni has quit [Read error: No route to host]
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
pupoque has quit [Quit: This computer has gone to sleep]
agarie has quit [Remote host closed the connection]
monkegjinni has joined #ruby
mafolz has joined #ruby
marcdel has joined #ruby
<Hanmac> banisterfiend: thank you for your decorate function, it inspirate me for my own overwrite method ... do you want to see it? (shevy you too?)
<shevy> yeah
haxrbyte_ has joined #ruby
francisfish has joined #ruby
mercwithamouth has quit [Ping timeout: 245 seconds]
zeade has quit [Quit: Leaving.]
monkegjinni has quit [Ping timeout: 256 seconds]
chandankumar has joined #ruby
haxrbyt__ has joined #ruby
haxrbyte has quit [Ping timeout: 255 seconds]
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
mahmoudimus has joined #ruby
rickruby has quit [Remote host closed the connection]
filipe has quit [Ping timeout: 256 seconds]
haxrbyte_ has quit [Ping timeout: 256 seconds]
tootooroo has joined #ruby
bonty_ssh has joined #ruby
chrishough has quit [Quit: chrishough]
<Hanmac> shevy did you looked?
anderse has joined #ruby
angusiguess has joined #ruby
dr_bob has joined #ruby
<callmeivan> is there a way to retrieve @great without running @great = 2 * number ? http://pastebin.com/mKtqvYdT
jdunck has quit [Quit: Computer has gone to sleep.]
ananthakumaran1 has joined #ruby
filipe has joined #ruby
<Hanmac> callmeivan: instance_variable_get
angusiguess has quit [Ping timeout: 245 seconds]
kofno has joined #ruby
ananthakumaran has quit [Ping timeout: 264 seconds]
<callmeivan> thanks
piotr has joined #ruby
<callmeivan> thats great
<callmeivan> i wish i would have asked before i set up all that useless junk :D
hogeo_ has joined #ruby
camilasan has joined #ruby
jurassic has quit [Quit: jurassic]
dankest has quit [Quit: Leaving...]
kofno has quit [Ping timeout: 256 seconds]
mpfundstein has quit [Remote host closed the connection]
hogeo has quit [Ping timeout: 276 seconds]
arya_ has joined #ruby
mercwithamouth has joined #ruby
arya has quit [Ping timeout: 256 seconds]
Skofo has quit [Ping timeout: 245 seconds]
MissionCritical has quit [Remote host closed the connection]
jurassic has joined #ruby
keymone has joined #ruby
fjfish has joined #ruby
timmow has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
bigkevmcd has quit [Ping timeout: 256 seconds]
timmow has joined #ruby
miso1337 has quit [Quit: afk]
francisfish has quit [Ping timeout: 246 seconds]
<xll11> lewix sorry, went to the gym
<xll11> i sure do!
Akuma has quit [Ping timeout: 245 seconds]
<xll11> I hope you didn't miss the bit about me being new to ruby :P
timonv has joined #ruby
timmow has quit [Remote host closed the connection]
maxmanders has joined #ruby
idkazuma has quit [Remote host closed the connection]
evxd_ is now known as evxd
bonty_ssh has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
x0F has quit [Ping timeout: 246 seconds]
maxmanders has quit [Client Quit]
tootooroo has quit [Ping timeout: 256 seconds]
Andromed_ has joined #ruby
havenn_ has quit [Remote host closed the connection]
filipe has quit [Ping timeout: 246 seconds]
wudofyr_ has quit [Remote host closed the connection]
wudofyr_ has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
bonty_ssh has joined #ruby
indigenous has quit [Changing host]
indigenous has joined #ruby
Guest41870 has quit [Quit: This computer has gone to sleep]
apeiros has joined #ruby
daniel_- has joined #ruby
dhruvasagar has joined #ruby
thmz_ has quit [Quit: thmz_]
wchun_ has joined #ruby
maxmanders has joined #ruby
apod has joined #ruby
MissionCritical has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
RORgasm has joined #ruby
Asher has quit [Ping timeout: 258 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
wchun_ has left #ruby ["Leaving"]
wchun has left #ruby ["Leaving"]
Akuma has joined #ruby
tootooroo has joined #ruby
arya has joined #ruby
x0F has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
wchun has joined #ruby
Asher has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
filipe has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
jurassic has quit [Quit: jurassic]
wchun has quit [Client Quit]
Elhu has joined #ruby
maxmanders has joined #ruby
wchun has joined #ruby
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
tootooroo has joined #ruby
tsipanov has quit [Remote host closed the connection]
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
brianpWins has quit [Quit: brianpWins]
Emmanuel_Chanel has joined #ruby
swex_ has joined #ruby
hackeron has quit [Ping timeout: 246 seconds]
swex has quit [Ping timeout: 256 seconds]
pi3r has joined #ruby
hackeron has joined #ruby
x0F has quit [Ping timeout: 264 seconds]
miso1337 has joined #ruby
hemanth_ has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
jeebster has quit [Quit: Leaving.]
toekutr has quit [Remote host closed the connection]
Asher1 has joined #ruby
chessguy has quit [Remote host closed the connection]
luckyruby has joined #ruby
Asher has quit [Ping timeout: 256 seconds]
luckyruby has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
hmarr has joined #ruby
luckyruby has joined #ruby
apod has quit []
quazimodo has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
shock_one has quit [Ping timeout: 264 seconds]
quazimodo has joined #ruby
perun_ has joined #ruby
martinklepsch has joined #ruby
duosrx has joined #ruby
timmow has joined #ruby
emocakes has joined #ruby
marcdel has quit []
elaptics`away is now known as elaptics
lewix has quit [Remote host closed the connection]
chandankumar has quit [Ping timeout: 245 seconds]
x0F has joined #ruby
lewix has joined #ruby
guns has joined #ruby
angusiguess has joined #ruby
rickruby has joined #ruby
lewix has quit [Ping timeout: 264 seconds]
timmow_ has joined #ruby
slainer68 has joined #ruby
nomenkun has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
blaxter has joined #ruby
rickmasta has quit [Remote host closed the connection]
nomenkun has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
neurone-2337 has joined #ruby
rickruby has quit [Ping timeout: 245 seconds]
nomenkun_ has joined #ruby
kofno has joined #ruby
Andromed_ has quit [Remote host closed the connection]
Guest41870 has joined #ruby
mikecmpbll has joined #ruby
Andromed_ has joined #ruby
pioz has joined #ruby
Andromed_ has quit [Client Quit]
Zai00 has joined #ruby
neurone-1337 has quit [Ping timeout: 252 seconds]
Andromed_ has joined #ruby
nomenkun has quit [Ping timeout: 256 seconds]
fjfish has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 256 seconds]
francisfish has joined #ruby
jabbslad has joined #ruby
Andromed_ has quit [Client Quit]
chandankumar has joined #ruby
Andromed_ has joined #ruby
tootooroo has quit [Ping timeout: 245 seconds]
carraroj has quit [Quit: Konversation terminated!]
Macaveli has joined #ruby
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby
Al_ has joined #ruby
Macaveli has quit [Client Quit]
francisfish has quit [Ping timeout: 276 seconds]
chandankumar has quit [Client Quit]
Es0teric has quit [Quit: Computer has gone to sleep.]
Macaveli has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
crackfu has joined #ruby
timonv has joined #ruby
jabbslad has quit [Quit: Leaving...]
<shevy> Hanmac I looked at it but I have no idea what your code does
<shevy> my brain only understands simple code :(
<Hanmac> :P
alup has joined #ruby
mneorr has joined #ruby
security has joined #ruby
megha has quit [Ping timeout: 248 seconds]
crackfu has quit [Remote host closed the connection]
adambeynon has joined #ruby
crackfu has joined #ruby
razibog has joined #ruby
clocKwize has joined #ruby
havenwood has joined #ruby
crackfu has quit [Ping timeout: 245 seconds]
chandankumar has joined #ruby
Andromed_ has quit []
Andromeda has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
echevemaster_ has joined #ruby
Hanmac has quit [Quit: Leaving.]
Hanmac has joined #ruby
drale2k has joined #ruby
gyre007 has joined #ruby
rcosta has joined #ruby
echevemaster_ has quit [Client Quit]
maxmanders has quit [Quit: Computer has gone to sleep.]
security has quit [Ping timeout: 246 seconds]
bluenemo has joined #ruby
ttt has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 245 seconds]
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
rh1n0 has joined #ruby
ehellman has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
rh1n0 has joined #ruby
rh1n0 has quit [Max SendQ exceeded]
echevemaster has joined #ruby
echevemaster has quit [Changing host]
echevemaster has joined #ruby
emocakes has quit [Quit: emocakes]
rcosta has quit [Ping timeout: 256 seconds]
eka has joined #ruby
ttt has joined #ruby
Hanmac has joined #ruby
Al_ has quit [Ping timeout: 264 seconds]
gommo has joined #ruby
vlad_starkov has joined #ruby
d2dchat has quit [Remote host closed the connection]
tevio has joined #ruby
tootooroo has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
soulofpeace has joined #ruby
MrZYX is now known as MrZYX|off
JonnieCache has quit [Quit: leaving]
maxmanders has joined #ruby
neurone-1337 has joined #ruby
tootooroo has quit [Ping timeout: 256 seconds]
sayan has quit [Read error: Connection reset by peer]
greenarrow has quit [Read error: Connection reset by peer]
greenarrow has joined #ruby
security has joined #ruby
hemanth_ is now known as hemanth
neurone-2337 has quit [Ping timeout: 245 seconds]
callmeivan has quit [Remote host closed the connection]
Andromeda has quit [Remote host closed the connection]
callmeivan has joined #ruby
Andromeda has joined #ruby
Macaveli has quit [Quit: Leaving]
crackfu has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
hemanth has joined #ruby
callmeivan_ has joined #ruby
Andromeda has quit [Ping timeout: 248 seconds]
robustus has joined #ruby
beiter has quit [Quit: beiter]
crackfu has quit [Ping timeout: 245 seconds]
sayan has joined #ruby
tsipanov has joined #ruby
haxrbyt__ has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
callmeivan has quit [Ping timeout: 246 seconds]
callmeivan_ is now known as callmeivan
guns has quit [Ping timeout: 256 seconds]
Xeago has joined #ruby
angusiguess has joined #ruby
My_Hearing has joined #ruby
My_Hearing has joined #ruby
Bry8Star has joined #ruby
arya has quit [Ping timeout: 260 seconds]
callmeivan has quit [Remote host closed the connection]
callmeivan has joined #ruby
Mon_Ouie has quit [Ping timeout: 255 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
sepp2k has joined #ruby
beiter has joined #ruby
callmeivan has quit [Remote host closed the connection]
end_guy has quit [Remote host closed the connection]
callmeivan has joined #ruby
end_guy has joined #ruby
arya_ has quit [Ping timeout: 260 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
moshef has joined #ruby
Bry8Star has quit [Ping timeout: 276 seconds]
kofno has joined #ruby
callmeivan_ has joined #ruby
lewix has joined #ruby
callmeivan__ has joined #ruby
callmeivan has quit [Read error: Connection reset by peer]
callmeivan__ is now known as callmeivan
arya has joined #ruby
kofno has quit [Ping timeout: 240 seconds]
bluenemo has quit [Quit: Verlassend]
Macaveli has joined #ruby
callmeivan_ has quit [Ping timeout: 260 seconds]
lewix has quit [Ping timeout: 260 seconds]
clocKwize has quit [Quit: clocKwize]
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Remote host closed the connection]
callmeivan has quit [Remote host closed the connection]
callmeivan has joined #ruby
sayan_ has joined #ruby
iPhoneMRZ has joined #ruby
iPhoneMRZ has quit [Client Quit]
sayan_ has quit [Read error: Connection reset by peer]
miso1337 has quit [Quit: unplugging]
Bry8Star has joined #ruby
drale2k has quit [Quit: Leaving...]
carraroj has joined #ruby
iPhoneMRZ has joined #ruby
jabbslad has joined #ruby
BSaboia has joined #ruby
lancepantz_ is now known as lancepantz
callmeivan_ has joined #ruby
havenwood has joined #ruby
hashmal has joined #ruby
whitedawg has joined #ruby
security is now known as megha
callmeivan_ has quit [Remote host closed the connection]
callmeivan_ has joined #ruby
yshh has quit [Remote host closed the connection]
callmeivan has quit [Ping timeout: 264 seconds]
callmeivan_ is now known as callmeivan
rdark has joined #ruby
hogeo_ has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 256 seconds]
hogeo has joined #ruby
callmeivan_ has joined #ruby
hogeo has quit [Remote host closed the connection]
freeayu has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
Guest41870 has quit [Quit: This computer has gone to sleep]
RORgasm has joined #ruby
callmeivan has quit [Ping timeout: 260 seconds]
callmeivan_ is now known as callmeivan
marwinis1 is now known as marwinism
arya has quit [Ping timeout: 252 seconds]
yshh has joined #ruby
RORgasm has quit [Ping timeout: 245 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
jgrevich has quit [Remote host closed the connection]
tevio has quit [Remote host closed the connection]
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
dhruvasagar has joined #ruby
grzywacz has quit [Ping timeout: 276 seconds]
bluenemo has joined #ruby
piotr_ has joined #ruby
piotr has quit [Ping timeout: 256 seconds]
arya has joined #ruby
arya has quit [Client Quit]
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #ruby
kaffepanna has quit [Ping timeout: 240 seconds]
ghanima has quit [Quit: Leaving.]
Proshot has joined #ruby
kaffepanna has joined #ruby
gommo_ has joined #ruby
m8 has joined #ruby
Michael__ has joined #ruby
Macaveli has quit [Quit: Leaving]
io_syl has quit [Quit: Computer has gone to sleep.]
blacktulip has joined #ruby
yshh has quit [Remote host closed the connection]
tadassce has joined #ruby
gommo has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 256 seconds]
dhruvasagar has joined #ruby
clocKwize has joined #ruby
cburyta has quit [Remote host closed the connection]
freeayu has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
LennyLinux has joined #ruby
carraroj has quit [Ping timeout: 245 seconds]
HecAtic has quit [Quit: Àá¼ö]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
tadassce has left #ruby ["Leaving..."]
rezzack1 has quit [Ping timeout: 264 seconds]
bluenemo has quit [Quit: Verlassend]
beiter has quit [Quit: beiter]
aaronmcadam has joined #ruby
<aaronmcadam> with rbenv, how do you handle your gemsets? really want to drop rvm now
ttt has quit [Remote host closed the connection]
<Xeago> aaronmcadam: are gemsets necessary when using bundler?
<aaronmcadam> not specifically
<aaronmcadam> but they do help keep project resources sandboxed
<aaronmcadam> so the dep tree isn't massiv
nyuszika7h_ is now known as nyuszika7h
[eDu] has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kofno has joined #ruby
freeayu has joined #ruby
slainer6_ has joined #ruby
elliottkember has joined #ruby
camilasan has quit [Remote host closed the connection]
rippa has quit [Ping timeout: 240 seconds]
luckyruby has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 256 seconds]
joshu has quit [Remote host closed the connection]
slainer68 has quit [Ping timeout: 256 seconds]
Michael__ has quit [Remote host closed the connection]
yshh has joined #ruby
luckyruby has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
benlieb has joined #ruby
tsipanov has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 256 seconds]
yshh has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
spooner_ has joined #ruby
carraroj has joined #ruby
tsipanov has joined #ruby
drale2k has joined #ruby
<moshef> I'm calling a file and getting classname is not a class (type error)
<moshef> the file itself is a class but I used in the past the same file as module
<moshef> is this the reason for conflict? when I open the file itself (where i see the error) i see the correct code and its indeed a class
monkegjinni has joined #ruby
havenwood has joined #ruby
ggVGc has joined #ruby
bonty_ssh has quit [Remote host closed the connection]
<lupine> moshef, if you've previously done class ::Foo ; end you cannot reopen it by doing module ::Foo ; end
<lupine> (and vice-versa)
<lupine> the class / module keyword must be the same each time
<moshef> so i have to use a different name?
<moshef> its
<moshef> i'm speaking about 1 day ago
<moshef> not current
sepp2k has quit [Remote host closed the connection]
<lupine> that would work too
<moshef> meaning? i need to rename the new class?
Astralum is now known as __KGB__
<lupine> class ::Foo ; end module ::Bar ; end won't conflict
<moshef> but then ill have to call foo::bar all the time instead of bar
<moshef> no?
<lupine> anyway, it's too easy to screw things up if you start using ambiguous class names. I try to avoid it
br4ndon has joined #ruby
<moshef> yeah, my thought too
<lupine> moshef, no, in the example, you'd have a class classed ::Foo, and a separate module called ::Bar
<moshef> yeah just saw that i was mistaken
<moshef> whats the foo for?
<lupine> if you have a module, module, module, class hierarchy, you can include the module to get unqualified access to the class, of course
<moshef> i do need a class not a module
havenwood has quit [Ping timeout: 245 seconds]
<moshef> no i just have a class and thats all
<lupine> moshef, I was just trying to put together a minimal example that duplicates the problem you described
<moshef> but then i end up with a module
<lupine> "I used in the past the same file as module"
<moshef> i'd expect to do the other way - class within module
<moshef> no?
Ortuna has joined #ruby
<shevy> moshef you can also put a class inside a class
<lupine> or a module inside a class
<moshef> I know
<shevy> class Foo; class Bar
jnoob22 has joined #ruby
<shevy> Foo::Bar.new
<moshef> i've been told its not wise to have class within class
<lupine> when you're using modules for namespacing, then you don't, because it's evil
<lupine> but when you have an internal class, it makes perfect sense
<shevy> moshef, it depends, if you need to do Foo.new, then this example is more useful
<shevy> problem is in ruby, modules are crippled classes :(
<moshef> yeah I'd have to do Foo.new
<shevy> one advantage you have with a module is that you can include it
<shevy> but personally, I think this distinction is really arbitrary, dunno why matz made it that way
[eDu] has quit [Quit: [eDu]]
<shevy> it annoys me when people use a main class namespace :\
<shevy> lupine, admit it... you are one of those evil guys who use classes as main namespace
<lupine> shevy, nope, not me
<shevy> hmm ok then it was apeiros hah!
soulofpeace has quit [Ping timeout: 256 seconds]
<lupine> although I have a number of projects inherited from my boss that started off as a single class, ~2000 lines
<shevy> in ruby?
<lupine> yeah
<shevy> that's a rather big class
<lupine> what I've been doing is splitting them up into littler classes and having the main class construct object trees with them
Morkel has quit [Quit: Morkel]
davetherat has quit [Remote host closed the connection]
<lupine> but you end up with Class MyMainClass ; include ModularMyMainClass ; end ; module MyMainClass ; class MyMainClassFunctionA ; end
<shevy> my current record is a class with 2738 lines (but including empty lines and comments)
davetherat has joined #ruby
fixl has quit [Remote host closed the connection]
<shevy> hehe yeah
brhelwig has joined #ruby
<lupine> until you've completely decomposed the massive class, it's an awkward class-in-class hierarchy
<apeiros> shevy: it wasn't me!</shaggy>
pi3r has quit [Ping timeout: 256 seconds]
<shevy> yesterday I wrote a class called SetTerminalTitle
<shevy> which... sets the title of a terminal
ggVGc has quit [Remote host closed the connection]
<shevy> but it's annoying to type that
<shevy> especially if you want to use it across many different .rb files, optionally right? hmm... set_title('hello world') would be nicer than SetTitle.new('hello world')
arya has joined #ruby
<lupine> mm, that doesn't seem natural to me
<lupine> Terminal.new( ... ).set_title is how I'd go
<lupine> if there's only one terminal (hah!) then Terminal.set_title
dhruvasagar has quit [Ping timeout: 276 seconds]
<moshef> i agree with set_title('hello') being easier
<shevy> lupine well I dont really have a functional Terminal.new class
<apeiros> set_title? in ruby? srsly?
<apeiros> title=, come on…
<shevy> apeiros but from within another class?
dhruvasagar has joined #ruby
<apeiros> what's the issue?
pi3r has joined #ruby
<lupine> Terminal/title = ... would be fine too
<lupine> . *
<shevy> looks like a local variable
<apeiros> shevy: how long are you doing ruby now?
<shevy> apeiros many years
<apeiros> you really should be accustomed to attr_writers
brhelwig has quit [Ping timeout: 256 seconds]
<xll11> attr_writers serve as getters/setters right?
<apeiros> writers are only the setters
<injekt> xll11: no, setters
<apeiros> accessors are getter+setter
* lupine whispers something about global variables
chussenot has quit [Quit: chussenot]
<apeiros> i.e., `attr_accessor :foo` is equivalent to `attr_reader :foo; attr_writer :foo`
* apeiros hits lupine over the head with an inflated $ sign
<xll11> :D
<xll11> and, outside the class, how do I set them?
<lupine> $terminal = Class.new() { def title=() ... ; end }.new
<xll11> Class.variable?
malte_ has joined #ruby
<lupine> there are worse places to put that kind of dirty hacky code
_bart has joined #ruby
<apeiros> lupine: ew
<lupine> I'd probably go for an interim module instead, myself
sonda has joined #ruby
arya has quit [Ping timeout: 245 seconds]
dmerrick has joined #ruby
[eDu] has joined #ruby
neredsenvy has joined #ruby
<moshef> lupine: I created another gem with a diff file and its still expecting to be a module
<moshef> wtf?
<moshef> I'm missing something here
<neredsenvy> How do I end a private visibility declaration for instance I write private def method1 end and then any other method I write after method1 is also private.
xll11 has quit [Ping timeout: 252 seconds]
<moshef> oh
FLeiXiuS` has quit [Read error: Connection reset by peer]
<neredsenvy> But I didn't find anything about ending private
<moshef> gem is supposed to be a module
<moshef> fucking shit
<injekt> neredsenvy: use 'public' keyword
<injekt> neredsenvy: you dont 'end' the scope, you change it
Macaveli has joined #ruby
<injekt> the visibility*
<shevy> moshef you mean a gem must be a module?
<neredsenvy> injekt: Ah ok. Thanks.
arya has joined #ruby
<lupine> moshef, different gems share a global namespace
<lupine> when you require two different gems, they can trample all over each other. the only thing preventing them from doing so is convention
<moshef> yes, as far as i remember
dmerrick has quit [Ping timeout: 256 seconds]
<lupine> if gem1 has foo.rb that does Class ::Foo ; end and gem2 has bar.rb that does Module ::Foo ; end, requiring them both *will* break
<moshef> so namespacing prevents that ?
slainer6_ has quit [Remote host closed the connection]
FLeiXiuS` has joined #ruby
Zai00 has quit [Quit: Zai00]
JonnieCache has joined #ruby
JonnieCache has quit [Client Quit]
pskosinski has joined #ruby
hiroyuki has joined #ruby
shock_one has joined #ruby
camilasan has joined #ruby
<moshef> ok I have another problem. my gem has a settings.yml file but I'm not sure if that settings file location is always going to be in the same place (or well - don't think i want to force it to be)
<moshef> how do I deal with that?
sayan has quit [Ping timeout: 260 seconds]
nari has quit [Ping timeout: 245 seconds]
<spooner_> moshef, Use a relative path to it, not an absolute one (look at File.expand_path).
yoshie902a has joined #ruby
<moshef> I'm using file.exapnd path
<moshef> but its still relative to where I'm running the file
<moshef> basically Im using /config/gem_name.yml
dylan has joined #ruby
<moshef> guess thats should be ok
<injekt> File.expand_path('../config/gem_name.yml', __FILE__)
<spooner_> Yes, and that is a problem because?
<moshef> injekt: yeah, thats what I'm doing
<injekt> then, what's the issue?
<moshef> idk, thought its a bit akward to assume
<injekt> uh
<injekt> how so?
<moshef> not sure, this is pretty new to me so
Zai00 has joined #ruby
<injekt> right, but you obviously have a problem, what is it?
<moshef> you mean, other than code?
<moshef> i lost you :)
<injekt> :/
kristofers has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<moshef> sorry..
neredsenvy has quit [Quit: Page closed]
<Macaveli> can you make "require pry-remote" globally available ? So I don't have to require it in every file that I need for debugging?
visof has joined #ruby
<injekt> Macaveli: ruby -rpry-remote ...
sk87 has joined #ruby
<Macaveli> injekt, does nothing keeps "hangin'
<injekt> Macaveli: you didn't actually to '...' right?
<injekt> or just nothing
chussenot has joined #ruby
<injekt> you need to replace ... with whatever you're running
kofno has joined #ruby
nignaztic has quit [Ping timeout: 245 seconds]
anonymuse has joined #ruby
tsipanov has quit [Remote host closed the connection]
arya has quit [Ping timeout: 256 seconds]
Morkel has joined #ruby
<Macaveli> injekt, ash ok :) no i just did it without the ,,,
grzywacz has joined #ruby
rudisimo has joined #ruby
<injekt> Macaveli: running ruby with no arguments takes input from stdin
<Macaveli> aight
hemanth_ has joined #ruby
alekst has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
hemanth has quit [Read error: Connection reset by peer]
hemanth_ has joined #ruby
kofno has quit [Ping timeout: 256 seconds]
arya has joined #ruby
hemanth has joined #ruby
hemanth_ has quit [Read error: Connection reset by peer]
Macaveli has quit [Quit: Leaving]
sepp2k has joined #ruby
filipe has quit [Remote host closed the connection]
filipe has joined #ruby
luckyruby has quit [Remote host closed the connection]
luckyruby has joined #ruby
luckyruby has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
mhn23 has joined #ruby
yekta has joined #ruby
Czupa has joined #ruby
chandankumar has quit [Ping timeout: 245 seconds]
slainer68 has joined #ruby
havenwood has joined #ruby
Macaveli has joined #ruby
chandankumar has joined #ruby
xll11 has joined #ruby
<xll11> Hey!
yshh has joined #ruby
kofno has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
sepp2k has quit [Quit: Leaving.]
Neandre has joined #ruby
Floydzy has joined #ruby
RORgasm has joined #ruby
yshh has quit [Ping timeout: 256 seconds]
<xll11> Anyone has some good book recommendation to creating games with Ruby?
slainer68 has quit [Ping timeout: 256 seconds]
<apeiros> xll11: I'd ask over in #gosu
vlad_starkov has joined #ruby
<xll11> apeiros, Thanks!
charliesome_ has joined #ruby
jon_w has joined #ruby
jon_w has quit [Excess Flood]
jon_w has joined #ruby
dormoose has quit [Quit: ZNC - http://znc.in]
dormousy has quit [Quit: ZNC - http://znc.in]
chimmy has joined #ruby
RORgasm has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
mark_locklear has joined #ruby
mneorr has quit [Remote host closed the connection]
dormousy has joined #ruby
sepp2k has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
sepp2k has joined #ruby
dormoose has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
slainer68 has joined #ruby
yekta has quit [Quit: yekta]
hashmal has quit [Ping timeout: 256 seconds]
seba4 has joined #ruby
wudofyr_ has quit [Remote host closed the connection]
wudofyr has joined #ruby
emocakes has joined #ruby
[eDu] has quit [Quit: [eDu]]
mneorr has joined #ruby
r0bby_ has quit [Ping timeout: 276 seconds]
wchun has quit [Quit: Leaving]
wchun has joined #ruby
freeayu has quit [Ping timeout: 256 seconds]
ryanh has quit [Quit: Computer has gone to sleep.]
wchun has quit [Client Quit]
wchun has joined #ruby
freeayu has joined #ruby
Ortuna has quit [Quit: Computer has gone to sleep.]
hashmal has joined #ruby
dustint has joined #ruby
malte_ has quit [Quit: malte_]
johnmlocklear_ has joined #ruby
mark_locklear has quit [Read error: Connection reset by peer]
krawchyk has joined #ruby
geekbri has joined #ruby
dhruvasagar has joined #ruby
monkegjinni has joined #ruby
monkegjinni has quit [Remote host closed the connection]
drale2k has quit [Quit: Leaving...]
k610 has joined #ruby
DrCode has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 252 seconds]
v0n has joined #ruby
chimmy has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
DrCode has joined #ruby
yoshie902a has quit [Quit: yoshie902a]
alup has quit [Read error: Connection reset by peer]
puppeh has quit [Read error: Connection reset by peer]
drale2k has joined #ruby
alup has joined #ruby
puppeh has joined #ruby
<gyre007> could someone give me ahint on regular expression
<gyre007> Im tring to replace "sdf 3483743 dsfd" string with JUST the number
<gyre007> Im trying to do gsub(/(\d+)/, '\1') but thats returnin the whole string
moshef has quit [Quit: moshef]
<gyre007> as oppose to just numbers...
monkegjinni has joined #ruby
<gyre007> anyone idea ?
wchun has quit [Quit: Leaving]
wchun has joined #ruby
<tobiasvl> yes
<tobiasvl> what you're doing is matching on just the number, and replacing the number with itself
<tobiasvl> the stuff you don't match isn't touched
<tobiasvl> gsub(/.*(\d+).*/, '\1') should do the trick
<gyre007> I tried that too
<gyre007> but thats returning only LAST number
<tobiasvl> ah yes. .* is greedy
<gyre007> yeah
<tobiasvl> >> "asdasd 653654 wfdsf".gsub(/[^\d]*(\d+).*/, '\1')
<eval-in> tobiasvl => "653654" (http://eval.in/14939)
<tobiasvl> there you go
<tobiasvl> [^\d] means anything BUT a digit
<gyre007> I see
mikecmpbll has joined #ruby
<charliesome_> tobiasvl: you can also use .*? to make it non-greedy
charliesome_ has quit [Quit: Textual IRC Client: www.textualapp.com]
gommo_ has quit [Remote host closed the connection]
<spooner_> gyre007, You want str.scan(/\d+/) {|number| p number.to_i }
gommo has joined #ruby
pupoque has joined #ruby
visof has quit [Quit: Leaving]
visof_ has joined #ruby
<spooner_> If you just want to strip non-numbers, then you can do str.gsub(/[^\d]/, '')
yannis has joined #ruby
beneggett has joined #ruby
benlieb has quit [Quit: benlieb]
gommo has quit [Ping timeout: 256 seconds]
jon_w has quit [Ping timeout: 256 seconds]
divout has quit [Remote host closed the connection]
haxrbyte has joined #ruby
pen has joined #ruby
invisime has joined #ruby
krawchyk has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 255 seconds]
baroquebobcat has joined #ruby
wchun has quit [Remote host closed the connection]
ibash has joined #ruby
havenwood has joined #ruby
newUser1234 has joined #ruby
dylan has quit [Quit: Leaving]
dqminh has joined #ruby
v0n has quit [Ping timeout: 245 seconds]
tootubular has joined #ruby
NiteRain has quit [Read error: Operation timed out]
rdark has joined #ruby
sailias has joined #ruby
haxrbyte_ has joined #ruby
havenwood has quit [Ping timeout: 248 seconds]
carloslopes has joined #ruby
sambio has joined #ruby
ehellman has quit []
haxrbyt__ has joined #ruby
newUser1234 has quit [Remote host closed the connection]
ehellman has joined #ruby
netto has joined #ruby
newUser1234 has joined #ruby
haxrbyte has quit [Ping timeout: 245 seconds]
tmiller has joined #ruby
netto has quit [Client Quit]
divout has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
netto has joined #ruby
ibash has left #ruby [#ruby]
logix812 has joined #ruby
haxrbyte_ has quit [Ping timeout: 240 seconds]
wmoxam has joined #ruby
beneggett has quit [Quit: Computer has gone to sleep.]
krawchyk has joined #ruby
eljojo has joined #ruby
eljojo has left #ruby [#ruby]
atno has quit [Remote host closed the connection]
monkegji_ has joined #ruby
seba4 has quit [Remote host closed the connection]
peterhellberg has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
yashshah has quit [Ping timeout: 260 seconds]
netto has quit [Client Quit]
monkegjinni has quit [Ping timeout: 246 seconds]
johnjohn1011 has quit [Quit: Leaving.]
dhruvasagar has joined #ruby
postmodern has quit [Quit: Leaving]
newUser1234 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
atno has joined #ruby
fernandoaleman has joined #ruby
binaryplease has joined #ruby
pupoque has quit [Quit: Leaving]
tootubular has quit [Quit: tootubular]
newUser1234 has quit [Remote host closed the connection]
RORgasm has joined #ruby
gommo has joined #ruby
RORgasm has quit [Remote host closed the connection]
yashshah has joined #ruby
newUser1234 has joined #ruby
cbot_ has joined #ruby
perun_ has quit [Ping timeout: 245 seconds]
breakingthings has joined #ruby
mhn23 has quit [Quit: Goodbye.]
gommo has quit [Remote host closed the connection]
XRPTrader2 has left #ruby [#ruby]
dqminh has quit [Remote host closed the connection]
Mattx has joined #ruby
ryanh has joined #ruby
alekst has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
graeme has joined #ruby
Matip has quit [Ping timeout: 245 seconds]
tootubular has joined #ruby
asattar has joined #ruby
newUser1234 has quit [Remote host closed the connection]
nezumi has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Remote host closed the connection]
nari has joined #ruby
codecop has quit [Remote host closed the connection]
blaxter has quit [Ping timeout: 276 seconds]
BSaboia has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
asattar has quit [Quit: Page closed]
tevio has joined #ruby
tommyvyo has joined #ruby
jeffsmykil has joined #ruby
dhruvasagar has quit [Ping timeout: 255 seconds]
newUser1234 has joined #ruby
<jeffsmykil> I am looking to take a black and white image and convert it to pixel verticies
RagingDave has joined #ruby
BizarreCake has joined #ruby
<visof_> why this implementation of sieve algorithm so slow??
arya has quit []
dhruvasagar has joined #ruby
mljsimone has joined #ruby
jerius has joined #ruby
dmiller1 has joined #ruby
netto has joined #ruby
Macaveli has quit [Ping timeout: 264 seconds]
EPIK has quit [Ping timeout: 255 seconds]
<akemrir> visof_: which version of ruby you are using?
Macaveli has joined #ruby
LennyLinux has quit [Remote host closed the connection]
Macaveli has left #ruby [#ruby]
anderse has quit [Quit: anderse]
gaahrdner has joined #ruby
MrZYX|off is now known as MrZYX
rosster has quit [Ping timeout: 256 seconds]
arya has joined #ruby
cmarques has joined #ruby
gristus has joined #ruby
Zai00 has quit [Ping timeout: 245 seconds]
<visof_> akemrir, 2
Zai00 has joined #ruby
<akemrir> use Prime class, this is ruby builtin and then list.select {|x| x % list.first == 0 and x != list.first}.map {|y| list.delete(y)}
<akemrir> end
`p has quit [Remote host closed the connection]
<akemrir> sorry
<akemrir> use Prime class
<akemrir> Prime.take_while { |p| p < 1000000 }
<visof_> akemrir, i want to implement my own one
<akemrir> In that case, this is so slow because you are doing loop on 1mln of elements and select on 1mln of elements. This generates 10^12 of operations
tmiller has quit [Remote host closed the connection]
<akemrir> with delete of course
akashj87 has joined #ruby
JonnieCache has joined #ruby
newUser1234 has quit [Remote host closed the connection]
tmiller has joined #ruby
Coolhand has quit [Remote host closed the connection]
dqminh has joined #ruby
<akemrir> visof_: take a look on this http://pastie.org/7327649
malte_ has joined #ruby
cbot_ has quit [Ping timeout: 248 seconds]
ariedler has joined #ruby
noop has quit [Ping timeout: 260 seconds]
akam-it has joined #ruby
monkegji_ has quit [Remote host closed the connection]
Coolhand has joined #ruby
netto has quit [Read error: Connection reset by peer]
dylan has joined #ruby
netto has joined #ruby
Czupa has quit [Remote host closed the connection]
failshell has joined #ruby
scrogson_ is now known as scrogson
malte_ has quit [Quit: malte_]
pavilionXP has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
[eDu] has joined #ruby
graeme has quit [Quit: graeme]
macabhaird has joined #ruby
eddiezane has joined #ruby
heliumsocket has quit [Ping timeout: 256 seconds]
wyhaines has joined #ruby
havenwood has quit [Ping timeout: 260 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
hassans has joined #ruby
eddiezane has quit [Client Quit]
jeffsmykil has left #ruby [#ruby]
camilasan has quit [Remote host closed the connection]
haxrbyt__ has quit [Remote host closed the connection]
haxrbyte has joined #ruby
francisfish has joined #ruby
kiwi_19935 has joined #ruby
perun_ has joined #ruby
interactionjaxsn has joined #ruby
momomomomo has joined #ruby
hiroyuki_ has joined #ruby
solars has joined #ruby
<solars> hey, does anyone have a working log4r email (gmail) config? somehow it doesn't want to send emails for me
philcrissman has joined #ruby
angusiguess has joined #ruby
codecop has joined #ruby
hiroyuki has quit [Ping timeout: 255 seconds]
visof_ is now known as visof
Gooder has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
NiteRain has joined #ruby
chandankumar has quit [Quit: Leaving]
graeme has joined #ruby
Gooder has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
Gooder has joined #ruby
predator117 has quit [Ping timeout: 256 seconds]
fernandoaleman has left #ruby [#ruby]
rdev has joined #ruby
jtharris has joined #ruby
teddyp1cker has joined #ruby
nicksloan has left #ruby [#ruby]
ffranz has joined #ruby
arya has joined #ruby
hiyakashi has joined #ruby
blaxter has joined #ruby
blaxter has quit [Read error: Connection reset by peer]
ixti has joined #ruby
osvico has quit [Ping timeout: 245 seconds]
blaxter has joined #ruby
perun_ has quit [Ping timeout: 245 seconds]
falsetto has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
SCommette has joined #ruby
lewix has joined #ruby
yfeldblum has joined #ruby
ibash has joined #ruby
theRoUS has joined #ruby
theRoUS has joined #ruby
ibash has quit [Client Quit]
mneorr has quit [Remote host closed the connection]
jlast has joined #ruby
alxscms has joined #ruby
v0n has joined #ruby
Gooder has quit [Remote host closed the connection]
d2dchat has joined #ruby
huttan has quit [Ping timeout: 248 seconds]
chandankumar has joined #ruby
<gestahlt> Hi
samflores has joined #ruby
samflores has quit [Client Quit]
aero1 has joined #ruby
huoxito has quit [Quit: Leaving]
huttan has joined #ruby
Davey has joined #ruby
rdev has quit [Quit: Linkinus - http://linkinus.com]
rdev has joined #ruby
ixti has quit [Quit: WeeChat 0.4.0]
Neomex has joined #ruby
predator117 has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
hmarr has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
bean__ has joined #ruby
emocakes has quit [Quit: emocakes]
nari has quit [Ping timeout: 245 seconds]
aaronmcadam has quit [Quit: Linkinus - http://linkinus.com]
arya has quit []
arya has joined #ruby
_bart has quit [Ping timeout: 264 seconds]
nightfalcon has joined #ruby
aganov has quit [Quit: aganov]
dqminh has quit [Remote host closed the connection]
ARCADIVS has joined #ruby
jon_w has joined #ruby
tagrudev has quit [Ping timeout: 245 seconds]
jon_w has quit [Max SendQ exceeded]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jon_w has joined #ruby
jon_w has quit [Max SendQ exceeded]
jon_w has joined #ruby
<kiwi_19935> hi
maletor has joined #ruby
<kiwi_19935> I have an issue with sockets in ruby quite funny
hmarr has joined #ruby
<kiwi_19935> I have a proxy that relays to another proxy and as long as data is not modified it works fine
Ontolog has joined #ruby
<kiwi_19935> but when I add 1 character in the first proxy and send it to the second proxy, even if the second proxy ignores the first character (the one added) and sends the rest, the connection fails
bradleyprice has joined #ruby
aero1 has left #ruby ["WeeChat 0.4.0"]
crassus is now known as duckstab
d2dchat has quit [Remote host closed the connection]
rdev is now known as rdev5
visof has quit [Remote host closed the connection]
niklasb has joined #ruby
Macaveli has joined #ruby
dqminh has joined #ruby
netto has quit [Read error: Connection reset by peer]
netto_ has joined #ruby
banisterfiend has joined #ruby
wolcanus has joined #ruby
gyre007 has quit [Ping timeout: 264 seconds]
graeme_ has joined #ruby
chrisnicola has joined #ruby
solidoodlesuppor has joined #ruby
gyre007 has joined #ruby
vlad_starkov has joined #ruby
binaryplease has quit [Ping timeout: 245 seconds]
graeme has quit [Ping timeout: 256 seconds]
graeme_ is now known as graeme
eibayan has joined #ruby
netto has joined #ruby
Pochacco has quit [Quit: Pochacco]
Hanmac has joined #ruby
Ontolog has quit [Remote host closed the connection]
GhettoCode has joined #ruby
<eibayan> hi
<kiwi_19935> hi
generalissimo has joined #ruby
braoru has quit [Quit: Leaving]
Macaveli has quit [Quit: Leaving]
netto_ has quit [Ping timeout: 264 seconds]
<gestahlt> Hi, im iterating a hash, the thing is, i need to do it backwards.. or at least define somehow the order in which methods are executed
vlad_starkov has quit [Ping timeout: 252 seconds]
<MrZYX> if you need order don't use a hash
yshh has joined #ruby
<gestahlt> Lets say hash is 1 -> a, 2 -> b, 3 -> c and i need to perform like a method for 2 first then for 3 and last 1
netto_ has joined #ruby
<gestahlt> Well, by the key value pairs i define the order
dqminh has quit [Remote host closed the connection]
mando has joined #ruby
apok has joined #ruby
<gestahlt> They are my conditions
d2dchat has joined #ruby
<Hanmac> gestahlt: an normal hash.each is not orderd
<gestahlt> if the hash has key1 = a, key2 = b then do this but not before
ShellFu_AFK is now known as ShellFu
<gestahlt> hash.each_key i did
<gestahlt> and the hash is very nesteed
<gestahlt> nested
daniel_- has quit [Ping timeout: 245 seconds]
acrussell has joined #ruby
kiwi_19935 is now known as mellow888
_maes_ has joined #ruby
eibayan has left #ruby [#ruby]
<kofno> well, in 1.9 hashes are ordered in the order the keys were inserted
<gestahlt> Hrm...
netto has quit [Ping timeout: 240 seconds]
<MrZYX> that doesn't mean it's a good idea to rely on that
<gestahlt> build a new hash based on the info? first and last is most important. Rest can be done whenever
<kofno> uh, it is part of the hash definition in ruby that hashes will be ordered.
fermion has joined #ruby
<kofno> it's not coincidental
whitedawg has quit [Ping timeout: 245 seconds]
<kofno> that said, maybe you need a different datastructure
wallerdev has joined #ruby
<gestahlt> maybe
<kofno> or to create keys that can be sorted in the order you need
<gestahlt> I could have added it on hash creation time.. that would have saved me the hassle
r126l has quit [Quit: leaving]
<gestahlt> hmmm
sgkim126l has joined #ruby
netto_ has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
peterhellberg has quit [Remote host closed the connection]
<gestahlt> i think i recreate the config file from where i create the hash and add a new key value with the order. I thought at first this was unecessary but seems like its more convienient that way
haxrbyte has joined #ruby
randomautomator has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
yshh has quit [Read error: Connection reset by peer]
yshh has joined #ruby
hashmal has quit [Quit: Computer has gone to sleep.]
havenwood has joined #ruby
alex__c2022 has joined #ruby
Elhu has joined #ruby
apok has quit [Quit: apok]
k610 has quit [Ping timeout: 264 seconds]
teddyp1cker has quit [Remote host closed the connection]
xyzodiac has joined #ruby
clocKwize has quit [Quit: clocKwize]
netto has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
dqminh has joined #ruby
enebo has joined #ruby
d2dchat has quit [Remote host closed the connection]
apeiros has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
mneorr has joined #ruby
LennyLinux has joined #ruby
whitedawg has joined #ruby
theRoUS has quit [Read error: Operation timed out]
rdark has quit [Ping timeout: 256 seconds]
netto has quit [Quit: netto]
haxrbyte has quit [Ping timeout: 256 seconds]
lewix has quit [Remote host closed the connection]
solars has left #ruby ["WeeChat 0.3.7"]
lewix has joined #ruby
alup has quit [Quit: Leaving]
jbueza has joined #ruby
jbueza has quit [Max SendQ exceeded]
jbueza has joined #ruby
rdark has joined #ruby
jbueza has quit [Client Quit]
zph has joined #ruby
jbueza has joined #ruby
markalanevans has joined #ruby
saimaz has quit [Remote host closed the connection]
hassans has quit [Quit: hassans]
MrZYX is now known as MrZYX|off
baroquebobcat has joined #ruby
francisfish has quit [Remote host closed the connection]
ckrailo has joined #ruby
lewix has quit [Ping timeout: 276 seconds]
francisfish has joined #ruby
nadirvardar has joined #ruby
dmerrick has joined #ruby
pi3r has quit [Quit: Leaving]
sk87 has quit [Read error: No route to host]
eldariof has joined #ruby
k610 has joined #ruby
frem has joined #ruby
pduin has quit [Remote host closed the connection]
dqminh has quit [Remote host closed the connection]
heliumsocket has joined #ruby
wsterling has joined #ruby
graspee has joined #ruby
Coolhand has quit [Ping timeout: 260 seconds]
mljsimone has quit [Remote host closed the connection]
graeme has quit [Quit: graeme]
Coolhand has joined #ruby
Andromeda has joined #ruby
strax has quit [Ping timeout: 248 seconds]
sk87 has joined #ruby
dmerrick has quit [Ping timeout: 256 seconds]
lupinstien has joined #ruby
jabbslad has quit [Quit: Leaving...]
baroquebobcat has quit [Quit: baroquebobcat]
arturaz has quit [Ping timeout: 276 seconds]
dankest has joined #ruby
Evixion` has joined #ruby
Neomex has quit [Quit: Neomex]
whitedawg has quit [Quit: Leaving.]
dankest has quit [Client Quit]
Evixion has quit [Ping timeout: 248 seconds]
jlast has quit [Remote host closed the connection]
tymat has joined #ruby
tymat is now known as starburst
zph has quit [Quit: Computer has gone to sleep.]
brennanMKE has joined #ruby
tevio has quit [Remote host closed the connection]
hashpuppy_ has joined #ruby
_maes_ has quit [Ping timeout: 256 seconds]
gestahlt has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0.1/20121129151842]]
a_a_g has quit [Quit: Leaving.]
<hashpuppy_> i wish ruby had something like scala's `object`
chrisnicola has quit [Quit: This computer has gone to sleep]
whitedawg has joined #ruby
<tos9> singleton is an antipattern.
<hashpuppy_> well, a lot of the time i only have one of something w/ no state
nomenkun_ has quit [Ping timeout: 256 seconds]
Astralum has joined #ruby
<hashpuppy_> seems like an anti pattern to ask for a new one of that something
camilasan has joined #ruby
<tos9> then you have a class and only make one instance of it, or you have some globals.
<tos9> (usually the former)
chrishough has joined #ruby
<tos9> since it's easier to test
bitZero__ has joined #ruby
camilasan has quit [Remote host closed the connection]
DrShoggoth has joined #ruby
__KGB__ has quit [Ping timeout: 245 seconds]
dmerrick has joined #ruby
brain_shim_ has quit [Ping timeout: 245 seconds]
<spooner_> hashpuppy_, Then just have some methods on a module.
<waxjar> couldn't you just use a module instead?
generalissimo has quit [Remote host closed the connection]
<hashpuppy_> yeah, ok, so what's preferred here. a module or a class with class << self
brain_shim_ has joined #ruby
[eDu] has quit [Quit: [eDu]]
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<spooner_> If you aren't instancing it, don't use a class.
nateberkopec has joined #ruby
hassans has joined #ruby
ananthakumaran has joined #ruby
apeiros has joined #ruby
Floydzy has quit [Quit: Floydzy]
mikepack has joined #ruby
<spooner_> hashpuppy_, Can also consider using module_function (though not really sure why that exists, since we can just use class << self or def self.meth).
tootooroo has joined #ruby
logix812 has quit [Quit: Computer has gone to sleep.]
netto has joined #ruby
<apeiros> Spooner_: module_function exists to create modules like Kernel or Math
<apeiros> where the class method is public and the instance method is private
newUser1234 has joined #ruby
netto has quit [Client Quit]
Neomex has joined #ruby
Andromeda has quit [Remote host closed the connection]
devdazed has quit [Ping timeout: 240 seconds]
ehellman has quit []
zeroeth has joined #ruby
dankest has joined #ruby
mellow888 has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
cmarques has quit [Ping timeout: 245 seconds]
mfletcher has joined #ruby
<spooner_> apeiros, Ah, right, I didn't realise it did both of those things.
<Xeago> apeiros: why does ARGF.read skip the first line, ARGF.rewind fixes it
Heero has joined #ruby
newUser1234 has quit [Remote host closed the connection]
Heero has quit [Changing host]
Heero has joined #ruby
<apeiros> Xeago: it doesn't
<Xeago> (puts ARGF.read is all the content of the file besides a shebang)
<Xeago> it does for me :\
soulofpeace has joined #ruby
<apeiros> if it does for you, you probably have `gets` somewhere
<apeiros> (Kernel#gets is ARGF.gets, not $stdin.gets as many think)
elliottkember has quit [Read error: Connection reset by peer]
<Xeago> file is literally shebang followed by puts ARGF.read
<apeiros> ARGF doesn't read the current file
elliottkember has joined #ruby
<Xeago> there is stuff on stdin
<apeiros> it reads all files in ARGV and then $stdin
d2dchat has joined #ruby
camilasan has joined #ruby
chandankumar has quit [Ping timeout: 248 seconds]
devdazed has joined #ruby
C0deMaver1ck is now known as BeatsByDJC0deMav
<apeiros> Xeago: a short test with `ruby -e 'puts ARGF.read' SOMEFILE` did not skip a line for me
<Xeago> neither for me
<apeiros> also tested against a file with shebang
ShellFu is now known as ShellFu_brb
ehellman has joined #ruby
io_syl has joined #ruby
dmerrick has quit [Remote host closed the connection]
tylersmith has joined #ruby
newUser1234 has joined #ruby
wolcanus has quit [Remote host closed the connection]
<Xeago> oh that displays horrible
Iszak_ has joined #ruby
<apeiros> hu? that url doesn't open (and in a weird way)
lewix has joined #ruby
<apeiros> Xeago: pastie.org supports multiple files, so does gist
<injekt> it downloads
<apeiros> (on pastie you'd use ## comments)
<apeiros> gah, shame on you safari for not making that more obvious
<apeiros> thanks inkjet
<injekt> no problem apieros
carloslopes has quit [Remote host closed the connection]
MrZYX|off is now known as MrZYX
<apeiros> um, the downloaded file only contains the link you already pasted? o0
<Xeago> welp
becom33 has joined #ruby
<injekt> :D
newUser1234 has quit [Remote host closed the connection]
<becom33> Im having a trouble with special chars http://pastebin.com/R2GBJh1R can some one help ?
echevemaster has quit [Quit: Leaving]
echevemaster_ has joined #ruby
echevemaster has joined #ruby
<injekt> becom33: what's the problem?
<Xeago> ignore the percentage
<becom33> well the out put isnt the way it suppose to be . if you could run the script u will see
<Xeago> and fine, i'll gist it :)
<becom33> I forgot to add a output result to the paste
ixti has joined #ruby
br4ndon_ has joined #ruby
br4ndon_ has quit [Client Quit]
<becom33> injekt, *
ant3841 has quit [Quit: Leaving.]
<injekt> becom33: what's it supposed to be?
<Xeago> oh deer god
i_s has joined #ruby
<Xeago> I figured it out
<Xeago> #!/usr/bin/env ruby -n
Skofo has joined #ruby
Neomex has quit [Quit: Neomex]
<injekt> who uses -n in a shebang D:
<becom33> injekt, the output is whats in variable bb
<apeiros> reindeer god?
maycon_ has joined #ruby
<injekt> apieros: :D
apok has joined #ruby
* Xeago hides
<becom33> but can't get the output with backslash . tried to escape it with gsub . didnt work
* apeiros goes on to work on "lunch roulette" :)
<injekt> becom33: so you want the exact same output as input
niklasb has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 248 seconds]
<becom33> injekt, yes
<injekt> uh
<injekt> becom33: why? why dont you just.. leave it?
i_s has quit [Client Quit]
br4ndon has quit [Ping timeout: 240 seconds]
<becom33> what do u mean leave it ?
niklasb has joined #ruby
<injekt> becom33: you want bb to be the same before and after, so why modify it?
<injekt> anyway, your string is exactly the same before and after the gsub
bsaboia_ has joined #ruby
maycon has quit [Ping timeout: 245 seconds]
<injekt> bb == bb.gsub("\\", "\\") #=> true
<becom33> no no injekt
<becom33> wati
* injekt wati's
sk87 has quit [Quit: sk87]
<injekt> you realize your \ characters in your original string are just escaping the spaces, right?
<injekt> that's why the output is weird
sk87 has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
<injekt> becom33: right
apok has quit [Client Quit]
<becom33> injekt, yes
meyebne has joined #ruby
<becom33> if I add \\ insted of \ output comes fine
<injekt> becom33: that's expected, what are you seeing that's odd?
<becom33> injekt, what do u mean odd ?
<gyre007> does open-uri support base authentication ?
<gyre007> somehow
<injekt> becom33: what's the problem? the escape character is working as expected
<injekt> gyre007: open(..., http_basic_authentication => [user, pass])
<gyre007> that swhat i tried..
<gyre007> must be a problem somewhere else then
lewix has quit [Remote host closed the connection]
<becom33> injekt, the problem is I can't get gsub working coz I can't do /\// it will replace \/ with //
Floydzy has joined #ruby
lewix has joined #ruby
dmerrick has joined #ruby
v0n has quit [Quit: WeeChat 0.4.0]
Neandre has quit [Read error: Connection reset by peer]
<injekt> becom33: I still dont see your issue, why are you trying to replace characters with the same characters?
v0n has joined #ruby
havenwood has joined #ruby
<becom33> no Im trying to replace \ with \\
IceDragon has joined #ruby
freakazoid0223 has joined #ruby
meyebne has quit [Client Quit]
ph^ has quit [Remote host closed the connection]
xjunior has joined #ruby
<xjunior> is there a warden dedicated channel?
<injekt> becom33: but \ doesn't exist in your string
<injekt> xjunior: probably not
zph has joined #ruby
pencilcheck has joined #ruby
<becom33> injekt, leave all to a side . could you just tell me how can I print the whats in variable b as it is
IceDragon has quit [Client Quit]
i_s has joined #ruby
IceDragon has joined #ruby
chrisnicola has joined #ruby
<injekt> becom33: you need to write the string properly
<becom33> hmm alright
fjfish has joined #ruby
francisfish has quit [Ping timeout: 248 seconds]
lewix has quit [Ping timeout: 258 seconds]
generalissimo has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
echevemaster has quit [Quit: Leaving]
echevemaster_ has quit [Quit: Leaving]
echevemaster has joined #ruby
dr_bob has left #ruby [#ruby]
<Dwarf> Hello, how would I get the text from a webpage using open()?
Voodoofish430 has joined #ruby
<BeatsByDJC0deMav> Dwarf: use something like Nokogiri
BeatsByDJC0deMav is now known as C0deMaver1ck
jlast has joined #ruby
<injekt> Dwarf: text = open('...').read
xyzodiac has joined #ruby
markalanevans has quit [Quit: markalanevans]
pen has quit [Ping timeout: 256 seconds]
havenwood has quit [Ping timeout: 264 seconds]
codezombie has joined #ruby
niklasb has quit [Read error: Connection reset by peer]
<Dwarf> injekt: that gives No such file or directory
<injekt> lol
<injekt> Dwarf: replace '...' with your website?
<injekt> oh
<injekt> make sure you require 'open-uri' first
Zai00 has joined #ruby
<injekt> otherwise open will use File.open
<injekt> er IO.open
<Dwarf> Bingo
havenwood has joined #ruby
<Dwarf> That did the trick
<Dwarf> Thanks
<injekt> er Kernel.open ?
<Dwarf> Kernel.open probably
jabbslad has joined #ruby
<injekt> yeah
niklasb has joined #ruby
cantonic|away is now known as cantonic
whitenoise has joined #ruby
angusiguess has joined #ruby
<injekt> break your irb session: open("|-")
filipe has quit [Remote host closed the connection]
jamie_ca_ has joined #ruby
dylan has quit [Read error: Connection reset by peer]
bigoldrock has joined #ruby
frem has quit [Ping timeout: 252 seconds]
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
angusiguess has quit [Ping timeout: 260 seconds]
etcetera has joined #ruby
Al__ has joined #ruby
fjfish has quit [Remote host closed the connection]
lewix has joined #ruby
adkron has joined #ruby
wolcanus has joined #ruby
yacks has quit [Ping timeout: 255 seconds]
puppeh has quit [Remote host closed the connection]
philcrissman has quit [Remote host closed the connection]
camilasan has quit []
wyhaines has quit [Remote host closed the connection]
pothibo has joined #ruby
carloslopes has joined #ruby
hashmal has joined #ruby
dqminh has joined #ruby
kiwi_34625 has joined #ruby
<kiwi_34625> hi
<kiwi_34625> is there a way to force a socket to read an amount of bytes or wait for that amount to be read before going on?
rismoney has joined #ruby
catphish has joined #ruby
<catphish> i am confused by an exception: "Connection timed out - connect(2)"
<catphish> where does that error originate from, and what does (2) mean?
<injekt> catphish: man connect 2
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
<MrZYX> it's man 2 connect :P
<catphish> it ruby appending connect(2) to the error?
d2dchat has quit [Remote host closed the connection]
<injekt> MrZYX: not on osx its not
<catphish> in order to tell me where to look in the manual? this is on linux
<MrZYX> ew OS X...
<injekt> ...
<injekt> catphish: then yes, `man 2 connect` in your terminal
<catphish> injekt: that doesn't really answer my question
dqminh has quit [Ping timeout: 258 seconds]
<MrZYX> it does, that's the function where your error originates from ;)
<injekt> catphish: what are you confused about? the connection timed out
huttan has quit [Quit: leaving]
<injekt> and it's using connect(2) for connecting
<catphish> i wanted to know how the error message was built
<injekt> why?
huttan has joined #ruby
<catphish> is "Connection timed out" an error from the c library, and "connect(2)" appended by ruby?
<catphish> i'm trying to determine whether the error definitely originated from the connect() kernel call
dmiller1 has quit [Ping timeout: 256 seconds]
wolcanus has quit [Ping timeout: 256 seconds]
<injekt> yes it adds the syscall
<catphish> ok, thanks
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
carloslopes has quit [Ping timeout: 258 seconds]
<catphish> i'm also baffled why this connection is timing out, it's a connection to another ruby tcp socket on localhost and i can't reproduce it
<catphish> (in controlled conditions)
MetaCosm has joined #ruby
MetaCosm has quit [Changing host]
MetaCosm has joined #ruby
MetaCosm has quit [Excess Flood]
MetaCosm has joined #ruby
ShellFu_brb is now known as ShellFu
timonv has quit [Remote host closed the connection]
alx- has joined #ruby
graspee has left #ruby [#ruby]
ph^ has joined #ruby
one8zero has joined #ruby
<martinklepsch> Is there a way to combine collect and select?
netto has joined #ruby
<martinklepsch> returning false or something?
<martinklepsch> for some of the elememts I dont want anything in the resulting array
netto has quit [Client Quit]
<injekt> martinklepsch: ary.select { }.map { } ?
<catphish> unlike map, collect allows you to not add something to the array
<catphish> nope
carloslopes has joined #ruby
<catphish> ignore me, i'm thinking of reduce
<martinklepsch> the manual way that comes to mind is to insert nil and strip that out afterwards
<injekt> catphish: collect is the same as map
timmow_ has quit [Ping timeout: 252 seconds]
<injekt> martinklepsch: then just use map { ... }.compact
mockra has joined #ruby
<martinklepsch> injekt: running map{}.select{} seems uneccessary inefficient
<catphish> map.compact works, or you could use inject / reduce
<injekt> martinklepsch: it's not
<catphish> which permit you you do modify an array / hash (or not) on each iteration
<martinklepsch> compact seems like a good idea
x0F has quit [Ping timeout: 252 seconds]
<injekt> compact still needs to traverse the entire array
<hassans> it's faster though
wchun has joined #ruby
zeade has joined #ruby
<catphish> i use .compact, it's hardly slow
S3kx has quit [Quit: Leaving]
<injekt> catphish: he was saying compact is faster
<injekt> neither of them are really slow, but use whatever works..
<catphish> faster than inject?
<martinklepsch> injekt: I was not actually saying that but I probably thought it :)
<catphish> both ways work :)
<injekt> martinklepsch: I wasn't talking about you :)
ixti has quit [Ping timeout: 252 seconds]
sk87 has quit [Quit: sk87]
newUser1234 has joined #ruby
<injekt> catphish: inject is slow ;)
brhelwig has joined #ruby
rdark has quit [Quit: leaving]
xardas has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
niklasb has quit [Ping timeout: 276 seconds]
keymone has quit [Quit: keymone]
wgosling_ is now known as wyattg
heliumsocket has quit [Ping timeout: 245 seconds]
tobor_one has joined #ruby
d2dchat has joined #ruby
<Hanmac> apeiros: an friend of my told me that my code was to meta :D
daniel_- has joined #ruby
Floydzy has quit [Quit: Floydzy]
ph^ has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
rdev5 has quit [Quit: Linkinus - http://linkinus.com]
spider-mario has joined #ruby
daniel_- has quit [Client Quit]
divout has quit [Quit: Leaving.]
jrhe has joined #ruby
divout has joined #ruby
newUser1234 has quit [Remote host closed the connection]
f0ster` has joined #ruby
swingha has joined #ruby
<f0ster`> I have a function, that calls another function which is raising an exception.. however I have a begin/rescue in my outer function, but the inner exception isnt rescue'd in the outer function. is this typical ruby behaviour or is there something stranger going on? it is in a rails app and I have restarted multiple times so im not sure what is causing it
phite has joined #ruby
pskosinski has quit [Ping timeout: 264 seconds]
mafolz has quit [Remote host closed the connection]
<bean__> probably a better question for #rubyonrails but unsure
* bean__ doesn't use exceptions except in rare cases
Eldariof-ru has joined #ruby
jurassic has joined #ruby
elaptics is now known as elaptics`away
newUser1234 has joined #ruby
<f0ster`> seems more of a language question, bean__
Andromeda has joined #ruby
<MrZYX> can you write a small reproducer?
IceDragon has quit [Ping timeout: 258 seconds]
slainer68 has quit [Remote host closed the connection]
jurassic has quit [Client Quit]
<quazimodo> object.foo.bar <-- i want to write a method zed(n) that will string foo n times, sort of like object.zed(n).bar ---> object.foo.foo.foo n times.bar
<quazimodo> is this insane?
<f0ster`> hmm yeah i guess, not sure it would help my case, i can bubble the exception up manually, but i dont think thats how exceptions should work in most languages
<bean__> quazimodo: that sounds silly.
hamush has left #ruby ["WeeChat 0.3.6"]
Evixion` has quit [Ping timeout: 264 seconds]
Evixion has joined #ruby
freeayu has quit [Remote host closed the connection]
eldariof has quit [Ping timeout: 252 seconds]
tootooroo has joined #ruby
indyrl has joined #ruby
phite has quit [Remote host closed the connection]
rdev has joined #ruby
<quazimodo> bean__: it's for grabbing a parent in capybara. Currently it's find(:xpath, './/..') and i'd like to define parent(n) that will go back to the nth parent node
<quazimodo> i suppose i can always modify the xpath string
<bean__> ./../../../
<bean__> :P
jgrevich has joined #ruby
<quazimodo> yeah seems more sensible. For the sake of education, though, howould you do this?
<jrhe> Hi, I have a question regarding overriding methods in classes from different modules. I have tried searching but without avail. So a gem I was using overrode Object#try from actitve_support core by copying the definition inline in the gem. It did this not to change its functionality but to provide access to the method without having to require active_support. This led to the gem breaking other gems in rails 4 because the
<jrhe> active_support definition of try had changed but was then being overwritten by the gems version. I moved the try method inside the class and added an extra 'object' argument. Is there a way of scoping method overrides so that I can still call object.try using the gems version but only inside that module.
t-mart_ has joined #ruby
jtperreault has left #ruby ["WeeChat 0.3.7"]
jtperreault has joined #ruby
IceDragon has joined #ruby
jdunck has joined #ruby
ToApolytoXaos has joined #ruby
grzywacz has quit [Ping timeout: 260 seconds]
<injekt> quazimodo: n.times { foo }; self
<quazimodo> oh
<quazimodo> that's easy
bsaboia_ has quit [Ping timeout: 258 seconds]
catphish has quit [Quit: Leaving]
AndChat| has joined #ruby
phite has joined #ruby
niklasb has joined #ruby
baroquebobcat has joined #ruby
zigomir has quit [Quit: zigomir]
t-mart has quit [Ping timeout: 256 seconds]
_maes_ has joined #ruby
br4ndon has joined #ruby
t-mart_ has quit [Client Quit]
end_guy has quit [Remote host closed the connection]
t-mart has joined #ruby
end_guy has joined #ruby
lancepantz is now known as lancepantz_
tomzx_mac has joined #ruby
soulofpeace has quit [Ping timeout: 240 seconds]
jrhe has quit [Quit: jrhe]
stef_204 has joined #ruby
strax has joined #ruby
br4ndon_ has joined #ruby
yacks has joined #ruby
Al__ has quit [Ping timeout: 264 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
Eldariof-ru has quit [Read error: Operation timed out]
yacks has quit [Max SendQ exceeded]
yacks has joined #ruby
perun_ has joined #ruby
Eldariof-ru has joined #ruby
br4ndon has quit [Ping timeout: 256 seconds]
zph has quit [Quit: Computer has gone to sleep.]
mityaz has joined #ruby
cantonic has quit [Quit: cantonic]
_________ has joined #ruby
pioz has quit [Ping timeout: 252 seconds]
kiwi_34625 has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
carraroj has quit [Quit: Konversation terminated!]
Czupa has joined #ruby
Ontolog has joined #ruby
adkron has quit [Ping timeout: 252 seconds]
dmerrick has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
RORgasm has joined #ruby
Zhut has joined #ruby
beneggett has joined #ruby
ericmathison has joined #ruby
* Zhut a
cantonic has joined #ruby
brhelwig has quit [Remote host closed the connection]
bean__ has quit [Quit: Computer has gone to sleep.]
thone has joined #ruby
_________ is now known as RubNoob
`p has joined #ruby
rupee has joined #ruby
apok has joined #ruby
mneorr has quit [Remote host closed the connection]
banjara has joined #ruby
ariedler has quit [Remote host closed the connection]
callmeivan has quit [Ping timeout: 264 seconds]
bricker`LA has quit [Ping timeout: 240 seconds]
pencilcheck has quit [Remote host closed the connection]
thone_ has quit [Ping timeout: 245 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
megha has quit [Ping timeout: 248 seconds]
security has joined #ruby
cantonic has quit [Ping timeout: 252 seconds]
araujo has quit [Ping timeout: 245 seconds]
<martinklepsch> is there a quick way to go from ["a" "a" "a" "b" "b"] to {"a" => 3, "b" => 2}
huoxito has joined #ruby
lukeholder has joined #ruby
hassans has quit [Quit: hassans]
yacks has quit [Ping timeout: 260 seconds]
lukeholder has quit [Client Quit]
duosrx has quit [Remote host closed the connection]
anderse has joined #ruby
jrhe has joined #ruby
<Hanmac> martinklepsch: array.inject(Hash.new(0)){|e,h|h[e] += 1}
ixti has joined #ruby
soulcake has quit [Quit: ZNC - http://znc.in]
<becom33> http://codepad.org/RSZYQDJn Im trying to get the output system(' cat \'index.php\' '). help ?
<RubNoob> has anyone used Faye?
<injekt> martinklepsch: Hash[a.map { |i| [i, a.count(i)] }]
callmeivan has joined #ruby
chussenot has quit [Quit: chussenot]
f0ster` has quit [Quit: leaving]
anderse has quit [Client Quit]
<injekt> that's a different way anyway, I'd also probably do what Hanmac wrote
chrishough has quit [Quit: chrishough]
chussenot has joined #ruby
<apeiros> Hanmac: that won't work
xjunior has quit [Remote host closed the connection]
<apeiros> injekt: that'll be slow
<injekt> apeiros: yeah
Davey has joined #ruby
Mattx has quit [Quit: Leaving]
<apeiros> Hash.new(0).tap { |h| ary.each do |e| h[e] += 1 } }
c0rn has joined #ruby
<apeiros> or each_with_object instead of inject
<injekt> <3 each_with_object
<Hanmac> apeiros: oh yeah you are right
<injekt> you can write it with inject.. but each_with_object is what should be used
<Hanmac> apeiros: look at this: https://gist.github.com/Hanmac/46aa0ecda5d117ed061d isnt that META? :P
<injekt> holy mother of tabs
<becom33> anyone for me ?
pskosinski has joined #ruby
k611 has joined #ruby
Asher1 has joined #ruby
altamic has joined #ruby
haxrbyte_ has quit [Read error: Connection reset by peer]
<apeiros> Hanmac: ubermeta
wolcanus has joined #ruby
Zhut has quit []
Ontolog_ has joined #ruby
<apeiros> becom33: system is the wrong tool
<apeiros> becom33: see Kernel#` and Kernel#spawn
olivier_bK has joined #ruby
dynetk has joined #ruby
<becom33> apeiros, why ?
<olivier_bK> hi
Asher has quit [Ping timeout: 276 seconds]
<injekt> becom33: ri system
<jrhe> Is there anyway of overwriting methods just for a particular module?
<apeiros> becom33: I think you already noticed that it doesn't give you the output. that's why.
cobragoat has joined #ruby
<becom33> apeiros, btw in here system is just a string
<apeiros> jrhe: only in ruby 2.0
<becom33> not a function
blaxter_ has joined #ruby
sayan has joined #ruby
<olivier_bK> in my script i get this error uninitialized constant Fileutils and i added inside my script require 'fileutils'
<olivier_bK> include FileUtils
<olivier_bK> but i have again this error :(
<apeiros> oh dear, what a misleading summary then
LennyLinux has quit [Remote host closed the connection]
<apeiros> becom33: \' in gsub has a special meaning
<apeiros> it needs 6 or 8 \ (I never remember right)
<injekt> olivier_bK: you can't have
LennyLinux has joined #ruby
<olivier_bK> do you know how i can resolve it
<jrhe> apeiros: Is there some workaround for achieving similar in other rubies? A gem I use copied Object#try from active support but as it has changed in rails 4, it breaks other gems. I have just factored it out to take an extra arg for now which is the object itself.
<injekt> olivier_bK: you said you have "FileUtils" and your error says you tried "Fileutils"
chrishough has joined #ruby
mneorr has joined #ruby
<olivier_bK> injekt, yes
skattyadz has joined #ruby
<injekt> olivier_bK: they're different
Ontolog has quit [Ping timeout: 258 seconds]
<apeiros> jrhe: patch the gem, use the patched gem instead. file a bug report.
k610 has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
twoism has joined #ruby
pdswan has joined #ruby
<becom33> is there a better way escape string ?
<becom33> like addslash() in php ?
<olivier_bK> injekt, it's true but when i write require 'fileutils'
<olivier_bK> include Fileutils inside my file i have again the error
<injekt> olivier_bK: that's because it's include FileUtils
<injekt> not Fileutils
<injekt> >> require 'fileutils'; p FileUtils
<eval-in> injekt => FileUtils ... (http://eval.in/14974)
ph^ has joined #ruby
ebobby has joined #ruby
<apeiros> becom33: addslash in php is about the worst thing ever
stkowski has joined #ruby
<apeiros> oh, wow, 895… just 5 more…
soulcake has joined #ruby
<injekt> 5 more what?
<jrhe> apeiros: I have patched the gem and its been pulled. I just wondered if there was a better way to do it than the way I have done it. Out of curiosity, how does one do it in ruby 2.0.0?
<apeiros> jrhe: the feature is called refinements. I'm not yet using ruby 2.0, so I mostly only know that it exists.
<olivier_bK> injekt, i get this error now :( no such file to load -- Fileutils (LoadError)
<injekt> :|
<injekt> olivier_bK: require 'fileutils
<injekt> '
LennyLinux has quit [Ping timeout: 257 seconds]
<injekt> NOT 'Fileutils'
<apeiros> jrhe: iirc this link describes it: http://globaldev.co.uk/2013/03/ruby-2-0-0-in-detail/
<jrhe> apeiros: Thank you :)
csaunders has joined #ruby
<injekt> 2.0 doesn't have the full refinements spec implement yet though so be aware it's sort of in development
nzee has joined #ruby
<injekt> haha 'spec'
<injekt> I make myself laugh
gaahrdner has quit [Ping timeout: 264 seconds]
carloslopes has quit [Remote host closed the connection]
<olivier_bK> injekt, if write require 'fileutils'
<olivier_bK> and i execute my script he tell me uninitialized constant Fileutils (NameError)
cmarques has joined #ruby
<apeiros> olivier_bK: dude, how often can you typo a word?
perun_ has quit [Ping timeout: 245 seconds]
<injekt> :(
<apeiros> case matters. it's require 'fileutils' and the module name is FileUtils
carloslopes has joined #ruby
<injekt> >> require 'fileutils'; FileUtils
<eval-in> injekt => FileUtils (http://eval.in/14975)
<injekt> it's really that easy
<nzee> All photos,tweets from Ancient City Ruby Conference here http://eventifier.co/event/AncientCityRuby/
failshell has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
ToApolytoXaos has quit [Quit: Leaving]
* apeiros is back down to 4 installed versions of ruby
<injekt> 3 for me!
<apeiros> well, I have 3 + system ruby
<injekt> oh
<injekt> 4 for me!
<apeiros> ^^
* apeiros goes to get himself some drugs
<Xeago> :o
<injekt> durgs
<Hanmac> apeiros: did you look at my gist?
<apeiros> Hanmac: yes, I said "ubermeta" :)
<Xeago> gstl gives way more adrenaline yo
<Hanmac> :P
<Hanmac> ping banisterfiend
pygmael has joined #ruby
<apeiros> Xeago: than my especially sugary milk? NEVER! :D
<banisterfiend> Hanmac: gutan tag, how are you Meneer? goed?
<Xeago> german and then dutch
brhelwig has joined #ruby
<Xeago> shame on you
failshell has joined #ruby
<olivier_bK> i looking on ruby-doc.org for FileUtils.mkdir_p because when i execute the script he tell me 23: uninitialized constant Fileutils (NameError)
<olivier_bK> my ligne 23 => FileUtils.mkdir_p "#{Directory}#{NameVhost}"
<Xeago> Goeden dag, hoe bent u, meneer? Goed?
whitedawg has quit [Quit: Leaving.]
<injekt> wow
akemrir has quit [Quit: WeeChat 0.4.0]
<banisterfiend> Xeago: you're right, dutch shouldn't be spoken at all
Zai00 has quit [Quit: Zai00]
<injekt> honestly
<banisterfiend> :P
<injekt> olivier_bK: you're still using Fileutils
blaxter_ has quit [Quit: foo]
lkba has joined #ruby
<injekt> olivier_bK: fix the case, it'll work
<banisterfiend> Hanmac: sup?
* apeiros wonders what's worse - him being a troll or him not being a troll
<injekt> aye
<injekt> I think him not being a troll is worse
johnmlocklear_ has quit [Read error: Operation timed out]
<injekt> for him, anyway
<Xeago> who is him?
<injekt> Xeago: olivier_bK
falsetto has quit [Remote host closed the connection]
<apeiros> Xeago: the guy who can't speeeel fileutils if his life depended on it…
ph^ has quit [Ping timeout: 258 seconds]
<injekt> apeiros: FileUtils*
<injekt> apeiros: :D
<apeiros> fIlEuTiLs
<apeiros> for better legibility
<injekt> LyK DiS If U CRy EVryTim
mahmoudimus has joined #ruby
brianpWins has joined #ruby
<banisterfiend> Hanmac: jesus your indentation is screwey
<banisterfiend> and even inconsistent
<injekt> tabs man, devil tabs
<olivier_bK> injekt, if i rename FileUtils by fileutils i get the same error normaly he must be working ?
yacks has joined #ruby
<injekt> ok im done
keymone has joined #ruby
<injekt> apeiros: all yours
Es0teric has joined #ruby
<apeiros> injekt: what? I'm not a masochist
<MrZYX> olivier_bK: please tell me, what's the difference between c and C
benlieb has joined #ruby
<Xeago> would you recommend writing the logic or the parser first?
<Xeago> I want to do parser first, but that sucks
<Xeago> feeling logic first is better
ariedler has joined #ruby
johnmlocklear_ has joined #ruby
yacks has quit [Max SendQ exceeded]
neurone-1337 has quit [Read error: Operation timed out]
<injekt> time for dinner, good day.
<Xeago> MrZYX: 32
<Hanmac> banisterfiend: yeah the gist editor does not fix it, but its about the code
yacks has joined #ruby
benlieb has quit [Client Quit]
<banisterfiend> Hanmac: not bad, i like the instance_exec
<banisterfiend> i think instance_eval should die
* apeiros still wants universal_eval
yacks has quit [Max SendQ exceeded]
robscomputer_ has quit [Ping timeout: 245 seconds]
<apeiros> which accepts a) ivar scope, b) implicit receiver, c) constant base, d) cvar scope and e) whatever I missed
<banisterfiend> Hanmac: but you're not overwriting really, you're just adding an 'after' hook, right?
<apeiros> oh, lvar binding
<banisterfiend> apeiros: yeah i tried to implement that a while ago, it's impossible to do it as a c extension
<banisterfiend> but trivial as a patch
dmiller1 has joined #ruby
whitedawg has joined #ruby
<apeiros> banisterfiend: pull request it! :)
<banisterfiend> hehe
thatRD has joined #ruby
carloslopes has quit [Remote host closed the connection]
brhelwig has quit [Ping timeout: 245 seconds]
<olivier_bK> MrZYX, i see what you mean but i don't understand why he dont work i write my uppercase in lowercase
neurone-1337 has joined #ruby
<banisterfiend> Hanmac: anyway i prefer that trick to alias_method filth
pen has joined #ruby
<MrZYX> olivier_bK: what's the difference between fileutils, Fileutils and FileUtils then?
<banisterfiend> you should see the method tables of objects that use a lot of alias_method based decoration (like rails things), they're really yucky
mahmoudimus has quit [Ping timeout: 258 seconds]
<Hanmac> banisterfiend: i dont like alias method, and my way is a bit more funnier
<olivier_bK> MrZYX, it a differente function
<MrZYX> which one do you use? which one is the right one?
x0F has joined #ruby
* apeiros admires MrZYX' patience
<MrZYX> just trying if the "asking questions"-way works
<MrZYX> ;P
carloslopes has joined #ruby
<apeiros> still…
thatRD has quit [Client Quit]
adkron has joined #ruby
security is now known as megha
<olivier_bK> i try to use FileUtils.mkdir_p
<Xeago> bah, feeling left out :<
ariedler has quit [Ping timeout: 258 seconds]
<Xeago> when solving https://www.spotify.com/se/jobs/tech/catvsdog/ would you recommend writing the logic or the parser first?
<olivier_bK> the function for creat a directory
alexim has joined #ruby
<MrZYX> olivier_bK: yes, now read the error you get
<MrZYX> which version is mentioned in it?
sonda has quit [Remote host closed the connection]
pen has quit [Ping timeout: 258 seconds]
pen has joined #ruby
thinkclay has joined #ruby
Ontolog has joined #ruby
<olivier_bK> i going to be crazy there is just 3 minute i write the same line and i get an error but now it's working
aantix has joined #ruby
anderse has joined #ruby
<olivier_bK> grr...
whitedawg has quit [Quit: Leaving.]
pioz has joined #ruby
mahmoudimus has joined #ruby
chrisnicola has quit [Quit: This computer has gone to sleep]
pioz has quit [Client Quit]
chimkan_ has quit [Read error: Connection reset by peer]
anderse has quit [Client Quit]
chimkan has joined #ruby
markalanevans has joined #ruby
mahmoudimus has quit [Client Quit]
chrisnicola has joined #ruby
mrsolo has joined #ruby
indyrl has quit [Quit: Leaving.]
Ontolog_ has quit [Ping timeout: 245 seconds]
stef_204 has quit [Quit: quitting]
psyprus has quit [Ping timeout: 258 seconds]
swingha has quit [Quit: WeeChat 0.4.0]
momomomomo has quit [Quit: momomomomo]
mahmoudimus has joined #ruby
Ontolog has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
<apeiros> olivier_bK: the point is, you did NOT write the same line. Fileutils and FileUtils is NOT the same.
noop has joined #ruby
maycon_ has quit [Read error: Connection reset by peer]
d2dchat has quit [Remote host closed the connection]
br4ndon_ has quit [Quit: Lorem ipsum dolor sit amet]
marcdel has joined #ruby
mahmoudimus has quit [Ping timeout: 258 seconds]
chandankumar has joined #ruby
buibex has joined #ruby
Ontolog has joined #ruby
atmosx has joined #ruby
k611 has quit [Ping timeout: 256 seconds]
cmarques has quit [Ping timeout: 258 seconds]
psyprus has joined #ruby
ariedler has joined #ruby
<wyattg> Ok. So I have a ruby app that runs as a daemon. I am supposed to make another script that controls the daemon while it is running (eg, sets a variable). How could I achieve that?
interactionjaxsn has quit [Remote host closed the connection]
rippa has joined #ruby
mahmoudimus has joined #ruby
pen has quit [Ping timeout: 258 seconds]
<apeiros> wyattg: e.g. via a socket, or a slower but manually reproducable way via a file + sending a signal
etcetera has quit []
thinkclay has quit [Quit: Leaving.]
<apeiros> (Process.kill - despite its name it only sends a signal, it doesn't really kill anything)
dmiller1 has quit [Ping timeout: 245 seconds]
kiri has quit [Ping timeout: 240 seconds]
pen has joined #ruby
<apeiros> there are also a couple of very high level IPC libs around. like Drb which is part of rubys stdlib.
etcetera has joined #ruby
<MrZYX> you can't trap on kill though ;)
pencilcheck has joined #ruby
<wyattg> you can trap other signals tho!
<wyattg> thanks apeiros
<apeiros> MrZYX: you can
<apeiros> ah well, kill == 9?
<MrZYX> yup
<apeiros> thought kill == sigint
Morkel has quit [Quit: Morkel]
<MrZYX> hm
<MrZYX> not sure about Process.kill
<apeiros> not sure, though
<apeiros> Process.kill is like the command line utility
<MrZYX> but sigkill == 9
<apeiros> you can send whatever signal you want with it
<MrZYX> oh then it's likely sigterm
Morkel has joined #ruby
Davey has joined #ruby
binaryplease has joined #ruby
cantonic has joined #ruby
br4ndon has joined #ruby
<MrZYX> by default
hiroyuki has joined #ruby
<apeiros> that of course, yes
theRoUS has quit [Ping timeout: 240 seconds]
generalissimo has quit [Read error: Connection reset by peer]
pen has quit [Ping timeout: 258 seconds]
generalissimo has joined #ruby
ryanh has quit [Quit: Computer has gone to sleep.]
robscomputer_ has joined #ruby
hiroyuki_ has quit [Ping timeout: 255 seconds]
casheew has quit [Read error: Connection reset by peer]
ukd1 has joined #ruby
cobragoat has quit [Remote host closed the connection]
casheew has joined #ruby
thinkdevcode has joined #ruby
yacks has joined #ruby
biz has joined #ruby
BizarreCake has quit [Ping timeout: 276 seconds]
cobragoa_ has joined #ruby
interactionjaxsn has joined #ruby
yacks has quit [Max SendQ exceeded]
grzywacz has joined #ruby
<apeiros> 900! :D
wolcanus_ has joined #ruby
<MrZYX> and 2 ;D
<MrZYX> is that channel record?
drago777- has left #ruby [#ruby]
blaxter has quit [Quit: KTHXBYE]
Morkel has quit [Quit: Morkel]
vetsin has quit [Ping timeout: 240 seconds]
<apeiros> possibly
carloslopes has joined #ruby
Hanmac has quit [Read error: Connection reset by peer]
sayan has quit [Quit: Leaving]
<apeiros> I don't always look at the numbers. but the last few weeks it was around 700-800 usually
<apeiros> and it was around 300 when I first joined
Hanmac has joined #ruby
Morkel has joined #ruby
swingha has joined #ruby
hassans has joined #ruby
wolcanus has quit [Read error: Operation timed out]
<olivier_bK> when i try to put some text inside a file a get this error in `initialize': No such file or directory or the directory exist my file https://gist.github.com/zyriuse75/56e013654cfa51c66b28
osvico has joined #ruby
mattbl has joined #ruby
BBonifield_ has joined #ruby
binaryplease has quit [Ping timeout: 248 seconds]
<olivier_bK> it's okai
BBonifield has quit [Ping timeout: 245 seconds]
<Morrolan> Well, does said file exist?
<Morrolan> Ah, actually mode "a" should create it if it doesn't exist, I believe.
rburton- has joined #ruby
<apeiros> Morrolan: it doesn't create intermediary directories, though
<Morrolan> apeiros: Oh, I see. :)
<injekt> FileUtils.mkdir_p(VhostAvailabe)
<injekt> lol @ spelling
<injekt> also lol @ constant
<injekt> I guess at lease he's using block form of open
<injekt> least* oh the irony
<apeiros> injekt: was just gonna say :D
<apeiros> also you shouldn't be laughing about spelling, given that you can't even spell your own nick!!!
<Morrolan> Not to mention the excess of 'lol'. :P
<injekt> apeiros: :(
failshell has quit [Remote host closed the connection]
<injekt> Morrolan: lol
aantix has quit [Quit: aantix]
vetsin has joined #ruby
bigkevmcd has quit [Quit: Ex-Chat]
Ontolog has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
brhelwig has joined #ruby
Morkel_ has joined #ruby
kenneth has joined #ruby
chandankumar has quit [Ping timeout: 240 seconds]
Morkel has quit [Ping timeout: 256 seconds]
Morkel_ is now known as Morkel
mattbl has joined #ruby
<kenneth> can you rescue multiple exceptions in ruby?
<kenneth> eg, rescue IOError, TypeError
failshell has joined #ruby
noop has quit [Remote host closed the connection]
hiyakashi has quit [Ping timeout: 256 seconds]
olivier_bK has quit [Ping timeout: 276 seconds]
Ontolog has joined #ruby
<apeiros> kenneth: yes
<apeiros> kenneth: also, irb
Ontolog_ has joined #ruby
forrest has joined #ruby
<apeiros> quickly and easily lets you answer "can I do X" questions yourself
rburton- has quit [Quit: Linkinus - http://linkinus.com]
indyrl has joined #ruby
indyrl has quit [Max SendQ exceeded]
<Hanmac> in ruby the answer to "can i do X" is in 99% of the cases Yes , because ruby is SO dynamic :P
hmarr has quit []
dmerrick has joined #ruby
breakingthings has quit []
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
mattbl has quit [Client Quit]
breakingthings has joined #ruby
indyrl has joined #ruby
indyrl has quit [Max SendQ exceeded]
Iszak_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ph^ has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
Ontolog has quit [Ping timeout: 252 seconds]
tmiller has quit [Remote host closed the connection]
mneorr has quit [Remote host closed the connection]
zph has joined #ruby
ukd1 has quit [Remote host closed the connection]
mattbl has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
ph^ has quit [Ping timeout: 255 seconds]
k610 has joined #ruby
mneorr has joined #ruby
xaq has joined #ruby
shock_one has quit [Ping timeout: 248 seconds]
pothibo has quit [Quit: pothibo]
MetaCosm has quit [Excess Flood]
k610 has quit [Client Quit]
hamakn has quit [Ping timeout: 248 seconds]
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
MetaCosm has joined #ruby
gyre007 has quit [Remote host closed the connection]
pencilcheck has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
jrajav has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
bean__ has joined #ruby
bean__ has quit [Max SendQ exceeded]
timonv has joined #ruby
bean__ has joined #ruby
generalissimo has quit [Remote host closed the connection]
mattbl has joined #ruby
sambio has quit []
yacks has joined #ruby
Guedes has joined #ruby
d2dchat has joined #ruby
<hashpuppy_> which do you guys prefer for initializing a hash of keys all to []: Hash[FIELDS.zip(Array.new(FIELDS.length) { [] })] or FIELDS.reduce({}){|o, p| o[p] = []; o}
<MrZYX> Hash.new([])
<bean__> Hash.new([]) def.
maxmanders has joined #ruby
<hashpuppy_> but then i iterate over some data and populate that hash and if there is nothing to iterate over i still want {field1: [], field2: []}
aapzak_ has quit [Ping timeout: 252 seconds]
ph^ has joined #ruby
pygmael has quit [Quit: pygmael]
pygmael has joined #ruby
altamic has quit [Quit: altamic]
xaq_ has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
anderse has joined #ruby
jeebster has joined #ruby
<Hanmac> when you do Hash.new([]) remember that you cant use <<, so you must use +=
maxmanders has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby
ebobby has left #ruby [#ruby]
jrhe has quit [Quit: jrhe]
d3 has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
martinklepsch has quit [Ping timeout: 245 seconds]
jrhe has joined #ruby
xaq has quit [Ping timeout: 258 seconds]
chussenot has quit [Quit: chussenot]
xaq_ has quit [Remote host closed the connection]
pygmael has quit [Quit: pygmael]
chrishough has quit [Quit: chrishough]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
chris_qwer has joined #ruby
chris_qwer has left #ruby [#ruby]
mneorr has quit [Remote host closed the connection]
aaaaa has joined #ruby
beneggett has quit [Ping timeout: 246 seconds]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
Eldariof93-ru has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
tmiller has joined #ruby
cmarques has joined #ruby
hakunin_ has joined #ruby
zph has quit [Quit: Computer has gone to sleep.]
jlast has quit [Remote host closed the connection]
echobinary has joined #ruby
<codezombie> is anyone aware of a tool similar to codeclimate that can be run locally? Doesn't have to have a fancy ui, just need to give code analysis reports for ruby/rails projects.
tmiller has quit [Remote host closed the connection]
tmiller has joined #ruby
<banisterfiend> codezombie: zenspider's tools: flog/flay etc
<banisterfiend> codezombie: codeclimate uses those internally iirc
davetherat has quit [Remote host closed the connection]
chrishough has joined #ruby
<codezombie> nice, I read about it but I thought I'd gather some other opinions before I went testing
davetherat has joined #ruby
Eldariof-ru has quit [Ping timeout: 264 seconds]
hakunin has quit [Ping timeout: 256 seconds]
marcdel has quit []
adkron has quit [Ping timeout: 245 seconds]
jlast has joined #ruby
mahmoudimus has joined #ruby
aaaaa has quit [Ping timeout: 245 seconds]
aapzak has joined #ruby
BSaboia__ has joined #ruby
RubNoob has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
maxmanders has quit [Quit: Computer has gone to sleep.]
slainer68 has joined #ruby
drale2k has quit [Quit: Leaving...]
c0rn has quit [Quit: Computer has gone to sleep.]
araujo has joined #ruby
axxT has quit [Ping timeout: 256 seconds]
BSaboia__ has quit [Client Quit]
BSaboia has quit [Ping timeout: 256 seconds]
Ontolog has joined #ruby
bronson has joined #ruby
skum has joined #ruby
bronson has quit [Client Quit]
indyrl has joined #ruby
drago777- has joined #ruby
bronson has joined #ruby
babinho has quit [Quit: leaving]
babinho has joined #ruby
maxmanders has joined #ruby
Banistergalaxy has joined #ruby
Eldariof93-ru has quit [Read error: Operation timed out]
nricciar has quit [Ping timeout: 246 seconds]
Vainoharhainen has quit [Ping timeout: 264 seconds]
Michael__ has joined #ruby
Ontolog_ has quit [Ping timeout: 256 seconds]
kiri has joined #ruby
r0bby_ has joined #ruby
AndChat| has quit [Ping timeout: 258 seconds]
kirun has joined #ruby
atmosx has quit [Quit: And so the story goes…]
mercwithamouth has quit [Ping timeout: 240 seconds]
atno has quit [Read error: No route to host]
cmarques has quit [Ping timeout: 245 seconds]
Eldariof93-ru has joined #ruby
biz has quit [Ping timeout: 264 seconds]
jlast has quit [Remote host closed the connection]
gaahrdner has joined #ruby
aytch has quit [Remote host closed the connection]
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
akashj87__ has joined #ruby
jlast has joined #ruby
Matt has joined #ruby
Matt is now known as Guest52362
cr3 has joined #ruby
<cr3> is there a nice way to merge an array of hashes?
becom33 has quit [Quit: Leaving]
<yxhuvud> arr.inject &:merge ?
mercwithamouth has joined #ruby
akashj87 has quit [Ping timeout: 245 seconds]
pdtpatrick has quit [Remote host closed the connection]
wyattg has quit [Quit: Konversation terminated!]
headius has joined #ruby
benweint has joined #ruby
<cr3> yxhuvud: inject?
Rumsteak has joined #ruby
<yxhuvud> yes?
<cr3> yxhuvud: I was looking in the Array doc but I found it in the Enumeration doc, I'll read more
louism2_ has joined #ruby
<louism2_> hey all
<yxhuvud> you may not need the &.
Rumsteak has quit [Client Quit]
<louism2_> what does the =~ operand do?
AndChat| has joined #ruby
mahmoudimus has quit [Remote host closed the connection]
<yxhuvud> due to inject being special.
wgosling has joined #ruby
<C0deMaver1ck> louism2_: matches a regex
wgosling has quit [Client Quit]
<C0deMaver1ck> I tend to use =~ /something/ more than .match /something/
cnrk has joined #ruby
<louism2_> <C0deMaver1ck> Thanks
<C0deMaver1ck> np
wyattg has joined #ruby
beneggett has joined #ruby
tobor_one has quit [Quit: tobor_one]
Banistergalaxy has quit [Ping timeout: 276 seconds]
pangur has joined #ruby
<apeiros> louism2_: actually =~ is a method
<apeiros> so what it does depends on the receiver
theRoUS has quit [Ping timeout: 245 seconds]
fmendez has joined #ruby
<apeiros> usually you'll call it on String or Regexp, though, and then it's what C0deMaver1ck said
divout has quit [Remote host closed the connection]
astegman has joined #ruby
Michael__ has quit [Remote host closed the connection]
maxmanders has quit [Quit: Computer has gone to sleep.]
baroquebobcat has joined #ruby
jonathanwallace has quit [Ping timeout: 256 seconds]
beneggett has quit [Ping timeout: 258 seconds]
mando has quit [Remote host closed the connection]
<xll11> Anyone got some interesting ruby project to show me?
zph has joined #ruby
<xll11> I wanna read some code and pick up habits of good programemrs
<pangur> I have a file of questions and answers. The questions begin with Q. and the answers with A. Each question is a line. However, a couple of the answers consist of more than one line. These additional lines begin with a number (1 .. 6, let's say). I show my code at https://gist.github.com/anonymous/5321997. How do I add the lines that begin with a number?
skattyadz has quit [Quit: skattyadz]
maycon has joined #ruby
zph has quit [Client Quit]
preyalone has joined #ruby
adkron has joined #ruby
<preyalone> How do I turn on line numbers in my default.reek?
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
zph has joined #ruby
<havenwood> xll11: Github has tons of great Ruby projects.
dynetk has quit []
baroquebobcat has quit [Quit: baroquebobcat]
<pangur> Is there a way for Ruby to look ahead to see whether the next line begins with a number?
preyalone has quit [Client Quit]
<havenwood> pangur: line.next[0] =~ /\d/
<pangur> Thanks havenwood :)
baroquebobcat has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
dankest has quit [Quit: Leaving...]
whitedawg has joined #ruby
graeme has joined #ruby
c0rn has joined #ruby
<havenwood> pangur: err, actually my code is fail, sec
theRoUS has joined #ruby
hamakn has joined #ruby
dankest has joined #ruby
Fuzai has quit [Ping timeout: 260 seconds]
<havenwood> pangur: Are you iterating over the lines, or at one line and want to peek at next?
marr has joined #ruby
jrhe has quit [Quit: jrhe]
hamakn has quit [Ping timeout: 246 seconds]
<pangur> I have 196 questions. Just two of them have multi-line answer. After the first line of the answer, the lines that follow it are numbered. I want to look ahead to see if the next line is a numbered line. If so, I want to add it to concatenate it to the answer.
dmiller1 has joined #ruby
monkegjinni has joined #ruby
<apeiros> pangur: care to show a reduced input file? i.e. 2 normal Q&A, and a third, the middle one, being a multiline?
graeme has quit [Read error: Connection reset by peer]
<apeiros> because you can probably just use scan on the whole input
<pangur> OK, I shall try that.
sambio has joined #ruby
<Gate> So is anyone using amazon simpledb that has a solution for test/development environments?
<bean__> xll11: httparty is pretty simple and pretty good.
graeme has joined #ruby
graeme has quit [Read error: Connection reset by peer]
graeme has joined #ruby
sepp2k has quit [Remote host closed the connection]
<denstark> Anyone have a recommendation for a ruby lame library? I'm looking to play streamed mp3s. I saw lamer but it lacks documentation so wanted to see if there were preferred alternatives
i_s has quit [Quit: i_s]
johnmlocklear_ has quit [Ping timeout: 245 seconds]
nazty has joined #ruby
<pangur> I am sorry that the text of the data file is of a religious nature. However, that is the data with which I am dealing. https://gist.github.com/anonymous/5322138 .
Michael__ has joined #ruby
lupinstien has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
<MrZYX> pangur: split at \n\n, first line is question, rest is answer
jrajav has joined #ruby
benlieb has joined #ruby
<pangur> Thanks Mr ZYX. I want to take the number of the question and index the question and the answer together as it were.
benlieb has quit [Client Quit]
<pangur> Sorry to take the number off the question.
osvico has quit [Ping timeout: 256 seconds]
<apeiros> ugh, pastie broken?
<pangur> What you say MrZYX is helpful for I had an extra blank line where I did not want it at the end of each question.
timonv has quit [Remote host closed the connection]
<apeiros> works with your input
<apeiros> it's an array of arrays, of the form [[question1, answer1], [q2, a2], …]
zph has quit [Quit: Computer has gone to sleep.]
<pangur> aperios, you are genius !
<apeiros> I'm also apeiros :-p
<apeiros> (not aperios)
<pangur> Makes me embarrassed to think of all thes lines I have in my code.
<MrZYX> apeiros: no you're actually ape<tab> :P
apeiros is now known as ape[tab]
<ape[tab]> srsly?
<MrZYX> ape[tab]: yup, still works^^
ape[tab] is now known as apeiros
<pangur> sorry apeiros
lupinstien has joined #ruby
robscomputer_ has quit [Remote host closed the connection]
<apeiros> pangur: I have a year or two of experience, so don't be too embarrassed ;-)
robscomputer_ has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
robscomputer_ has joined #ruby
wolcanus_ has quit [Ping timeout: 248 seconds]
beneggett has joined #ruby
<pangur> I know. I remember that you were the designer of the sorting gem :)
<pangur> Probably other things too - but that is one of which I know :)
zph has joined #ruby
nricciar has joined #ruby
mando has joined #ruby
k610 has joined #ruby
zph has quit [Client Quit]
brennanMKE has joined #ruby
speakingcode-wor has quit [Remote host closed the connection]
huoxito has quit [Quit: Leaving]
acrussell has left #ruby [#ruby]
stat1x has left #ruby [#ruby]
nomenkun has joined #ruby
cobragoa_ has quit [Remote host closed the connection]
skum has quit [Quit: Leaving...]
<shevy> he wrote butler too
<shevy> and some file that played Alle meine Entlein
<shevy> and he wrote halsbe
swingha has quit [Ping timeout: 256 seconds]
nricciar has quit [Read error: Connection reset by peer]
cearls has joined #ruby
idkazuma has joined #ruby
beneggett has quit [Ping timeout: 245 seconds]
cmarques has joined #ruby
AlSquire has quit [Ping timeout: 240 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
monkegjinni has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
elaptics`away is now known as elaptics
<apeiros> s/wrote/is writing/ - I wish I was done, but I think that jockingly mentioned 2017 release date might even have been optimistic :)
<Xeago> apeiros: why not call it array of tuples?
<apeiros> Xeago: just to answer what a tuple is right after that? :)
monkegjinni has joined #ruby
astegman has quit [Ping timeout: 264 seconds]
<Xeago> would have a higher amount of education
<apeiros> also since there's a couple of ways to represent a tuple, array is actually saying a bit more
<pangur> I know what tuples are from python.
<Xeago> pangur: btw you can do this: question, answer = questionanswertuplearray.first
<Xeago> for example
krawchyk has quit [Remote host closed the connection]
divout has joined #ruby
<pangur> However I am still stuck because I get a undefined method `scan' for #<Array:0x9e76914> (NoMethodError)
cantonic_ has joined #ruby
<apeiros> pangur: you have to call it on the full text
astegman has joined #ruby
<apeiros> not on the individual lines
cmarques has quit [Ping timeout: 256 seconds]
<pangur> ah, thanks.
rtyer has joined #ruby
ShellFu is now known as ShellFu_f0oD
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
<pangur> Thanks, that worked.
keymone_ has joined #ruby
backjlack has quit [Read error: Connection reset by peer]
jonathanwallace has joined #ruby
akam-it has quit [Remote host closed the connection]
nimred has quit [Quit: leaving]
keymone_ has quit [Client Quit]
rezzack has joined #ruby
marcdel has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
unstable has quit [Changing host]
unstable has joined #ruby
<pangur> Very much indebted to you, apeiros.
backjlack has joined #ruby
Czupa has quit [Remote host closed the connection]
<apeiros> and if you want @nums, @questions and @answers separately too, just use transpose:
<apeiros> @nums, @questions, @answers = *@combined.transpose
sepp2k has joined #ruby
banjara has quit [Quit: Leaving.]
<pangur> brilliant!
wmoxam has quit [Ping timeout: 245 seconds]
banjara has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<pangur> I really will have to learn about scan and regex.
banjara has quit [Client Quit]
banjara has joined #ruby
baroquebobcat has joined #ruby
<pangur> puts "Question #{num} - #{question}", answer is giving me output like: Question 144 - 144. What are the duties ...? and then the Answer too. How are the num and the question coming up as if they were the same?
grn_ is now known as grn
nricciar has joined #ruby
sailias has quit [Read error: Operation timed out]
* pangur hopes that the answer does not make pangur look exceptionally foolish.
whitenoise has quit [Quit: This computer has gone to sleep]
wchun has quit [Quit: Leaving]
banjara has quit [Client Quit]
banjara has joined #ruby
keymone_ has joined #ruby
<apeiros> ah well, you have the question number in your questions file too. I understood you that those weren't actually there as in your example
<apeiros> in that case, the code can be reduced even further
<pangur> ah, I see. Ok :)
banjara has quit [Client Quit]
osvico has joined #ruby
banjara has joined #ruby
<hashpuppy_> is there a .each_with_filter so i don't have to iterate over something twice and can reuse a lambda for filtering
slyv has joined #ruby
* pangur is sitting astounded.
<apeiros> hashpuppy_: ¿come?
banjara has quit [Client Quit]
banjara has joined #ruby
louism2_ has quit [Quit: This computer has gone to sleep]
<hashpuppy_> why don't i want to iterate over something tiwce?
<hashpuppy_> i guess it's not that big of a deal
<hashpuppy_> i could just write my own
invisime has quit [Quit: Leaving.]
<bean__> hashpuppy_: are you wanted to iterate over a thing and only get some of them back?
banjara has quit [Client Quit]
banjara has joined #ruby
echobinary has quit [Disconnected by services]
echobinary has joined #ruby
keymone__ has joined #ruby
keymone___ has joined #ruby
keymone___ has quit [Client Quit]
tootooroo has quit [Ping timeout: 256 seconds]
zph has joined #ruby
i_s has joined #ruby
<hashpuppy_> i just mean instead of list.select{|x| x == 3}.each do |x| … end have list.each_with_select(->(a) a == 3) do |x| … end
<hashpuppy_> sorry… on the phone if it doesn't make sense
keymone has quit [Ping timeout: 252 seconds]
keymone__ is now known as keymone
banjara has quit [Client Quit]
banjara has joined #ruby
<bean__> eh, the 1st way is fine imo
tootooroo has joined #ruby
astegman has quit [Quit: Computer has gone to sleep.]
keymone_ has quit [Ping timeout: 248 seconds]
zph has quit [Client Quit]
echobinary has quit [Read error: Connection reset by peer]
echobinary has joined #ruby
gaahrdner has quit [Remote host closed the connection]
brennanMKE has quit [Read error: Connection reset by peer]
spider-mario has quit [Remote host closed the connection]
brennanMKE has joined #ruby
banjara has quit [Client Quit]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
banjara has joined #ruby
mfletcher has quit []
echobinary has quit [Remote host closed the connection]
chrisnicola has quit [Ping timeout: 256 seconds]
cmarques has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
chrishough has quit [Quit: chrishough]
* pangur prints off apeiros's code with a view to read it in bed and trying to understand the various steps.
adkron has quit [Ping timeout: 255 seconds]
<pangur> Amazingly compact.
cearls has quit [Remote host closed the connection]
c0rn has quit [Ping timeout: 252 seconds]
Andromeda has quit [Remote host closed the connection]
robscomputer_ has quit [Ping timeout: 256 seconds]
Andromeda has joined #ruby
kuzushi__ is now known as kuzushi
banjara has quit [Client Quit]
geekbri has quit [Remote host closed the connection]
banjara has joined #ruby
chrisnicola has joined #ruby
iaj has quit [Ping timeout: 245 seconds]
artofraw has joined #ruby
xclite has quit [Quit: Leaving]
banjara has quit [Client Quit]
astegman has joined #ruby
banjara has joined #ruby
jbueza has quit [Quit: Leaving.]
pangur has quit [Quit: Leaving]
rudisimo has quit [Quit: Leaving.]
angusiguess has quit [Ping timeout: 245 seconds]
<waxjar> hashpuppy_: list.each { |x| … if lamba.call == true } or just pass your lambda to select as a block (#select(&lambda).each { |x| … })
banjara has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
louism2_ has joined #ruby
banjara has joined #ruby
<hashpuppy_> yep. thanks
hashpuppy_ has quit [Quit: hashpuppy_]
Andromeda has quit [Ping timeout: 245 seconds]
<injekt> ew == true
<waxjar> hm?
<injekt> x == true is horrible
<waxjar> why?
c0rn has joined #ruby
<denstark> oh
<denstark> is that cameron diaz?
<denstark> either way shthat person has a mazzssive mouth
banjara has quit [Client Quit]
<injekt> because for good code constructs, `== true` should be completely pointless
banjara has joined #ruby
wmoxam has joined #ruby
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
<denstark> Erm.. sorry. Lag spike + irssi + wrong window = the above messages
baroquebobcat has joined #ruby
wmoxam has quit [Client Quit]
tootooroo has joined #ruby
EzeQL has joined #ruby
astegman has quit [Quit: Out of time]
banjara has quit [Client Quit]
jon_w has quit [Quit: Occifer, take me drunk, I'm home   [www.t7ds.com.br]]
zastern has joined #ruby
banjara has joined #ruby
<zastern> When I do this - https://gist.github.com/zacharyalexstern/5322558 - Why is foo in the last line automatically the key? Is there a way to make it the value, other than doing what I do on line 9, and just only "puts"ing one of them? (not a programmer [yet] )
t-mart_ has joined #ruby
carlyle has joined #ruby
iaj has joined #ruby
<waxjar> zastern: hash.each { |key, value| … }
hiroyuki_ has joined #ruby
codezombie has quit [Quit: Linkinus - http://linkinus.com]
idkazuma has quit [Remote host closed the connection]
<zastern> waxjar: right I get that.
<apeiros> zastern: secret_identities.each_key do |fake| … end
<zastern> apeiros: interesting, thanks
<apeiros> and secret_identities.each_value do |real| … end
slainer68 has quit [Remote host closed the connection]
* waxjar should learn to read
arietis has quit [Quit: Computer has gone to sleep.]
t-mart has quit [Ping timeout: 258 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
banjara has quit [Client Quit]
hiroyuki has quit [Ping timeout: 256 seconds]
banjara has joined #ruby
lewix has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 248 seconds]
gaahrdner has joined #ruby
chrishough has joined #ruby
lewix has joined #ruby
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
idkazuma has joined #ruby
banjara has quit [Client Quit]
jtharris has quit [Quit: WeeChat 0.4.0]
drale2k has joined #ruby
banjara has joined #ruby
Eldariof93-ru has quit []
zph has joined #ruby
jeebster has quit [Quit: Leaving.]
banjara has quit [Client Quit]
arietis has joined #ruby
banjara has joined #ruby
k610 has quit [Quit: Leaving]
gf3 is now known as miketaylr
jeebster has joined #ruby
tootooroo has quit [Ping timeout: 252 seconds]
lewix has quit [Ping timeout: 258 seconds]
csaunders has quit [Ping timeout: 264 seconds]
banjara has quit [Client Quit]
banjara has joined #ruby
Andromeda has joined #ruby
adkron has joined #ruby
dagnachew has joined #ruby
banjara has quit [Client Quit]
banjara has joined #ruby
carlyle has quit [Remote host closed the connection]
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
ariedler has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
headius has quit [Quit: headius]
r0bby_ has quit [Ping timeout: 255 seconds]
Michael__ has quit [Remote host closed the connection]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
zavier has quit [Quit: WeeChat 0.3.8]
zavier has joined #ruby
h8R has quit [Remote host closed the connection]
swex_ has quit [Ping timeout: 256 seconds]
idkazuma has quit [Remote host closed the connection]
alx- has quit [Quit: alx-]
rippa has quit [Ping timeout: 240 seconds]
rtyer has quit [Quit: Leaving...]
pavilionXP has joined #ruby
buibex has quit [Remote host closed the connection]
miketaylr is now known as gf3
jrajav has quit [Quit: I tend to be neutral about apples]
divout has quit [Remote host closed the connection]
maxmanders has joined #ruby
nezumi has joined #ruby
geggam has quit [Quit: switching computers]
kiwnix has joined #ruby
robscomputer_ has joined #ruby
beneggett has joined #ruby
bradleyprice has quit [Remote host closed the connection]
interactionjaxsn has quit [Remote host closed the connection]
dayepa1 has joined #ruby
lewix has joined #ruby
brhelwig has quit [Remote host closed the connection]
jackerran has joined #ruby
lupinstien has quit [Ping timeout: 260 seconds]
thinkdevcode has quit [Read error: Connection reset by peer]
thinkdevcode has joined #ruby
pitzips has joined #ruby
<lewix> hmm
BSaboia has joined #ruby
dayepa has quit [Ping timeout: 245 seconds]
<lewix> what is cameron diaz doing in ruby
<lewix> didn't know she was a rubyist
gaahrdner has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 245 seconds]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tmiller has quit [Ping timeout: 245 seconds]
gaahrdner has joined #ruby
nazty has quit [Read error: Connection reset by peer]
niklasb has joined #ruby
greenarrow has quit [Ping timeout: 245 seconds]
greenarrow has joined #ruby
luckyruby has quit [Remote host closed the connection]
tomku has quit [Quit: WeeChat 0.4.0]
zph has quit [Quit: Computer has gone to sleep.]
slainer68 has joined #ruby
ToApolytoXaos has joined #ruby
agarie has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
dmerrick has quit [Remote host closed the connection]
chrisnicola has quit [Quit: This computer has gone to sleep]
gaahrdner has quit [Ping timeout: 240 seconds]
tootooroo has joined #ruby
nazty has joined #ruby
alex__c2022 has quit [Quit: alex__c2022]
lewix_ has joined #ruby
staafl has joined #ruby
Ortuna has joined #ruby
brhelwig has joined #ruby
gaahrdner has joined #ruby
mityaz has quit [Quit: See ya!]
ShellFu_f0oD is now known as ShellFu
lewix has quit [Ping timeout: 260 seconds]
Michael__ has joined #ruby
supergiantrobot has quit [Quit: supergiantrobot]
bronson has quit [Quit: bronson]
whitedawg has quit [Quit: Leaving.]
codecop has quit [Remote host closed the connection]
tomku has joined #ruby
memristor has joined #ruby
rdev has quit [Quit: Leaving...]
LennyLinux has joined #ruby
slainer68 has quit [Ping timeout: 258 seconds]
ggVGc has joined #ruby
zph has joined #ruby
chessguy has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
rdev has joined #ruby
cr3 has quit [Quit: leaving]
alexim has quit [Quit: bye]
rdev has quit [Client Quit]
carlyle has joined #ruby
maxmanders has quit [Ping timeout: 256 seconds]
failshell has quit [Remote host closed the connection]
reytt has joined #ruby
ph^ has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
ph^ has joined #ruby
baroquebobcat has joined #ruby
RagingDave has quit [Quit: Ex-Chat]
beneggett has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
RORgasm has quit [Remote host closed the connection]
jacobbednarz has joined #ruby
geggam has joined #ruby
t-mart has joined #ruby
Neandre has joined #ruby
t-mart__ has joined #ruby
carlyle has quit [Remote host closed the connection]
seich- has quit [Quit: See you guys later]
Michael__ has quit [Remote host closed the connection]
keymone has quit [Quit: keymone]
t-mart__ has quit [Read error: Connection reset by peer]
ph^ has quit [Ping timeout: 256 seconds]
gaahrdner has quit [Remote host closed the connection]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
Neandre has quit [Read error: Connection reset by peer]
gaahrdner has joined #ruby
t-mart__ has joined #ruby
t-mart_ has quit [Ping timeout: 258 seconds]
reytt has quit [Quit: Linkinus - http://linkinus.com]
t-mart has quit [Ping timeout: 256 seconds]
t-mart has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
tootooroo has quit [Quit: Brain.sys has encountered a problem and needs to close. We are sorry for the inconvenience.]
brhelwig has quit [Remote host closed the connection]
breakingthings has quit []
anonymuse has quit [Quit: Leaving...]
chrisnicola has joined #ruby
forrest has quit [Quit: Leaving]
gaahrdner has quit [Ping timeout: 276 seconds]
chrisnicola has quit [Client Quit]
t-mart__ has quit [Ping timeout: 258 seconds]
solidoodlesuppor has quit [Remote host closed the connection]
thinkdevcode has quit [Remote host closed the connection]
chrisnicola has joined #ruby
adkron has quit [Ping timeout: 258 seconds]
zph has quit [Ping timeout: 256 seconds]
brhelwig has joined #ruby
seich- has joined #ruby
alanp_ has joined #ruby
alanp has quit [Disconnected by services]
alanp_ is now known as alanp
lodestone has joined #ruby
lodestone is now known as Guest3171
Guest3171 has quit [Client Quit]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
tootubular has quit [Quit: tootubular]
jerius has quit [Ping timeout: 264 seconds]
sixty4k has joined #ruby
monkegjinni has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
zeade has joined #ruby
monkegjinni has joined #ruby
rdev has joined #ruby
graeme has quit [Quit: graeme]
chrisnicola has quit [Quit: This computer has gone to sleep]
t-mart_ has joined #ruby
banjara has quit [Client Quit]
jlast has quit [Remote host closed the connection]
banjara has joined #ruby
emmanuelux has joined #ruby
dagnachew has quit [Quit: WeeChat 0.4.0]
hassans has left #ruby [#ruby]
dagnachew has joined #ruby
zastern has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 248 seconds]
mockra has quit [Remote host closed the connection]
Guest52362 has quit [Quit: This computer has gone to sleep]
dagnachew has quit [Client Quit]
dagnachew has joined #ruby
cmarques has quit [Ping timeout: 256 seconds]
t-mart has quit [Ping timeout: 258 seconds]
graft_ has quit [Ping timeout: 245 seconds]
skattyadz has joined #ruby
rdev has quit [Quit: Leaving...]
bean__ has quit [Quit: Computer has gone to sleep.]
robscomputer_ has quit [Ping timeout: 258 seconds]
jacobbednarz has quit [Quit: Laters.]
jackerran has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
timeout_ has quit [Quit: leaving]
etcetera has quit []
jonathanwallace has joined #ruby
chrisnicola has joined #ruby
cobragoat has joined #ruby
brhelwig has quit [Remote host closed the connection]
hadees has joined #ruby
tommyvyo has quit [Quit:]
<hadees> it's alright to write your own blank? method for your class right?
carlyle has joined #ruby
jeebster has quit [Quit: Leaving.]
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
chrisnicola has quit [Client Quit]
graeme has joined #ruby
<shevy> hadees you can
<shevy> def blank?
<shevy> # do stuff here
<shevy> end
<shevy> inside your class
<hadees> shevy: yeah I know I can but I just wanted to make sure people actually do that
<shevy> but usually the question mark indicates either a boolean value, or a general query
<hadees> it isn't bad practice
<shevy> jmm
<shevy> I mean, hmm
<shevy> I usually define a method called "run" and a method called "reset" for most of my classes
<shevy> run contains the logic to run/start it, reset initializes or resets the @ivars it needs
<shevy> what is blank() or blank?() doing?
<MrZYX> shevy: blank? is active_support black magic ;)
<MrZYX> " ".blank? => true, nil.blank? => true, [].blank? => true etc
memristor has quit [Read error: Connection reset by peer]
hiroyuki_ has quit [Read error: Connection reset by peer]
graeme has quit [Client Quit]
<shevy> gmm
logix812 has joined #ruby
logix812 has quit [Max SendQ exceeded]
<shevy> I mean
<shevy> hmm
<shevy> my keyboard is off today :\
<shevy> ok so basically
macabhaird has quit [Quit: Leaving.]
<shevy> .blank? is like .empty? but also for nil, right?
brennanMKE has quit [Remote host closed the connection]
<MrZYX> " ".empty? is false, " ".blank? is true
logix812 has joined #ruby
jeebster has joined #ruby
logix812 has left #ruby [#ruby]
<shevy> ohhhh
<shevy> I see now, thanks
danman has joined #ruby
<hadees> So basically I have a hash, using Hashie::Dash, where a couple variables are empty arrays and the rest of the variables are nil but blank is returning false, i'm guessing because of the arrays.
carlyle has quit [Ping timeout: 245 seconds]
<hadees> So I just want to make blank? for my class return true in that setup
<hadees> i think it's kosher but I couldn't really find anyone doing it
GhettoCode has quit [Ping timeout: 264 seconds]
<hadees> MrZYX: ok, i guess empty is better
<hadees> Thanks
<MrZYX> makes your code more reusable outside rails
arya_ has joined #ruby
zeade has quit [Quit: Leaving.]
mockra has joined #ruby
nzee has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
theRoUS has quit [Ping timeout: 258 seconds]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
mockra_ has joined #ruby
banjara has quit [Quit: Leaving.]
banjara has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
slainer68 has joined #ruby
Arzaga has quit [Quit: Computer has gone to sleep.]
Ontolog_ has joined #ruby
etcetera has joined #ruby
chrishough has quit [Quit: chrishough]
mockra has quit [Ping timeout: 258 seconds]
mando has quit [Remote host closed the connection]
newUser1234 has quit [Remote host closed the connection]
pioz has joined #ruby
<Rym> what's peoples feelings around open source etiquette? e.g. a cool project, with bad code, relatively short (1k code max)… hack a feature onto the mess, or rewrite it?
Ontolog has quit [Ping timeout: 248 seconds]
ToApolytoXaos has quit [Quit: Leaving]
chrishough has joined #ruby
chrisnicola has joined #ruby
Guedes has quit [Remote host closed the connection]
benlieb has joined #ruby
atno has joined #ruby
headius has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
Sicp has joined #ruby
pyx has joined #ruby
pyx has quit [Client Quit]
d2dchat has quit [Remote host closed the connection]
Sicp has quit [Read error: Connection reset by peer]
jgarvey has quit [Quit: Leaving]
razibog has quit [Ping timeout: 245 seconds]
arya_ has quit [Ping timeout: 248 seconds]
chrisnicola has quit [Client Quit]
brhelwig has joined #ruby
sixty4k has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
xyzodiac has joined #ruby
netto has joined #ruby
<netto> I'm start my server with 'thin' server, and I'm getting this error: .rvm/gems/ree-1.8.7-2012.02/gems/thin-1.5.1/lib/thin/backends/tcp_server.rb:16:in `connect': no such file to load -- thin/connection (MissingSourceFile)
jcheng has joined #ruby
xargoon has quit [Quit: .]
aarush has joined #ruby
headius has quit [Quit: headius]
mikepack has quit [Remote host closed the connection]
aarush has left #ruby [#ruby]
arya has joined #ruby
<netto> can someone help me?
timmow has quit [Remote host closed the connection]
timmow has joined #ruby
monkegjinni has quit [Remote host closed the connection]
atno has quit [Remote host closed the connection]
xyzodiac has quit [Quit: Computer has gone to sleep.]
cbot_ has joined #ruby
brennanMKE has joined #ruby
<Rym> netto: does bundler exec thin … help?
<netto> no
<netto> thin --prefix /portal start
<netto> Rym:
cbot_ has quit [Max SendQ exceeded]
AlSquire has joined #ruby
cbot_ has joined #ruby
chrisnicola has joined #ruby
jrhe has joined #ruby
arya has quit [Ping timeout: 248 seconds]
whitenoise has joined #ruby
<Rym> netto: but are you using a gemfile and does it have gem 'thin' in it?
<netto> Rym: no… my Gemfile doesnt have thin. But its installed.
threesome has quit [Ping timeout: 264 seconds]
Michael__ has joined #ruby
yfeldblum has joined #ruby
<netto> Rym: I have 'thin'' in my gem list
agarie has quit [Remote host closed the connection]
<Rym> I'd give it a test if I were you :) and then try using bundle exec
danneu has joined #ruby
louism2_ has quit [Quit: This computer has gone to sleep]
Michael__ has quit [Ping timeout: 257 seconds]
SCommette has quit [Quit: SCommette]
wsterling has quit [Remote host closed the connection]
bigoldrock has quit [Ping timeout: 264 seconds]
brhelwig has quit [Remote host closed the connection]
threesome has joined #ruby
artofraw has quit [Ping timeout: 252 seconds]
artofraw has joined #ruby
phasma_ has joined #ruby
welandC has joined #ruby
danman has quit [Quit: danman]
Derander_ has joined #ruby
JaTochNietDan_ has joined #ruby
ty-mat has joined #ruby
Blue_Ice_ has joined #ruby
z_ has joined #ruby
ixti_ has joined #ruby
mnaser_ has joined #ruby
SegFaultAX_ has joined #ruby
brianpWins_ has joined #ruby
dagnachew has quit [Quit: WeeChat 0.4.0]
statarb3 has joined #ruby
sepp2k has quit [Remote host closed the connection]
zastern has joined #ruby
<zastern> So, conceptually, what makes a hash better than a 2-dimensional array?
Rix_ has joined #ruby
<MrZYX> hash[key] # => value
<zastern> oh so its just easier to reference values?
<MrZYX> also way faster than array.find {|e| e.first == key }
tubbo`work has joined #ruby
<MrZYX> .last
thisirs has joined #ruby
<MrZYX> I mean they are really different things
lupine_85 has joined #ruby
tvw has quit []
twoism has quit [Remote host closed the connection]
whitenoise has left #ruby ["Leaving"]
pioz has quit [Quit: This computer has gone to sleep]
gaahrdne_ has joined #ruby
artofraw has quit [Remote host closed the connection]
xaq has joined #ruby
i_s has quit [Quit: i_s]
sheerun has joined #ruby
LennyLinux has quit []
<sheerun> Please be so kind give +1 on this issue, I think it's a big issue https://github.com/slim-template/slim/issues/375
unstable has left #ruby [#ruby]
<markalanevans> Hey folks, how do i get the stage variable when using capistrano
<markalanevans> for example
<markalanevans> cap staging deploy
<markalanevans> is there a variable besides argv[2] that has the value staging
etcetera has quit []
AlSquire has quit [Read error: No route to host]
chrisnicola_ has joined #ruby
danneu has quit [Ping timeout: 264 seconds]
Es0teric has joined #ruby
statarb3 has quit [Quit: Leaving]
jonathanwallace1 has joined #ruby
hiroyuki has joined #ruby
brennanMKE has quit [Ping timeout: 258 seconds]
<netto> Rym: bundle exec thin --prefix /portal start -p 3000
rickmasta has joined #ruby
<Rym> netto: yeah? so it worked? :P
enebo has quit [Quit: enebo]
wyattg has quit [Quit: Konversation terminated!]
<netto> Rym: bundle exec thin --prefix /portal start -p 3000
<netto> .../.rvm/gems/ree-1.8.7-2012.02/gems/bundler-1.3.5/lib/bundler/rubygems_integration.rb:214:in `gem': thin is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
<Rym> and after you add it to the gem file, how does it look?