apeiros changed the topic of #ruby to: Ruby 2.0.0-p353: http://ruby-lang.org (Ruby 1.9.3-p484) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
yfeldblum has quit [Remote host closed the connection]
benlieb has joined #ruby
Reach has quit [Read error: Connection reset by peer]
elux has joined #ruby
mikesplain2 has joined #ruby
petey has joined #ruby
davy_ has joined #ruby
nanoyak has joined #ruby
Reach_ has joined #ruby
Bira has quit [Ping timeout: 272 seconds]
heidi has joined #ruby
tsykoduk is now known as zz_tsykoduk
Lewix has joined #ruby
Jetchisel has joined #ruby
nari has quit [Ping timeout: 260 seconds]
DeProdigy has joined #ruby
Reach_ is now known as Reach
yfeldblu_ has joined #ruby
nhhagen has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
mikepack has quit [Remote host closed the connection]
Es0teric has joined #ruby
vlad_starkov has joined #ruby
iliketur_ has joined #ruby
coca_rails has joined #ruby
nowthatsamatt has joined #ruby
VesQ has quit [Ping timeout: 246 seconds]
Sami345 has quit [Ping timeout: 260 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
blaxter has quit [Quit: KTHXBYE]
Sami345 has joined #ruby
allaire has joined #ruby
VesQ has joined #ruby
petey_ has joined #ruby
dayepa has quit [Quit: dayepa]
sheap has joined #ruby
johnnyfuchs has joined #ruby
dayepa has joined #ruby
benlieb has quit [Quit: benlieb]
<bnagy> ary.map {|e| Integer(e) rescue e}
snath has joined #ruby
pel_daniel has left #ruby [#ruby]
petey has quit [Ping timeout: 248 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
brtdv has quit []
nifty has quit [Ping timeout: 246 seconds]
komodo has quit []
petey_ has quit [Ping timeout: 272 seconds]
<xibalba> how do i get the memory location of an object ?
komodo has joined #ruby
<bnagy> with difficulty
<xibalba> in irb
<bnagy> check out FFI, you can probably do it with that
VTLob has quit [Quit: VTLob]
<xibalba> no no, irb was showing me previously
<havenwood> xibalba: Are you looking for the #object_id?
jamesaanderson has joined #ruby
<xibalba> yes. i just wanted to visualize the two separate memory locations for some strings
<xibalba> going through my eloquent ruby book right now
koopa has joined #ruby
mikesplain2 has quit [Ping timeout: 272 seconds]
jamesaanderson has quit [Client Quit]
<xibalba> ok i see object.object_id is available
shadoi1 has joined #ruby
<Mon_Ouie> That's not the actual memory location btw (you can't get that without making assumptions about how the implementation you're using works)
<bnagy> I don't think the bot has FFI :/
<bnagy> >> require 'ffi'
<eval-in_> bnagy => (https://eval.in/77754)
jkhwan has quit [Remote host closed the connection]
<xibalba> yeah the object_id isn't the memory location
<bnagy> anyway, a="foo"; FFI::MemoryPointer.new(a) => #<FFI::MemoryPointer address=0x007fbfc9d0f060 size=3>
<Mon_Ouie> When it's running MRI you can just do a bitshift
<havenwood> >> true.object_id
<eval-in_> havenwood => 2 (https://eval.in/77755)
<havenwood> >> ObjectSpace._id2ref 20
<eval-in_> havenwood => 0x000014 is not id value (RangeError) ... (https://eval.in/77756)
<havenwood> >> ObjectSpace._id2ref 2
<eval-in_> havenwood => true (https://eval.in/77757)
batchitcray has quit [Ping timeout: 260 seconds]
sheap has quit [Quit: Lost terminal]
<havenwood> >> RUBY_VERSION
<eval-in_> havenwood => "2.0.0" (https://eval.in/77758)
sheap has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
<havenwood> err, object_ids are wrong for 2.0.0, i'm confuzeles
<xibalba> i just wanted to see that ` a = new String("foo") \n b = a ' and to see they have the same memory address
mikepack has quit [Remote host closed the connection]
jamesaanderson has quit [Client Quit]
clamstar has quit [Quit: Textual IRC Client: www.textualapp.com]
<xibalba> inspect i think is what i'm looking for
VesQ has quit [Ping timeout: 246 seconds]
Sami345 has quit [Ping timeout: 260 seconds]
<Mon_Ouie> No, inspect for strings will not display the object_id
predator117 has joined #ruby
<havenwood> xibalba: I don't really know what you mean. But #inspect doesn't make sense to me.
sheap has left #ruby [#ruby]
<Mon_Ouie> It just returns the string but replacing "special" characters by escaped form of them
<havenwood> xibalba: Maybe look into #object_id and #hash.
Zai00 has quit [Quit: Zai00]
<xibalba> check those. i'm just looking for the 0x0.....memory addr
<Mon_Ouie> It's just object_id
<havenwood> xibalba: ^
<xibalba> b.object_id
<xibalba> => 12911240
<Mon_Ouie> (#hash can be the same for two distinct objects, so long as they represent the same thing)
<xibalba> so the memory location is 0x12911240 ?
<bnagy> no
<DanKnox> i think the real answer to your question is.... a = b is essentially creating a pseudo pointer to b from a... a will still technically be it's own object though
<Mon_Ouie> No, you can't know what it is, but the only object for which object_id is 12911240 is b
<xibalba> yeah i just wanted to verify the observastion via a memory address
<bnagy> do the FFI thing I showed you above
<xibalba> but the object_id is the same, so i suppose thats sufficient
<DouweM> xibalba: object_id ~ address
<xibalba> bnagy, ok
<DouweM> xibalba: yeah, that's sufficient
<bnagy> object_id is not memory address
<DouweM> bnagy: it's not, but for our purposes they're equivalent
predator217 has quit [Ping timeout: 245 seconds]
<Mon_Ouie> bnagy: 12… ≠ 0x12…
<bnagy> thanks?
<Mon_Ouie> 0x… means hexadecimal notation, 12… is the decimal representation of a number
<xibalba> any modification to a will modify b as well though
<xibalba> correct?
<DouweM> xibalba: the two vars point to the same object, so yeah
<Mon_Ouie> Yes, since there is only one object
<xibalba> how do i copy and create a new object for storing in b ?
<xibalba> a = "foo"
<xibalba> b = ....
lfox has joined #ruby
<DouweM> #clone or #dup
mootpointer has joined #ruby
virtualize has joined #ruby
<xibalba> ty
<xibalba> perfect!
<xibalba> ty fellas
komodo has quit [Ping timeout: 248 seconds]
johnnyfuchs has quit [Quit: Leaving.]
drumusician has quit [Read error: Connection reset by peer]
rushed has joined #ruby
mlpinit has joined #ruby
<xibalba> in reading the docs i'm not sure i get the diff between clone & dup
ehc has quit [Quit: ehc]
<havenwood> xibalba: clone copies singleton class and preserve freezyness
dreamchaser has quit [Ping timeout: 252 seconds]
<Mon_Ouie> >> s = "foo"; s.freeze; s.dup.frozen?
<eval-in_> Mon_Ouie => false (https://eval.in/77759)
<Mon_Ouie> >> s = "foo"; s.freeze; s.clone.frozen?
<eval-in_> Mon_Ouie => true (https://eval.in/77760)
nateberkopec has quit [Quit: Leaving...]
<havenwood> seems a lot of ruby stuff with a difference is actually two differences, a pattern repeated over and over
ner0x has joined #ruby
<xibalba> does freeze lock the object from modifcation?
<DouweM> So, you're usually looking for #dup
<Mon_Ouie> Well, it's three if you count taintedness
dkamioka has quit [Remote host closed the connection]
<havenwood> DouweM: yeah, dup ftw
<Mon_Ouie> xibalba: And yes, that's what it does
jkhwan has joined #ruby
<havenwood> Mon_Ouie: ooh, i didn't even realize, but makes sense
mary5030 has quit [Remote host closed the connection]
<bnagy> bleah FFI memorypointers don't work for that anyway, least not directly. Lame.
<xibalba> what's taintedness?
<havenwood> xibalba: something nobody uses
mlpinit has quit [Remote host closed the connection]
zz_karupanerura is now known as karupanerura
mlpinit has joined #ruby
<Mon_Ouie> If you want to know, data that come from a source you don't explicitly trust (e.g. downloaded) are marked as "tainted"
<DanKnox> it can be helpful for sites that let you try ruby code out
dreamchaser has joined #ruby
<bnagy> no
<DanKnox> yes
<Mon_Ouie> And Ruby can raise exceptions if you try to e.g. eval those
dreamchaser is now known as Guest53428
<xibalba> k thanks
<Mon_Ouie> DarkFoxDK: Such a website should use a better sandbox anyway
<bnagy> nothing built into ruby is sufficient
Lewis has joined #ruby
freakazoid0223 has joined #ruby
<Mon_Ouie> That was for DanKnox*, sorry
<DanKnox> that's why I said helpful :)
<DouweM> Huh. I've never heard of Ruby taintedness before
<bnagy> although the new SAFE levels are.. better? I guess?
<Mon_Ouie> But when you have the better mechanisms those built-in Ruby become pointless
freerobby has quit [Quit: Leaving.]
<DanKnox> true I guess... it depends on what you are doing
<DanKnox> the ruby monk guys use it
<DanKnox> and i'm out
<havenwood> DanKnox: laters
nhhagen has joined #ruby
mlpinit has quit [Client Quit]
crazysim has quit [Excess Flood]
crazysim has joined #ruby
havenn has joined #ruby
Sami345 has joined #ruby
s2013 has quit [Ping timeout: 240 seconds]
jamesaanderson has joined #ruby
musl_ has joined #ruby
joaoh82 has quit [Remote host closed the connection]
jcarouth` has joined #ruby
itamaryu has joined #ruby
Lewis has quit [Ping timeout: 272 seconds]
VesQ has joined #ruby
Voodoofish430 has quit [Read error: Connection timed out]
psyl0n has quit [Remote host closed the connection]
zzak_ has joined #ruby
itamar7 has quit [Read error: Connection reset by peer]
jcarouth has quit [Excess Flood]
v0n has quit [Ping timeout: 250 seconds]
pwestlund_away has quit [Ping timeout: 250 seconds]
zzak has quit [Ping timeout: 250 seconds]
itamaryu is now known as itamar7
musl has quit [Ping timeout: 250 seconds]
spike|spiegel has quit [Ping timeout: 250 seconds]
coca_rails has quit [Remote host closed the connection]
dennie has quit [Ping timeout: 250 seconds]
thezanke has quit [Ping timeout: 250 seconds]
emocakes_ has joined #ruby
kostine has quit [Quit: kostine]
havenwood has quit [Ping timeout: 240 seconds]
spike|spiegel has joined #ruby
<DouweM> And I'm off as well, cya
hogeo has joined #ruby
withnale_ has joined #ruby
nhhagen has quit [Ping timeout: 272 seconds]
pwestlund_away has joined #ruby
pwestlund_away is now known as pwestlund
blaskovicz has quit [Quit: Leaving.]
olivier_bK has quit [Ping timeout: 252 seconds]
dzan has joined #ruby
emocakes has quit [Ping timeout: 272 seconds]
thezanke has joined #ruby
pdtpatri1k has joined #ruby
havenn has quit [Ping timeout: 272 seconds]
Voodoofish430 has joined #ruby
coca_rails has joined #ruby
bklane has joined #ruby
Columcil1e has joined #ruby
three18t- has joined #ruby
kofno_ has joined #ruby
noxgirl has joined #ruby
TorpedoSkyline_ has joined #ruby
AntelopeSalad_ has joined #ruby
OdNairy_ has joined #ruby
n88_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
matti_ has joined #ruby
thumpba has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
gf3_ has joined #ruby
spacemud_ has joined #ruby
bklane has joined #ruby
KevinSjoberg_ has joined #ruby
SeySayux_ has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
uxp_ has joined #ruby
bakingbread has joined #ruby
_maes_ has joined #ruby
dzan_ has quit [Ping timeout: 250 seconds]
pdtpatrick has quit [Ping timeout: 250 seconds]
bakingbread is now known as Guest5622
vadviktor_ has joined #ruby
OdNairy has quit [Ping timeout: 250 seconds]
DanielRb has quit [Ping timeout: 250 seconds]
three18ti has quit [Ping timeout: 250 seconds]
TorpedoSkyline has quit [Ping timeout: 250 seconds]
autumn has quit [Ping timeout: 250 seconds]
SeySayux has quit [Ping timeout: 250 seconds]
kofno has quit [Ping timeout: 250 seconds]
matti has quit [Ping timeout: 250 seconds]
withnale has quit [Ping timeout: 250 seconds]
n88 has quit [Ping timeout: 250 seconds]
KevinSjoberg has quit [Ping timeout: 250 seconds]
AntelopeSalad has quit [Remote host closed the connection]
`ph8 has quit [Ping timeout: 250 seconds]
shevy has quit [Ping timeout: 250 seconds]
spacemud has quit [Ping timeout: 250 seconds]
Columcille has quit [Ping timeout: 250 seconds]
gf3 has quit [Ping timeout: 250 seconds]
spacemud_ is now known as spacemud
gf3_ is now known as gf3
deepy- has quit [Excess Flood]
dh64 has quit [Ping timeout: 250 seconds]
vadviktor has quit [Ping timeout: 250 seconds]
uxp has quit [Remote host closed the connection]
icedp has quit [Ping timeout: 250 seconds]
matti_ is now known as matti
sumark has quit [Ping timeout: 250 seconds]
sumark has joined #ruby
kostine has joined #ruby
v0n has joined #ruby
zeade1 has joined #ruby
m_3_ has joined #ruby
AntelopeSalad_ is now known as AntelopeSalad
Eiam has quit [Ping timeout: 260 seconds]
linduxed has joined #ruby
bradhe has quit [Remote host closed the connection]
nari has joined #ruby
bklane has quit [Ping timeout: 272 seconds]
BraddBitt has joined #ruby
rootshift has joined #ruby
ph8 has joined #ruby
zeade has quit [Ping timeout: 245 seconds]
deepy has joined #ruby
deepy is now known as Guest36979
Guest5622 has quit [Quit: _]
icedp has joined #ruby
dennie has joined #ruby
virtualize has quit [Quit: Leaving...]
joaoh82 has joined #ruby
BraddPitt has quit [Ping timeout: 265 seconds]
p4d4w4n has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
tylersmith has quit [Remote host closed the connection]
mk_qi has joined #ruby
thumpba has joined #ruby
code-cat has joined #ruby
Hanmac1 has joined #ruby
<code-cat> hi, have anyone ever run into using Find.find() to search trough a directory, and deleted files still show up on find function?
<code-cat> through*
komodo has joined #ruby
tidu12 has quit [Quit: Textual IRC Client: www.textualapp.com]
shevy has joined #ruby
Hanmac has quit [Ping timeout: 265 seconds]
b00stfr3ak has quit [*.net *.split]
m_3 has quit [*.net *.split]
robustus has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby
thumpba has quit [Remote host closed the connection]
pwh has quit [Ping timeout: 252 seconds]
valesk has joined #ruby
shadoi1 has quit [Quit: Leaving.]
timonv has quit [Ping timeout: 272 seconds]
mercwithamouth has joined #ruby
lyanchih has joined #ruby
thumpba has joined #ruby
Megtastique has joined #ruby
p4d4w4n has joined #ruby
havenwood has joined #ruby
pwh has joined #ruby
robustus has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
nateberkopec has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
code-cat has left #ruby ["Leaving..."]
hogeo has quit [Remote host closed the connection]
nateberkopec has quit [Read error: Connection reset by peer]
JJMalina has joined #ruby
bklane has joined #ruby
tkuchiki has joined #ruby
Monie has joined #ruby
Monie has quit [Max SendQ exceeded]
<ArchBeOS> Hey Guys, im trying to do an attr_accessor for an array but when I try to add something to it I get an error. undefined method for <<. Here is my pastie
dhruvasagar has quit [Ping timeout: 240 seconds]
Monie has joined #ruby
Monie has quit [Max SendQ exceeded]
dennie has quit [Remote host closed the connection]
coca_rails has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Monie has joined #ruby
<sevenseacat> whats the full error?
ssvo_ has quit [Ping timeout: 272 seconds]
<sevenseacat> you misspelt initialize
<sevenseacat> so your @images would be nil
bradhe has joined #ruby
stevenhaddox has joined #ruby
joaoh82 has quit [Remote host closed the connection]
m__s has quit [Ping timeout: 260 seconds]
zz_tsykoduk is now known as tsykoduk
Sami345 has quit [Ping timeout: 260 seconds]
virtualize has joined #ruby
VesQ has quit [Ping timeout: 246 seconds]
JJMalina has quit [Ping timeout: 272 seconds]
mgberlin has joined #ruby
kevind has quit [Remote host closed the connection]
<mgberlin> h3po4.phosphor
pkrnj has quit [Quit: Textual IRC Client: www.textualapp.com]
coca_rai_ has joined #ruby
ephemerian has quit [Quit: Leaving.]
michaeldeol has joined #ruby
marr has quit [Ping timeout: 241 seconds]
sailias has joined #ruby
bradhe has quit [Ping timeout: 272 seconds]
<ArchBeOS> sevenseacat: i feel silly now
p4d4w4n has quit [Quit: This computer has gone to sleep]
iliketur_ has quit [Quit: zzzzz…..]
rootshift has quit [Quit: rootshift]
casheew has quit [Read error: Connection reset by peer]
iamjarvo_ has joined #ruby
casheew has joined #ruby
toretore has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Ping timeout: 260 seconds]
ItSAN____ has quit [Read error: Connection reset by peer]
toretore has joined #ruby
lmickh has quit [Quit: lmickh]
sec^nd has quit [Ping timeout: 240 seconds]
ItSANgo has joined #ruby
m__s has joined #ruby
sailias has quit [Ping timeout: 248 seconds]
nobitanobi has joined #ruby
aryaching has quit []
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
gyre007_ has quit [Remote host closed the connection]
BeanDip__ has quit [Quit: No Ping reply in 180 seconds.]
sevenseacat has quit [Ping timeout: 240 seconds]
psyl0n has joined #ruby
VesQ has joined #ruby
plotter has quit [Quit: Leaving]
carlyle has joined #ruby
BeanDip has joined #ruby
brianpWins has quit [Quit: brianpWins]
superscott[8] has joined #ruby
DanielRb has joined #ruby
pdtpatri1k has quit [Quit: leaving]
pdtpatrick has joined #ruby
Sami345 has joined #ruby
Mattias has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
jamesaanderson has joined #ruby
p4d4w4n has joined #ruby
mgberlin has quit [Quit: mgberlin]
nobitanobi has quit [Read error: Connection reset by peer]
aapzak has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
Mattias has joined #ruby
aapzak has joined #ruby
valesk has quit [Remote host closed the connection]
carlyle has quit []
roolo has quit [Quit: Leaving...]
bradhe has quit [Remote host closed the connection]
gstamp has quit [Ping timeout: 256 seconds]
zeade1 has quit [Quit: Leaving.]
coca_rai_ has quit [Remote host closed the connection]
havenwood has quit [Ping timeout: 240 seconds]
coca_rails has joined #ruby
Megtastique has quit []
ehaliewicz has quit [Remote host closed the connection]
kevinykchan has joined #ruby
gstamp has joined #ruby
valesk has joined #ruby
user5555 has joined #ruby
sevenseacat has joined #ruby
nhhagen has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
<user5555> So, if I am looking to have an if statment with a bunch of conditions like this: if x!= "and" || "for" || "the", how am I suppose to make something like that work while avoiding doing a bunch of if statements? I could do a million if statements, but it would look stupid.
koopa has quit [Ping timeout: 260 seconds]
closures999 has joined #ruby
charliesome has joined #ruby
Reach has quit [Remote host closed the connection]
sailias has joined #ruby
Megtastique has joined #ruby
nhhagen has quit [Remote host closed the connection]
<mootpointer> user5555: I'd pull it out into different methods which allow you to express clearly what's going on.
<user5555> hello?
<mootpointer> Patience :)
<user5555> I'm simply looking to do this within one method. Its a simple conditional.
Megtastique has quit [Client Quit]
<user5555> Instead of laying out a million conditionals.
<user5555> I want to do it all one one line, it is going on within a method? What are you talking about?
<mootpointer> It doesn't seem like a *simple* conditional.
fandikurnia01 has joined #ruby
<user5555> I'm looking to say if x does not contain one of those words, then do that.
<user5555> Its pretty simple, no?
niklasb has quit [Ping timeout: 272 seconds]
<user5555> How do you do that in one line?
falood has joined #ruby
<user5555> Or are you familiar with this?
<mootpointer> I'd still push it out into a method.
flubba has quit [Remote host closed the connection]
<mootpointer> You could do something like this:
<user5555> What are you talking about "push it into a method"
<davy_> unless ["and", "for", "the"].include?(x)
<user5555> IC, so use include?
mickthenick has joined #ruby
<user5555> That actually seems better
<user5555> Thanks
<davy_> def is_unwanted_word x; ["and", "for", "the"].include?(x); end;
<user5555> Sorry, I don't know why I didn't think about that.
<davy_> unless is_unwanted_word x
<mootpointer> davy_: +1
<kostine> unless is unwanted ... :)
<mootpointer> Although I'd consider losing the "is_" :)
<davy_> ;)
<davy_> yeah, I'd totally rename and rearrange
<davy_> but that matched more closely with original example
<mootpointer> It means that you can extend your list of words easily.
<user5555> Yeah, I'm just playing around with ruby right now.
<kostine> if banned(x) maybe
<user5555> So, I will check the docs for unless.
vlad_starkov has quit [Read error: Connection reset by peer]
<kostine> and banned return true if its there
<davy_> yep, you'd want to pull the array out of the method too
<mootpointer> The domain term would tend to be "stopword"
joaoh82 has joined #ruby
<kostine> array could be result of a method or a constant if it doesn't change
bklane has quit [Remote host closed the connection]
phipes has joined #ruby
Megtastique has joined #ruby
<davy_> even if constant I'd still pull out of the method
<kostine> if bad_bad_word(x)
<davy_> BANNED_WORDS = [list]
bklane has joined #ruby
virtualize has quit [Quit: Leaving...]
<mootpointer> In the end, I think it would probably be a method since it would be likely driven by a config file
mercwithamouth has quit [Ping timeout: 240 seconds]
superscott[8] has quit [Quit: superscott[8]]
<mootpointer> Having done the stop-wording game before...
hogeo has joined #ruby
<davy_> yeah, that definitely seems like the right thing to do
mickthenick has quit [Client Quit]
sec^nd has joined #ruby
ldnunes has quit [Quit: Leaving]
belak has joined #ruby
<belak> Are there any good ruby wrappers for C++?
chrisja has quit [Quit: leaving]
Columcil1e is now known as Columcille
Reach has joined #ruby
komodo has quit [Ping timeout: 240 seconds]
mickthenick has joined #ruby
ElasticElephant has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0.1/20131112160018]]
bklane has quit [Ping timeout: 260 seconds]
<bnagy> no there is only swig
ArchBeOS has quit [Quit: Konversation terminated!]
<bnagy> you can use FFI if it has a C api
sergicles has joined #ruby
petey has joined #ruby
mickthenick has quit [Client Quit]
bklane has joined #ruby
troyready has quit [Ping timeout: 245 seconds]
petey has quit [Remote host closed the connection]
DouweM has quit [Ping timeout: 248 seconds]
<user5555> K, I really gave some things a try. I made it so the method works that I'm looking to do. However, I have a bunch of repeating if, elsif, elsif, else stuff going on.
coca_rails has joined #ruby
joaoh82 has quit [Ping timeout: 272 seconds]
<user5555> If you have a bunch of if elsif stuff going on, is there a method or something that can help avoid this?
joaoh82 has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
nwertman has quit [Ping timeout: 272 seconds]
mickthenick has joined #ruby
lfox has quit [Quit: ZZZzzz…]
<bnagy> case
<kostine> and yank logic into methods
<rjhunter> user5555: if you paste some code, we can offer suggestions more specific to your circumstance
sepp2k1 has quit [Quit: Leaving.]
IceDragon has quit [Ping timeout: 252 seconds]
<user5555> Ok, I will try to paste it, one second.
<kostine> in a gist or pasty
IceDragon has joined #ruby
<user5555> word.scan(/\w+/).each do |word| if word.include?("and") && rounds!=0 array<<word rounds+=1 elsif word.include?("or") && rounds!=0 array<<word rounds+=1 elsif word.include?("the") && rounds!=0 array<<word rounds+=1 elsif word.include?("over") && rounds!=0 array<<word rounds+=1 else array<<word.capitalize rounds+=1 end end
batchitcray has joined #ruby
<user5555> LOLZ
<user5555> lets try this again.
<mootpointer> user5555: Don
<mootpointer> Don't paste it in here.
<rjhunter> user5555: in a gist, please, not in the channel
<user5555> mootpointer: I see that now :P.
<mootpointer> Use gist.github.com
b00stfr3ak has quit [Ping timeout: 260 seconds]
<user5555> This is a snippet that is inside a method
<user5555> Word is a string
tsykoduk is now known as zz_tsykoduk
mickthenick has quit [Client Quit]
<mootpointer> Okay. Definitely some things we can do here :)
<rjhunter> user5555: you can definitely simplify your logic
<user5555> PS: Try not to post publicly, I am doing this for homework.
<kostine> i am out :)
<user5555> I dont want to be accussed of cheating, since I technically have solved this and it works.
p4d4w4n has quit [Quit: This computer has gone to sleep]
p4d4w4n has joined #ruby
<mootpointer> user5555: I don't know how I feel about doing your homework for you.
<kostine> word.scan ... each do |word|
virtualize has joined #ruby
<user5555> mootpointer: Again, I already solved the problem.
<user5555> mootpointer: I'm looking to make it better.
<davy_> solved and optimized are different
it_tard has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
<kostine> first one should prob be a sentence or words not word
<davy_> you'll get more points if it's better
<davy_> hence, we'd still be doing your work for you
it_tard has joined #ruby
xcv has quit [Remote host closed the connection]
it_tard has quit [Changing host]
it_tard has joined #ruby
<mootpointer> user5555: I realise that. Still I'd rather try and push you in the right direction instead of rewriting it wholesale.
<davy_> I do feel comfortable telling you vaguely what areas you should think about more
psyl0n has quit [Remote host closed the connection]
nanoyak has quit [Ping timeout: 260 seconds]
<rjhunter> user5555: the first thing i notice is that you've got a lot of repeating inside your conditions
<davy_> for example, I don't think you understand how powerful included? is
xcv has joined #ruby
45PAAS1GI has joined #ruby
45PAAS1GI has quit [Remote host closed the connection]
<user5555> rjhunter: Yes, this is how I know this code can be better.
mkevin has joined #ruby
<user5555> rjhunter: Repeating usually means something can be done better.
<davy_> and by included? I mean include? of course
<kostine> you breaking it into words and then checking if word include word?
<kostine> that works?
<kostine> why not just ==
<davy_> second, what is rounds doing, needing to keep track of that info prob means you aren't rubying right ;)
CpuID has quit [Quit: This computer has gone to sleep]
<user5555> kostine: They do the same thing
<mootpointer> kostine: I think we may be responsible for that one.
<user5555> mootpointer: They acheive the same thing
<davy_> user5555: no they don't
<davy_> see my comment
<mootpointer> Whether they are clear about their intentions is another thing.
<rjhunter> >> ['cheese', 'milk', 'cream'].include? 'bread'
<eval-in_> rjhunter => false (https://eval.in/77784)
<user5555> round=0
<rjhunter> >> ['cheese', 'milk', 'cream'].include? 'milk'
<eval-in_> rjhunter => true (https://eval.in/77785)
<user5555> So, round basically means once it goes above 0
hackeron_ has quit [Ping timeout: 260 seconds]
<kostine> break sentence into words, only capitalize non stop words?
<user5555> It ignores the first word
mercwithamouth has joined #ruby
p4d4w4n has quit [Client Quit]
<bnagy> rjhunter: I think this is String#include though :/
hackeron has joined #ruby
gyre007 has joined #ruby
<rjhunter> bnagy: yeah, I don't think String#include? is what he wants (although it kinda works)
<user5555> Basically, here is what it is successfully achieving.
<kostine> what dis it supposed to do
rushed has quit [Read error: Connection reset by peer]
xcv has quit [Ping timeout: 248 seconds]
<user5555> It turns a texted into capitalized words. Unless they are one of those words.
rushed has joined #ruby
ewnd9 has joined #ruby
<user5555> Also, if one of those words is in the first position.
joaoh82 has quit []
<user5555> Then it will do that, because round will equal zero then.
<user5555> It capitalizes
chomskiii has quit [Ping timeout: 246 seconds]
<user5555> It then adds one and move on.
phipes has quit [Remote host closed the connection]
<user5555> So I guess +=1 isn't necessary in the other parts.
<user5555> Ok, here is what I would rather have instead of an answer.
stevenhaddox has quit [Quit: Zzzz...]
<user5555> Could someone guide me to a page basically explaining in a situation like this how to avoid so many damn if elsif stuff?
<rjhunter> user5555: when i mentioned earlier that the code had duplication *inside conditions*, you can reduce duplication by moving it outside the condition
<user5555> rjhunter: Are you talking about basically putting it in another method then?
<bnagy> user5555: %w(blah bloo blee wah).any? {|s| word.include? s}
mickthenick has joined #ruby
<bnagy> I suspect the whole thing is a oneliner though
Authenticator has joined #ruby
fijimunkii has joined #ruby
colonolGron has quit [Quit: leaving]
<user5555> Ok, here is my big question.
<mootpointer> I don't think there's a page.
<mootpointer> Problems come in many different shapes and sizes.
<rjhunter> user5555: not necessarily. consider that `rounds += 1` happens at the end of every branch. if it happens at the end anyway, why not move it to after the `if/end` section
CpuID has joined #ruby
<user5555> rjhunter: I deleted that and just left it in the else part.
<user5555> rjhunter: It will only fire there anyways.
Loaft has quit [Ping timeout: 264 seconds]
<rjhunter> user5555: the technique (observe "unconditional conditions", move them to outside) is a useful general technique
koopa has joined #ruby
koopa has quit [Client Quit]
<bnagy> if you have an exceptional condition for only the very first word, deal with that immediately
<rjhunter> user5555: and probably still applies to your `rounds != 0`
virtualize has quit [Quit: Leaving...]
maletor has quit [Quit: Computer has gone to sleep.]
ewnd9 has quit [Ping timeout: 260 seconds]
<bnagy> also probably you can just rewrite this as a map
<davy_> user5555: you are spending a lot of code checking for something when you know it's only going to affect the first word.
<kostine> "one twe test blue".capitalize.split(" ").map{ |x| ['test'].include?(x) ? x:x.capitalize }.join(" ")
nateberkopec has joined #ruby
tylersmith has joined #ruby
belak has left #ruby [#ruby]
psyl0n has joined #ruby
peregrine81 has joined #ruby
<user5555> Sorry, also when I say homework, I meant for myself. Nevermind, I will try to solve it myself. I am lost.
<user5555> But I guess I will just try to go on docs or something.
<rjhunter> when you have a nest of complicated logic (if/else etc), the general thing you're looking for is to identify which bits are the same and which bits are different
<user5555> I figured there is some page out there that helps avoid this if else repeating
<user5555> The code solves my problem.
<davy_> user5555: spend some time reading the enumerable module docs
<user5555> But, I am just trying to clean it up, and I already did clean it up somewhat.
allaire has quit []
havenwood has joined #ruby
dhruvasagar has quit [Read error: Operation timed out]
<bnagy> user5555: I already put ^^ up there a line that can compress those 4 elsifs
hamakn has joined #ruby
<user5555> bnagy: How does "%w(blah bloo blee wah).any? {|s| word.include? s}" solve what my thing does?
vlad_starkov has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<user5555> I'll try it in IRb
<user5555> But I dont' think it is doing the same thing.
<bnagy> user5555: it is :)
mickthenick has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
hamakn has joined #ruby
bbloom has quit [Read error: Connection reset by peer]
<bnagy> apart from the actual words involved, obviously
<user5555> Can someone else confirm this, not that I don't believe bnagy. I'm just not seeing it.
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kostine> here is a one line that does it all
hamakn has quit [Read error: Connection reset by peer]
<kostine> "one twe test blue".capitalize.split(" ").map{ |x| ['test'].include?(x) ? x:x.capitalize }.join(" ")
<davy_> kostine: don't just solve his homework for him
<bnagy> boo ternary
hamakn has joined #ruby
<rjhunter> booo
<kostine> :)
maroloccio has joined #ruby
<user5555> davy_: Its not "homework" for a class, its homework that I set for myself to learn ruby.
batchitcray has quit [Read error: Connection reset by peer]
<bnagy> which is why you care if we post solutions publicly
Loaft has joined #ruby
<sevenseacat> even more reason for us not to do it for you
<davy_> user5555: you say that now, but that's not what it sounded like earlier ;)
batchitcray has joined #ruby
<user5555> davy_: Sorry for using the word, I forgot that is associated with school, I graduated and have full time job now, lolz.
<kostine> :/
<bnagy> lolz OK WE BELIEVE YOU
<sevenseacat> you dont learn anything if we do it for you
mickthenick has joined #ruby
<davy_> user5555: read enumerable! =D it is the best and will help solve lots of your problems
tylersmith has quit [Ping timeout: 272 seconds]
<user5555> enumerables on ruby docs?
<davy_> yup
<mootpointer> "<user5555> I dont want to be accussed of cheating, since I technically have solved this and it works."
<davy_> there is a module called Enumerable
iliketur_ has joined #ruby
<mootpointer> I have a confuse.
<davy_> it's used within Array and other things you might want to loop over
<davy_> it has cool things
<user5555> mootpointer: I mainly do this because it achieves exactly this.
<user5555> mootpointer: If I say something else, people just give me the answer.
justsee has joined #ruby
justsee has joined #ruby
casheew_ has joined #ruby
<mootpointer> Enumerable ftw.
Patchou has quit [Read error: Connection reset by peer]
<davy_> play around with Enumerable methods in irb
<davy_> you can use arrays
<user5555> mootpointer: But the flip sid also happens.
<user5555> mootpointer: People can also be too condicending and not want to help if I say it too :/.
brianpWins has joined #ruby
<mootpointer> "I don't want the answer, I just want you to point me in the right direction" seems like a viable middle ground.
<user5555> mootpointer: So, I guess I don't know how to word it to not give me the answer, but also help me find the answer :/.
xea has quit [Ping timeout: 252 seconds]
<bnagy> or just think you're lying through your teeth
fdelacruz has joined #ruby
mickthenick has quit [Client Quit]
<bnagy> 09:43 < user5555> PS: Try not to post publicly, I am doing this for homework.
<user5555> bnagy: If I was lieing, I would just say nothing.
<sevenseacat> now now
<user5555> bnagy: Get the answer and move on O.o.
* mootpointer shuffles off.
<davy_> ANYWAY, back to helping you learn things
xea has joined #ruby
<rjhunter> user5555: for the general case of complicated if/else structures, refactorings like "Replace nested conditional with guard clauses" and "Decompose conditional" are the general case (look 'em up, they apply in any language)
<davy_> rjhunter has been saying some smart things
tylershi_ has joined #ruby
gyre007 has quit [Remote host closed the connection]
araujo has quit [Read error: Connection reset by peer]
<user5555> rjhunter: I will google that, one second.
iamjarvo_ has quit [Remote host closed the connection]
casheew has quit [Ping timeout: 248 seconds]
flubba has joined #ruby
iamjarvo_ has joined #ruby
Tamae has joined #ruby
Hanmac1 has quit [Ping timeout: 248 seconds]
Voodoofish430 has quit [Ping timeout: 248 seconds]
predator117 has quit [Ping timeout: 248 seconds]
ambushsabre has quit [Ping timeout: 248 seconds]
tylershipe has quit [Read error: Connection reset by peer]
bricker`1ork has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
closures999 has quit [Ping timeout: 248 seconds]
bricker`work has quit [Ping timeout: 248 seconds]
g0bl1n has quit [Ping timeout: 248 seconds]
Elfix has quit [Ping timeout: 245 seconds]
momomomomo has joined #ruby
Styles has joined #ruby
predator117 has joined #ruby
freggles has quit [Remote host closed the connection]
<Styles> Hey guys I"m using RVM to install ruby and am running into an issue
g0bl1n has joined #ruby
<rjhunter> Styles: do you see an error message?
<Styles> rvm use system but it's not linking right. It's going to /usr/local/rvm/bin/ruby
closures999 has joined #ruby
ambushsabre has joined #ruby
<Styles> instead of /usr/bin/ruby
Elfix has joined #ruby
Voodoofish430 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
plotter has joined #ruby
plotter has joined #ruby
plotter has quit [Changing host]
Hanmac has joined #ruby
<mootpointer> Isn't rvm just a shim?
<Styles> I have no idea
<mootpointer> So it will still point to the same place.
<Styles> I need this for flvtool2
<bnagy> no chruby does shims
nifty has joined #ruby
<mootpointer> Yeah. It's been a long time since I've used rvm.
noob101 has joined #ruby
davy_ has quit [Remote host closed the connection]
<bnagy> rvm is.. :<
Styles has left #ruby ["Leaving"]
Styles has joined #ruby
<Styles> Well ruby on RPM forge is broken
<Styles> soooooooo
<noob101> How do I have random numbers 1-11 using rand?
<noob101> Any suggestions please.
<Styles> I need 1.9.3
iamjarvo_ has quit [Ping timeout: 260 seconds]
shadoi1 has joined #ruby
<bnagy> >> rand(1..11)
<eval-in_> bnagy => 7 (https://eval.in/77787)
<noob101> How do I have random numbers 1-11 using rand? Any suggestions please?
<bnagy> Styles: do you really need a systemwide install?
<nifty> Styles: is there a problem with using RVM/rbenv/compiling from source?
<noob101> rand(1,11) doesn't work.
<Styles> bnagy, yeah flvtool2 requires it
<bnagy> imho, and this is controversial, rvm is a bad choice, ESPECIALLY for systemwide
<Styles> nifty, not exactly I just have RVM installed already :p
<bnagy> I would go with a distro package
<bnagy> otherwise chruby
<sevenseacat> i'd go with chruby :)
<nifty> noob101: try rand(1..11)
<Styles> CentOS didin't have one and RPMForge is broken
<Styles> chruby?
<bnagy> least that's a much simpler path switcher
<nifty> a number .. a number is a range
<bnagy> hahah centos
<nifty> rand expects a range
<nifty> ;)
<bnagy> sorry :(
<noob101> nifty thank you, You are a life saver!!!!
<noob101> Thank you nifty nifty!
<nifty> bangy: I thought it might be local just for development
<nifty> no problem nood101
Hanmac1 has joined #ruby
shadoi1 has quit [Ping timeout: 245 seconds]
<nifty> Styles: Why won't compiling from source work? Just curious what issues you might have for my own reference.
justsee has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 272 seconds]
yfeldblu_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
nomenkun_ has joined #ruby
<bnagy> there's even an rpm thing that makes rpms out of source tarballs afair
havenwood has joined #ruby
justsee has joined #ruby
<noob101> I am having trouble with defining my own methods. Any recommendations?
<sevenseacat> def method_name; end ?
<bnagy> landscape gerdening
momomomomo has quit [Quit: momomomomo]
<sevenseacat> lol
<bnagy> *gardening
nomenku__ has joined #ruby
<bnagy> it's outdoor work, the pay is OK...
jkhwan has quit [Remote host closed the connection]
<rjhunter> noob101: what kind of trouble are you having?
<noob101> It's confusing.^
araujo has joined #ruby
<noob101> I'll try to define my own method right now.
<noob101> Tell me if this is correct.
jkhwan has joined #ruby
<bnagy> weeks this has been going on
culturelabs has joined #ruby
phipes has joined #ruby
<sevenseacat> poor bnagy.
<noob101> def dealer(user_cards)
<noob101> user_cards + rand(1..11)
Loaft has quit [Ping timeout: 272 seconds]
<noob101> end
<sevenseacat> and the problem is?
nomenkun has joined #ruby
<rjhunter> noob101: that's correct syntax
CaptainJet has quit [Read error: Connection reset by peer]
<noob101> I am working on a game, 21. I am trying to excersize my programming skills.
<noob101> I am only 16.
<noob101> Oh really?
havenwood has quit [Ping timeout: 240 seconds]
<noob101> How can a user use my method?
flubba has quit [Remote host closed the connection]
<rjhunter> noob101: it might not do what you expect it to do, but it's syntactically correct
nomenkun_ has quit [Ping timeout: 272 seconds]
<kostine> thats funny i wrote a blackjack game in ruby to test some math a while back :)
<rjhunter> noob101: dealer(7)
echevemaster has quit [Quit: Leaving]
<rjhunter> noob101: puts dealer(7)
<noob101> Wait .
<noob101> I don't need to use gets.chomp or something?
<sevenseacat> or something, indeed
neoice has joined #ruby
gyzmodo has joined #ruby
falood has quit [Remote host closed the connection]
CaptainJet has joined #ruby
<rjhunter> noob101: gets is for taking input and putting it into your Ruby code (like a variable)
agent_white has quit [Quit: Lost terminal]
nhhagen has joined #ruby
nomenku__ has quit [Ping timeout: 272 seconds]
coca_rails has quit [Remote host closed the connection]
<noob101> I think I will need to paste my code up here.
Loaft has joined #ruby
<noob101> I need to work on it.
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sergicles has quit [Quit: sergicles]
<rjhunter> noob101: what resources are you using to learn programming?
jkhwan has quit [Ping timeout: 272 seconds]
dhruvasagar has joined #ruby
phipes has quit [Read error: Connection reset by peer]
phipes_ has joined #ruby
<noob101> LearnStreet
agent_white has joined #ruby
<noob101> I went to CodeNow
closures999 has quit [Ping timeout: 240 seconds]
bogeyd6 has joined #ruby
jcarouth` is now known as jcarouth
nomenkun has quit [Ping timeout: 260 seconds]
<noob101> I use codecademy
<noob101> CodeNow = A non profit orgranization that teaches young adults how to code for free I attended their program for 6 weeks and got a free laptop
withnale_ has quit [Read error: Operation timed out]
<noob101> rjhunter, how do I make sure if someone uses my program, whatever input they put, it will be stored in my temporary variable in my defined method?
closures999 has joined #ruby
raphaelivan has joined #ruby
<sevenseacat> you dont have a temporary variable
zzak_ is now known as zzak
<sevenseacat> and you're not storing anything
kobain_ has joined #ruby
withnale has joined #ruby
<sevenseacat> 6 weeks and you didnt learn this stuff?
<noob101> sevenseacat how much can you learn in 6 weeks, I was working on new stuff. I am relatively new to programming.
eka has quit [Quit: Computer has gone to sleep.]
<rjhunter> noob101: variables work the same way no matter what you put in them -- math, user input, or calling a method
kobain has quit [Read error: Connection reset by peer]
<noob101> I did activities and projects.
<rjhunter> noob101: my_var = 1
<rjhunter> noob101: my_var = 'hello'
<rjhunter> noob101: my_var = gets
<rjhunter> noob101: those all store a value in the variable called `my_var`
<noob101> rjhunter, I will give you an example.
komodo has joined #ruby
<noob101> I want to develop a method that it's purpose is to be a command.
nhhagen has quit [Ping timeout: 252 seconds]
<noob101> I am developing this game called 21, everyone is familar with it.
<rjhunter> noob101: be careful, methods and commands are quite different things
vlad_starkov has quit [Read error: Connection reset by peer]
<noob101> Gotchya, like I was stating.
rezzack has quit [Quit: Leaving.]
<noob101> If the user puts "h", the method would run I guess so whatever value the variable is for the cards he has then it would increase.
fdelacruz has quit [Quit: EPIC5-1.1.6[1699] - amnesiac : WHAT? THE ROOF IS ON FIRE?]
raphaelivan has quit [Client Quit]
<noob101> Example : If he has 10 as his value of cards and he puts in an input of "h" = hit, it would call a method I guess and add more value
nifty has quit [Ping timeout: 240 seconds]
cgcardona_ has joined #ruby
<noob101> the method would include a rand which would randomly give him any number 1-11 since those are the values in the game of 21.
<noob101> Are you with me rjhunter, I hope so.
vpretzel has quit [Quit: Adios!]
<bnagy> popcorn.gif
<rjhunter> noob101: OK, it sounds like you've got a reasonable idea of what you want. There are a couple of things that might trip you up.
<noob101> great.
mickthenick has joined #ruby
timonv has joined #ruby
kaiza has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
mercwithamouth has quit [Ping timeout: 248 seconds]
<cgcardona_> Hello - I'm currently using this flow with the oauth2 gem to generate an auth_token and refresh_token in the coin base api. https://gist.github.com/cgcardona/7884879 I can't seem to figure out how to turn the refresh token into fresh auth_token. Any suggestions? Thanks in advance.
mickthenick has quit [Client Quit]
lfox has joined #ruby
<rjhunter> noob101: before I get into the potential obstacles, I'll give you a couple of suggestions you might find helpful
<noob101> rjhunter. May we please chat with PM?
<noob101> Do you mind?
mgberlin has joined #ruby
<noob101> I like 1 on 1
<rjhunter> noob101: i don't PM, sorry
dseitz has joined #ruby
momomomomo has joined #ruby
<noob101> No problem. Continue please.
jwingfi has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
<pontiki> felicitation, rubyists
mickthenick has joined #ruby
tylersmith has joined #ruby
falood has joined #ruby
rburton- has joined #ruby
w4pm_ has quit [Ping timeout: 240 seconds]
falood has quit [Remote host closed the connection]
mickthenick has quit [Client Quit]
<rjhunter> noob101: The first suggestion is to try isolate any problem you have. In this case, you've described increasing variables, user input, and method calls. That's at least three separate problems, each of which could interfere with your understanding of the others.
jonathanwallace has joined #ruby
flubba has joined #ruby
echevemaster has joined #ruby
<rjhunter> noob101: Try to get a program working with increasing variables. Then try another program with user input, but no increasing variables. Then another program with method calls, but no user input and no increasing variables.
<rjhunter> noob101: Once you're comfortable with each concept separately, you can try adding in one at a time.
mkevin has quit [Quit: mkevin]
Elfix has quit [Read error: Operation timed out]
Elfix has joined #ruby
<rjhunter> noob101: When you mix the new things together, it's often hard to tell which part or parts are going wrong.
jwingfi has quit [Read error: No route to host]
fdelacruz has joined #ruby
jwingfi has joined #ruby
jpinnix has quit [Ping timeout: 252 seconds]
havenwood has joined #ruby
varfoo has joined #ruby
<noob101> rjhunter thanks a lot.
<rjhunter> noob101: I have some other advice but it'll be more useful once you've written those separate programs :-)
<noob101> Where's nifty, he is a big help to me.
jpinnix_ has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
<noob101> to be honest, I don't have time because I have school tomorrow but for another day. The advice would settle well for me.
<noob101> Thanks rjhunter.
<noob101> nifty if you can see this message please add me.
ItSANgo has joined #ruby
<rjhunter> nifty was here earlier but not right now
DeProdigy has quit [Ping timeout: 246 seconds]
mickthenick has joined #ruby
mickthenick is now known as bigbals
ambushsa_ has joined #ruby
bigbals is now known as safsd
ambushsabre has quit [Read error: Connection reset by peer]
mkevin has joined #ruby
heidi has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
sensen has joined #ruby
<user5555> Anyhow, thanks for everyones help. I am trying to learn ruby on my freetime outside work.
<user5555> I was trying to not get the answer given to me basically is all. Sorry for all the confusion :/.
jamesaanderson has joined #ruby
mkevin has quit [Client Quit]
kevinykchan has joined #ruby
user5555_ has joined #ruby
<mgberlin> so earlier today I was looking at a Project Euler solution that found the prime factorization of a number
fdelacruz has quit [Quit: EPIC5-1.1.6[1699] - amnesiac : when you're talking to yourself, and nobody's home]
<mgberlin> i can't find the code now
<mgberlin> but someone had used (0..2).find {block} in their solution
hamakn has quit [Remote host closed the connection]
<user5555_> Anyhow, tahnks for all your guys help.
<mgberlin> but range#find isn't in the documentation
virtualize has joined #ruby
<rjhunter> user5555: I hope you find what you seek. Practicing to improve the design of existing code is a long but fruitful road.
<mgberlin> can anyone tell me where to find out more about this method?
hamakn has joined #ruby
bigkevmcd has quit [Ping timeout: 264 seconds]
<user5555_> I am currently learning ruby outside work is all.
user5555 has quit [Ping timeout: 250 seconds]
iliketu__ has joined #ruby
<user5555_> So, I just try not to get the answers from people basically :).
<rjhunter> mgberlin: Range#find is actually Enumerable#find
<user5555_> Sorry for the confusion everyone :/.
<mgberlin> aha! thanks. in that case, what's a range?
<mgberlin> and is .find the same as .detect?
<rjhunter> mgberlin: 0..2 is a range, in your example above. "a series of values with a beginning and an end"
<rjhunter> mgberlin: and yes, .find is an alias for .detect
hogeo has quit [Remote host closed the connection]
<rjhunter> i forget which one is canonical
<mgberlin> okay, so what's an enumerable?
jonathanwallace has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
fijimunkii has quit [Ping timeout: 260 seconds]
iliketur_ has quit [Ping timeout: 272 seconds]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
noob101 has quit [Quit: Page closed]
<rjhunter> mgberlin: Enumerable is anything that you can ask it "OK, next value please"
<rjhunter> mgberlin: Arrays, ranges, hashes and more
jwingfi has quit [Remote host closed the connection]
<mgberlin> okay, so range is a subclass of enumerable
<mgberlin> makes sense, thanks.
<rjhunter> mgberlin: not technically a subclass in ruby, but you can think of it that way
hamakn has quit [Ping timeout: 272 seconds]
virtualize has quit [Ping timeout: 272 seconds]
<havenwood> mgberlin: rather Range includes the module Enumerable, just like Array, Hash, Struct, and Enumerator
user5555 has joined #ruby
hogeo has joined #ruby
vpretzel has joined #ruby
<rjhunter> mgberlin: if you have a custom class that should be enumerable, you can include Enumerable and make sure it responds to `each`
safsd has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
<mgberlin> would I just do that with: class Thingy < Enumerable
<havenwood> mgberlin: nope, they mixin Enumerable, they don't inherit from it
<rjhunter> mgberlin: close, with `include Enumerable`.
<havenwood> mgberlin: Enumerable is a module not a class.
<mgberlin> got it
mickthenick has joined #ruby
nateberkopec has joined #ruby
<rjhunter> mgberlin: Ruby classes only have a single parent, but can have many mixed-in modules
<mgberlin> wait so is a gem a module?
<havenwood> mgberlin: a gem could be either a module or a class
user5555_ has quit [Ping timeout: 250 seconds]
<havenwood> mgberlin: up to the gem author
<rjhunter> mgberlin: a gem is a way to package up some ruby code for distribution. doesn't have to be any particular ruby code (class, module, whatever)
bklane has left #ruby ["Leaving..."]
<rjhunter> mgberlin: a Module is a Ruby concept like a Class or a Method
ryotarai has quit [Ping timeout: 260 seconds]
<rjhunter> mgberlin: in fact, a Class happens to be a Module :-)
<rjhunter> >> Class.ancestors
<eval-in_> rjhunter => [Class, Module, Object, Kernel, BasicObject] (https://eval.in/77808)
enape_101 is now known as Apane
Apane has quit []
enape_101 has joined #ruby
enape_101 is now known as Apane
Apane has quit [Client Quit]
enape_101 has joined #ruby
w4pm has joined #ruby
Reach has quit [Read error: Connection reset by peer]
Ogion has quit [Ping timeout: 260 seconds]
platzhirsch has quit [Ping timeout: 246 seconds]
hogeo has quit [Remote host closed the connection]
felixjet__ has quit [Quit: Leaving]
user5555 has quit [Quit: Page closed]
nateberkopec has quit [Ping timeout: 272 seconds]
Reach has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
Ogion has joined #ruby
kevinykchan has quit [Ping timeout: 272 seconds]
<havenwood> mgberlin: All Classes superclass is Module (whose superclass is Object) but some Classes mixin other modules (whose class is Module). Module's class is Class.
ryotarai has joined #ruby
Hamburglr has quit [Quit: Textual IRC Client: www.textualapp.com]
<mgberlin> ohhhhh yeah?
daidoji has quit [Ping timeout: 252 seconds]
<mgberlin> i know some of those words.
<havenwood> mgberlin: It isn't easy to get a grasp on, but elegant in its design.
iliketur_ has joined #ruby
<havenwood> mgberlin: Take a look at the left side of this diagram: http://www.gliffy.com/go/publish/5152080
shoMo has quit [Ping timeout: 252 seconds]
flubba has quit [Remote host closed the connection]
kevinykchan has joined #ruby
<mgberlin> oh, i like that.
<havenwood> mgberlin: You can explore this stuff too in Pry/irb.
<havenwood> >> Module.superclass
<eval-in_> havenwood => Object (https://eval.in/77809)
<havenwood> >> Module.class
<eval-in_> havenwood => Class (https://eval.in/77810)
daidoji has joined #ruby
<mgberlin> wait, you can pull up irb on this channel?
shoMo has joined #ruby
iliketu__ has quit [Ping timeout: 260 seconds]
<havenwood> mgberlin: Well, it is a service called eval-in. Only in this channel for demonstration purposes. But you can go to eval.in and run Ruby code there (or better yet locally in Pry).
momomomomo has joined #ruby
<mgberlin> yeah, I use pry all the time, i was just impressed by that little maneuver.
falood has joined #ruby
<havenwood> mgberlin: htts://eval.in is pretty nifty, can run mruby, 1.8, 2.1, lots of options :)
<havenwood> https://eval.in **
<havenwood> MRI 1.0 >.>
mickthenick has quit [Quit: http://www.kiwiirc.com/ - A hand-crafted IRC client]
virtualize has joined #ruby
phipes_ is now known as phipes
enape_101 has quit []
bogeyd6 has quit [Ping timeout: 272 seconds]
Apane has joined #ruby
nomenkun has joined #ruby
momomomomo has quit [Quit: momomomomo]
jhn has joined #ruby
nifty has joined #ruby
nateberkopec has joined #ruby
michaeldeol has quit [Remote host closed the connection]
emocakes has joined #ruby
michaeldeol has joined #ruby
divi has joined #ruby
nocturne777 has joined #ruby
and0 has joined #ruby
justsee has quit [Quit: leaving]
nomenkun has quit [Ping timeout: 248 seconds]
justsee has joined #ruby
lfox has quit [Quit: ZZZzzz…]
nhhagen has joined #ruby
emocakes_ has quit [Ping timeout: 260 seconds]
ScottNYC has quit [Quit: Linkinus - http://linkinus.com]
divi has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 260 seconds]
nhhagen_ has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
jamesfung14 has joined #ruby
michaeldeol has quit [Ping timeout: 272 seconds]
agjacome has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
zcreative has joined #ruby
nhhagen has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
flubba has joined #ruby
momomomomo has joined #ruby
nhhagen_ has quit [Ping timeout: 240 seconds]
lmickh has joined #ruby
DrShoggoth has joined #ruby
dkamioka has joined #ruby
bogeyd6 has joined #ruby
momomomomo has quit [Client Quit]
hamakn has joined #ruby
rburton- has joined #ruby
mootpointer has quit [Quit: ENOCAFFEINE.]
hogeo has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
sailias has quit [Quit: Leaving.]
hogeo has joined #ruby
toretore has quit [Ping timeout: 248 seconds]
mootpointer has joined #ruby
v0n has quit [Ping timeout: 272 seconds]
ItSANgo has quit [Read error: Connection reset by peer]
ItSANgo has joined #ruby
hogeo has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
Arzaga has joined #ruby
kevinykchan has quit [Ping timeout: 241 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
jhn has quit [Quit: jhn]
nwertman has joined #ruby
hogeo has joined #ruby
Lewis has joined #ruby
lyanchih has quit [Quit: lyanchih]
freerobby has joined #ruby
angusiguess has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
hogeo has quit [Remote host closed the connection]
braincrash has quit [Quit: bye bye]
nifty has quit [Ping timeout: 246 seconds]
ValicekB has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
fijimunk1i has joined #ruby
t_mmyvyo is now known as tommyvyo
braincrash has joined #ruby
brianpWins has quit [Quit: brianpWins]
Arzaga has quit [Quit: Computer has gone to sleep.]
angusiguess has quit [Ping timeout: 272 seconds]
petey has joined #ruby
scruple has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
jonathanwallace has joined #ruby
hiyosi_ has quit [Ping timeout: 260 seconds]
freakazoid0223 has quit [Ping timeout: 240 seconds]
scruple has quit [Quit: Reconnecting]
scruple has joined #ruby
hogeo has joined #ruby
ValicekB has joined #ruby
scruple has quit [Client Quit]
jonathanwallace has quit [Ping timeout: 272 seconds]
bnjamin has joined #ruby
shedd has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
DeanH has joined #ruby
sayan has joined #ruby
ace_striker has joined #ruby
Authenticator has quit [Quit: leaving]
nocturne777 has quit [Quit: Leaving]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mootpointer has quit [Quit: ENOCAFFEINE.]
OdNairy_ is now known as OdNairy
LexicalScope has joined #ruby
R33C3 has joined #ruby
R33C3_ has joined #ruby
Bira has joined #ruby
Lewis_ has joined #ruby
amacgregor has quit [Ping timeout: 246 seconds]
soba has joined #ruby
reset has quit [Quit: Leaving...]
freakazoid0223 has joined #ruby
reset has joined #ruby
Lewis has quit [Ping timeout: 260 seconds]
Bira_ has quit [Ping timeout: 272 seconds]
ehc has joined #ruby
withnale has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
reset has quit [Ping timeout: 272 seconds]
timonv has quit [Read error: Operation timed out]
justsee has quit [Quit: leaving]
justsee has joined #ruby
scruple has joined #ruby
scruple has quit [Client Quit]
scruple has joined #ruby
OdNairy has quit [Ping timeout: 240 seconds]
petey has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
scruple has quit [Client Quit]
petey has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
nhhagen has joined #ruby
nifty has joined #ruby
shedd has joined #ruby
braincrash has quit [Read error: Operation timed out]
vlad_starkov has quit [Read error: Connection reset by peer]
dkamioka_ has joined #ruby
flubba has quit [Remote host closed the connection]
petey has quit [Ping timeout: 246 seconds]
bluOxigen has joined #ruby
nhhagen has quit [Ping timeout: 246 seconds]
shedd has quit [Ping timeout: 260 seconds]
justsee has quit [Quit: leaving]
dkamioka_ has quit [Ping timeout: 272 seconds]
justsee has joined #ruby
tjad has quit [Read error: Operation timed out]
nomenkun has joined #ruby
hiyosi_ has joined #ruby
s2013 has joined #ruby
butblack has joined #ruby
hogeo has quit [Remote host closed the connection]
shedd has joined #ruby
braincrash has joined #ruby
blaskovicz has joined #ruby
withnale has joined #ruby
peregrine81 has quit []
Bira has quit [Remote host closed the connection]
blaskovicz has quit [Client Quit]
nomenkun has quit [Ping timeout: 260 seconds]
hiyosi_ has quit [Ping timeout: 272 seconds]
jamesaanderson has joined #ruby
blueOxigen has joined #ruby
hogeo has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
blaskovicz has joined #ruby
sayan has quit [Read error: Connection reset by peer]
nhmood has joined #ruby
io_syl has quit []
ace_striker has quit [Ping timeout: 250 seconds]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
ace_striker has joined #ruby
<nhmood> I am trying to use Regexp.escape() but the output I am getting doesn't seem to make sense
<nhmood> When I try Regexp.escape("..") I get "\\.\\." whereas I would espect "\.\.", is there something I am missing?
blaskovicz has quit [Client Quit]
robbyoconnor has joined #ruby
<nhmood> Also, I'm noticing that using " vs ' has a difference in output for some strings ('\*?{}.' vs "\*?{}.", as posted on RubyDoc has different outputs)
bnjamin has quit [Ping timeout: 272 seconds]
sensen has quit [Ping timeout: 272 seconds]
<bnagy> >> "\\.\\.".size
<eval-in_> bnagy => 4 (https://eval.in/77874)
flubba has joined #ruby
<nhmood> bnagy: I'm not following, where is the extra \ coming from (or going??)
<bnagy> nowhere. It doesn't exist.
nifty has quit [Ping timeout: 240 seconds]
<rjhunter> nhmood: it's only showing up when you are looking at an inspectable representation of a string
dhruvasagar has joined #ruby
fmendez has quit [Quit: fmendez]
scruple has joined #ruby
hogeo has quit [Remote host closed the connection]
<nhmood> Hmm...so if I was to use that return string as my actual regex, it should work correctly?
<rjhunter> >> '\' == "\\"
<eval-in_> rjhunter => /tmp/execpad-325c46a99c5e/source-325c46a99c5e:2: unterminated string meets end of file ... (https://eval.in/77876)
s2013 has quit [Ping timeout: 260 seconds]
Arzaga has joined #ruby
<bnagy> lulz backslashes. Champagne comedy every time.
<rjhunter> oops
diegoviola has quit [Quit: WeeChat 0.4.2]
kitak_ has quit [Remote host closed the connection]
<bnagy> nhmood: yeah. What rjhunter said. You're just seeing irb saying "this is what you would need to type to get this string"
<nhmood> So if I wanted to do a #gsub on the return from Regexp.escape(), I would use the singular '\' as opposed to the '\\', or is the return string going to be in the "type to get this string" format
kitak has joined #ruby
nisstyre has quit [Quit: Leaving]
<bnagy> why would you.. whatever. There's only one backslash there.
hamakn has quit [Remote host closed the connection]
<bnagy> but if you want to tell the interpreter you're looking for a backslash you're most likely going to have to escape it
mary5030 has joined #ruby
hamakn has joined #ruby
nstdloop has joined #ruby
<bnagy> >> [92].pack('c')
<eval-in_> bnagy => "\\" (https://eval.in/77884)
<bnagy> you could do that I guess
<bnagy> (I am joking, don't do that)
<rjhunter> bnagy: it's worth clarifying jokes like that :-)
lyanchih has joined #ruby
freerobby has quit [Quit: Leaving.]
<bnagy> >> '['.succ
<eval-in_> bnagy => "\\" (https://eval.in/77887)
angusiguess has joined #ruby
vlad_starkov has joined #ruby
kitak has quit [Ping timeout: 245 seconds]
dkamioka has joined #ruby
<bnagy> >> (77^17).chr
<eval-in_> bnagy => "\\" (https://eval.in/77888)
<sevenseacat> oh ruby you so silly
hamakn has quit [Ping timeout: 246 seconds]
<bnagy> it's really hard to get \ :( even %q hates it
beardedninja has joined #ruby
IceDragon has quit [Quit: Space~~~]
<rjhunter> nhmood: to clarify, you're only seeing the "type this string" format because IRB shows you return values using 'inspect'. if you do anything to the string (like `puts` it) you'll see there's no extra \
<pontiki> >> ?\
<eval-in_> pontiki => (NilClass) ... (https://eval.in/77889)
<pontiki> figured
blueOxigen has quit [Read error: Connection reset by peer]
<nhmood> http://pastebin.kde.org/phprh54pp thats the context I am using it in
bluOxigen has joined #ruby
<nhmood> I may be doing the regex thing totally wrong
<nhmood> but I'm seeing the opposite behavior
kitak has joined #ruby
ewnd9 has joined #ruby
angusiguess has quit [Ping timeout: 246 seconds]
<nhmood> Not opposite I guess, it is as if the extra \ is actually there and it is messing up my regex down the road
<rjhunter> let's take the problem up a level or two
<pipecloud> To eleven!
ace_striker has quit [Ping timeout: 250 seconds]
<rjhunter> it sounds like you're trying to match filenames using patterns like 'src/*.cpp'
<pontiki> as an engineer, i can make that go up to twelve
<rjhunter> those patterns are called "globs"
<rjhunter> and ruby can deal with them natively
Arzaga has quit [Quit: Computer has gone to sleep.]
<rjhunter> no regexes necessary
s2013 has joined #ruby
ewnd9 has quit [Excess Flood]
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
ner0x has quit [Quit: Leaving]
<nhmood> rjhunter: I am globbing for Files / Dirs then using this regex block to ignore certain files/dirs
<nhmood> rjhunter: I guess I could roll the things that should be ignored into the initial Glob?
saarinen has quit [Quit: saarinen]
elux has quit [Quit: Leaving...]
iliketur_ has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
dkamioka has quit [Ping timeout: 248 seconds]
yfeldblum has joined #ruby
michaeldeol has joined #ruby
zz_tsykoduk is now known as tsykoduk
<pipecloud> As a supreme moral vigilant guardian, I demand it go up to 14.
mansi has quit [Ping timeout: 260 seconds]
ambushsa_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rjhunter> nhmood: Rake (which comes with Ruby these days) has a bunch of handy things for working with files and patterns: FileList['myproject/**].exclude('**/src/*.cpp')
virtualize has quit [Ping timeout: 246 seconds]
<fijimunk1i> hat
<pontiki> hey, this is accorded neutral territory, innit?
hogeo has joined #ruby
ewnd9 has joined #ruby
Megtastique has quit []
roodee has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
phansch has joined #ruby
n88_ is now known as n88
nowthatsamatt has quit [Quit: nowthatsamatt]
ewnd9 has quit [Max SendQ exceeded]
iliketur_ has joined #ruby
ewnd9 has joined #ruby
mansi has joined #ruby
lagweezle is now known as plagueweezle
ewnd9 has quit [Read error: Connection reset by peer]
gverri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ewnd9 has joined #ruby
orionstein_away is now known as orionstein
ewnd9 has quit [Max SendQ exceeded]
dhruvasagar has quit [Ping timeout: 260 seconds]
ewnd9 has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
psyl0n has quit [Remote host closed the connection]
corehook has joined #ruby
flubba has quit [Remote host closed the connection]
kevinykchan has joined #ruby
cgcardona_ has quit [Quit: cgcardona_]
tylersmith has joined #ruby
ewnd9 has joined #ruby
ace_striker has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
nateberkopec has joined #ruby
L8D has quit [Ping timeout: 272 seconds]
phipes has quit [Remote host closed the connection]
OdNairy has joined #ruby
tylersmith has quit [Ping timeout: 248 seconds]
ewnd9 has joined #ruby
mootpointer has joined #ruby
mansi has quit [Remote host closed the connection]
brianpWins has joined #ruby
nateberkopec has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
nhhagen has joined #ruby
zz_N00D is now known as CripperZ
CripperZ is now known as N00D
vlad_starkov has quit [Read error: Connection reset by peer]
corehook has quit [Quit: Leaving.]
ewnd9 has quit [Read error: Connection reset by peer]
kobain has joined #ruby
kobain_ has quit [Ping timeout: 246 seconds]
s2013 has quit [Ping timeout: 248 seconds]
lmickh has quit [Quit: lmickh]
mansi has quit [Ping timeout: 272 seconds]
freakazoid0223 has quit [Ping timeout: 240 seconds]
nhhagen has quit [Ping timeout: 252 seconds]
dkamioka has joined #ruby
ewnd9 has joined #ruby
hiyosi_ has joined #ruby
tsykoduk is now known as zz_tsykoduk
dkamioka has quit [Read error: Connection reset by peer]
g0bl1n has quit [Ping timeout: 260 seconds]
dkamioka has joined #ruby
hamakn has joined #ruby
browndawg has joined #ruby
parduse has quit [Killed (sendak.freenode.net (Nickname regained by services))]
parduse has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
Lewis_ has quit [Remote host closed the connection]
hiyosi_ has quit [Ping timeout: 260 seconds]
varfoo has quit [Ping timeout: 272 seconds]
hamakn has quit [Remote host closed the connection]
ewnd9 has joined #ruby
hamakn has joined #ruby
bnjamin has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
sensen has joined #ruby
horrorvacui has quit [Read error: Operation timed out]
hamakn has joined #ruby
kobain has quit []
hamakn has quit [Read error: Connection reset by peer]
orionstein is now known as orionstein_away
hamakn has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
dukz has joined #ruby
mary5030 has quit [Remote host closed the connection]
lyanchih has quit [Ping timeout: 260 seconds]
flubba has joined #ruby
ewnd9 has joined #ruby
lyanchih has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
sensen has quit [Ping timeout: 260 seconds]
ewnd9 has joined #ruby
dkamioka has quit [Ping timeout: 248 seconds]
kitak_ has joined #ruby
kitak has quit [Read error: Connection reset by peer]
closures999 has quit [Remote host closed the connection]
mmcdaris has joined #ruby
dukz has quit [Remote host closed the connection]
ewnd9 has quit [Max SendQ exceeded]
nhmood has quit [Quit: Page closed]
dukz has joined #ruby
ewnd9 has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
valesk has quit [Remote host closed the connection]
OdNairy has joined #ruby
varfoo has joined #ruby
scruple has quit [Quit: leaving]
kaldrenon has joined #ruby
flubba has quit [Remote host closed the connection]
nouitfvf_ has quit [Ping timeout: 246 seconds]
nwertman has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby
mootpointer has quit [Quit: ENOCAFFEINE.]
kiri has joined #ruby
hamakn has quit [Remote host closed the connection]
kaldrenon has quit [Ping timeout: 260 seconds]
freakazoid0223 has joined #ruby
hamakn has joined #ruby
zz_tsykoduk is now known as tsykoduk
schaerli has joined #ruby
iliketur_ has quit [Ping timeout: 272 seconds]
iliketur_ has joined #ruby
flubba has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
mootpointer has joined #ruby
mgberlin has quit [Quit: mgberlin]
w4pm has quit [Read error: Operation timed out]
io_syl has joined #ruby
nifty has joined #ruby
CaptainJet has quit []
weems has quit [Ping timeout: 260 seconds]
ahbrendan has joined #ruby
timonv has joined #ruby
bnjamin has quit [Read error: Connection reset by peer]
bnjamin has joined #ruby
dkamioka has joined #ruby
DeanH has quit [Ping timeout: 272 seconds]
Asitha has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
timonv has quit [Ping timeout: 248 seconds]
mootpointer has quit [Quit: Exit, pursued by a bear.]
jrobeson has joined #ruby
sayan has joined #ruby
clint_s has quit [Ping timeout: 272 seconds]
clint_s has joined #ruby
nifty has quit [Ping timeout: 272 seconds]
cha1tanya_ has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamesfung14 has quit [Ping timeout: 272 seconds]
fgo has quit [Remote host closed the connection]
davy_ has joined #ruby
ewnd9 has quit [Ping timeout: 272 seconds]
flubba has quit [Remote host closed the connection]
wongon has quit [Quit: wongon]
fgo has joined #ruby
dkamioka has quit [Ping timeout: 248 seconds]
tsykoduk is now known as zz_tsykoduk
nateberkopec has joined #ruby
gianlucadv has joined #ruby
noop has joined #ruby
ewnd9 has joined #ruby
petey has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL has left #ruby [#ruby]
vlad_starkov has quit [Read error: Connection reset by peer]
nhhagen has joined #ruby
kaiza has joined #ruby
hamakn_ has quit [Remote host closed the connection]
ewnd9 has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 260 seconds]
hamakn has joined #ruby
ewnd9 has joined #ruby
bigkevmcd has joined #ruby
schaerli has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
maletor has joined #ruby
petey has quit [Ping timeout: 260 seconds]
hamakn_ has joined #ruby
nhhagen has quit [Ping timeout: 246 seconds]
hamakn has quit [Read error: Connection reset by peer]
cbetta has quit [Changing host]
cbetta has joined #ruby
LexicalScope has quit [Ping timeout: 260 seconds]
w4pm has joined #ruby
jamesfung14 has joined #ruby
hiyosi_ has joined #ruby
michaeldeol has quit [Remote host closed the connection]
dseitz has quit [Ping timeout: 272 seconds]
justsee has quit [Ping timeout: 248 seconds]
hiyosi_ has quit [Ping timeout: 240 seconds]
w4pm has quit [Ping timeout: 272 seconds]
zipper has joined #ruby
sensen has joined #ruby
brtdv has joined #ruby
ewnd9 has quit [Read error: No route to host]
ewnd9 has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
butblack has quit [Quit: butblack]
ewnd9 has joined #ruby
bnjamin has quit [Ping timeout: 260 seconds]
ehc has quit [Quit: ehc]
carraroj has joined #ruby
sensen has quit [Ping timeout: 246 seconds]
cbetta is now known as cbetta_afk
ewnd9 has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
larissa has quit [Quit: Leaving]
ewnd9 has joined #ruby
jamesfung14 has quit [Quit: Leaving]
nwertman has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
amritanshu_RnD has joined #ruby
ewnd9 has joined #ruby
Tentra has quit [Ping timeout: 246 seconds]
Es0teric has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
tonni has joined #ruby
ewnd9 has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
vlad_starkov has joined #ruby
mary5030 has joined #ruby
fgo has joined #ruby
shedd has quit [Remote host closed the connection]
nwertman has quit [Ping timeout: 240 seconds]
kitak has joined #ruby
zarul has quit [Ping timeout: 246 seconds]
taion809 has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Max SendQ exceeded]
taion809 has joined #ruby
fgo has quit [Read error: No route to host]
timonv has joined #ruby
fgo has joined #ruby
ewnd9 has joined #ruby
roolo has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
kitak has quit [Read error: Connection reset by peer]
ewnd9 has quit [Max SendQ exceeded]
kitak has joined #ruby
kitak_ has quit [Ping timeout: 245 seconds]
ewnd9 has joined #ruby
tjad has joined #ruby
mary5030 has quit [Ping timeout: 260 seconds]
Reach has quit [Remote host closed the connection]
nobitanobi has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Max SendQ exceeded]
thesheff17 has quit [Read error: Operation timed out]
ewnd9 has joined #ruby
fgo has quit [Ping timeout: 272 seconds]
browndawg has quit [Quit: Leaving.]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bricker`LA has quit [Ping timeout: 246 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
klaut has joined #ruby
brtdv has quit []
michaeldeol has joined #ruby
aagdbl has joined #ruby
ewnd9 has quit [Ping timeout: 248 seconds]
brtdv has joined #ruby
dseitz has joined #ruby
michaeldeol has quit [Ping timeout: 240 seconds]
mmcdaris has quit [Quit: mmcdaris]
rjhunter has quit [Remote host closed the connection]
lyanchih has quit [Quit: lyanchih]
lyanchih has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
lyanchih has quit [Client Quit]
dkamioka has joined #ruby
brtdv has quit []
shime has joined #ruby
brtdv has joined #ruby
wongon has joined #ruby
sensen has joined #ruby
charliesome has joined #ruby
wongon has quit [Client Quit]
OdNairy has joined #ruby
ewnd9 has joined #ruby
lyanchih has joined #ruby
dkamioka has quit [Ping timeout: 260 seconds]
noop has quit [Ping timeout: 260 seconds]
shedd has joined #ruby
nhhagen has joined #ruby
nateberkopec has joined #ruby
charliesome has quit [Client Quit]
ewnd9 has quit [Max SendQ exceeded]
shime has quit [Ping timeout: 260 seconds]
nhhagen has quit [Ping timeout: 252 seconds]
shedd has quit [Ping timeout: 272 seconds]
mk_qi has quit [Ping timeout: 272 seconds]
andikr has joined #ruby
io_syl has quit []
gyzmodo has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Ping timeout: 272 seconds]
dagobah has joined #ruby
phansch has quit [Remote host closed the connection]
wongon has joined #ruby
echevemaster has quit [Read error: Connection reset by peer]
fandikurnia01 has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
fandikurnia01 has joined #ruby
vlad_starkov has joined #ruby
Kayzon has quit [Read error: Connection reset by peer]
noop has joined #ruby
shadoi1 has joined #ruby
wongon has quit [Client Quit]
fandikurnia01 has quit [Read error: Connection reset by peer]
fandikurnia01 has joined #ruby
fandikurnia01 has quit [Read error: Connection reset by peer]
phantomcircuit has quit [Excess Flood]
phantomcircuit_ has joined #ruby
fandikurnia01 has joined #ruby
schaerli has joined #ruby
batchitcray has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
shadoi1 has quit [Ping timeout: 245 seconds]
rdark has joined #ruby
bnjamin has joined #ruby
d45h has joined #ruby
roodee has quit [Remote host closed the connection]
fandikurnia01 has quit [Ping timeout: 272 seconds]
<gr33n7007h> Got a question about pry, say you write a function, class or any piece of code then execute in ipython, after execution you can press the up arrow and get all lines of code again. Is their a way of doing this in pry instead of line by line?
Mon_Ouie has quit [Ping timeout: 246 seconds]
andrewt has quit [Quit: Connection closed for inactivity]
YOURBESTFRIEND is now known as FlashCode`
kostine has quit [Quit: kostine]
kaiza has quit [Quit: Leaving]
<banisterfiend> gr33n7007h look at the `play` command
<banisterfiend> gr33n7007h and `edit`
zoee has joined #ruby
FlashCode` is now known as YOURBESTFRIEND
dukz has quit [Remote host closed the connection]
<gr33n7007h> banisterfiend, digging into them now
vlad_starkov has quit [Remote host closed the connection]
Arzaga has joined #ruby
aapzak has quit [Read error: Connection reset by peer]
dukz_ has joined #ruby
tesuji has joined #ruby
Azure has quit [Quit: My MBP went to sleep.]
vlad_starkov has joined #ruby
nouitfvf has joined #ruby
amacgregor has joined #ruby
dukz_ has quit [Remote host closed the connection]
aapzak has joined #ruby
dukz has joined #ruby
zipper has quit [Remote host closed the connection]
zipper has joined #ruby
h_kon has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fgo has joined #ruby
weems has joined #ruby
weems has joined #ruby
weems has quit [Changing host]
carraroj has quit [Quit: Konversation terminated!]
maletor has quit [Quit: Computer has gone to sleep.]
nettoweb has joined #ruby
aganov has joined #ruby
ace_striker has quit [Ping timeout: 250 seconds]
fgo has quit [Ping timeout: 260 seconds]
roolo has quit [Quit: Leaving...]
zipper has quit [Ping timeout: 240 seconds]
Arzaga has quit [Quit: Computer has gone to sleep.]
kevinykchan has joined #ruby
zipper has joined #ruby
jprovazn has joined #ruby
jhaals has joined #ruby
bluOxigen has quit [Ping timeout: 248 seconds]
hamakn_ has quit [Remote host closed the connection]
ws2k3 has joined #ruby
CpuID has quit [Ping timeout: 272 seconds]
hamakn has joined #ruby
charliesome has joined #ruby
ahawkins has joined #ruby
dangerousdave has joined #ruby
Apane has quit [Ping timeout: 272 seconds]
noop has quit [Ping timeout: 272 seconds]
jhaals has quit [Ping timeout: 248 seconds]
alup has joined #ruby
beardedninja has quit [Ping timeout: 260 seconds]
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #ruby
beardedninja has joined #ruby
threesome has joined #ruby
michaeldeol has joined #ruby
hamakn has quit [Ping timeout: 272 seconds]
jbpros has joined #ruby
jhaals has joined #ruby
yfeldblum has quit [Remote host closed the connection]
zipper has quit [Ping timeout: 246 seconds]
hamakn has joined #ruby
OdNairy has quit [Ping timeout: 272 seconds]
michaeldeol has quit [Ping timeout: 246 seconds]
bnjamin has quit [Ping timeout: 272 seconds]
zipper has joined #ruby
relix has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dkamioka has joined #ruby
aganov has quit [Quit: Leaving]
shime has joined #ruby
aganov has joined #ruby
LostMonk has quit [Read error: Connection reset by peer]
LostMonk has joined #ruby
yfeldblum has joined #ruby
dkamioka has quit [Ping timeout: 248 seconds]
fgo has joined #ruby
avril14th has joined #ruby
shedd has joined #ruby
marcgg has joined #ruby
nateberkopec has joined #ruby
petey has joined #ruby
ahawkins_ has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
marcgg_ has quit [Ping timeout: 245 seconds]
dawkirst_ has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
ValicekB has quit [Ping timeout: 260 seconds]
mansi has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
nateberkopec has quit [Ping timeout: 260 seconds]
ahawkins has quit [Ping timeout: 246 seconds]
claymore has joined #ruby
noop has joined #ruby
petey has quit [Ping timeout: 246 seconds]
ahawkins_ has quit [Ping timeout: 272 seconds]
mansi has quit [Ping timeout: 272 seconds]
charliesome has joined #ruby
nhhagen has joined #ruby
troessner has joined #ruby
ValicekB has joined #ruby
nhhagen has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
rushed has quit [Quit: rushed]
akonny has joined #ruby
falood has quit []
Floydzy has joined #ruby
olivier_bK has joined #ruby
Xeago has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
sjuxax has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
OdNairy has joined #ruby
Floydzy has quit [Client Quit]
<sjuxax> Hello. I have code that needs to run on both 1.9.3 and 2.0.0. I catch exceptions on HTTP timeouts, and 1.9.3 returns EOFError while 2.0.0 returns Net::ReadTimeout. How can I tell my rescue block to act on either exception when Net::ReadTimeout doesn't exist in 1.9.3?
ValicekB has quit [Ping timeout: 246 seconds]
Hanmac1 is now known as Hanmac
rushed has joined #ruby
sng|afk has quit [Ping timeout: 252 seconds]
iliketur_ has quit [Quit: zzzzz…..]
fandikurnia01 has joined #ruby
Vaibhav_Rajput has joined #ruby
<Vaibhav_Rajput> how to install rvm in /bin directory in ubuntu 12
<Vaibhav_Rajput> Do I need to do some trick here "curl -L https://get.rvm.io | bash -s"
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<tobiasvl> why do you need to install it in /bin?
<YOURBESTFRIEND> the point of rvm is to not install them there
<Vaibhav_Rajput> but I wanted to be.
<Hanmac> sjuxax: begin ... <code> rescue Net.const_defined?(:ReadTimeout) ? Net::ReadTimeout : EOFError; end
<tobiasvl> Vaibhav_Rajput: but why?
dukz has quit [Remote host closed the connection]
<Vaibhav_Rajput> I want to hardcode ruby path
vlad_starkov has joined #ruby
<Vaibhav_Rajput> then what is the best location to install it?
<Hanmac> Vaibhav_Rajput: are you sure you want /bin and not /usr/bin ??
fgo has joined #ruby
<Vaibhav_Rajput> HAnmac, /usr/bin is fine
<YOURBESTFRIEND> the default one
<Vaibhav_Rajput> Hanmac, /usr/bin is fine
_Andres has joined #ruby
davy_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
<Hanmac> /usr/local/bin is better
<Vaibhav_Rajput> ^ ok fine so how I can install there?
avril14th has quit [Remote host closed the connection]
<tobiasvl> Vaibhav_Rajput: why do you want to hardcode it btw? why not just use ubuntu's default path?
shedd has joined #ruby
<sjuxax> Hanmac: Thanks, wasn't aware of const_defined?
iliketur_ has joined #ruby
iliketur_ has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
<Vaibhav_Rajput> tobiasvl, hardcode is worst thing yeah.
<tobiasvl> yes. so why do you want to do it?
roolo has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
avril14th has joined #ruby
<tobiasvl> <Vaibhav_Rajput> I want to hardcode ruby path
dukz has joined #ruby
<Vaibhav_Rajput> I want to make executable of my ruby script so for that I have to add path on top of the rb file. Then I wanted to release it for testing to test team. How to give ruby path there then?
pranny has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
workmad3 has joined #ruby
<tobiasvl> oh, the shebang?
lurch_ has joined #ruby
<Hanmac> Vaibhav_Rajput: use "#!/usr/bin/env ruby"
<tobiasvl> yes that
<Vaibhav_Rajput> will that take care of any ruby path?
<tobiasvl> yes
<Vaibhav_Rajput> oh thanks let me try then
nari has quit [Ping timeout: 245 seconds]
gstamp has joined #ruby
joaoh82 has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
TMM has quit [Ping timeout: 240 seconds]
nvrch has joined #ruby
apeiros has joined #ruby
shedd has quit [Ping timeout: 272 seconds]
avril14th has quit [Remote host closed the connection]
phansch has joined #ruby
phil_b has joined #ruby
ValicekB has joined #ruby
avril14th has joined #ruby
canton7-mac has joined #ruby
bluOxigen has joined #ruby
ephemerian has joined #ruby
avril14th has quit [Remote host closed the connection]
sevenseacat has quit [Quit: Leaving.]
DouweM has joined #ruby
michaeldeol has joined #ruby
bnjamin has joined #ruby
altvnk has joined #ruby
klaut has quit [Remote host closed the connection]
avril14th has joined #ruby
<olivier_bK> hy all
bluOxigen has quit [Ping timeout: 240 seconds]
<Hanmac> shevy: look your new "best friend" is there ;P
schaerli has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 240 seconds]
zz_tsykoduk is now known as tsykoduk
bluOxigen has joined #ruby
<shevy> wat
<shevy> you need to keep in mind that I don't remember anything from +3 days ago Hanmac ;)
<Hanmac> bufferoverflow? ;P
ahawkins has joined #ruby
fgo has joined #ruby
fntzr has joined #ruby
nomenkun has joined #ruby
nomenkun has quit [Remote host closed the connection]
dukz has quit [Remote host closed the connection]
obs has joined #ruby
dukz has joined #ruby
<shevy> no
bnjamin has quit [Ping timeout: 260 seconds]
<shevy> I never really store IRC in any buffer
<shevy> I just idle away and forget
kiri has quit [Ping timeout: 246 seconds]
rootshift has joined #ruby
rootshift has quit [Client Quit]
karupanerura is now known as zz_karupanerura
dangerousdave has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rootshift has joined #ruby
tsykoduk is now known as zz_tsykoduk
joonty has quit [Quit: WeeChat 0.4.2]
dukz has quit [Remote host closed the connection]
nateberkopec has joined #ruby
_Andres has quit [Ping timeout: 248 seconds]
decoponio has joined #ruby
TMM has joined #ruby
TMM has quit [Remote host closed the connection]
TMM has joined #ruby
TMM has joined #ruby
TMM has quit [Changing host]
yfeldblum has quit [Ping timeout: 246 seconds]
ahawkins has quit [Ping timeout: 246 seconds]
dukz_ has joined #ruby
<Xeago> I am running ruby2.0.0p247 on osx, and during a gem install I get a ERROR: Could not find a valid gem 'bundler' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
<Xeago> curling that works just fine
<Xeago> any idea how this might be?
mansi has joined #ruby
<Xeago> running gem sources -a https://rubygems.org fails too
Will| has joined #ruby
Will| has left #ruby [#ruby]
nateberkopec has quit [Ping timeout: 272 seconds]
reset has joined #ruby
<Hanmac> Xeago: did you try to google the error message "SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed" in combination with OSX ?
zipper has quit [Ping timeout: 240 seconds]
dukz_ has quit [Remote host closed the connection]
zipper has joined #ruby
dukz has joined #ruby
mansi has quit [Ping timeout: 248 seconds]
reset has quit [Client Quit]
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
Speed has joined #ruby
<apeiros> Xeago: rvm? update the ssl certs
<apeiros> `rvm osx-ssl-certs update all`
ahawkins has joined #ruby
kevinykchan has quit [Quit: Computer has gone to sleep.]
nari has joined #ruby
<Hanmac> you should be happy that osx already support ssl
_Andres has joined #ruby
wallerdev has quit [Quit: wallerdev]
nstdloop has quit [Remote host closed the connection]
hiyosi_ has joined #ruby
ace_striker has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
ahawkins has quit [Ping timeout: 240 seconds]
decoponio has quit [Quit: My PC will restarting]
hiyosi_ has quit [Ping timeout: 246 seconds]
marr has joined #ruby
A124 has quit [Read error: Connection reset by peer]
klaut has joined #ruby
mephux has quit [Remote host closed the connection]
<Xeago> apeiros: no rvm
<Xeago> custom compile
<Xeago> Hanmac: yes I did, seems to be an issue with the list of CA's for rubygems to be out of date in the compiled binaries
lurch_ has quit [Quit: lurch_]
mojjojo has joined #ruby
Zai00 has joined #ruby
decoponio has joined #ruby
butblack has joined #ruby
ahbrendan has quit [Ping timeout: 272 seconds]
joonty has joined #ruby
popl has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
ahbrendan has joined #ruby
A124 has joined #ruby
kiri has joined #ruby
<Xeago> s/custom/manual
joaoh82 has quit [Remote host closed the connection]
zipper has quit [Ping timeout: 260 seconds]
drumusician has joined #ruby
joaoh82 has joined #ruby
lkba has quit [Ping timeout: 272 seconds]
claymore has quit [Quit: Leaving]
yfeldblum has joined #ruby
zipper has joined #ruby
shedd has joined #ruby
amacgregor_ has joined #ruby
amacgregor__ has joined #ruby
butblack has quit [Quit: butblack]
yfeldblum has quit [Ping timeout: 260 seconds]
amacgregor has quit [Ping timeout: 246 seconds]
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
dukz has quit [Remote host closed the connection]
dukz has joined #ruby
amacgregor_ has quit [Ping timeout: 246 seconds]
shaunbaker has joined #ruby
lyanchih has quit [Quit: lyanchih]
shedd has quit [Ping timeout: 272 seconds]
ahbrendan has quit [Ping timeout: 240 seconds]
Advocation has joined #ruby
joaoh82 has quit [Remote host closed the connection]
saurabh has joined #ruby
saurabh is now known as Guest13786
zipper has quit [Ping timeout: 248 seconds]
Guest13786 has quit [Client Quit]
davy_ has joined #ruby
varfoo has quit [Ping timeout: 260 seconds]
mojjojo has quit [Quit: mojjojo]
davy_ has quit [Ping timeout: 248 seconds]
MrZYX|off is now known as MrZYX
michaeldeol has joined #ruby
joonty has quit [Quit: WeeChat 0.4.2]
bamdad has joined #ruby
mengu has quit [Remote host closed the connection]
MrZYX is now known as MrZYX|off
Nanuq has quit [Ping timeout: 245 seconds]
michaeldeol has quit [Ping timeout: 260 seconds]
joaoh82 has joined #ruby
amundj_ has quit [Quit: Textual IRC Client: www.textualapp.com]
amundj has joined #ruby
p4d4w4n has joined #ruby
skaflem has joined #ruby
zipper has joined #ruby
joonty has joined #ruby
mmcdaris has joined #ruby
mengu has joined #ruby
varfoo has joined #ruby
Nanuq has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
ldnunes has joined #ruby
gyre007 has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #ruby
nateberkopec has joined #ruby
mojjojo has joined #ruby
parduse has quit [Killed (pratchett.freenode.net (Nickname regained by services))]
parduse has joined #ruby
Lewis has joined #ruby
DanBoy has quit [Remote host closed the connection]
zoee has quit [Quit: This computer has gone to sleep]
petey has joined #ruby
_Andres has quit [Quit: jazz]
zipper has quit [Ping timeout: 241 seconds]
mansi has joined #ruby
zipper has joined #ruby
eka has joined #ruby
nomenkun has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
petey has quit [Ping timeout: 260 seconds]
Alina-malina has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 272 seconds]
xerxas_ is now known as xerxas
w4pm has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
Lewis has quit [Remote host closed the connection]
lyanchih has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 272 seconds]
h_kon has quit [Remote host closed the connection]
isieox has quit [Remote host closed the connection]
Alina-malina has joined #ruby
closures999 has joined #ruby
ghr has joined #ruby
h_kon has joined #ruby
dukz has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
DonRichie has joined #ruby
DouweM has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 260 seconds]
Lewis has joined #ruby
vlad_starkov has joined #ruby
dfranciosi has joined #ruby
dfranciosi has quit [Client Quit]
dfranciosi has joined #ruby
himsin has joined #ruby
dukz has joined #ruby
dawkirst has quit [Remote host closed the connection]
dawkirst_ is now known as dawkirst
yfeldblum has joined #ruby
amacgregor has joined #ruby
shedd has joined #ruby
shime has quit [Ping timeout: 272 seconds]
amacgregor__ has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
mengu has quit [Remote host closed the connection]
varfoo has quit [Quit: WeeChat 0.4.0]
rootshift has quit [Quit: rootshift]
yfeldblum has quit [Ping timeout: 246 seconds]
rootshift has joined #ruby
ahbrendan has joined #ruby
sensen has quit [Quit: leaving]
brtdv has quit [Ping timeout: 240 seconds]
shedd has quit [Ping timeout: 272 seconds]
carraroj has joined #ruby
buscon has joined #ruby
dukz_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Advocation has joined #ruby
vlad_starkov has joined #ruby
zarul has joined #ruby
dukz has quit [Ping timeout: 246 seconds]
fgo_ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
fgo has quit [Ping timeout: 272 seconds]
matheuscaceres has joined #ruby
carraroj has quit [Ping timeout: 248 seconds]
joaoh82 has quit [Remote host closed the connection]
dukz_ has quit [Remote host closed the connection]
michaeldeol has joined #ruby
avalarion has quit [Ping timeout: 252 seconds]
bluOxigen has joined #ruby
d45h has quit []
michaeldeol has quit [Ping timeout: 260 seconds]
kitak has quit [Remote host closed the connection]
DrCode has joined #ruby
schaerli has joined #ruby
kitak has joined #ruby
funburn has joined #ruby
mercwithamouth has joined #ruby
dukz has joined #ruby
mojjojo has quit [Quit: mojjojo]
lkba has joined #ruby
whysomad has joined #ruby
dukz has quit [Remote host closed the connection]
psyl0n has joined #ruby
dukz has joined #ruby
maasha has joined #ruby
mklappstuhl has joined #ruby
whysosad has quit [Read error: Operation timed out]
ValicekB has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
mojjojo has quit [Client Quit]
vlad_starkov has joined #ruby
<maasha> I need some ideas how to code this so that both @input and @output are Enumerators: https://gist.github.com/maasha/57d9ce20cfefe1b7bda5
mojjojo has joined #ruby
N00D is now known as zz_N00D
mengu has joined #ruby
nateberkopec has joined #ruby
<Lewis> maasha: you can put @input in an array
DrCode has quit [Remote host closed the connection]
jbpros has quit [Ping timeout: 272 seconds]
sbarkaoui has joined #ruby
mansi has joined #ruby
yjmsf20__ has joined #ruby
DrCode has joined #ruby
mr_red1 has joined #ruby
<maasha> Lewis: I think I need some Enumerator.new { |y| } in a proc or such.
dmoe has quit [Ping timeout: 240 seconds]
mr_red has quit [Ping timeout: 240 seconds]
yjmsf20_ has quit [Ping timeout: 240 seconds]
mroth has quit [Ping timeout: 240 seconds]
mjc_ has quit [Quit: No Ping reply in 180 seconds.]
anderson has quit [Excess Flood]
rurban has quit [Ping timeout: 240 seconds]
Liothen has quit [Ping timeout: 240 seconds]
ozzloy has quit [Ping timeout: 240 seconds]
mjc_ has joined #ruby
anderson has joined #ruby
dmoe has joined #ruby
orionstein_away is now known as orionstein
ozzloy has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
ozzloy has quit [Changing host]
ozzloy has joined #ruby
mroth has joined #ruby
rurban has joined #ruby
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
jbpros has joined #ruby
A124 has quit [Quit: Reboot.]
ggherdov has quit [Ping timeout: 240 seconds]
<Lewis> maasha: how do you expect the input to look like
<maasha> Lewis: File.open().each.lazy
<maasha> Lewis: which is a Lazy Enumerator, but an Enumerator nevertheless
zipper has quit [Ping timeout: 272 seconds]
mansi has quit [Ping timeout: 248 seconds]
bluOxigen has quit []
A124 has joined #ruby
<Lewis> How about @input = Enumerator.new |y|; y << input ; end
ggherdov has joined #ruby
zipper has joined #ruby
<apeiros> maasha: require input to respond to .next, let Foo respond to .next too. implement .each in terms of .next.
phansch has quit [Remote host closed the connection]
<maasha> Lewis: That goes well for @input, but how about @output
<maasha> apeiros: hmm
niklasb has joined #ruby
phansch has joined #ruby
<heftig> maasha: class Foo < Enumerator; def initialize(input); super() { |output| input.each { |record| output << record } } end end
<Hanmac> maasha: use File.foreach
hiyosi_ has joined #ruby
claymore has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
zipper has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
orionstein is now known as orionstein_away
joaoh82_ has joined #ruby
phansch has quit [Remote host closed the connection]
klipeto has left #ruby [#ruby]
<maasha> interesting
hiyosi_ has quit [Ping timeout: 272 seconds]
sergicles has joined #ruby
ahbrendan has quit [Ping timeout: 272 seconds]
fmendez has joined #ruby
<Lewis> maasha: what would be the parameters passed for input and output
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maasha> Lewis: well, IO objects so reading from one and writing to the other (input/output)
zipper_ has joined #ruby
joaoh82_ has quit [Ping timeout: 260 seconds]
<workmad3> apeiros: next? or succ?
zipper has quit [Ping timeout: 240 seconds]
<workmad3> maasha: if this is still for your pipelines, then your output should be another input anyway ;)
<maasha> workmad3: right you are.
xcv has joined #ruby
ddd has quit [Ping timeout: 272 seconds]
<maasha> workmad3: I want to abstract away all the Enumerators
raphaelivan has joined #ruby
rdark has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
<maasha> workmad3: I think your pipe approach might just work for what I want - so I expanded the test to cover some real functionality so I could do some preliminary speed and memory tests (so far so good). But the code is ready for refactoring: https://gist.github.com/maasha/dfbca5690c2043b3054f
closures999 has quit []
rdark has joined #ruby
<workmad3> maasha: did you consider this style? https://gist.github.com/HedtekGa/7582839
<workmad3> maasha: so that you can (repeatedly if necessary) yield output to the next step in the pipeline rather than returning a single result? :)
sergicles has quit [Quit: sergicles]
ValicekB has joined #ruby
<maasha> workmad3: I looked at it yes, but I was a tad confused, so ...
zipper_ is now known as zipper
kraljev has left #ruby [#ruby]
jbpros has quit [Read error: Connection reset by peer]
Guest47781 has joined #ruby
sergicles has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
<maasha> workmad3: I better find out what it does exactly. One thing that throws me off was the use of Cat and super-cat - not related to cmd(:cat), right?
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rootshift has quit [Quit: rootshift]
<workmad3> maasha: that was just a command example using some metaprogramming
dukz has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 260 seconds]
stormbytes has joined #ruby
<stormbytes> morning folks
<workmad3> maasha: just removed that for now
<maasha> workmad3: Metaprogramming is awesome, it is just a complete new topic to me.
lyanchih has quit [Ping timeout: 240 seconds]
<workmad3> maasha: the important bit in that gist is really that, instead of .call returning the entire output at once, instead it yields output
zoee has joined #ruby
<workmad3> maasha: which frees you up to yield a line at a time
amedeiros has joined #ruby
<maasha> workmad3: nice.
<maasha> I am beginning to get it.
angusiguess has joined #ruby
jbpros has joined #ruby
<maasha> ok, I'll go for lunch and come back to and really stare at it! :o)
<maasha> workmad3: thanks dude :o)
kevinykchan has joined #ruby
ahbrendan has joined #ruby
blaskovicz has joined #ruby
<workmad3> maasha: just added a file source to it, so you can do 'a = cmd(:file, filename: "foobar") | cmd(:foo) | cmd(:bar) | ...'
blaxter_ has joined #ruby
agjacome has joined #ruby
joaoh82 has joined #ruby
joaoh82 has quit [Client Quit]
mercwithamouth has joined #ruby
michaeldeol has joined #ruby
amoli has joined #ruby
platzhirsch has joined #ruby
hogeo has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 240 seconds]
tkuchiki has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
jbpros has quit [Read error: Connection reset by peer]
nettoweb has quit [Quit: nettoweb]
blaxter_ is now known as blaxter
virtualize has joined #ruby
postmodern has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 240 seconds]
nadley has joined #ruby
funburn has quit [Quit: funburn]
mengu has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
bnjamin has joined #ruby
blaskovicz has quit [Quit: Leaving.]
<Hanmac> maasha: what about a short from? like "cmd(:file, filename: "foobar") | cmd(:foo) | cmd(:bar)" can shorted to "cmd(:file, filename: "foobar") | :foo | :bar" for cmd that dont need parameters?
<nadley> hi all I'm trying to build ruby-2.0.0-p247 in Centos and I got a small error http://pastebin.com/qYyVXQ6q any idea ?
jbpros has joined #ruby
Lewis has quit [Remote host closed the connection]
<shevy> compiling ossl_pkey_ec.c
<shevy> ossl_pkey_ec.c: In function ?ossl_ec_group_initialize?:
carraroj has joined #ruby
shime has joined #ruby
<nadley> I have installed openssl-devel
shedd has joined #ruby
nateberkopec has joined #ruby
apeiros has quit [Remote host closed the connection]
<nadley> Hanmac: ok that's what I'm trying right now :)
<nadley> thks
apeiros has joined #ruby
petey has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
bogeyd6 has quit [Quit: Leaving]
Guest47781 has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 272 seconds]
<shevy> nadley if that still does not work, what openssl version do you use
mansi has joined #ruby
gyre007 has quit [Remote host closed the connection]
<Hanmac> he has centos ... he should be happy when he have a version after the year 2000
shedd has quit [Ping timeout: 272 seconds]
shaunbaker has quit [Remote host closed the connection]
pranny has quit [Quit: Leaving.]
nateberkopec has quit [Ping timeout: 248 seconds]
petey has quit [Ping timeout: 246 seconds]
shaunbaker has joined #ruby
mmcdaris has quit [Quit: mmcdaris]
mmcdaris has joined #ruby
clamstar has joined #ruby
<nadley> Hanmac: this is not nice :p
<nadley> :D
mansi has quit [Ping timeout: 272 seconds]
<Hanmac> i had used centos at work ... we need to compile nearly everything by ourselves because the versions was outdated as hell
<Hanmac> hm .. i think hell is newer than the packages from centos
komodo has quit [Ping timeout: 248 seconds]
w4pm has joined #ruby
apeiros has joined #ruby
virtualize has quit [Quit: Leaving...]
<nadley> here is my openssl version : openssl-devel-1.0.1e-16.el6_5.x86_64.rpm
apeiros has quit [Client Quit]
sbarkaoui has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> ruby-1.9.3-p484/ext/openssl/ossl_pkey_ec.c
mmcdaris has quit [Client Quit]
<shevy> I have Openssl Version: 1.0.1e
ahawkins has joined #ruby
hiyosi_ has joined #ruby
akonny has quit [Quit: akonny]
atno__ has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
w4pm has quit [Ping timeout: 248 seconds]
atno__ has quit [Client Quit]
atno has quit [Remote host closed the connection]
ahawkins has quit [Client Quit]
atno has joined #ruby
ahawkins has joined #ruby
<maasha> Hanmac: that is an idea I have considered. (Btw, would (:foo, option: 1) | (:bar, option: 2) work?)
joonty_ has joined #ruby
jlast has joined #ruby
jlast has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
tkuchiki has joined #ruby
jlast has joined #ruby
<Hanmac> maasha: hm that may not but this would be possible [:foo, option: 1] | [:bar, option: 2]
<maasha> Hanmac: right.
joonty has quit [Ping timeout: 272 seconds]
Lewis has joined #ruby
hiyosi_ has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
<maasha> Hanmac: workmad3 so it is possible to replace cmd() with [] :o) - That I want try as well
freerobby has joined #ruby
dweeb_ has joined #ruby
tvw has joined #ruby
<workmad3> maasha: not really...
<maasha> ?
<workmad3> maasha: you'd need to start with a cmd()
joaoh82 has joined #ruby
jamesaanderson has joined #ruby
dweeb_ has quit [Client Quit]
<workmad3> maasha: and then your | operator would need to spot that it had been given an array
<maasha> workmad3: what about a dummy command behind the scene?
fgo_ has quit [Remote host closed the connection]
<workmad3> maasha: you can't change what a [] literal creates
<maasha> ok
<workmad3> maasha: so a single [] would never work... and to start with a [] and chain with | would require you to override Array#|
colonolGron has joined #ruby
einarj_ has joined #ruby
einarj_ has left #ruby [#ruby]
fgo has joined #ruby
<workmad3> maasha: same is true with ':foo | :bar | :buzz' however, there isn't a | operator for Symbol normally so you could always add one without interfering with other stuff
robbyoconnor has quit [Ping timeout: 246 seconds]
<Hanmac> what can work is "cmd(:foo) | :bar | :buzz" but not ':foo | :bar | :buzz' allone
<maasha> right
lurch_ has joined #ruby
<workmad3> Hanmac: well, the second one can work if you provide a Symbol#| method
cha1tanya_ has quit [Quit: cha1tanya]
<Hanmac> yeah it can but i still would not recoment that (the first one of my two is better)
virtualize has joined #ruby
<nadley> Hanmac: with a newer version of ruby make complete
linduxed has quit [Ping timeout: 272 seconds]
<workmad3> Hanmac: adding a Symbol#| isn't too bad... there isn't one already, unlike with Array#|, so you're not stepping on toes to create a DSL at least :)
<Hanmac> until you want to kombine it with something other that also defines that ;P
fijimunk1i has quit [Ping timeout: 272 seconds]
<workmad3> well, that's always an issue ;)
<workmad3> what happens when you want to combine with something that also has a Pipeline module
carraroj has quit [Ping timeout: 272 seconds]
<workmad3> IMO that's the sort of thing that you deal with when it happens, rather than supposition beforehand... and there's not many DSLs (I suspect) that can make good, sensible use of Symbol#| ;)
drumusician has quit [Ping timeout: 246 seconds]
<workmad3> also, I'm not saying I'd go for that route... I'd personally go for cmd(:foo) | cmd(:bar) | cmd(...) rather than a bare symbol shortcut, and I can't say I particularly like ':foo | :bar | :buzz', but I can't say, hand on my heart, that providing the latter would be worse in any respect other than I don't particularly like it
KevinSjoberg_ is now known as KevinSjoberg
rdark has quit [Ping timeout: 246 seconds]
thezanke has left #ruby ["Leaving"]
rdark has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
cgcardona_ has joined #ruby
virtualize has quit [Quit: Leaving...]
Wildhoney has joined #ruby
rootshift has joined #ruby
colonolGron has quit [Ping timeout: 272 seconds]
Macaveli has quit [Quit: Leaving]
Speed has left #ruby ["WeeChat 0.4.2"]
hiall has joined #ruby
mikecmpbll has joined #ruby
fmendez has quit [Quit: fmendez]
clamstar has joined #ruby
kindjal has joined #ruby
Macaveli has joined #ruby
maycon has joined #ruby
maycon has quit [Read error: Connection reset by peer]
ace_striker has quit [Ping timeout: 250 seconds]
nomenkun has joined #ruby
dkamioka has joined #ruby
virtualize has joined #ruby
bamdad has quit [Quit: bamdad]
michaeldeol has joined #ruby
jbpros has quit [Read error: Connection reset by peer]
jbpros_ has joined #ruby
fmendez has joined #ruby
Emmanuel_Chanel_ has joined #ruby
Apane has joined #ruby
Hanmac1 has joined #ruby
virtualize has quit [Ping timeout: 272 seconds]
michaeldeol has quit [Ping timeout: 260 seconds]
Emmanuel_Chanel has quit [Ping timeout: 248 seconds]
mark_locklear has joined #ruby
sepp2k has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
fandikurnia01 has quit [Quit: Leaving]
colonolGron has joined #ruby
fmendez has quit [Quit: fmendez]
justsee has quit [Ping timeout: 272 seconds]
kindjal has quit [Quit: Computer has gone to sleep.]
preller has quit [Read error: Operation timed out]
cbetta_afk is now known as cbetta
matheuscaceres has quit [Quit: matheuscaceres]
breakingthings has joined #ruby
elux has joined #ruby
dkamioka has quit [Remote host closed the connection]
mklappst_ has joined #ruby
cleme1mp has joined #ruby
fgo has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
fgo has joined #ruby
Guest47781 has joined #ruby
<shevy> "cmd(:foo) | :bar | :buzz" looks ugly
<shevy> Hanmac is a genius, but please don't let him design any language
<shevy> :>
himsin has quit [Quit: himsin]
mklapps__ has joined #ruby
burlyscudd has joined #ruby
mklappstuhl has quit [Ping timeout: 248 seconds]
ffranz has joined #ruby
stringoO has joined #ruby
nomenkun has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
Vaibhav_Rajput has quit [Quit: Leaving]
fgo has quit [Remote host closed the connection]
shedd has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
nateberkopec has joined #ruby
mklappst_ has quit [Ping timeout: 260 seconds]
falood has joined #ruby
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
gyre007 has joined #ruby
timonv has quit [Remote host closed the connection]
shedd has quit [Ping timeout: 246 seconds]
orionstein_away is now known as orionstein
jmimi has joined #ruby
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
gyre007 has quit [Read error: Operation timed out]
nateberkopec has quit [Ping timeout: 272 seconds]
Bira has joined #ruby
banister has joined #ruby
phantummm has joined #ruby
Advocation has joined #ruby
mklappstuhl has joined #ruby
gregoriokusowski has joined #ruby
p4d4w4n has quit [Quit: This computer has gone to sleep]
p4d4w4n has joined #ruby
virtualize has joined #ruby
mklapps__ has quit [Read error: Connection reset by peer]
tesuji has quit [Read error: Connection reset by peer]
p4d4w4n has quit [Client Quit]
bamdad has joined #ruby
tesuji has joined #ruby
Fire-Dragon-DoL has joined #ruby
Apane has quit [Ping timeout: 248 seconds]
mojjojo has quit [Quit: mojjojo]
kevinykchan has quit [Ping timeout: 240 seconds]
hiyosi_ has joined #ruby
ArchBeOS-work has joined #ruby
nomenkun has joined #ruby
Hanmac has joined #ruby
timonv has joined #ruby
Bira has quit [Remote host closed the connection]
akonny has joined #ruby
RaCx has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
hiyosi_ has quit [Ping timeout: 248 seconds]
Hanmac1 has joined #ruby
F1skr has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
Wildhoney has quit [Quit: Wildhoney]
machuga|away is now known as machuga
tonni has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 248 seconds]
tonni has joined #ruby
freerobby has quit [Quit: Leaving.]
DeanH has joined #ruby
DeanH has quit [Max SendQ exceeded]
dEPy has joined #ruby
aapzak has quit [Quit: leaving]
fijimunkii has joined #ruby
aapzak has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
kitak_ has joined #ruby
Hanmac has joined #ruby
dhruvasagar has joined #ruby
tonni has quit [Ping timeout: 248 seconds]
thesheff17 has joined #ruby
virtualize has quit [Ping timeout: 248 seconds]
stevenhaddox has joined #ruby
L8D has joined #ruby
RaCx has quit [Ping timeout: 240 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinxreese has quit [Ping timeout: 246 seconds]
joshwines has quit [Ping timeout: 246 seconds]
von___ has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
platzhirsch has quit [Ping timeout: 246 seconds]
joshwines has joined #ruby
joaoh82 has quit [Remote host closed the connection]
RaCx has joined #ruby
nowthatsamatt has joined #ruby
platzhirsch has joined #ruby
stormbytes has quit [Ping timeout: 246 seconds]
robwilliamsukio has quit [Ping timeout: 246 seconds]
graft has quit [Ping timeout: 246 seconds]
breakingthings has quit [Ping timeout: 246 seconds]
mark_locklear has quit [Ping timeout: 246 seconds]
robwilliamsuk has joined #ruby
phil_b has quit [Ping timeout: 246 seconds]
carif_ has quit [Ping timeout: 246 seconds]
joaoh82 has joined #ruby
nowthatsamatt has quit [Remote host closed the connection]
Columcille has quit [Ping timeout: 246 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
amacgregor has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
von___ has joined #ruby
nowthatsamatt has joined #ruby
pontiki has quit [Ping timeout: 246 seconds]
buscon has quit [Remote host closed the connection]
blandflakes has joined #ruby
p0wn3d has joined #ruby
amritanshu_RnD has quit [Ping timeout: 246 seconds]
Anarch has quit [Ping timeout: 246 seconds]
graft has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
agjacome has quit [Ping timeout: 272 seconds]
sayan has quit [Ping timeout: 260 seconds]
pontiki has joined #ruby
Voodoofish4302 has joined #ruby
phansch has joined #ruby
braincrash has quit [Ping timeout: 246 seconds]
Columcille has joined #ruby
uxp_ has quit [Ping timeout: 246 seconds]
dandrade has quit [Ping timeout: 246 seconds]
breakingthings has joined #ruby
Anarch has joined #ruby
gyre007 has joined #ruby
jamesaanderson has quit [Ping timeout: 246 seconds]
dandrade has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
thesheff17 has quit [Ping timeout: 272 seconds]
awarner_ has joined #ruby
sergicles has quit [Ping timeout: 246 seconds]
Voodoofish430 has quit [Ping timeout: 246 seconds]
daidoji has quit [Ping timeout: 246 seconds]
mark_locklear has joined #ruby
sergicles has joined #ruby
klaut has quit [Ping timeout: 246 seconds]
kofno_ has quit [Ping timeout: 246 seconds]
awarner has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
uxp has joined #ruby
BraddBitt has quit [Ping timeout: 246 seconds]
jamesaanderson has joined #ruby
whysobad has joined #ruby
blandflakes_ has joined #ruby
claymore has quit [Ping timeout: 246 seconds]
devdazed has quit [Ping timeout: 246 seconds]
thejoecarroll has quit [Ping timeout: 246 seconds]
lmickh has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blandflakes has quit [Disconnected by services]
blandflakes_ is now known as blandflakes
kofno has joined #ruby
whysomad has quit [Ping timeout: 246 seconds]
devdazed has joined #ruby
Guest36979 has quit [Excess Flood]
amedeiro1 has joined #ruby
Lewix has joined #ruby
klaut has joined #ruby
spyderma_ has joined #ruby
adamholt has quit [Ping timeout: 246 seconds]
colonolGron has quit [Ping timeout: 260 seconds]
deepy has joined #ruby
gverri has joined #ruby
deepy is now known as Guest63455
jerius has joined #ruby
BraddBitt has joined #ruby
lurch_ has quit [Quit: lurch_]
braincrash has joined #ruby
adamholt has joined #ruby
spyderman4g63 has quit [Ping timeout: 264 seconds]
thejoecarroll has joined #ruby
mansi has quit [Remote host closed the connection]
amedeiros has quit [Ping timeout: 260 seconds]
emocakes has quit [Quit: Linkinus - http://linkinus.com]
phansch has quit [Read error: Connection reset by peer]
phansch has joined #ruby
joaoh82 has quit [Remote host closed the connection]
niklasb has joined #ruby
spyderman4g63 has joined #ruby
banister has joined #ruby
shaunbaker has quit [Remote host closed the connection]
spyderma_ has quit [Ping timeout: 272 seconds]
hiall_ has joined #ruby
shime has quit [Read error: Operation timed out]
sayan has joined #ruby
phil_b has joined #ruby
carif_ has joined #ruby
gr33n7007h has joined #ruby
havenwood has quit [Remote host closed the connection]
h_kon has quit [Remote host closed the connection]
fmcgeough has joined #ruby
hiall has quit [Ping timeout: 246 seconds]
hiall_ is now known as hiall
amritanshu_RnD has joined #ruby
h_kon has joined #ruby
maasha has quit [Ping timeout: 250 seconds]
michaeldeol has joined #ruby
clamstar has quit [Remote host closed the connection]
soba has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
tjad has quit [Ping timeout: 240 seconds]
Aloysius1 has quit [Read error: Connection reset by peer]
falood has quit [Remote host closed the connection]
h_kon has quit [Ping timeout: 260 seconds]
plotter has quit [Remote host closed the connection]
raphaelivan has quit [Quit: Leaving.]
falood has joined #ruby
ehc has joined #ruby
RaCx has quit [Ping timeout: 248 seconds]
michaeldeol has quit [Ping timeout: 272 seconds]
justinxreese has joined #ruby
batchitcray has joined #ruby
falood has quit [Remote host closed the connection]
falood has joined #ruby
RaCx has joined #ruby
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
matheuscaceres has joined #ruby
dkamioka has joined #ruby
cbetta is now known as cbetta_afk
DeanH has joined #ruby
DeanH has quit [Max SendQ exceeded]
peregrine81 has joined #ruby
aspires has joined #ruby
jchristi has joined #ruby
sambao21 has joined #ruby
atno has quit [Remote host closed the connection]
spyderman4g63 has quit [Ping timeout: 248 seconds]
spyderman4g63 has joined #ruby
sergicles has quit [Quit: sergicles]
digifiv5e has joined #ruby
digifiv5e is now known as Guest16500
snath has quit [Ping timeout: 272 seconds]
burlyscudd has quit [Quit: Leaving.]
mengu has quit [Remote host closed the connection]
shedd has joined #ruby
geekbri has joined #ruby
spyderman4g63 has quit [Ping timeout: 272 seconds]
shaunbaker has joined #ruby
nateberkopec has joined #ruby
kobain has joined #ruby
virtualize has joined #ruby
shedd has quit [Ping timeout: 260 seconds]
F1skr has quit [Quit: WeeChat 0.4.2]
plotter has joined #ruby
mmitchell has joined #ruby
mmitchell has quit [Remote host closed the connection]
DeProdigy has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
akonny has quit [Quit: akonny]
mmitchell has joined #ruby
rootshift has quit [Quit: rootshift]
Spleeze has quit [Quit: QUIT]
Spleeze has joined #ruby
preller has quit [Ping timeout: 240 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mary5030 has quit [Remote host closed the connection]
duggiefresh has joined #ruby
<and0> The Bengals
preller has joined #ruby
preller has joined #ruby
preller has quit [Changing host]
mary5030 has joined #ruby
OdNairy has joined #ruby
CaptainKnots has quit [Ping timeout: 245 seconds]
nsarno has joined #ruby
jedimind has joined #ruby
hiyosi_ has joined #ruby
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Client Quit]
asobrasil has joined #ruby
havenwood has joined #ruby
p4d4w4n has joined #ruby
bamdad has quit [Quit: bamdad]
rootshift has joined #ruby
joaoh82 has joined #ruby
xcv has quit [Remote host closed the connection]
avril14th_ has joined #ruby
bamdad has joined #ruby
seoNinjaWarrior has quit [Quit: Computer has gone to sleep.]
xcv has joined #ruby
bamdad has quit [Client Quit]
seoNinjaWarrior has joined #ruby
elux has quit [Quit: Leaving...]
seoNinjaWarrior has quit [Remote host closed the connection]
CaptainKnots has joined #ruby
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
cbetta_afk is now known as cbetta
johnmilton has joined #ruby
hiyosi_ has quit [Ping timeout: 240 seconds]
d2dchat has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Guest45295 is now known as Gnubie__
p0wn3d has quit [Quit: I'm not here right now.]
elux has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
RaCx has quit [Ping timeout: 260 seconds]
p0wn3d has joined #ruby
chrisja has joined #ruby
himsin has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
interactionjaxsn has joined #ruby
enebo has joined #ruby
himsin has quit [Client Quit]
tannerburson has joined #ruby
joaoh82 has quit [Ping timeout: 272 seconds]
xcv has quit [Ping timeout: 260 seconds]
Macaveli has quit [Ping timeout: 272 seconds]
RaCx has joined #ruby
Wildhoney has joined #ruby
kaiza has joined #ruby
michaellynch has joined #ruby
ambushsabre has joined #ruby
ramblex has joined #ruby
sambao21 has joined #ruby
Lewix has quit [Remote host closed the connection]
petey has joined #ruby
Megtastique has joined #ruby
johnnyfuchs has joined #ruby
acrussell has joined #ruby
iamjarvo_ has joined #ruby
hogeo has joined #ruby
nomenkun has joined #ruby
havenwood has quit [Ping timeout: 248 seconds]
jamesaanderson has joined #ruby
ndee has joined #ruby
<ndee> when I'm in a @array.each do |item|, is it somehow possible to set a new value for the current element?
zeeraw has joined #ruby
carraroj has joined #ruby
<ndee> s/set/add
kindjal has joined #ruby
Hamburglr has joined #ruby
DouweM has joined #ruby
<cbetta> ndee you're looking for map
<cbetta> vs each
gverri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest47781 has quit [Quit: Leaving]
<platzhirsch> ndee: @array.each { |item| @array[some_index] = new_ value }
<ndee> cbetta: sweet, thanks
<cbetta> for example if you have an array of strings and you want to up case them: strings.each { |item| item.upcase }
<cbetta> ugh
nomenkun has quit [Ping timeout: 246 seconds]
<cbetta> strings.map { |item| item.upcase }
petey has quit [Remote host closed the connection]
<ndee> got it, thanks!
johnnyfuchs has left #ruby [#ruby]
<tobiasvl> platzhirsch: where do you get your some_index from?
<tobiasvl> Array#each_with_index
<platzhirsch> tobiasvl: my imagination
CaptainJet has joined #ruby
<tobiasvl> hehe. ndee is probably looking for either map or each_with_index
<platzhirsch> yeah, I noticed too late. I was curious if it is legal to manipulate an iterating enumerable
<cbetta> platzhirsch just bnever a good idea to do
<cbetta> *never
Emmanuel_Chanel_ is now known as Emmanuel_Chanel
<platzhirsch> yeah
kindjal has quit [Client Quit]
butblack has joined #ruby
clamstar has joined #ruby
rootshift has quit [Quit: rootshift]
synergy_ has joined #ruby
araujo has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
ahbrendan has quit [Ping timeout: 272 seconds]
butblack has left #ruby [#ruby]
araujo has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<workmad3> platzhirsch: you get some odd behaviour if you delete from 'behind' while iterating... but not quite as bad as the memory leaks you can get doing that in C :)
rootshift has joined #ruby
<platzhirsch> In Java there is always this CocurrentModificationException
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
gigetoo has quit [Remote host closed the connection]
apeiros has joined #ruby
kevind has joined #ruby
stl05 has joined #ruby
virtualize has quit [Quit: Leaving...]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gigetoo has joined #ruby
stl05 has left #ruby [#ruby]
jrhe has joined #ruby
RaCx has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mikecmpbll has joined #ruby
Solnse has joined #ruby
drag00n has joined #ruby
zomgbie has joined #ruby
otherj has joined #ruby
<workmad3> platzhirsch: yeah, that happens when you try to modify a container in one thread that's being used in another
tylershipe has joined #ruby
<platzhirsch> workmad3: or no thread at all, which made it so confusing
<platzhirsch> sequential program, trying to modify the collection you were iterating in a loop
otherj has quit [Read error: Connection reset by peer]
noop has quit [Ping timeout: 272 seconds]
<workmad3> oh yeah, I forgot it occurs then too
otherj has joined #ruby
<workmad3> but then, java is all about its perceived safety...
ahbrendan has joined #ruby
tonni has joined #ruby
mando has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
avalarion has joined #ruby
otherj has quit [Client Quit]
yfeldblum has joined #ruby
tonni has quit [Read error: Connection reset by peer]
sailias has joined #ruby
tonni has joined #ruby
gverri has joined #ruby
tylershi_ has quit [Ping timeout: 272 seconds]
michaeldeol has joined #ruby
nomenkun has joined #ruby
skywebro has joined #ruby
rootshift has quit [Quit: rootshift]
Bira has joined #ruby
vlad_starkov has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
m8 has joined #ruby
kaiza has joined #ruby
dEPy has quit [Quit: Computer has gone to sleep.]
dEPy has joined #ruby
bean__ has joined #ruby
barratt has joined #ruby
aryaching has joined #ruby
freakazoid0223 has quit [Remote host closed the connection]
bean__ has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 272 seconds]
bnjamin has quit [Remote host closed the connection]
michaeldeol has quit [Ping timeout: 248 seconds]
tonni has joined #ruby
nomenkun has quit [Read error: No route to host]
RaCx has quit [Quit: Computer has gone to sleep.]
nomenkun has joined #ruby
LadyRainicorn has joined #ruby
<avalarion> Hey ho... I am working on a Chef enviroment normally we get users like this ( users = search(:users, 'groups:sysadmin') ) but if working on a Vagrantbox without databags we are using: users = [{'id' => "vagrant"}]
<avalarion> no I would like to add another user to my users array, but it is not working.
bean__ has joined #ruby
rootshift has joined #ruby
petey has joined #ruby
ramblex_ has joined #ruby
dEPy has quit [Ping timeout: 260 seconds]
aapzak has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 248 seconds]
tesuji has quit [Ping timeout: 246 seconds]
sayan has joined #ruby
angusiguess has quit [Disconnected by services]
<avalarion> ... works now ... but I do not know why it was not working before...
mansi has joined #ruby
michaellynch has quit [Ping timeout: 272 seconds]
jprovazn has quit [Quit: Leaving]
petey has quit [Remote host closed the connection]
freggles has joined #ruby
petey has joined #ruby
Xeago has quit [Remote host closed the connection]
ramblex has quit [Ping timeout: 248 seconds]
Atrophius has joined #ruby
Xeago has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
jamesaanderson has joined #ruby
root_empire has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
nsarno has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
momomomomo has joined #ruby
ahbrendan has quit [Remote host closed the connection]
CorySimmons has joined #ruby
jamesaanderson has quit [Client Quit]
<tobiasvl> zomgbie: #RubyOnRails question?
michael_lee has quit [Ping timeout: 252 seconds]
<zomgbie> tobiasv: No, ruby question.
nettoweb has joined #ruby
<zomgbie> Generally speaking all kinds of libs and rdocs.
<zomgbie> I never know what all those methods *want*
petey_ has joined #ruby
amritanshu_RnD has quit [Read error: Connection reset by peer]
shedd has joined #ruby
<zomgbie> is this an inherit "flaw" b/c we are talking dynamically typed language here?
petey has quit [Read error: Connection reset by peer]
joonty_ is now known as joonty
nomenkun has joined #ruby
joaoh82 has joined #ruby
defrag has quit [Quit: WeeChat 0.3.5]
elux has quit [Quit: Leaving...]
<LadyRainicorn> Sort of I guess.
mojjojo has joined #ruby
mojjojo has quit [Client Quit]
dukz has joined #ruby
<LadyRainicorn> You cannot programatically infer expected arguments.
<LadyRainicorn> That's an issue even in Haskell though.
nateberkopec has joined #ruby
<LadyRainicorn> So not really is probably a better answer.
RaCx has joined #ruby
atno has joined #ruby
iamjarvo_ has quit [Ping timeout: 272 seconds]
s2013 has joined #ruby
elux has joined #ruby
zeeraw has joined #ruby
f0ster has quit [Ping timeout: 240 seconds]
mklappstuhl has quit [Remote host closed the connection]
<zomgbie> LadyRainicorn: Thanks, always frustrates me but good to know that I have to / always can check out the source.
skywebro has quit [Quit: skywebro]
<LadyRainicorn> Sometimes you'll need to know expected values too, because many funxtions will return nonsense if tjey get inputs out of the domain.
skywebro has joined #ruby
<LadyRainicorn> But they might not actually excepr.
jrhe_ has joined #ruby
<LadyRainicorn> soooo
skywebro has quit [Client Quit]
shedd has quit [Ping timeout: 260 seconds]
<LadyRainicorn> Yeah, code only makes sense in context
jrhe has quit [Ping timeout: 272 seconds]
jrhe_ is now known as jrhe
Bira has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
pu22l3r has joined #ruby
carraroj has quit [Read error: Operation timed out]
St_Marx has quit [Ping timeout: 245 seconds]
mansi has joined #ruby
lfox has joined #ruby
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
nateberkopec has quit [Ping timeout: 272 seconds]
LuxuryMode has joined #ruby
<LuxuryMode> Just did `gem install veewee`. It succeeded and then I did `veewee` and got "could not locate gemfile"
virtualize has joined #ruby
<zomgbie> LadyRainicorn: Thanks for answering, I'll let that sink in and delete all my ruby gem's downloaded rdocs ;)
zomgbie has quit [Read error: Connection reset by peer]
psyprus has quit [Changing host]
psyprus has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
kostine has joined #ruby
<LadyRainicorn> hahaaaa nooooo, the rdocs tell you what the context is!
shedd has joined #ruby
<LadyRainicorn> ;p
kcombs has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
jchristi1 has joined #ruby
dhruvasagar has joined #ruby
nwertman has joined #ruby
thesheff17 has joined #ruby
jchristi has quit [Quit: Leaving.]
Arzaga has joined #ruby
Spami has joined #ruby
CorySimmons has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
felixjet_ has quit [Read error: Connection reset by peer]
kindjal has joined #ruby
virtualize has quit [Ping timeout: 240 seconds]
zoee has quit [Quit: This computer has gone to sleep]
<LuxuryMode> Trying to use a gem but getting "could not locate gemfile". http://sebsauvage.net/paste/?447fac8bd5b063b5#HtI5il1RaT7czORqbJBFamA9Ec9VzFUB50Lst/g7K3o= Any ideas?
jchristi1 has quit [Ping timeout: 272 seconds]
caveat- has quit [Ping timeout: 260 seconds]
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
CorySimmons has joined #ruby
GMFlash has joined #ruby
_maes_ has joined #ruby
allaire has joined #ruby
virtualize has joined #ruby
caveat- has joined #ruby
<LadyRainicorn> LuxuryMode: pwd?
<LuxuryMode> you wanna see what directory im in?
_maes_ has quit [Client Quit]
s2013 has quit [Ping timeout: 246 seconds]
iamjarvo_ has joined #ruby
amundj has quit [Ping timeout: 246 seconds]
_maes_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
yfeldblum has joined #ruby
jbpros_ has quit [Ping timeout: 272 seconds]
vlad_starkov has joined #ruby
joaoh82 has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
dukz has quit []
Hanmac has quit [Ping timeout: 272 seconds]
<LadyRainicorn> My first guess is that you need to be in a directory with a Gemfil for that xommand to work
tylershipe has quit [Remote host closed the connection]
joaoh82 has joined #ruby
tylershipe has joined #ruby
burlyscudd has joined #ruby
wallerdev has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
<LuxuryMode> right
<LuxuryMode> i think its an rvm issue here
<LuxuryMode> or
<LuxuryMode> err
virtualize has quit [Ping timeout: 272 seconds]
<LuxuryMode> that i need to export the path to the gem file
yfeldblum has joined #ruby
kaiza has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<LuxuryMode> How can I find out where a particular gem is installed?
schaerli has joined #ruby
dhruvasagar has quit [Ping timeout: 272 seconds]
jbpros has joined #ruby
falood has quit [Remote host closed the connection]
dash__ has joined #ruby
petey_ has quit [Remote host closed the connection]
falood has joined #ruby
petey has joined #ruby
kaiza has quit [Max SendQ exceeded]
cgcardona_ has quit [Quit: cgcardona_]
jchristi has joined #ruby
s2013 has joined #ruby
kaiza has joined #ruby
the_mentat has joined #ruby
rippa has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
lurch_ has joined #ruby
Bira has joined #ruby
kaiza has joined #ruby
jbpros has quit [Client Quit]
falood has quit [Ping timeout: 240 seconds]
petey has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
nwertman has quit [Remote host closed the connection]
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kaiza has quit [Max SendQ exceeded]
Arzaga has quit [Quit: Computer has gone to sleep.]
kaiza has joined #ruby
workmad3 has joined #ruby
ahawkins has quit [Quit: leaving]
Bira has quit [Remote host closed the connection]
RaCx has quit [Ping timeout: 246 seconds]
jjbohn has joined #ruby
DrShoggoth has quit [Quit: Leaving]
mengu has joined #ruby
RaCx has joined #ruby
<LadyRainicorn> rvm path i think?
nwertman has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jrhe has quit [Quit: jrhe]
caesura has joined #ruby
zipper has quit [Ping timeout: 272 seconds]
_HolyCow has quit [Read error: Connection reset by peer]
fmendez has joined #ruby
stevenhaddox has quit [Quit: Zzzz...]
IceDragon has joined #ruby
blandflakes has quit [Quit: Page closed]
daidoji has joined #ruby
blandflakes has joined #ruby
DouweM_ has joined #ruby
xcv has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
RaCx has joined #ruby
petey has joined #ruby
workmad3 has quit [Quit: leaving]
mojjojo has joined #ruby
DouweM has quit [Ping timeout: 260 seconds]
jrhe has joined #ruby
tylersmith has quit [Remote host closed the connection]
jrhe has left #ruby [#ruby]
zipper has joined #ruby
workmad3 has joined #ruby
zipper has quit [Client Quit]
matheuscaceres has quit [Quit: matheuscaceres]
kostine has quit [Quit: kostine]
matheuscaceres has joined #ruby
michaeldeol has joined #ruby
stevenhaddox has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
bean__ has joined #ruby
bean__ has quit [Client Quit]
baroquebobcat has joined #ruby
jonathanwallace has joined #ruby
stevenhaddox has quit [Client Quit]
bean__ has joined #ruby
nhhagen has joined #ruby
s2013 has quit [Quit: Leaving]
michaeldeol has quit [Ping timeout: 272 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
stonevil has joined #ruby
jjbohn is now known as jjbohn|afk
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cbetta is now known as cbetta_afk
RaCx has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
Tentra has joined #ruby
_HolyCow has joined #ruby
jjbohn|afk is now known as jjbohn
Spami has quit [Quit: This computer has gone to sleep]
Reach has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
jonathanwallace has joined #ruby
jonathanwallace has quit [Client Quit]
nomenkun has joined #ruby
matheuscaceres has quit [Quit: matheuscaceres]
nhhagen has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
nhhagen has joined #ruby
maletor has joined #ruby
<Hanmac> shevy i make a very big change in my rwx binding ... BEWARE! ;P ... i through rb_hash_aref out of the cpp files an only use macros and templates ;P
dhruvasagar has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
AlSquire has quit [Read error: Connection reset by peer]
batchitcray has quit [Ping timeout: 248 seconds]
vt102 has joined #ruby
allaire has quit []
batchitcray has joined #ruby
kaiza has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
Atrophius has quit [Ping timeout: 246 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
kaiza has joined #ruby
olivier_bK has quit [Ping timeout: 272 seconds]
zomgbie has joined #ruby
AlSquire has joined #ruby
nomenkun has quit [Ping timeout: 272 seconds]
RaCx has joined #ruby
burlyscudd has quit [Quit: Leaving.]
nhhagen has quit [Ping timeout: 252 seconds]
mengu has quit [Remote host closed the connection]
alup has quit [Quit: Leaving]
elux has quit [Quit: Leaving...]
olivier_bK has joined #ruby
geggam has joined #ruby
allaire has joined #ruby
Azure has joined #ruby
lurch_ has quit [Quit: lurch_]
kaiza has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
gestahlt has joined #ruby
<gestahlt> Hi!
bricker`LA has joined #ruby
shadoi1 has joined #ruby
troyready has joined #ruby
<DouweM_> Hi!
DouweM_ has quit [Quit: Linkinus - http://linkinus.com]
w4pm has joined #ruby
davy_ has joined #ruby
TMM has quit [Quit: Ex-Chat]
<gestahlt> I have a question regarding threads: When i create a new thread (t = Thread.new(stuff)) and i have another new thread inside the new thread, will the "nested" thread also be killed when i kill the parent thread?
DouweM has joined #ruby
<LadyRainicorn> No.
<gestahlt> Ah
<gestahlt> Good to know
<gestahlt> So i need to take care of it somehow
<LadyRainicorn> (Unless you set the thing on yhr thread that kills the progeam when it exists
<LadyRainicorn> exits
<LadyRainicorn> I think main_thread=
RaCx has quit [Ping timeout: 272 seconds]
nwertman has quit [Ping timeout: 246 seconds]
jchristi has quit [Ping timeout: 246 seconds]
<LadyRainicorn> But I am lazy so use the docs if you want that
<gestahlt> Hm, i have to read up on that
<gestahlt> It just came to my mind spontaniously
wallerdev has quit [Quit: wallerdev]
<gestahlt> Today i fought against the serial console with ruby
tannerburson has quit [Quit: tannerburson]
shadoi1 has quit [Ping timeout: 246 seconds]
tannerburson has joined #ruby
jchristi has joined #ruby
<gestahlt> I had putty open for the same tty device where i got my code running. Sending commands worked fine, output didnt work.. and the cause was putty which i discovered like 2 hours of debugging
bricker`LA has quit [Ping timeout: 265 seconds]
amundj has joined #ruby
<gestahlt> i also noticed you need to wait at least 2 seconds after you send a command to serial console before you send the next
w4pm has quit [Ping timeout: 252 seconds]
RaCx has joined #ruby
matheuscaceres has joined #ruby
CorySimmons has quit [Quit: Leaving.]
aapzak has joined #ruby
amundj_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
pearkes has joined #ruby
Spami has joined #ruby
burlyscudd has joined #ruby
bricker`LA has joined #ruby
pearkes has left #ruby ["Textual IRC Client: www.textualapp.com"]
root_empire has quit [Quit: Ex-Chat]
amundj has quit [Ping timeout: 246 seconds]
aspires has quit []
matchaw has quit [Quit: No Ping reply in 180 seconds.]
matchaw has joined #ruby
virtualize has joined #ruby
petey has quit [Remote host closed the connection]
CorySimmons has joined #ruby
rootshift has quit [Quit: rootshift]
nari has quit [Ping timeout: 248 seconds]
roodee has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
petey has joined #ruby
andikr has quit [Remote host closed the connection]
jrhe has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
aganov has quit [Remote host closed the connection]
benzrf has joined #ruby
virtualize has quit [Ping timeout: 252 seconds]
<benzrf> hi, how are circular deps handled?
ambushsabre has joined #ruby
slap_stick has joined #ruby
jonathanwallace has joined #ruby
<DouweM> benzrf: give us a concrete example
valesk has joined #ruby
nomenkun has joined #ruby
Apane has joined #ruby
nhhagen has joined #ruby
<benzrf> a.rb requires b.rb which requires a.rb
<cleme1mp> \quit
<benzrf> both @ the top of the file
Jdubs has joined #ruby
cleme1mp has quit [Quit: leaving]
<DouweM> benzrf: needing to do that indicates a problem with what's defined in the files. you shouldn't need circular dependencies like that, and Ruby doesn't support it
<benzrf> not even python-style?
psyl0n has quit [Remote host closed the connection]
<DouweM> I have no idea what that means :)
<DouweM> why is there circular dependecy?
maletor has joined #ruby
<benzrf> i guess i could refactor around it
slash_quit is now known as slash_join
skaflem has quit [Read error: Connection reset by peer]
<benzrf> in python, importing a file which then imports you will give the second file an incomplete copy of you, which is then filled in when control finishes back in the first file
tylershipe has quit [Remote host closed the connection]
dagobah has quit [Remote host closed the connection]
tylershipe has joined #ruby
skaflem has joined #ruby
<benzrf> but i guess that wouldn't really work in ruby given the major diffs between the import systems...
ghr has quit [Quit: Computer has gone to sleep.]
<slap_stick> hey i am trying to iterate over two hashes, (which could end up containing embeded hashes) i want to iterate all the way through comparing the two together but removing any keys that have '?' in them, if they are not inside the other hash from the hash itself and then return the hashes as they should be . https://gist.github.com/anonymous/4c5633574
<slap_stick> 55f542ecf3b explains what i have but obviously it a) doesnt work and b) seems maybe the wrong way to go, not sure. maybe i need to reconstruct the hash as i'm iterating and return the new ones?
jkhwan has joined #ruby
<shevy> Hanmac when will you be finished?
sepp2k has quit [Quit: Konversation terminated!]
<benzrf> shevy: what is Hanmac doing
<shevy> benzrf he writes ruby bindings for wxwidgets
nobitanobi has joined #ruby
kaiza has joined #ruby
<benzrf> require basically just execs a file, doesn't it?
ShinySides has left #ruby [#ruby]
Monie has joined #ruby
yfeldblum has joined #ruby
<shevy> I think it loads the code, then evals it
Monie has quit [Max SendQ exceeded]
<shevy> benzrf circular dependencies in ruby can be annoying
hogeo has joined #ruby
<ericwood> ircular dependencies in any language are annoying
<shevy> the way I try to avoid it is by requiring things only when needed, on a per-file basis
Monie has joined #ruby
kaiza has quit [Read error: Connection reset by peer]
<ericwood> I just put everything in one file
jimmymad has joined #ruby
tylershipe has quit [Ping timeout: 245 seconds]
<shevy> ericwood benzrf kinda said that python has a dream solution :D
blaxter has quit [Quit: foo]
moted has quit [Remote host closed the connection]
<ericwood> I don't read scrollback
jimmymad has left #ruby [#ruby]
zz_tsykoduk is now known as tsykoduk
moted has joined #ruby
horrorvacui has joined #ruby
<benzrf> shevy: dream solution?
roodee has quit [Remote host closed the connection]
dbjeepn has quit [Ping timeout: 264 seconds]
<shevy> benzrf yeah
blaxter has joined #ruby
<shevy> <benzrf> in python, importing a file which then imports you will give the second file an incomplete copy of you, which is then filled in when control finishes back in the first file
<benzrf> what do you mean?
<benzrf> what do you mean by 'dream solution'
<shevy> there
<shevy> a dream solution
kevind_ has joined #ruby
Tentra has quit [Quit: Rage quit!]
schaerli has quit [Remote host closed the connection]
<mojjojo> are there any good examples of loading google analytics data with ruby?
<benzrf> in python importing a file runs the file, then gives you an object containing all of that file's top-level vars as attributes
<benzrf> so if you import a file that has already started running, you get an incomplete object that only has the variables that have been set so far
burlyscudd has quit [Quit: Leaving.]
echevemaster has joined #ruby
<benzrf> then it gets fully filled in once execution continues in said file
hogeo has quit [Ping timeout: 260 seconds]
<mojjojo> are there any good examples of loading google analytics data with ruby? and can the auth be done without the private key?
zeeraw has joined #ruby
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
phantomcircuit_ is now known as phantomcircuit
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ephemerian has quit [Quit: Leaving.]
s2013 has joined #ruby
iamjarvo_ has quit [Remote host closed the connection]
dbjeepn has joined #ruby
ssvo has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marz_skilex has joined #ruby
iamjarvo_ has joined #ruby
skaflem has quit [Quit: Leaving]
lfox has quit [Quit: ZZZzzz…]
mikepack has joined #ruby
tvw has quit []
GMFlash has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
allaire has quit []
nomenkun has quit [Remote host closed the connection]
L8D has quit [Ping timeout: 248 seconds]
wallerdev has joined #ruby
havenwood has joined #ruby
Apane has quit [Ping timeout: 245 seconds]
timonv has quit [Remote host closed the connection]
elux has joined #ruby
iamjarvo_ has quit [Ping timeout: 246 seconds]
linduxed has joined #ruby
<s2013> is there like a opposite of empty?
<platzhirsch> s2013: full
petey has quit [Remote host closed the connection]
<apeiros> yes, !obj.empty?
<platzhirsch> oh a Ruby method
Spami has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
<s2013> yeah
<s2013> apeiros, besides that.
petey has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
<s2013> or is that the only way
<platzhirsch> def obj.full?; !self.empty?; end
Voodoofish4302 has quit [Ping timeout: 240 seconds]
<platzhirsch> that's the only way, either that or you define or your own method
jibi has joined #ruby
stevenhaddox has joined #ruby
natano has joined #ruby
ddd has joined #ruby
RaCx has joined #ruby
<s2013> alright
<s2013> thanks
RaCx has quit [Client Quit]
ddd has quit [Max SendQ exceeded]
natano has left #ruby [#ruby]
RaCx has joined #ruby
bradhe has joined #ruby
RaCx has quit [Client Quit]
ddd has joined #ruby
VTLob has joined #ruby
ddd has quit [Max SendQ exceeded]
RaCx has joined #ruby
ddd has joined #ruby
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ddd has quit [Max SendQ exceeded]
<DouweM> s2013: if you're dealing with an enumerable, there's enum.any?
blandflakes has left #ruby [#ruby]
blandflakes has joined #ruby
burlyscudd has joined #ruby
Voodoofish430 has joined #ruby
<DouweM> platzhirsch: full and empty are opposites, but full isn't !empty
LuxuryMode has quit [Quit: Computer has gone to sleep.]
petey has quit [Ping timeout: 260 seconds]
enebo has quit [Quit: enebo]
<platzhirsch> fair enough
Eiam has joined #ruby
ddd has joined #ruby
<s2013> thanks
psyl0n has joined #ruby
ddd has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 260 seconds]
jcromartie has joined #ruby
pel_daniel has joined #ruby
phipes has joined #ruby
mojjojo has quit [Quit: mojjojo]
nvrch has quit [Quit: nvrch]
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
olivier_bK has quit [Ping timeout: 260 seconds]
danman has joined #ruby
bnjamin has joined #ruby
dfranciosi has quit []
noop has joined #ruby
obs has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
petey has joined #ruby
Apane has joined #ruby
petey has quit [Remote host closed the connection]
flubba has joined #ruby
nouitfvf has quit [Read error: No route to host]
tylershipe has joined #ruby
petey has joined #ruby
g0bl1n has joined #ruby
daidoji has quit [Quit: WeeChat 0.4.1]
marz_skilex has quit [Quit: marz_skilex]
preller has quit [Read error: Operation timed out]
jerius has quit [Remote host closed the connection]
marz_skilex has joined #ruby
preller has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jerius has joined #ruby
joaoh82 has quit [Remote host closed the connection]
nhhagen has quit [Remote host closed the connection]
tylersmith has joined #ruby
bradhe has quit [Remote host closed the connection]
nhhagen has joined #ruby
petey_ has joined #ruby
pel_daniel has quit [Quit: Leaving.]
joaoh82 has joined #ruby
nwertman has joined #ruby
burlyscudd has quit [Quit: Leaving.]
petey has quit [Read error: Connection reset by peer]
Bira has joined #ruby
marz_skilex has quit [Client Quit]
marz_skilex has joined #ruby
marz_skilex has left #ruby [#ruby]
amedeiro1 has quit [Ping timeout: 272 seconds]
marz_skilex has joined #ruby
ndee has quit [Quit: ndee]
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
sambao21 has quit [Quit: Computer has gone to sleep.]
burlyscudd has joined #ruby
<gestahlt> unless
CorySimmons has quit [Quit: Leaving.]
nhhagen has quit [Ping timeout: 245 seconds]
gregoriokusowski has quit [Read error: Connection reset by peer]
<gestahlt> what is full then?
iliketur_ has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
Thanatermesis has joined #ruby
DeProdigy has quit [Ping timeout: 272 seconds]
tannerburson has quit [Quit: tannerburson]
tsykoduk is now known as zz_tsykoduk
gregoriokusowski has joined #ruby
maletor has joined #ruby
Mon_Ouie has quit [Read error: Operation timed out]
tannerburson has joined #ruby
clamstar has quit [Quit: Computer has gone to sleep.]
spyderman4g63 has joined #ruby
rootshift has joined #ruby
bradhe has joined #ruby
Jdubs has quit [Remote host closed the connection]
jhaals has quit [Ping timeout: 246 seconds]
AlSquirrel has joined #ruby
Bira has quit [Remote host closed the connection]
michaeldeol has joined #ruby
tfitts has joined #ruby
<DouweM> gestahlt: [nil, nil, "hey", nil, nil] is neither full nor empty. it really depends on the definitions used
mephux has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
alvaro_o has joined #ruby
marz_skilex has quit [Quit: marz_skilex]
<havenwood> >> [nil, nil, "hey", nil, nil].none? &:nil?
<eval-in_> havenwood => false (https://eval.in/78109)
andikr has joined #ruby
davy__ has joined #ruby
stringoO has quit [Ping timeout: 240 seconds]
canton7-mac has quit [Ping timeout: 260 seconds]
<DouweM> havenwood `.none? &:nil` ~ `.any?`, although the latter trips on false
jbpros has joined #ruby
sguselnikov has joined #ruby
sguselnikov has quit [Remote host closed the connection]
stringoO has joined #ruby
<tfitts> I need to evaluate date field (which is either a date or nil) and return true if it is a time that is > Time.now, otherwise I need to return false. Is there a common ruby way to do this?
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<DouweM> time && time > Time.now
colonolGron has joined #ruby
<gestahlt> well, the elements are full with nil, so you got an array.count = 5
<gestahlt> or not?
<gestahlt> and wth is none
<gestahlt> Never used that
arietis has joined #ruby
<havenwood> tfitts: time ? time > nil : false
<DouweM> gestahlt: right. but "full" could mean "everything has a value", where value is non-nil, or just "array has > 0 elements"
<benzrf> fmap (> now) time
<havenwood> s/nil/Time.now
<benzrf> :v
<benzrf> haskull
<pragmatism> Morning morning
lfox has joined #ruby
<benzrf> hello pragmatism
sambao21 has joined #ruby
<LadyRainicorn> >> [nil].full?
<eval-in_> LadyRainicorn => undefined method `full?' for [nil]:Array (NoMethodError) ... (https://eval.in/78110)
fdelacruz has joined #ruby
* DouweM is off to dinner
LuxuryMode has joined #ruby
<LadyRainicorn> Apparently full? doesn't exist
<LadyRainicorn> (which explains why it sounds unfamiliar)
<workmad3> no, it doesn't
davy_ has quit [Ping timeout: 272 seconds]
mlpinit has joined #ruby
clamstar has joined #ruby
<benzrf> LadyRainicorn: shouldnt you be speaking korean
<gestahlt> DouweM: Isnt that nitpickng? What point has full in the language?
RaCx has joined #ruby
rootshift has quit [Quit: rootshift]
RaCx has quit [Client Quit]
<Lewis> 09:50 havenwood: >> [nil, nil, "hey", nil, nil].none? &:nil? what did you do here
<LadyRainicorn> I am, but I have the universal translator on.
<gestahlt> LadyRainicorn: full with nil
<pragmatism> >> [].empty?
<eval-in_> pragmatism => true (https://eval.in/78111)
<pragmatism> cool
<LadyRainicorn> Can't you hear the old man voice?
<workmad3> >> [].any?
<eval-in_> workmad3 => false (https://eval.in/78112)
<workmad3> >> [nil].any?
<eval-in_> workmad3 => false (https://eval.in/78113)
<workmad3> >> ["foo"].any?
<eval-in_> workmad3 => true (https://eval.in/78114)
nobitanobi has quit [Read error: Connection reset by peer]
<pragmatism> LadyRainicorn: nice
<pragmatism> #idigit
<Lewis> >>[" "].empty?
<eval-in_> Lewis => false (https://eval.in/78115)
<benzrf> LadyRainicorn: touche
pwh has quit []
ramblex_ has quit [Ping timeout: 248 seconds]
rootshift has joined #ruby
<benzrf> what is idigit??
fdelacruz has quit [Client Quit]
<havenwood> Lewis: I used enumerable's #none? and checked that none are #nil?.
fdelacruz has joined #ruby
<gestahlt> What do you mean with that?
iliketur_ has quit [Quit: zzzzz…..]
mojjojo has joined #ruby
Advocation has quit [Quit: Advocation]
fivethreeo has joined #ruby
RaCx has joined #ruby
colonolGron has quit [Ping timeout: 250 seconds]
<tfitts> havenwood: thanks. It was < Time.now but that got me close enough.
joaoh82 has quit [Remote host closed the connection]
<havenwood> tfitts: yeah, i typo'd a nil there >.> need coffees
michaeldeol has quit [Remote host closed the connection]
<benzrf> gestahlt: none? maps a block over an array, then checks whether all of the results are falsy
<gestahlt> We got a saying: Nix isch au ebbes. Means: "nil is something"
tjbiddle has joined #ruby
fdelacruz has quit [Client Quit]
breakingthings has quit []
<gestahlt> or better "nothing is something too"
fdelacruz has joined #ruby
<LadyRainicorn> def nil() true; end
troessner has quit [Quit: Leaving]
<benzrf> havenwood:
<benzrf> *ha
jbpros has quit [Quit: jbpros]
lurch_ has joined #ruby
burlyscudd has quit [Quit: Leaving.]
IceDragon has joined #ruby
<gestahlt> LadyRainicorn: You might have just fixed a bug
virtualize has joined #ruby
fivethre1o has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
michaeldeol has joined #ruby
nobitanobi has joined #ruby
nhhagen has joined #ruby
<gestahlt> Btw
tylershipe has quit [Remote host closed the connection]
<gestahlt> I think i will try that and check how my apps fall apart
<gestahlt> might be fun
<Lewis> havenwood: thanks
tylershipe has joined #ruby
<LadyRainicorn> Pretty much everything I would think.
Wildhoney has quit [Quit: Wildhoney]
mansi has joined #ruby
<benzrf> DateTime vs Time?
<LadyRainicorn> It is about the worst thing I can think of that doesn't neccesarilly except.
<havenwood> >> Time.at(0)
<eval-in_> havenwood => 1970-01-01 01:00:00 +0100 (https://eval.in/78116)
<havenwood> benzrf: ^
<benzrf> ok
roolo has quit [Remote host closed the connection]
<benzrf> how can I iterate over each day between two Times?
<benzrf> or DateTimes?
<gestahlt> Say
<LadyRainicorn> So if you could have any extinct animal for a pet, what would it be?
<gestahlt> Hm
Apane has quit []
<havenwood> benzrf: Time began and will end much sooner to now than DateTime. :P
joaoh82 has joined #ruby
<gestahlt> A neanderthal
<gestahlt> A lot of them
enape_101 has joined #ruby
rushed has quit [Quit: rushed]
<LadyRainicorn> rofl
<apeiros> benzrf: DateTime#+ operates with days
<LadyRainicorn> TIL gestahlt aspires to be a slaveholder.
tylershipe has quit [Read error: Operation timed out]
<benzrf> apeiros: what about Date?
<apeiros> same
<benzrf> ok, i'll use dates
virtualize has quit [Ping timeout: 245 seconds]
<benzrf> since sequel uses em w/ my postgres table
zz_tsykoduk is now known as tsykoduk
<benzrf> wait wut
nhhagen has quit [Ping timeout: 245 seconds]
ramblex_ has joined #ruby
clamstar has quit [Ping timeout: 265 seconds]
<benzrf> hm
coca_rails has joined #ruby
barratt has quit [Ping timeout: 248 seconds]
<gestahlt> I am an open book rainicorn
<benzrf> huh, Sinatra modifies Date
<gestahlt> What would you take?
shaunbaker has quit [Remote host closed the connection]
rootshift has quit [Quit: rootshift]
pwh has joined #ruby
Fidelix has joined #ruby
davy__ has quit [Remote host closed the connection]
nobitanobi has quit [Read error: Connection reset by peer]
<shevy> damn those ponicorn posers
nomenkun has joined #ruby
<Fidelix> Hello. I have installed ruby with rbenv but neither "ruby" nor "gem" commands ara available!
dash__ has quit []
jwiering1 has joined #ruby
akonny has joined #ruby
<shevy> Fidelix always find out where rbenv is installed to. I assume in your home dir, so I suppose it would work if your $PATH variable includes that
jwiering1 has left #ruby [#ruby]
colonolGron has joined #ruby
<Fidelix> shevy: I guess I found the problem. .bash_profile simply isn't loaded. I don't know how that's possible.
sepp2k has joined #ruby
Atrophius has joined #ruby
nhhagen has joined #ruby
wallerdev has quit [Quit: wallerdev]
nhhagen_ has joined #ruby
wallerdev has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
CorySimmons has joined #ruby
CorySimmons has left #ruby [#ruby]
kostine has joined #ruby
hiall has quit [Ping timeout: 272 seconds]
banister has joined #ruby
allaire has joined #ruby
nhhagen_ has quit [Ping timeout: 272 seconds]
jkhwan has quit [Read error: Connection reset by peer]
jkhwan has joined #ruby
lmickh has quit [Quit: lmickh]
klaut has quit [Remote host closed the connection]
mlpinit has quit [Ping timeout: 272 seconds]
<LadyRainicorn> Wow those are big
mojjojo has quit [Quit: mojjojo]
heidi has joined #ruby
iliketur_ has joined #ruby
lurch_ has quit [Quit: lurch_]
davy_ has joined #ruby
ahawkins has joined #ruby
scruple has joined #ruby
scruple has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Hanmac> shevy look at this https://bugs.ruby-lang.org/issues/9237 isnt it fun ? ;P
phil_b has quit [Read error: Operation timed out]
coca_rails has quit [Remote host closed the connection]
amedeiros has joined #ruby
lmickh has joined #ruby
timonv has joined #ruby
schaerli has joined #ruby
elux has quit [Quit: Bye!]
petey has joined #ruby
<LadyRainicorn> weird as fuck
<benzrf> how can I slice a hash?
nobitanobi has joined #ruby
<LadyRainicorn> With a knife?
fdelacruz has quit [Quit: EPIC5-1.1.6[1699] - amnesiac : if you know how to use it, it is outdated]
* benzrf prods LadyRainicor
<benzrf> n
iliketur_ has quit [Client Quit]
Skylab has joined #ruby
fdelacruz has joined #ruby
gyre007 has quit [Ping timeout: 260 seconds]
adammokan has joined #ruby
adammokan has quit [Max SendQ exceeded]
<apeiros> benzrf: use active_support/core_ext or roll your own
<LadyRainicorn> In Rails?
petey_ has quit [Ping timeout: 260 seconds]
<apeiros> not too difficult with Hash::[], zip & values_at
<benzrf> alright ill just do this the inelegant way
<benzrf> :[
<benzrf> or not w/e
adammokan has joined #ruby
adammokan has quit [Max SendQ exceeded]
petey_ has joined #ruby
<apeiros> class Hash; def slice(*keys); Hash[keys.zip(values_at(*keys))]; end; end
<apeiros> trivial
clamstar has joined #ruby
nhhagen has joined #ruby
<benzrf> wait, values_at?
petey has quit [Ping timeout: 246 seconds]
schaerli has quit [Ping timeout: 260 seconds]
adammokan has joined #ruby
<benzrf> that's what I wanted actually -.-
<LadyRainicorn> haha
<apeiros> well - reading the docs++ :-p
<apeiros> knowing core+++ ;-)
<benzrf> you mean += 2?
<benzrf> [and += 1]
<benzrf> this is ruby, not c!
<apeiros> this is irc, not ruby :-p
<apeiros> C doesn't know +++ either
nobitanobi has quit [Read error: Connection reset by peer]
tannerburson has quit [Quit: tannerburson]
mansi has quit [Remote host closed the connection]
<platzhirsch> havenwood: thanks for the hint to the talk REPL driven development. I thought I know most of it,... ;)
sepp2k has quit [Quit: Leaving.]
mansi has joined #ruby
shime has joined #ruby
nhhagen_ has joined #ruby
<havenwood> platzhirsch: :) yeah going up and down the stack is new to me, i've been meaning to actually try some stuff out I learned in that talk!
Wildhoney has joined #ruby
<platzhirsch> I had troubles getting the addons to work, so I didn't bother for a while
tannerburson has joined #ruby
blackmesa has joined #ruby
Fidelix|2 has joined #ruby
nhhagen has quit [Ping timeout: 252 seconds]
Fidelix|2 has quit [Max SendQ exceeded]
Lewis has quit [Remote host closed the connection]
Fidelix|2 has joined #ruby
iliketur_ has joined #ruby
<shevy> HERE COMES THE FUTURE!!!
jchristi has quit [Quit: Leaving.]
Advocation has joined #ruby
<benzrf> hey, if I put something on github, i should probably put in a LICENSE file right
<apeiros> yes
<apeiros> at least, it's the nice thing to do
mansi has quit [Ping timeout: 272 seconds]
<Hanmac> benzrf ruby know +++
<Hanmac> >> +++3
<LadyRainicorn> +++x
<eval-in_> Hanmac => 3 (https://eval.in/78117)
<shevy> benzrf yeah, also when you write .gemspec, there will be a license = entry
Fidelix has quit [Ping timeout: 250 seconds]
<benzrf> what's .gemspec?
<LadyRainicorn> (does that work in c?)
<benzrf> this is a website, not a gem
<apeiros> a .gemspec is what you need to create a gem
<shevy> benzrf when you ever come to it, just do: ".license = 'Hipster 1.0'
MrZYX|off is now known as MrZYX
<shevy> you use it to create a gem benzrf which you should have already done so! when will you write a gem benzrf!!!
<benzrf> l8r m8
<shevy> :(
<benzrf> maybe ill make sintra but for irc bots
<shevy> that's like Hanmac saying he will add documentation to his wxwidget bindings...
<shevy> we all know that will never happen
<benzrf> wait isn't there something like that called Autumn
<shevy> yeah, it's one of the four seasons
thumpba has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
<benzrf> ok if this is a website's Sourceless_
<benzrf> *soure
<benzrf> should I use affero
nomenkun has quit [Remote host closed the connection]
rootshift has joined #ruby
jchristi has joined #ruby
Zai00 has quit [Quit: Zai00]
<apeiros> you should use whatever you feel comfortable with
heidi has joined #ruby
<apeiros> I prefer MIT/BSD 2 clause
b00stfr3ak has quit [Ping timeout: 246 seconds]
nomenkun has joined #ruby
<benzrf> i dont know shit about licenses except basic gpl vs bsd stuff
mlpinit has joined #ruby
<benzrf> i want a gpl-style, should I use affero for a website
<LadyRainicorn> pubdomain
thumpba has joined #ruby
<shevy> puberty
<LadyRainicorn> whatev bitches
<shevy> benzrf I like GPL 2 still
<benzrf> justinmcp:
jkhwan has quit [Remote host closed the connection]
<benzrf> *just
<benzrf> what is the best license for a website's source code which is gpl styl
<benzrf> e
Advocation has quit [Quit: Advocation]
mansi has joined #ruby
jkhwan has joined #ruby
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
joonty has quit [Ping timeout: 240 seconds]
<LadyRainicorn> The GPL?
<shevy> lol
<shevy> so great :)
<benzrf> alright
joonty has joined #ruby
<benzrf> i thought affero had some kind of special clauses for websites?
<LadyRainicorn> It does.
<benzrf> like, to prevent you from modifying it, then running it without distributing it?
nomenkun has quit [Ping timeout: 246 seconds]
<LadyRainicorn> Yes.
graft has quit [Ping timeout: 260 seconds]
Advocation has joined #ruby
<LadyRainicorn> If you would like that, I would recommend the AGPL.
<flubba> x = lambda {|x| x * 2}
<flubba> how could i get the inner contents of the lambda expr
<benzrf> meh, I doubt anybody is going to even use the site :p
<benzrf> flubba: use some kind of decompiling gem
<flubba> thx
dh64 has joined #ruby
<LadyRainicorn> flubba: That is very evil.
<flubba> like parsetree?
<flubba> hehe i know
rdark has quit [Quit: leaving]
<LadyRainicorn> Why do you want to do that?
<flubba> useless meta programming gem i'm working on
Alina-malina has quit [Quit: Leaving]
RaCx has quit [Ping timeout: 250 seconds]
allaire has quit []
<shevy> flubba not sure you can ... I only know you can use .call to invoke it... perhaps try x.method?
reset has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
RaCx has joined #ruby
stevenhaddox has quit [Quit: Sayonora]
iamjarvo_ has joined #ruby
Advocation has quit [Client Quit]
<benzrf> should i just 'wget http://www.gnu.org/licenses/agpl-3.0.txt -O LICENSE' or what
saarinen has joined #ruby
<flubba> thanks shevy
Alina-malina has joined #ruby
<LadyRainicorn> benzrf: If you like.
bean__ has joined #ruby
<flubba> this is what i have started https://github.com/aaronlifton/MetaProtoObject
<benzrf> i dunno what convention is for this stuff
<benzrf> >_>
fdelacruz has quit [Quit: EPIC5-1.1.6[1699] - amnesiac : when you're talking to yourself, and nobody's home]
thevishy has joined #ruby
matheuscaceres has quit [Quit: matheuscaceres]
<thevishy> I am getting an issue doing gem install sup
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
ephemerian has joined #ruby
Rollabunna has joined #ruby
fdelacruz has joined #ruby
<shevy> is this issue a secret or will you reveal what it is
jkhwan has joined #ruby
DeProdigy has joined #ruby
jprovazn has joined #ruby
<LadyRainicorn> He signed an NDA.
rootshift has quit [Quit: rootshift]
fdelacruz has quit [Client Quit]
<LadyRainicorn> But we will force reveal then blackmail.
lfox has quit [Ping timeout: 260 seconds]
<shevy> >> "thevishy".delete('t').split(//).values_at(4,5,1,2,6).join('')
<eval-in_> shevy => "shevy" (https://eval.in/78118)
allaire has joined #ruby
<shevy> I like his nick
fdelacruz has joined #ruby
<thevishy> lol
<sec^nd> What exactly does #{} in a string do? Execute code or what?
<shevy> one day I am gonna beat Hanmac in ruby golfing
<shevy> sec^nd it turns the object into string format
<benzrf> sec^nd: it's interpolation, yes
bricker`1ork is now known as bricker
<benzrf> sec^nd: the code is eval'd, then it takes the result and to_s's it
w4pm has joined #ruby
<sec^nd> I see
nhhagen_ has quit [Remote host closed the connection]
<shevy> sec^nd you could do it manually too
<sec^nd> shevy: how?
<shevy> >> x = 1; puts "Hi #{x}"
<eval-in_> shevy => Hi 1 ... (https://eval.in/78119)
<benzrf> "foo#{bar}baz" is the same as "foo" + bar.to_s + "baz"
<shevy> >> x = 1; puts "Hi #x"
<eval-in_> shevy => Hi #x ... (https://eval.in/78120)
<shevy> >> x = 1; puts "Hi "+x.to_s
<eval-in_> shevy => Hi 1 ... (https://eval.in/78121)
<shevy> ^^^
phipes has quit [Remote host closed the connection]
nhhagen has joined #ruby
<shevy> ignore the second :P
<sec^nd> can you define functions without ( )?
<shevy> with an @ivar the second would have worked
<shevy> yeah
hashpuppy has joined #ruby
<sec^nd> and can you do it with one which accept arguments?
<shevy> yeah but then I will hate you
<MrZYX> because his syntax highlighting is odd ;P
<sec^nd> shevy: so you don't need the #{ and can do #<var> if you are just inserting a variable?
decoponio has quit [Quit: Leaving...]
<shevy> sec^nd no, only for @ and $
<shevy> the others need #{}
<sec^nd> kk
<benzrf> sec^nd: what you just said works... in livescript
<sec^nd> Which values use $ ?
<benzrf> not in ruby ;P
<shevy> >> @world = 'World'; puts "Hello #@world"
<eval-in_> shevy => Hello World ... (https://eval.in/78122)
<benzrf> sec^nd: if it starts with $ it's a global
<sec^nd> @ is for class variables right?
<shevy> for @ivars
Jdubs has joined #ruby
<benzrf> sec^nd: @ is for ivars
petey_ has quit [Remote host closed the connection]
<benzrf> @@ is classvars
<benzrf> do not use classvars
<sec^nd> What are ivars?
<benzrf> they have Problems
<shevy> @@is_a_class_var_and_if_you_use_it_i_will_hate_you_even_more
<benzrf> sec^nd: vars local to an instance
<benzrf> i is for instance
<sec^nd> So @@ would be like static values?
<benzrf> sec^nd: yes
<benzrf> but the thing is
<shevy> they aren't static!
<sec^nd> How do I define class values before initialization?
phipes has joined #ruby
ramblex_ has quit [Remote host closed the connection]
<benzrf> shevy: in java a static var is a class var
<apeiros> what's a class value?
<apeiros> @ sec^nd
<shevy> we are not in #java!!!
xcv has quit [Remote host closed the connection]
<benzrf> sec^nd: @@vars are _SHARED BETWEEN SUBCLASSES_
schaerli has joined #ruby
<benzrf> sec^nd: this is a problem
<sec^nd> public static String HELLO_WORLD = "Hello World!";
<shevy> why is there static
petey has joined #ruby
<benzrf> sec^nd: class-level not instance-level
agjacome has joined #ruby
<benzrf> *shevy
<apeiros> shevy: because it's not ruby
<shevy> hehehe
xcv has joined #ruby
<shevy> I like that explanation :)
<apeiros> class Foo; HelloWorld = "Hello World!"; end
<shevy> sec^nd in ruby you can even modify a constant
<apeiros> Foo::HelloWorld # => "Hello World!"
<sec^nd> benzrf: what is the difference between class level and instance-level?
<apeiros> a class is not the same object as any of its instances
<apeiros> ivars belong to a single object. classes are an object.
<benzrf> >> class Superclass; def foo; @@foo; end; class Subclass; def bar(thing); @@foo = thing; end; end; Subclass.new.bar(25); Superclass.new.foo
<eval-in_> benzrf => /tmp/execpad-ad6ba90b6fff/source-ad6ba90b6fff:7: syntax error, unexpected end-of-input, expecting keyword_end (https://eval.in/78123)
<benzrf> ?
<benzrf> >> class Superclass; def foo; @@foo; end; end; class Subclass; def bar(thing); @@foo = thing; end; end; Subclass.new.bar(25); Superclass.new.foo
<eval-in_> benzrf => uninitialized class variable @@foo in Superclass (NameError) ... (https://eval.in/78124)
<benzrf> w8
<benzrf> i guess i was wrong
<benzrf> derp
<benzrf> oh wait
<benzrf> ugh
<apeiros> forget @@class_vars
<benzrf> >> class Superclass; def foo; @@foo; end; end; class Subclass < Superclass; def bar(thing); @@foo = thing; end; end; Subclass.new.bar(25); Superclass.new.foo
<eval-in_> benzrf => uninitialized class variable @@foo in Superclass (NameError) ... (https://eval.in/78125)
<benzrf> orrr not
tylershipe has joined #ruby
<apeiros> o0
enebo has joined #ruby
<benzrf> i think i have a committing problem
tannerburson has quit [Quit: tannerburson]
noop has quit [Read error: Operation timed out]
<benzrf> i have 19 commits for 75 total lines written in all of my project files
fntzr has quit [Quit: Leaving]
<benzrf> i think im taking 'commit early commit often' a little too seriously
<benzrf> _>
virtualize has joined #ruby
Rollabunna has quit [Remote host closed the connection]
<benzrf> oh wait 13 commits
<benzrf> that's marginally less weird
<MrZYX> just never push and use --amend :P
tannerburson has joined #ruby
vlad_sta_ has joined #ruby
noop has joined #ruby
<benzrf> i was gonna go back and fiddle with 3 commits that should be one
Rollabunna has joined #ruby
<benzrf> but then i pushed to github
<Hanmac> "its a method? its a module? no its the Superclass!" ;P
<benzrf> w/e
<apeiros> shubberclasses, yaaaay
tjad has joined #ruby
tjad has quit [Read error: Connection reset by peer]
xcv has quit [Ping timeout: 245 seconds]
Rollabun_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
kh019267 has joined #ruby
<apeiros> MrZYX: why, no problem with force pushing. have fun cleaning up the mess if somebody pulled in the mean time, though :D
<MrZYX> guess what, I had to do that already a few times
vlad_starkov has quit [Ping timeout: 246 seconds]
dionyziz has quit [Ping timeout: 252 seconds]
xcv has joined #ruby
<MrZYX> clearing up the mess that is
jbpros has joined #ruby
<LadyRainicorn> force pushing is fun to keep everyone on their toes.
brianpWins has quit [Quit: brianpWins]
<sec^nd> What does <instance>.respond_to?("<val name>") do?
<sec^nd> What is the ?(<params>) paret for?
<platzhirsch> Is the duck quacking ?
<sec^nd> What is respond_to ?
<LadyRainicorn> April Fool's joke: Force push a commit that deletes everything, and tell users they fucked up.
<sec^nd> Why the ?
<benzrf> sec^nd: the ? is part of the method name
tylershi_ has joined #ruby
<Hanmac> benzrf: one of my projects reached more than 100 commits last weekend ... and it has more than 11000 code lines (+comment+blank lines)
<benzrf> sec^nd: method names may end with a ! or a ? in ruby
<benzrf> Hanmac: >_>
dionyziz has joined #ruby
shadoi has quit [Quit: Leaving.]
<benzrf> sec^nd: ? suffix is like is_ prefix in java
<sec^nd> benzrf: nice to know
virtualize has quit [Ping timeout: 246 seconds]
<benzrf> sec^nd: thelist.is_empty() -> thelist.empty?
<platzhirsch> LadyRainicorn: lol
<benzrf> sec^nd: ! is commonly used for alternate versions of methods which are destructive
diegoviola has joined #ruby
<benzrf> sec^nd: like so
<benzrf> >> foo = [1, 2, 3]; foo.map &:succ; foo
<eval-in_> benzrf => [1, 2, 3] (https://eval.in/78130)
<benzrf> >> foo = [1, 2, 3]; foo.map! &:succ; foo
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78131)
joshu_ has quit [Quit: Bye.]
<benzrf> sec^nd: note that Array#map returns a new array, but Array#map! modifies the array in place
<benzrf> also i just noticed that i keep calling arrays lists
<benzrf> nothing but python & haskell for a year will do that to you i guess
amundj_ has quit [Ping timeout: 250 seconds]
<benzrf> and really they're lists not arrays
<sec^nd> What is the &:succ ?
<benzrf> sec^nd: it's a block param
endash has quit [Read error: No route to host]
<sec^nd> What are block params?
<benzrf> sec^nd: in ruby, you can pass a block to a method as a regular argument if you put an & in front. watch this
<benzrf> >> plus_one_block = proc {|n| n + 1}; [1, 2, 3].map(&plus_one_block)
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78132)
<benzrf> sec^nd: follow?
tylershipe has quit [Ping timeout: 250 seconds]
<waxjar_> &:symbol is syntax sugar for :symbol.to_proc
<sec^nd> benzrf: not yet, one sec
tylershi_ has quit [Remote host closed the connection]
<benzrf> sec^nd: if you give it something besides a proc with the &argument, it'll call .to_proc on it
tylershipe has joined #ruby
<benzrf> sec^nd: and calling .to_proc on a symbol gives you a proc that runs a method on it
<LadyRainicorn> (Well, to_proc is implicitly callemu
<sec^nd> What is proc ?
nomenkun has joined #ruby
<benzrf> a proc is a block object
<enebo> waxjar_: &anything will attempt to call to_proc on anything
<benzrf> sec^nd: watch
<sec^nd> What is to_proc ?
<enebo> waxjar_: Since 1.8.7 to_proc was added to symbol
<LadyRainicorn> It is a method
jrhe has quit [Quit: jrhe]
<waxjar_> enebo: i know :)
<benzrf> >> succ_proc = :succ.to_proc; succ_proc.call 3
<eval-in_> benzrf => 4 (https://eval.in/78133)
<enebo> waxjar_: ahaha sorry you were explaining it
<benzrf> >> succ_proc = proc {|n| n.succ}; succ_proc.call 3
<eval-in_> benzrf => 4 (https://eval.in/78134)
Jdubs has quit [Remote host closed the connection]
<sec^nd> What does to_proc do?
phipes has quit [Remote host closed the connection]
mlpinit has quit [Remote host closed the connection]
endash has joined #ruby
allaire has quit []
<sec^nd> Wait, does it just return a function
<benzrf> a proc is basically a function object
<sec^nd> So I could def a function / method called h and then do h.to_proc to get it as a function?
jkhwan has quit [Remote host closed the connection]
carraroj has joined #ruby
<benzrf> sec^nd: no, not really
<sec^nd> and thus use it to pass it elsewhere
clov3r has joined #ruby
<benzrf> sec^nd: ruby has no 'functions'
<benzrf> sec^nd: it has methods and procs
jkhwan has joined #ruby
<benzrf> sec^nd: a proc is like a function object though
<benzrf> sec^nd: you can get a proc from a block by calling 'proc' or 'Proc.new'
<LadyRainicorn> You can use method(:method) though
<benzrf> >> times_two_proc = proc {|n| n * 2}; times_two_proc.call(23)
<eval-in_> benzrf => 46 (https://eval.in/78136)
<waxjar_> that will give you a Method
michaeldeol has quit [Remote host closed the connection]
<sec^nd> What is the difference between a function and a method? IIRC methods are class objects
momomomomo has quit [Quit: momomomomo]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sec^nd> main:Object would be the main class object then?
<benzrf> sec^nd: it's kind of poorly defined
<sec^nd> I operate within that and then have classes etc
<benzrf> *the difference
michaeldeol has joined #ruby
ikawnoclast has joined #ruby
<LadyRainicorn> Function isn't a Ruby term really.
<benzrf> sec^nd: if you pass a method an argument with a & in front, it'll use that argument as though it were a block
colonolGron has quit [Ping timeout: 245 seconds]
<benzrf> sec^nd: look at this
<waxjar_> generally methods are bound to an object, functions aren't.
<benzrf> >> [1, 2, 3].map {|n| n + 1}
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78137)
schaerli has quit []
<benzrf> >> plus_one_proc = proc {|n| n + 1}; [1, 2, 3].map(&plus_one_proc)
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78138)
<benzrf> sec^nd: see?
joaoh82 has quit [Remote host closed the connection]
matheuscaceres has joined #ruby
<sec^nd> benzrf: What does |n| do? absolute value?
<benzrf> sec^nd: do you know about blocks in ruby?
<sec^nd> or shorthand argument variable
colonolGron has joined #ruby
<sec^nd> benzrf: no, not yet
<benzrf> ok
<sec^nd> benzrf: I know about def and end
<benzrf> some methods take a block
jekt has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
<benzrf> it's a special extra argument that represents a block of code
<benzrf> >> [1, 2, 3].map {|n| n + 1}
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78139)
<benzrf> the {|n| n + 1} is the block here
<benzrf> you cannot put it in parens, it's an extra arg with its own synta
<benzrf> x
<benzrf> the |n| is the arguments it takes
<sec^nd> Why does attr_accessor :name use :name instead of @name
<benzrf> it's kind of like a lambda
<benzrf> sec^nd: :name is a symbol
<sec^nd> benzrf: can it take more than one argument?
<sec^nd> benzrf: I see
<benzrf> sec^nd: yes
phipes has joined #ruby
<sec^nd> lambda n: n + 1
jkhwan has quit [Ping timeout: 272 seconds]
<benzrf> sec^nd: if you have an object that you want to pass in the same way as a literal block, you put an & in front
<waxjar_> sec^nd, wouldn't it be easier to just read a good introduction to Ruby? :/
<benzrf> >> plus_one_proc = proc {|n| n + 1}; [1, 2, 3].map(&plus_one_proc)
<eval-in_> benzrf => [2, 3, 4] (https://eval.in/78142)
<sec^nd> waxjar_: I am, I'm asking questions as I go through it though
<benzrf> sec^nd: if the &argument isn't a proc object, it calls to_proc on it to turn it into one
michaeldeol has quit [Ping timeout: 250 seconds]
<benzrf> sec^nd: calling to_proc on a symbol gives you a proc like so:
<sec^nd> >> [1, 2, 3].map({|x| x + 1})
<eval-in_> sec^nd => /tmp/execpad-b826607a00ff/source-b826607a00ff:2: syntax error, unexpected '|', expecting '}' ... (https://eval.in/78143)
<benzrf> sec^nd: remember, that's not a regular arg
momomomomo has joined #ruby
<benzrf> sec^nd: {|x| x + 1} isn't a regular expression
<sec^nd> >> [1, 2, 3].map(&{|x| x + 1})
<eval-in_> sec^nd => /tmp/execpad-5edbededef01/source-5edbededef01:2: syntax error, unexpected '|', expecting '}' ... (https://eval.in/78144)
<benzrf> it's a special piece of syntax
<benzrf> if you want to get a proc object, you can call the proc method
includex has joined #ruby
<benzrf> with the block you want to turn into a proc
Guest53428 has quit [Quit: ZNC - http://znc.in]
<benzrf> :foo.to_proc is the same as proc {|x| x.foo}
<benzrf> that's how Symbol#to_proc is defined
<sec^nd> >> [1, 2, 3].map.to_proc {|x| x + 1}
<eval-in_> sec^nd => undefined method `to_proc' for #<Enumerator: [1, 2, 3]:map> (NoMethodError) ... (https://eval.in/78145)
<apeiros> it's actually a bit more
<apeiros> but that covers most use-cases
<sec^nd> bbl, more tutorials
jrhe has joined #ruby
jrhe has quit [Client Quit]
jrhe has joined #ruby
<sec^nd> >> [1, 2, 3].map {|x| x + 1}
<eval-in_> sec^nd => [2, 3, 4] (https://eval.in/78146)
freerobby has joined #ruby
daidoji has joined #ruby
<sec^nd> ahh so { } is a proc?
<flubba> def λ(&blk)
<flubba> LambdaProxy.new &p
<flubba> p = Proc.new &blk
<flubba> end
<sec^nd> no need to call t_proc etc
<benzrf> sec^nd: no
michaeldeol has joined #ruby
<benzrf> sec^nd: { } is a special syntactic construct that you can only use after method calls
<benzrf> sec^nd: to get a proc you need to call the proc method or Proc.new witha block arg
<MrZYX> flubba: that's def λ; LambdaProxy.new &Proc.new; end ;P
<flubba> >my bad
Monie has joined #ruby
Monie has quit [Max SendQ exceeded]
freerobby1 has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
freerobby has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
Monie has joined #ruby
<sec^nd> How do I create custom getter / setter methods?
<Hanmac> sec^nd: {} is also used for Hash outside of method calls
<Hanmac> >> {:a => 2}.class
<eval-in_> Hanmac => Hash (https://eval.in/78147)
Monie has quit [Max SendQ exceeded]
<sec^nd> Hanmac: so I must add :<var> for the key value?
<benzrf> sec^nd: :foo is a symbol
<sec^nd> What if I want to substitue a value for key?
<sec^nd> >> :a
<eval-in_> sec^nd => :a (https://eval.in/78148)
Monie has joined #ruby
<flubba> >>def fmap(a, &blk); a.map(&blk); end; fmap [1,2,3] {|x| x+1}
<sec^nd> benzrf: What is a symbol?
<eval-in_> flubba => [2, 3, 4] (https://eval.in/78149)
<Hanmac> no :<str> are Symbols, you can use nearly EVERYTHING as a key for a hash
<benzrf> sec^nd: symbols are like strings but immutable and auto,atically interned
mlpinit has joined #ruby
<sec^nd> There are classvars, instance vars, and symbols?
<sec^nd> >> puts :a
<eval-in_> sec^nd => a ... (https://eval.in/78150)
<benzrf> sec^nd: symbols are values
<sec^nd> ahh
<benzrf> sec^nd: not vars
bbloom has joined #ruby
<sec^nd> >> :9001
<eval-in_> sec^nd => /tmp/execpad-f63f9b3850c4/source-f63f9b3850c4:2: syntax error, unexpected tINTEGER, expecting tSTRING_CONTENT or tSTRING_DBEG or tSTRING_DVAR or tSTRING_END (https://eval.in/78151)
<Hanmac> sec^nd: Symbols are like a hybrid between strings, and C-Enum values ...
<benzrf> sec^nd: the idea is that sometimes you use strings to represent text and sometimes you use them to represent names
<benzrf> sec^nd: that is, sometimes you care about what they contain, and sometimes you just care if they're equal
klaut has joined #ruby
<MrZYX> sec^nd: eval-in is for demonstrating, to try stuff out use your local irb please
<benzrf> sec^nd: in ruby, use strings for the former and symbols for the latter
<sec^nd> puts "T: #{:test}"
<LadyRainicorn> (unless the latter is generatef at runtime)
s_kilk has joined #ruby
<LadyRainicorn> (.to_sym is evil)
<Hanmac> LadyRainicorn: did you know about Symbol#upcase ? ;P
havenwood has quit [Remote host closed the connection]
pwh has quit []
komodo has joined #ruby
johnnyfuchs has joined #ruby
<sec^nd> What does to_sym do?
andikr has quit [Remote host closed the connection]
<benzrf> sec^nd: it turns things into symbols
<flubba> >>"blah".to_sym == :blah
<eval-in_> flubba => true (https://eval.in/78152)
<LadyRainicorn> Hanmac: omfg
<benzrf> sec^nd: you can use this syntax for symbols if you want, but it's kind of a bad idea:
havenwood has joined #ruby
<benzrf> >> :'34sdfo oisdf j'
<eval-in_> benzrf => :"34sdfo oisdf j" (https://eval.in/78153)
<LadyRainicorn> I am going to kill myself like right now.
<sec^nd> Why use sym instead of just plain ""?
<benzrf> sec^nd: symbols should ideally look like var names
<benzrf> 14:26 < benzrf> sec^nd: that is, sometimes you care about what they contain, and sometimes you just care if they're equal
<benzrf> 14:26 < benzrf> sec^nd: in ruby, use strings for the former and symbols for the latter
<flubba> :"@lol"
<LadyRainicorn> Symbols are represented differently.
<benzrf> sec^nd: symbols are immutable, strings are mutable
jbpros has quit [Quit: jbpros]
<flubba> ^
<benzrf> >> foo = "wat"; foo << " is this"; p foo
<eval-in_> benzrf => "wat is this" ... (https://eval.in/78154)
<sec^nd> symbols do not eval either
<benzrf> sec^nd: you cannot do that to a symbol
<LadyRainicorn> :x really is :x, always; 'x' is not necessarily the same as 'x'
<sec^nd> kk
<benzrf> sec^nd: don't overuse symbols
<sec^nd> Can I clone a symbol into a string to mutate it?
<benzrf> they're not gc'd
<benzrf> sec^nd: yes, but if you do that you're doing something wrong
colonolGron has quit [Ping timeout: 245 seconds]
petey has quit [Remote host closed the connection]
<LadyRainicorn> It is okay to do :sym.to_s if you must.
<sec^nd> Symbols would like "<string>" in C in that they are stored in the code itself and stay in memory?
<Hanmac> sec^nd: Strings with the same content still uses different places in memory, Symbols with the same content are always the same Object and only uses the same memory place
<LadyRainicorn> But 'str'.to_sym is almost always bad.
<benzrf> sec^nd: not exactly but more or less
petey has joined #ruby
<benzrf> ish
maletor has quit [Quit: Computer has gone to sleep.]
<sec^nd> What if I had a forloop / function which always called 'str'.to_sym, would that create a memory leak because symbols aren't GC'd or would it just store it in the same place in memory?
freerobby has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
jjbohn is now known as jjbohn|afk
<benzrf> sec^nd: same place in memory is kind of the point
<sec^nd> Would it create a leak if '<str>' was a different value and I called to_sym on it (a different value generated each iteration)?
<benzrf> like Hanmac _JUST SAID_
maletor has joined #ruby
<benzrf> sec^nd: it would
<sec^nd> benzrf: I mean does it keep a reference count then?
havenwood has quit [Ping timeout: 245 seconds]
<sec^nd> no GC so I guess not
nomenkun_ has joined #ruby
<benzrf> symbols are like variable names
<sec^nd> more of a lookup table I assume is what is happening in the backend
<benzrf> they are used to identify something, but the content doesn't matter
<benzrf> *of the symbol
rubyracer has joined #ruby
dreamchaser has joined #ruby
dreamchaser has joined #ruby
dreamchaser has quit [Changing host]
tsykoduk is now known as zz_tsykoduk
<benzrf> code that cares about the value of a symbol is like code that cares about the value of a variable name
<benzrf> usually
<sec^nd> also the respond_to? just checks that a method exists correct?
<benzrf> right
<benzrf> mostly
<LadyRainicorn> Usually you would want that to print messages.
matheuscaceres has quit [Quit: matheuscaceres]
<benzrf> matz doth decree that method names should be in second person
allaire has joined #ruby
jkhwan has joined #ruby
<benzrf> that is, as though you are addressing the object
petey has quit [Ping timeout: 252 seconds]
<benzrf> 'Object, do you [respond to] this?'
<benzrf> 'Array, are you [empty?]'
<sec^nd> 'Object, do :method'
nomenkun has quit [Ping timeout: 265 seconds]
<benzrf> send is kind of an oddball in this sense
kirun has joined #ruby
<sec^nd> benzrf: What is send?
<Hanmac> sec^nd: yes and no, there is a helper method named "respond_to_missing?" ... with that "respond_to?" can also return true for methods that does not exist (like for magic getter/setter)
<benzrf> sec^nd: send is for calling methods by name
<benzrf> >> "foo".send(:reverse)
<eval-in_> benzrf => "oof" (https://eval.in/78155)
<benzrf> >> "foo".send('reverse')
<eval-in_> benzrf => "oof" (https://eval.in/78156)
<sec^nd> oh nice so I could do... yar
<sec^nd> nice
<benzrf> in that case you are addressing Ruby itself, not the object
<benzrf> you are saying 'Ruby, send reverse to foo'
<sec^nd> respond_to_missing? would be what?
<sec^nd> benzrf: ahh
<benzrf> not 'foo, send reverse'
<LadyRainicorn> But variable names should be in first person.
<LadyRainicorn> self, me, i, etc.
<sec^nd> benzrf: what if my object overrides send?
iamjarv__ has joined #ruby
<LadyRainicorn> I...
<benzrf> sec^nd: then use __send__
araujo has quit [Read error: Connection reset by peer]
<LadyRainicorn> Don't do that.
xcv has quit [Remote host closed the connection]
<benzrf> but what LadyRainicorn said
komodo has quit [Ping timeout: 246 seconds]
araujo has joined #ruby
<benzrf> this is the reason why python uses __dunder_methods__ instead of regular_names
petey has joined #ruby
<benzrf> :p
xcv has joined #ruby
<sec^nd> benzrf: like __getattr__, etc
<sec^nd> and yes, those are very confusing but handly for stuff like SQLAlchemy etc
<LadyRainicorn> I would prefer those in Ruby tbh.
<Hanmac> benzrf:
<Hanmac> >> [method(:send).owner,method(:__send__).owner]
<eval-in_> Hanmac => [Kernel, BasicObject] (https://eval.in/78158)
jjbohn|afk is now known as jjbohn
<sec^nd> How would I do this
<sec^nd> >> [1, 2, 3].each {|n| puts n + 1}
<eval-in_> sec^nd => 2 ... (https://eval.in/78159)
iamjarvo_ has quit [Ping timeout: 246 seconds]
<LadyRainicorn> Magic is almost always the right answer.
<matti> What is this witchcraft Hanmac
<sec^nd> It doesn't add the n + 1
tannerburson has quit [Quit: tannerburson]
<sec^nd> even with parenthesis (it just makes it a normal function call I assume)
johnnyfuchs has left #ruby [#ruby]
<LadyRainicorn> Yes it does?
<sec^nd> nvm, it actulaly does
<matti> LOL
<sec^nd> ;D
* LadyRainicorn nominates sec^nd for a Programmer of the Century award
<sec^nd> { } is shorthand for do |val| ... end ?
<matti> sec^nd: Not quite.
horrorvacui has quit [Quit: WeeChat 0.4.2]
kostine has quit [Read error: Connection reset by peer]
<sec^nd> matti: what is the difference?
virtualize has joined #ruby
xcv has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
<matti> Its time to get ... let me google that for you running ;p
pwh has joined #ruby
<sec^nd> I have no ida what its called?
<LadyRainicorn> {} is sexier.
rudisimo has joined #ruby
<MrZYX> many people use { } if the return value of the block matters and do end if not
iliketur_ has quit [Quit: zzzzz…..]
rudisimo1 has joined #ruby
<sec^nd> MrZYX: can do end return?
<MrZYX> yes
rudisimo1 has quit [Client Quit]
breakingthings has joined #ruby
Liothen has joined #ruby
<sec^nd> MrZYX: How?
kostine has joined #ruby
<MrZYX> the value of the expression is implicitly returned
<sec^nd> How would I do [1, 2, 3].each! {|n| return n + 1} ?
<sec^nd> How do I return?
maletor has quit [Quit: Computer has gone to sleep.]
<MrZYX> >> [1, 2, 3].each do |n| n+1; end
<eval-in_> MrZYX => [1, 2, 3] (https://eval.in/78160)
<MrZYX> ups
Lewis has joined #ruby
<MrZYX> >> [1, 2, 3].map do |n| n+1; end
<eval-in_> MrZYX => [2, 3, 4] (https://eval.in/78161)
* Hanmac took his grimoire "the black rubynomicon" ;P
graft has joined #ruby
mlpinit has quit [Remote host closed the connection]
<matti> Oh nodes.
<matti> We are doomed.
rudisimo1 has joined #ruby
<sec^nd> MrZYX: so map is like each but allows you to edit a value
<sec^nd> ?
<matti> Hanmac: Are you going to summon Lamacorns?
iamjarv__ has quit [Remote host closed the connection]
rudisimo has quit [Max SendQ exceeded]
<MrZYX> but since the return value matters here, many people prefer [1, 2, 3].map {|n| n+1 }
<matti> Hanmac: Like this one? http://i.imgur.com/LS1lfqd.jpg
havenwood has joined #ruby
<MrZYX> sec^nd: map builds a new array from values the block returns
iamjarvo_ has joined #ruby
<sec^nd> and e.map! does it in place!
<sec^nd> and also returns an array or the array
banister has joined #ruby
<Hanmac> matti i thought i summon a few dæmon services and a a little horde of zombie processes ;P
tannerburson has joined #ruby
tannerburson has quit [Client Quit]
jibi has quit [Ping timeout: 252 seconds]
<matti> Hanmac: Ah.
<matti> Hanmac: ;]
<MrZYX> sec^nd: be careful here, bang methods tend to return nil if the value isn't changed
<bricker> Which do you people prefer:
<MrZYX> >> "FOO".upcase!
<eval-in_> MrZYX => nil (https://eval.in/78162)
<bricker> hsh = options[:something] || {}
<bricker> or
ambushsabre has joined #ruby
<bricker> hsh = Hash.new(options[:something])
<matti> Hanmac: I suppose of #rubyonrails they go for fairy creatures ;p Since there is so much magic there ;]
<sec^nd> This method of not caring about the actual type of a variable, just relying on what methods it supports is known as “Duck Typing”, as in “if it walks like a duck and quacks like a duck…”
<sec^nd> I see the "Duck Typing"
<MrZYX> bricker what about hsh = options.fetch(:something) { {} }?
nomenkun has joined #ruby
rudisimo has joined #ruby
rudisimo1 has quit [Client Quit]
<benzrf> sec^nd: i like my scripting langs to be duck typed
<Hanmac> MrZYX: isnt options.fetch(:something,{}) better?
zeeraw has joined #ruby
<benzrf> sec^nd: static typing is good if theres powerful inference tho
<benzrf> [for non-scripting purposes]
jibi has joined #ruby
<sec^nd> if __FILE__ == $0
<bricker> MrZYX: Trying to go for succinct yet clear. Option #1 achieves the best clarity, but option #2 is easier on the eyes imo
Lewis has quit [Ping timeout: 252 seconds]
<sec^nd> just like pythons if __name__ == "main":
<bricker> er, I guess just "succinct" is the right word
<matti> I wote for Hanmac's answer
Astralum has joined #ruby
brianpWins has joined #ruby
allaire has quit []
nomenkun_ has quit [Ping timeout: 260 seconds]
<benzrf> sec^nd: *__main__
joaoh82 has joined #ruby
rooty_ has joined #ruby
vdf430work has joined #ruby
<rooty_> Hi how can i acvhieve this in ruby for a string (Binary safe string replacement) perl -pi -e 's/pattern/replacement/g' file1
enape_101 has quit [Ping timeout: 260 seconds]
<sec^nd> benzrf: correct!
<apeiros> rooty_: gsub, and read/write with binary encoding
allaire has joined #ruby
nanoyak has joined #ruby
<apeiros> //n sets the encoding of a regex to binary
<LadyRainicorn> ruby -npe 's/evil/good/g' file
<LadyRainicorn> I think
<rooty_> LadyRainicorn: i need to do it on a string not a file
<LadyRainicorn> I've never used it, but should work.
<LadyRainicorn> str.gsub(/evil/, 'good')
colonolGron has joined #ruby
<apeiros> rooty_: I think the equivalent would be: ruby -E binary:binary -pi -e '$_.gsub!(/pattern/n, "replacement")' file1
<sec^nd> doing this now
* LadyRainicorn gives sec^nd a gold star for initiative.
dkamioka has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
nomenkun has quit [Ping timeout: 250 seconds]
<benzrf> sec^nd: if you have ice cream, I will give it to you
<benzrf> sec^nd: if you do not have ice cream, I will take it from you
p4d4w4n has quit [Quit: This computer has gone to sleep]
<benzrf> sec^nd: this is an Ice Cream Koan
p4d4w4n has joined #ruby
jkhwan has quit [Remote host closed the connection]
<sec^nd> What does __ do?
jbpros has joined #ruby
jkhwan has joined #ruby
<benzrf> sec^nd: hmm?
nanoyak has quit [Read error: Operation timed out]
phipes has quit [Remote host closed the connection]
<LadyRainicorn> It makes love to you slowly.
adammokan has quit []
coca_rails has joined #ruby
<sec^nd> benzrf: I see it in a koan
<sec^nd> Is __ just a syntax error?
felixjet has joined #ruby
<sec^nd> Or is __ a variable?
<LadyRainicorn> No.
<LadyRainicorn> It is an identifier.
<benzrf> sec^nd: it means 'fill in this blank'
shadoi has joined #ruby
<benzrf> :P
<LadyRainicorn> So a method or variable.
joaoh82 has quit []
colonolGron has quit [Ping timeout: 250 seconds]
p4d4w4n has quit [Client Quit]
<sec^nd> ahh you can have a function called __ ?
<sec^nd> a method that is
<shevy> yes
maletor has joined #ruby
<sec^nd> kk, thanks
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<shevy> >> def __; puts 'sec^nd learns ruby, that is cool'; end; __
<LadyRainicorn> Yes, but you shouldn't becayse it doesn't play nice with irb or pry.
<eval-in_> shevy => sec^nd learns ruby, that is cool ... (https://eval.in/78163)
Reach has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
nanoyak has joined #ruby
<shevy> sec^nd can sometimes also be used for internal ruby things like __dir__ or __method__
<shevy> >> def _____; puts __method__; end; _____
<eval-in_> shevy => _____ ... (https://eval.in/78164)
<shevy> one day I shall write a project where one is only allowed to use _ for naming methods
btanaka has joined #ruby
<LadyRainicorn> You can do that in Ruby.
virtualize has quit [Quit: Leaving...]
SHyx0rmZ has joined #ruby
michaeldeol has joined #ruby
jkhwan has quit [Ping timeout: 272 seconds]
<Hanmac> sec^nd: "_" is also an important name for variables in blocks
tjbiddle has joined #ruby
<Hanmac> >> [1,2].each {|x,x|} #SyntaxError
<eval-in_> Hanmac => /tmp/execpad-b15d36f5ff95/source-b15d36f5ff95:2: duplicated argument name ... (https://eval.in/78165)
<Hanmac> >> [1,2].each {|_,_|} #no error
<eval-in_> Hanmac => [1, 2] (https://eval.in/78166)
<bricker> :O
xcv has joined #ruby
<LadyRainicorn> Oh hey that is interesting.
<sec^nd> _, ignore this variable
<LadyRainicorn> Also last expression in irb.
<bricker> I knew Ruby ignored _ for "unused variable" warnings, but I thought that was it
<flubba> >>Ruby.is_a?(Object) {|oriented| language}
<eval-in_> flubba => uninitialized constant Ruby (NameError) ... (https://eval.in/78167)
<bricker> didn't realize it went deeper than that
iliketur_ has joined #ruby
<apeiros> bricker: ruby does not do such a thing
<apeiros> _ is a valid local variable
<apeiros> and some IDEs/editors accept variables starting with _ or being named just _ as unused
<apeiros> e.g. rubymine will not report "unused local variable" if you name it _foo
<sec^nd> does _ in irc but execute the last staement?
<sec^nd> Or is it a reference the the output of the last statement?
<apeiros> sec^nd: no, it just returns the last value
<LadyRainicorn> the last value
<sec^nd> kk
Alina-malina has quit [Quit: Leaving]
pkrnj has joined #ruby
blaxter has quit [Quit: KTHXBYE]
iliketur_ has quit [Client Quit]
petey has quit [Remote host closed the connection]
nhhagen has quit [Remote host closed the connection]
petey has joined #ruby
jjbohn is now known as jjbohn|afk
<sec^nd> some of the koans are already done :(
nhhagen has joined #ruby
<flubba> >>[1,2].each {|_|_}
<eval-in_> flubba => [1, 2] (https://eval.in/78169)
tannerburson has joined #ruby
<bricker> apeiros: and the check to see if it is "_" : https://github.com/ruby/ruby/blob/trunk/parse.y#L8731
jkhwan has joined #ruby
drumusician has joined #ruby
elux has joined #ruby
<apeiros> bricker: ah, ok. I don't really use rubys warnings
carraroj has quit [Quit: Konversation terminated!]
<apeiros> so it incorporates that just like some IDEs. nice.
<sec^nd> >> [1, 2].map {|_|}
<sec^nd> >> [1, 2].map {|_| _ }
<eval-in_> sec^nd => [1, 2] (https://eval.in/78170)
jonathanwallace has quit [Ping timeout: 245 seconds]
<eval-in_> sec^nd => [nil, nil] (https://eval.in/78171)
tjbiddle has quit [Quit: tjbiddle]
<sec^nd> >> [1, 2].each {|_| }
<eval-in_> sec^nd => [1, 2] (https://eval.in/78172)
<sec^nd> meh
Fidelix has joined #ruby
Alina-malina has joined #ruby
colonolGron has joined #ruby
Reach has joined #ruby
petey has quit [Ping timeout: 252 seconds]
b00stfr3ak has joined #ruby
nhhagen has quit [Ping timeout: 265 seconds]
<flubba> >>[1, 2].map {|_,_,_,_| _+_}
<eval-in_> flubba => [2, 4] (https://eval.in/78173)
Fidelix|2 has quit [Ping timeout: 250 seconds]
gregoriokusowski has quit [Quit: gregoriokusowski]
mikepack has joined #ruby
Alina-malina has quit [Max SendQ exceeded]
<apeiros> dudes
<apeiros> use irb for your experiments. srsly.
ldnunes has quit [Quit: Leaving]
thaifood has joined #ruby
<apeiros> (or better yet - pry)
Alina-malina has joined #ruby
<apeiros> that was specifically @ flubba and sec^nd
<sec^nd> What is pry?
coca_rails has quit [Ping timeout: 245 seconds]
<benzrf> sec^nd: a much awesomer REPL than irb
<apeiros> an irb replacement
<sec^nd> Also is there a better interactive ruby shell?
<havenwood> sec^nd: Pry is the best.
sepp2k has joined #ruby
<sec^nd> Similar to what ipython is for python
<havenwood> sec^nd: Pry.
<flubba> pry + jazz_hands gem
* havenwood screams PRY!
<benzrf> flubba: what does jazz_hands do
<sec^nd> How do I get pry?
thaifood has left #ruby [#ruby]
<havenwood> sec^nd: gem install pry
<benzrf> sec^nd: gem install pry
<apeiros> I dislike how commands in pry work, though :-/
mojjojo has joined #ruby
<havenwood> apeiros: could disable the commands you don't like, or do you not like any of them? :P
<apeiros> havenwood: I want them prefixed
<sec^nd> What is a good tutorial on gems? will ruby koans cover that?
<apeiros> all to often I stumble over some one-char command when I use a one-char lvar
<benzrf> sec^nd: gem == pip
daidoji has quit [Quit: WeeChat 0.4.1]
<sec^nd> benzrf: Where are the packages installed (gems) if I run it as a normal user, .gem ?
<shevy> the program gimp sucks so much...
mmcdaris has joined #ruby
<benzrf> sec^nd: dunno about local installs
<benzrf> sec^nd: gem may not support em
<shevy> sec^nd usually into SITE DIR
<havenwood> apeiros: In .pryrc set a `Pry.config.command_prefix = 'pry-'` or some other nice prefix maybe?
aspires has joined #ruby
<shevy> SITE_DIR/lib/ruby/gems/1.9.1/cache/*.gem for the backups
<shevy> or 2.0
<apeiros> gotta think of one now
<apeiros> maybe -
<havenwood> apeiros: so then `pry-ls` or `pry-cat` instead of `ls` and `cat`
<apeiros> or just because I'm used to it from irc: /
<havenwood> hehe
buscon_ has joined #ruby
jonathanwallace has joined #ruby
petey has joined #ruby
<havenwood> apeiros: but, but... colors and indentation!
<apeiros> fuckwat?
<sec^nd> shevy: how do I find out site dir?
<MrZYX> sec^nd: gem env
<sec^nd> GEM PATH: ~/.gem/ruby/2.0.0
<sec^nd> yar pry is installed there
<sec^nd> as a user its user install
drumusician has quit [Ping timeout: 246 seconds]
tjbiddle has joined #ruby
hamakn has quit [Remote host closed the connection]
Alina-malina has quit [Max SendQ exceeded]
mark_locklear has quit [Ping timeout: 260 seconds]
hamakn has joined #ruby
<shevy> :)
Alina-malina has joined #ruby
jjbohn|afk is now known as jjbohn
<benzrf> shevy: haskell of the day
jibi has quit [Quit: leaving]
<benzrf> [1,3..15] >>= join replicate
jibi has joined #ruby
komodo has joined #ruby
jrhe has quit [Quit: jrhe]
buscon_ has quit [Remote host closed the connection]
<sec^nd> ruby supports 3..x too huh
<sec^nd> ranges
hellome has quit [Read error: Connection reset by peer]
mando_ has joined #ruby
hellome has joined #ruby
hamakn has quit [Ping timeout: 245 seconds]
blandflakes has quit [*.net *.split]
mojjojo has quit [Quit: mojjojo]
Megtastique has quit []
zoee has joined #ruby
freakazoid0223 has joined #ruby
<rooty_> i appologise if this is a bad question, how can i do this with /n (binary safe regex)
<rooty_> name.gsub!(name, new_name)
lfox has joined #ruby
<apeiros> rooty_: where do you have problems with it?
iamjarvo_ has quit [Remote host closed the connection]
<rooty_> apeiros: ive got a binary string
<apeiros> or rather, do you have a specific problem? if so - code, input, expected output and what happened instead please.
CpuID has joined #ruby
CpuID has joined #ruby
CpuID has quit [Changing host]
petey has quit [Remote host closed the connection]
Megtastique has joined #ruby
iamjarvo_ has joined #ruby
freerobby has quit [Quit: Leaving.]
<rooty_> apeiros: as per the example
SHyx0rmZ has quit [Ping timeout: 246 seconds]
<apeiros> as per what example? I've not seen one…
freerobby has joined #ruby
mando has quit [Ping timeout: 246 seconds]
noop has quit [Ping timeout: 250 seconds]
Scient has quit [Ping timeout: 264 seconds]
preller has quit [Ping timeout: 272 seconds]
iamjarvo_ has quit [Read error: Operation timed out]
<rooty_> name.gsub!(name, new_name)
<apeiros> that's not a usable example.
mando_ has quit [Ping timeout: 245 seconds]
freerobby has quit [Read error: Connection reset by peer]
<rooty_> ok somebinarydump.gsub!(name, new_name)
shedd has quit [Remote host closed the connection]
<rooty_> name is a string and new_name is a string
<apeiros> dude
<apeiros> does "reproducable" ring a bell with you?
<apeiros> I'm not going to riddle what problem you have.
<rooty_> ive not written it
<rooty_> today is the first time im writing ruby code
<apeiros> if you want help, be more forthcoming in providing information. otherwise - have fun solving it yourself.
<rooty_> ive been pretty persistent with providing plenty of information
phipes has joined #ruby
<apeiros> ok, if you think so - have fun.
<rooty_> your a cunt
rooty_ has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
<benzrf> o:
<DouweM> :)
elux has quit [Quit: Leaving...]
funburn has joined #ruby
Scient has joined #ruby
<shevy> benzrf I don't know how you can manage multiple languages at the same time
<benzrf> My brain is magic
SHyx0rmZ has joined #ruby
<shevy> wow
<shevy> we are almost at 1000 idlers here
graft has quit [Ping timeout: 245 seconds]
preller has joined #ruby
<shevy> WE SHALL OVERTAKE #python ONE DAY!
alekst has joined #ruby
<benzrf> lol
carraroj has joined #ruby
<Jamo> :P
nhhagen has joined #ruby
<shevy> #haskell has more than #ruby :(
Mon_Ouie has joined #ruby
pu22l3r_ has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
komodo has quit [Ping timeout: 250 seconds]
<benzrf> shevy: thats cuz #haskell is absurdly awesome
<benzrf> it is the most helpful channel ive ever been in
<shevy> damn elitists
<momomomomo> #ruby-lang is where it's at
<DouweM> benzrf: yes! I haven't spent a lot of time there, but any questions I asked were answered swiftly
<shevy> aren't there only like 300 folks on #ruby-lang?
pu22l3r has quit [Ping timeout: 248 seconds]
<momomomomo> could be
<shevy> let's fight them down
Guedes0 has joined #ruby
<sec^nd> Is everything in ruby an Object?
<momomomomo> sec^nd: yes
Scient has quit [Client Quit]
<DouweM> sec^nd: depends on what you mean by "everything" ;) but generally, yeah
<Jamo> are methods objects too?
vdf430work has quit [Read error: Connection reset by peer]
komodo has joined #ruby
<benzrf> Jamo: no
<benzrf> unlike in PYTHON
<benzrf> :DDD
s_kilk has quit [Quit: Leaving]
<Jamo> ok
<DouweM> Jamo: a method per se isn't, but object.method(:whatever) will return a Proc for the whatever metho
<shevy> sec^nd there are cheating objects
Scient has joined #ruby
<benzrf> sec^nd: you could inherit from BasicObject if u wanted to
<shevy> >> x = 5; def x.hi; puts "hi"; end
funburn has quit [Quit: funburn]
<eval-in_> shevy => can't define singleton (TypeError) ... (https://eval.in/78174)
stonevil has quit [Remote host closed the connection]
<shevy> sec^nd see? 5 is a cheater
<DouweM> sec^nd: everything's an object, not everything's an Object
vlad_starkov has joined #ruby
hiyosi_ has joined #ruby
<DouweM> shevy: goddamn 5
<sec^nd> I've not learned about inheritance in ruby yet
<shevy> :)
<shevy> sec^nd class Foo; end; class Bar < Foo; end <--- this is all you need to know about inheritance in ruby
cpruitt has joined #ruby
<shevy> Jamo well I guess you can turn a method into an object...
<xibalba> momomomomo, the pragmatic programmers book is better no ?
rootshift has joined #ruby
<momomomomo> xibalba: is it free?
elux has joined #ruby
<Hanmac> 18>> x = 5; def x.hi; puts "hi"; end; 5.hi
<eval-in_> Hanmac => can't define singleton method "hi" for Fixnum (TypeError) ... (https://eval.in/78175)
<shevy> >> def foo; puts 'hi'; end; y = method(:foo); y.call
jprovazn has quit [Quit: Odcházím]
<eval-in_> shevy => hi ... (https://eval.in/78176)
<momomomomo> The Well Grounded Rubyist is good as well
<xibalba> i dont care for no starch books. the older version is free momomomomo
<Hanmac> hm interesting
<shevy> hehe... no starch books?
<shevy> do you eat your books or something :)
<xibalba> =D
<xibalba> sometimes
<xibalba> good fiber for the bowel system
<shevy> I am destroying my pickaxe book slowly
preller has quit [Ping timeout: 252 seconds]
<shevy> I write up things from it into my local knowledge base, then toss the page away one after the other
<xibalba> lol
stonevil has joined #ruby
<DouweM> Hanmac: a bunch of classes don't have a singleton class: https://github.com/ruby/ruby/blob/c039c7081594a7e8e7cf5e96abbdc8fc6ac43a21/class.c#L1546
graft has joined #ruby
<shevy> hey benzrf let me show you something
<shevy> you probably have not seen it yet
<benzrf> k
<shevy> >> 1.coerce 2
<eval-in_> shevy => [2, 1] (https://eval.in/78177)
<xibalba> what is a singleton
<DouweM> xibalba: magic
<Hanmac> DouweM: i know about that, i was looking if it was possible before for some classes that was changed later
<xibalba> i dont believe in it
<shevy> benzrf, that should be the same as: 1+2
<shevy> >> 1.coerce 2.3
<eval-in_> shevy => [2.3, 1.0] (https://eval.in/78178)
<shevy> and this should be 1+2.3
<DouweM> Hanmac: ah
<benzrf> shevy: i dont understand
<shevy> well
<shevy> >> 1+2.3
<eval-in_> shevy => 3.3 (https://eval.in/78179)
pushpak has joined #ruby
<shevy> it's ruby's way to deal with coercions
<DouweM> #coerce is great
<Hanmac> xibalba: "singleton_class" it allows objects to be its own class and have methods (and constants) that only exist for this very own object
<shevy> I did not know about it until today
<benzrf> o i c
<platzhirsch> DouweM: that channel is empty
davy_ has quit [Remote host closed the connection]
<DouweM> shevy: I learned about it when reading through the Opal implementation
<shevy> you can see it in error messages like:
<DouweM> platzhirsch: I meant the method :P
<shevy> "Foo can't be coerced into Fixnum (TypeError)"
<sec^nd> Do all classes start with Capital letterS?
<DouweM> sec^nd: Yes
<benzrf> sec^nd: usually yes
<platzhirsch> Opal? That's developed at the technical university here in Berlin :P
<shevy> what is opal
<shevy> is that like a diamond?
<DouweM> shevy: a JS Ruby implementation
<platzhirsch> FP language
<xibalba> thanks Hanmac i'll have to do more readong on it
<platzhirsch> what
<shevy> omg then it can't be any good platzhirsch :(
<DouweM> platzhirsch: haha
<DouweM> platzhirsch: multiple opals, apparently
OdNairy has quit []
<sec^nd> benzrf: so more of a coding standard but not enforced by ruby?
<platzhirsch> Yes, but there is only one Wikipedia article http://en.wikipedia.org/wiki/Opal_(programming_language)
<platzhirsch> to rule them all
CaptainKnots has quit [Remote host closed the connection]
<shevy> did you delete the other wikipedia articles!!!
amedeiros has quit [Ping timeout: 246 seconds]
<Jamo> sec^nd: must begin with capital letter:
<Jamo> irb(main):003:0> class bar; end
<Jamo> SyntaxError: (irb):3: class/module name must be CONSTANT
carraroj has quit [Read error: Connection reset by peer]
<DouweM> sec^nd: when using the class keyword, it needs to be constant, so it needs to start with a capital
<platzhirsch> yes, the TU Berlin hired me as a mercenary
<DouweM> sec^nd: `whatever = Class.new` will work just fine
carraroj has joined #ruby
<platzhirsch> no seriously, Opal the FP language is horrible, just write Haskell
phansch has quit [Remote host closed the connection]
iamjarvo_ has joined #ruby
<DouweM> hah. I can't say anything about that Opal, but the JS Opal is awesome
<sec^nd> DouweM: so constants begin with Capital letters?
<DouweM> sec^nd: yes
<sec^nd> or must begin with
<platzhirsch> but Ruby -> JS seems to be a nice idea, since I hate to miss on all Ruby's utility functions when programming CS :P
<shevy> yes
Nogbit has joined #ruby
<sec^nd> How does ruby generate the fixed object ids for small numbers?
<shevy> if they do not start with a capital letter they are not a constant
preller has joined #ruby
<shevy> sec^nd by cheating
benweint has joined #ruby
<shevy> >> 5.object_id
<sec^nd> >> 0.object_id
<eval-in_> shevy => 11 (https://eval.in/78181)
<eval-in_> sec^nd => 1 (https://eval.in/78182)
<sec^nd> :/
<DouweM> platzhirsch: definitely check it out
<shevy> >> 6.object_id
<eval-in_> shevy => 13 (https://eval.in/78183)
<shevy> >> 6.object_id
<eval-in_> shevy => 13 (https://eval.in/78184)
carraroj has quit [Read error: Connection reset by peer]
<shevy> always the same
michaeldeol has quit [Remote host closed the connection]
carraroj has joined #ruby
<shevy> I am sorry sec^nd, the deeper you dig, the more mud you dig up :(
jrhe has joined #ruby
mojjojo has joined #ruby
<sec^nd> shevy: how are they generated and why not just use regular numbers?
michaeldeol has joined #ruby
<shevy> because of speed reasons
<sec^nd> 0.object_id == 0
<momomomomo> >> [5.object_id, 5.dup.object_id];
<eval-in_> momomomomo => can't dup Fixnum (TypeError) ... (https://eval.in/78185)
<platzhirsch> DouweM: though I am a bit cautious with this approach. Programming in just language makes you st00pid
<benzrf> platzhirsch: have you seen livescript
<platzhirsch> no
<sec^nd> How are they generated then?
<sec^nd> compile time?
<sec^nd> hash?
<shevy> sec^nd I think there is a macro in C
<DouweM> platzhirsch: oh for sure, I'm just impressed by it intellectually. I haven't used it yet and probably won't soon
<momomomomo> >> a = 5; [a.object_id, a.dup.object_id];
<eval-in_> momomomomo => can't dup Fixnum (TypeError) ... (https://eval.in/78186)
<shevy> sec^nd other objects yes, look
<shevy> >> "Hello".object_id
<eval-in_> shevy => 540273020 (https://eval.in/78187)
<shevy> >> "Hello".object_id
<eval-in_> shevy => 541583740 (https://eval.in/78188)
<platzhirsch> benzrf: ah I see
<benzrf> platzhirsch: it is sort of like coffeescript
<DouweM> platzhirsch: reading its source has taught me a lot about Ruby though
vlad_starkov has quit [Read error: Connection reset by peer]
<DouweM> platzhirsch: but nothing you couldn't also learn from reading MRI, or slightly easier: Rubinius
<benzrf> platzhirsch: but it has fucking boatload of sugar
<benzrf> platzhirsch: and some haskellisms
<momomomomo> >> a = 'hello'; [a.object_id,a.dup.object_id];
<eval-in_> momomomomo => [551618810, 551618800] (https://eval.in/78189)
hellome has quit [Remote host closed the connection]
burlyscudd has quit [Quit: Leaving.]
ldnunes has joined #ruby
<momomomomo> >> a = 'hello'; b = a; [a.object_id, b.object_id]
<eval-in_> momomomomo => [551340270, 551340270] (https://eval.in/78190)
<sec^nd> shevy: those values were different!
hellome has joined #ruby
<benzrf> ?!
funburn has joined #ruby
<benzrf> how is that possible?!
<sec^nd> looks like fibinnachi etc
forcefsck has joined #ruby
<sec^nd> benzrf: not a reference, copied it instead ?
<xibalba> >> foo = Array.new
<eval-in_> xibalba => [] (https://eval.in/78191)
flubba has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
iliketur_ has joined #ruby
<xibalba> >> foo = Array.new ; foo[999999999999999999999999] = "oh"
<eval-in_> xibalba => bignum too big to convert into `long' (RangeError) ... (https://eval.in/78192)
<shevy> sec^nd yeah, it gets its own unique object id
<sec^nd> != compares references not objects?
<DouweM> xibalba: that's not a good idea :)
<benzrf> how does that work?!
<sec^nd> keiche!
<benzrf> I thought = was reference ?!
<DouweM> sec^nd: compares objects, it's just the #= method
<DouweM> benzrf: what?
<benzrf> >> a = 'hello'; b = a; [a.object_id, b.object_id]
<xibalba> haha yeah i didn't think it would be a good idea
<eval-in_> benzrf => [540059910, 540059910] (https://eval.in/78193)
michaeldeol has quit [Ping timeout: 245 seconds]
<benzrf> oh wait derp
<benzrf> i thought when momomomomo did that the vals were diff
<benzrf> my bad
<benzrf> phew
<momomomomo> benzrf: When you dup, the values are different
<DouweM> benzrf: he #dup'ed a ;)
Astralum has quit [Quit: Leaving]
<sec^nd> I did obj = Object.new and then copy = obj.clone; obj != copy is true
<DouweM> sec^nd: because Object#= checks identity, not value
<sec^nd> It looks to be comparing references if they aren't equal
michaeldeol has joined #ruby
<sec^nd> ahh
<DouweM> sec^nd: that's the default implementation. String#= checks value, for example
<benzrf> sec^nd: == and != are overridden for many classes
<DouweM> whoops #==
<sec^nd> DouweM: how would I override Object#= ?
mansi has quit [Read error: Connection reset by peer]
<benzrf> sec^nd: ==
<sec^nd> def == ?
<benzrf> sec^nd: yeah
<DouweM> sec^nd: def ==(other); false; end
<sec^nd> kk
<DouweM> sec^nd: same goes for all other operators in Ruby. they're just methods
mansi has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
<DouweM> sec^nd: #[] and #[]= for array/hash indexing as well
<sec^nd> kk
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<sec^nd> nice
freakazoid0223 has quit [Ping timeout: 240 seconds]
<sec^nd> DouweM: Also when you guys say Object#= the # is refering to a method call?
<benzrf> sec^nd: yes
<DouweM> # means instance method, :: meand class method
<sec^nd> DouweM: Is # used anywhere in ruby to reference part of an object
CpuID has quit [Quit: This computer has gone to sleep]
<DouweM> you have File::size and File#size, which are different methods
<DouweM> sec^nd: it's not, that syntax is just used in documentation or conversation
<sec^nd> DouweM: how are those defined in ruby?
pu22l3r_ has quit [Remote host closed the connection]
<sec^nd> How would I define a class method and an instance method?
<MrZYX> it's (mainly) a documentation convention
cgore has joined #ruby
<sec^nd> DouweM: kk, good to know
<benzrf> sec^nd: def defines instance methods
jkhwan has quit [Remote host closed the connection]
<DouweM> sec^nd: File::size is `def self.size`, File#size is `def size`. the one is a class method, the other's an instance method
carraroj has quit [Quit: Konversation terminated!]
<sec^nd> kk
<DouweM> File::size is also referred to as File.size, because that's how you'd actually call it in ruby
<benzrf> sec^nd: if you say 'def foo', that creates an instance method foo on instances of the class you're in
jkhwan has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<sec^nd> do instance methods a reference to self?
whysobad has quit [Ping timeout: 272 seconds]
<DouweM> sec^nd: from an instance method, you can use self, yeah
<benzrf> sec^nd: if you say 'def <something>.foo', that creates a new method called foo on <seomthing>
stonevil_ has joined #ruby
<benzrf> sec^nd: self is the class you're currently defining inside a class definition
mansi has joined #ruby
<DouweM> and here comes the singleton class :)
<benzrf> sec^nd: so 'def self.foo' defines a method foo on the class youre in
mojjojo has quit [Quit: mojjojo]
<benzrf> >> foo = Object.new; def foo.bar; 3; end; foo.bar
<eval-in_> benzrf => 3 (https://eval.in/78194)
<sec^nd> kk
<benzrf> >> foo = Object.new; def foo.bar; 3; end; foo.bar; Object.new.bar
<eval-in_> benzrf => undefined method `bar' for #<Object:0x40a810d4> (NoMethodError) ... (https://eval.in/78195)
<benzrf> sec^nd: every object may have its own 'singleton class'
<DouweM> >> class X; def self.hey; 3; end; end; X.hey
<eval-in_> DouweM => 3 (https://eval.in/78196)
<benzrf> sec^nd: in which methods unique to it are defined
<DouweM> >> class X; end; def X.hey; 3; end; X.hey
<eval-in_> DouweM => 3 (https://eval.in/78197)
<benzrf> sec^nd: so in that example, the 'real class' of foo was some new subclass of Object that was generated when I defined foo.bar
rootshift has quit [Quit: rootshift]
<sec^nd> I see
carraroj has joined #ruby
preller has quit [Ping timeout: 260 seconds]
stonevil has quit [Ping timeout: 252 seconds]
<benzrf> you can use 'class << thing
Jdubs has joined #ruby
<benzrf> to do a class def where the class is an object's singleton classs
petey has joined #ruby
heidi has quit [Quit: Leaving.]
<DouweM> `class << x` enters x's singleton class
<benzrf> >> foo = Object.new; class << foo; def bar; 3; end; def baz; 4; end; end; p foo.bar; p foo.baz
<eval-in_> benzrf => 3 ... (https://eval.in/78198)
shedd has joined #ruby
aapzak has quit [Ping timeout: 250 seconds]
<DouweM> >> class X; end; class << X; def hey; 3; end; end; X.hey
<eval-in_> DouweM => 3 (https://eval.in/78199)
jkhwan has quit [Ping timeout: 272 seconds]
acrussell has left #ruby [#ruby]
<DouweM> benzrf: you've learned a lot in the short while you've been doing Ruby :)
ddd has joined #ruby
maletor has joined #ruby
<benzrf> my brain is also a sponge
<benzrf> in addition to being magic
kitak_ has quit [Remote host closed the connection]
<Hanmac> DouweM: did you know this:
<Hanmac> >> o = Object.new; class << o; ABC = 123;end;end; o::ABC
<eval-in_> Hanmac => /tmp/execpad-60999c151cb2/source-60999c151cb2:3: syntax error, unexpected keyword_rescue, expecting end-of-input ... (https://eval.in/78200)
kitak_ has joined #ruby
<Hanmac> o = Object.new; class << o; ABC = 123;end;end; o.singleton_class::ABC
<Hanmac> >> o = Object.new; class << o; ABC = 123;end;end; o.singleton_class::ABC
<eval-in_> Hanmac => /tmp/execpad-7bfebb7b2066/source-7bfebb7b2066:3: syntax error, unexpected keyword_rescue, expecting end-of-input ... (https://eval.in/78201)
jrhe has quit [Quit: jrhe]
<Hanmac> >> o = Object.new; class << o; ABC = 123;end; o.singleton_class::ABC
<eval-in_> Hanmac => 123 (https://eval.in/78202)
<benzrf> anybody here do sinatra?
<DouweM> Hanmac: I did not!
<Hanmac> benzrf: #sinatra ?
<benzrf> tried Hanmac
<benzrf> its dead atm
mojjojo has joined #ruby
carraroj has quit [Client Quit]
aapzak has joined #ruby
jrhe has joined #ruby
stonevil has joined #ruby
freakazoid0223 has joined #ruby
hellome has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
cflat has joined #ruby
preller has joined #ruby
Nogbit has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
hellome has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
drag00n has quit [Ping timeout: 246 seconds]
cflat has quit [Remote host closed the connection]
Tentra has joined #ruby
vlad_starkov has joined #ruby
koshhen has joined #ruby
cflat has joined #ruby
vt102 has quit [Remote host closed the connection]
stonevil_ has quit [Ping timeout: 246 seconds]
heidi has joined #ruby
vt102 has joined #ruby
vt102 has quit [Remote host closed the connection]
vt102 has joined #ruby
johnmilton has quit [Ping timeout: 260 seconds]
postmodern has joined #ruby
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
aapzak has quit [Ping timeout: 260 seconds]
synergy_ has quit [Read error: Connection reset by peer]
drumusician has joined #ruby
kpshek has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
cgore has quit [Remote host closed the connection]
Tentra has quit [Remote host closed the connection]
Tentra has joined #ruby
CpuID has joined #ruby
aapzak has joined #ruby
dkamioka has quit [Remote host closed the connection]
koshhen has quit [Ping timeout: 272 seconds]
coca_rails has joined #ruby
iliketur_ has joined #ruby
petey has quit []
nateberkopec has joined #ruby
mengu has joined #ruby
breakingthings has quit []
zoee has quit [Quit: This computer has gone to sleep]
senj has joined #ruby
davy_ has joined #ruby
shadoi has quit [Quit: Leaving.]
coca_rails has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
mmcdaris has quit [Quit: mmcdaris]
marz_skilex has joined #ruby
marz_skilex has quit [Client Quit]
LadyRainicorn has quit [Quit: Bye]
johnnyfuchs has joined #ruby
michaeldeol has quit [Remote host closed the connection]
marz_skilex has joined #ruby
geekbri has quit []
johnnyfuchs has left #ruby [#ruby]
Voodoofish4301 has joined #ruby
michaeldeol has joined #ruby
parduse has quit [Read error: Connection reset by peer]
parduse has joined #ruby
mr_white has joined #ruby
Jetchisel has joined #ruby
davy__ has joined #ruby
davy_ has quit [Read error: Connection reset by peer]
allaire has quit []
drumusician has quit [Read error: Connection reset by peer]
drumusician has joined #ruby
aryaching has joined #ruby
michaeldeol has quit [Ping timeout: 246 seconds]
funburn has quit [Quit: funburn]
jedimind has quit [Ping timeout: 260 seconds]
<sec^nd> !
jedimind has joined #ruby
<sec^nd> :uno != "uno"
SHyx0rmZ has quit [Ping timeout: 250 seconds]
<sec^nd> >> :uno == "uno"
<eval-in_> sec^nd => false (https://eval.in/78207)
<benzrf> well yeah
jonathanwallace has quit [Ping timeout: 265 seconds]
<benzrf> one is a symbol, the other is a sring
<benzrf> *string
<sec^nd> so it doesn't compare by string values then
SHyx0rmZ has joined #ruby
<benzrf> ??
foobar3005 has joined #ruby
<benzrf> what doesnt?
<benzrf> Symbol#== compares object identity
lfox has quit [Quit: ZZZzzz…]
<sec^nd> Ahh
<benzrf> remember, symbols are automatically interned
<sec^nd> How do I compare strings then
<benzrf> ==
<sec^nd> ...
<sec^nd> >> "uno" == :uno
<eval-in_> sec^nd => false (https://eval.in/78209)
bnjamin has quit [Remote host closed the connection]
michaeldeol has joined #ruby
<benzrf> foo == bar is the same as foo.==(bar)
<sec^nd> benzrf: see what I'm trying to do?
<benzrf> >> "uno".==(:uno)
nanoyak has quit [Quit: Computer has gone to sleep.]
<eval-in_> benzrf => false (https://eval.in/78210)
<benzrf> you're comparing a symbol and a string
<benzrf> not two strings
<benzrf> why would they be equal
<sec^nd> ahh
<sec^nd> so ..
<mr_white> :uno.to_s == "uno" ?
<DouweM> >> "uno" == "uno"
<eval-in_> DouweM => true (https://eval.in/78211)
<sec^nd> >> :uno.to_s == "uno"
<eval-in_> sec^nd => true (https://eval.in/78212)
<DouweM> >> "uno".equal?("uno")
<eval-in_> DouweM => false (https://eval.in/78213)
<sec^nd> so there is an equal method too
<DouweM> yes, equal always checks identity
<sec^nd> ahh
<DouweM> Object#==, so the default implementation, calls #equal?
<DouweM> String#== overrides that
foobar3005 has quit [Client Quit]
<Hanmac> there is also eql?
rezzack has joined #ruby
<sec^nd> Why might you want to use #fetch instead of #[] when accessing hash keys?
<DouweM> sec^nd: but why are you comparing string and symbol?
<sec^nd> because of nil!
<sec^nd> fetch throws an error, otherwise you get nil
<DouweM> sec^nd: the former allows you to set a default value
mr_white has left #ruby ["Textual IRC Client: www.textualapp.com"]
<sec^nd> also that
<sec^nd> like get in python for dict
jibi has quit [Quit: .]
simoz has joined #ruby
<DouweM> >> h = { a: nil }; [h[:a], h[:b], h.fetch(:a, "default_a"), h.fetch(:b, "default_b")]
<eval-in_> DouweM => [nil, nil, nil, "default_b"] (https://eval.in/78214)
mercwithamouth has joined #ruby
<DouweM> :a is actually in h, so #fetch correctly returns nil instead of going with the default
<DouweM> if you'd done `h[:a] || "default_a"`, it wouldn't work with nil and false
<Hanmac> DouweM & sec^nd: an info about ==, eql? and equal?
<Hanmac> >> [(3.0) == 3.0,(3.0).eql?(3.0),(3.0).equal?(3.0),(3.0) == 3,(3.0).eql?(3),(3.0).equal?(3)]
<eval-in_> Hanmac => [true, true, false, true, false, false] (https://eval.in/78215)
lkba has quit [Ping timeout: 272 seconds]
<DouweM> ah nice, I would've forgotten to mention the 3.0/3 case
<Hanmac> very important is that (3.0).equal?(3.0) may return true for 2.1+ and 64 bit
michaeldeol has quit [Ping timeout: 265 seconds]
stonevil has quit [Remote host closed the connection]
<DouweM> Hanmac: link?
LuxuryMode has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
includex has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmimi has quit [Ping timeout: 240 seconds]
simoz2 has joined #ruby
<Hanmac> hm it is also for 2.0 ... look for flonum
johnmilton has joined #ruby
lfox has joined #ruby
gianlucadv has quit [Ping timeout: 260 seconds]
<DouweM> ah, neat
stonevil has joined #ruby
forcefsck has quit [Quit: Ex-Chat]
komodo has quit [Ping timeout: 264 seconds]
rubyracer has quit [Quit: Konversation terminated!]
<DouweM> >> (2.0).equal?(2.0)
<eval-in_> DouweM => false (https://eval.in/78216)
<DouweM> eval.in runs 2.0.0
<MrZYX> 19>> (2.0).equal?(2.0)
<eval-in_> MrZYX => false (https://eval.in/78217)
<s2013> i havean ordered has of timestamps and some value. like { "timestamp" => 123, ... } i need to change all the timestamps frmo datetime to date
<s2013> i tried using map, keys.each, etc.
<Hanmac> DouweM: yes, but evalin runs on 32bit
<DouweM> Hanmac: ah, right.
weszlem has joined #ruby
Xeago_ has joined #ruby
vlad_starkov has joined #ruby
hellome has quit [Remote host closed the connection]
simoz has quit [Ping timeout: 246 seconds]
<MrZYX> s2013: something like Hash[hsh.map {|k, v| [k, v.to_date] }] should do
<s2013> oh
jmimi has joined #ruby
joshu has joined #ruby
jonathanwallace has joined #ruby
<platzhirsch> When I get sad because my MongoDB-powered app is so slow, I add an index, stop being sad and be awesome instead.
dhruvasagar has quit [Ping timeout: 260 seconds]
shime has quit [Ping timeout: 272 seconds]
benweint has quit [Quit: Computer has gone to sleep.]
g0bl1n has quit [Ping timeout: 246 seconds]
rf has joined #ruby
Xeago has quit [Ping timeout: 245 seconds]
enape_101 has joined #ruby
virtualize has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
shedd has joined #ruby
Rollabunna has joined #ruby
bnjamin has joined #ruby
fijimunkii has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
thesheff17 has quit [Quit: Leaving]
phipes has quit [Remote host closed the connection]
Xeago_ has quit [Ping timeout: 260 seconds]
cascalheira has joined #ruby
benweint has joined #ruby
p0wn3d has quit [Quit: ChatZilla 0.9.90.1 [Firefox 17.0.11/20131119163834]]
justsee has joined #ruby
nanoyak has joined #ruby
Rollabun_ has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
plotter has quit [Ping timeout: 245 seconds]
nobitanobi has quit [Ping timeout: 250 seconds]
mmcdaris has joined #ruby
nobitanobi has joined #ruby
lkba has joined #ruby
jkhwan has joined #ruby
threesome has quit [Read error: Operation timed out]
bradhe has quit [Remote host closed the connection]
Es0teric has joined #ruby
akonny has quit [Quit: akonny]
michaeldeol has joined #ruby
stonevil has quit [Remote host closed the connection]
Voodoofish430 has left #ruby [#ruby]
michaeldeol has quit [Read error: Connection reset by peer]
claymore has quit [Quit: Leaving]
davy__ has quit [Remote host closed the connection]
mansi has quit [Remote host closed the connection]
Fidelix has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
akonny has joined #ruby
mansi has joined #ruby
andrewstewart_ is now known as andrewstewart
senj has quit [Ping timeout: 246 seconds]
mansi has quit [Read error: Connection reset by peer]
Guedes0 has quit [Ping timeout: 245 seconds]
freakazoid0223 has quit [Ping timeout: 240 seconds]
freakazoid0223 has joined #ruby
mansi has joined #ruby
rudisimo has quit [Ping timeout: 245 seconds]
brianpWins has quit [Quit: brianpWins]
rudisimo has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
mmcdaris has quit [Ping timeout: 246 seconds]
stonevil has joined #ruby
fijimunkii has joined #ruby
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
mando has joined #ruby
MrZYX is now known as MrZYX|off
stringoO has quit [Read error: Connection reset by peer]
bean__ has joined #ruby
bradhe has joined #ruby
ddd has quit [Disconnected by services]
ddd1 has joined #ruby
rudisimo1 has joined #ruby
freerobby has joined #ruby
rudisimo has quit [Ping timeout: 260 seconds]
interactionjaxsn has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
tylershipe has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 264 seconds]
stringoO has joined #ruby
havenwood has joined #ruby
tylershipe has joined #ruby
interactionjaxsn has joined #ruby
zombiebit has joined #ruby
d45h has joined #ruby
Guedes0 has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
davy_ has joined #ruby
<xibalba> when people say " I'm a full-stack Rails developer" what do they mean by full-stack
tylershipe has quit [Ping timeout: 252 seconds]
<xibalba> backend / front end for web apps?
<xibalba> ruby/js/html ?
yfeldblum has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
havenwood has quit [Ping timeout: 260 seconds]
<platzhirsch> xibalba: maybe a bit more general http://www.laurencegellert.com/2012/08/what-is-a-full-stack-developer/
<xibalba> ty
doodlehaus has joined #ruby
phipes has joined #ruby
doodlehaus has quit [Client Quit]
<platzhirsch> worth aspiring for, just sometimes a bit hard to imagine that someone can cover all these fields :)
* Hanmac can write an HTTP server in C ;P
yfeldblu_ has joined #ruby
enape_101 has quit [Ping timeout: 260 seconds]
<xibalba> i can, void main { while(true) { fork(); } return; }
rudisimo1 has quit [Quit: Leaving.]
<momomomomo> Hanmac: I can't do that, but I consider having to be my own PM, define / outline the project, run and sys admin my own servers, build the front and back end including any additional services needed in addition to the web app, etc. to make me a full stack dude
gyre007 has joined #ruby
<xibalba> platzhirsch, cool sections #1 and #2 check
<matti> Hanmac: In C?
<matti> Hanmac: Will it handle 10k problem?
clamstar has quit [Quit: Computer has gone to sleep.]
<matti> ;]
jbpros has quit [Quit: jbpros]
<Hanmac> matti yes, i am an full educated programmer ... when learning programing languages, one of the first was C and then we managed to make an http server in C with listen and other functions
<momomomomo> Hanmac: I started with C but didn't make an http server, did some bit level jpeg analysis etc
jedimind has quit [Quit: Textual IRC Client: www.textualapp.com]
tannerburson has quit [Quit: tannerburson]
<momomomomo> I do want to dig into the mine craft clone in C I saw on HN earlier though
Guedes0 has quit [Ping timeout: 252 seconds]
enape_101 has joined #ruby
asobrasil has quit [Read error: Connection reset by peer]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
nobitanobi has quit [Read error: Connection reset by peer]
coca_rails has joined #ruby
justsee has quit [Ping timeout: 246 seconds]
mercwithamouth has quit [Ping timeout: 250 seconds]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<matti> Hanmac: Full-Educated programmer ;]
flubba has joined #ruby
<matti> Hanmac: I started with C and made into Kernel changelog ;p
<matti> Hanmac: It can power your HTTP server now.
<matti> ;]
<xibalba> do you guys find alot of jobs requiring a college degree? or self-taught is fine too
bradhe has quit [Remote host closed the connection]
<matti> xibalba: I graduated physics ;p
<xibalba> i have yet to graduate!
breakingthings has joined #ruby
<xibalba> only did about 50% of college
asobrasil has joined #ruby
<platzhirsch> xibalba: most of the time I saw that a college-degree is not required, if you have the same years of industry experience
fmendez has quit [Quit: fmendez]
<platzhirsch> US based jobs
asobrasil has quit [Max SendQ exceeded]
<matti> xibalba: My point was - I work in IT and nobody cares ;p
randomnick_ has joined #ruby
<xibalba> yea i'm US based
<xibalba> ok
<xibalba> why didn't you do something in physics?
<xibalba> physics is cool man
CpuID has quit [Ping timeout: 265 seconds]
<matti> xibalba: I would starve to death as Physicist in Poland ;s
<xibalba> ah, good point
<xibalba> come to the USA!
<platzhirsch> Though I wouldn't advise to go to college just to get a job afterwards, although study fees is an issue here
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
kpshek has quit []
<xibalba> im torn on going back to school. i'm 29, did about half of it. have 13 years of industry experience (sys admin mostly, some coding about 8 years ago)
<Hanmac> matti: Kernel ... okay i didnt reached that level YET ... but i am commited things in many other projects like cegui or wx or sfml or glfw (mostly to inproof my bindings)
<Hanmac> matti: shevy says that when my commits will reach the Kernel, the IT worldwide will collapse and the universe will end ;P
mmitchel_ has joined #ruby
<matti> Hanmac: No ;p
<platzhirsch> xibalba: you are already half-away through, why quit now?
<matti> Hanmac: I just did bug fixes in shit I was workig with day-to-day.
<matti> Hanmac: Its not a rocket science.
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xibalba> platzhirsch, school has gone up almost 3x the price :(
benzrf has left #ruby [#ruby]
<xibalba> use to be $12 per unit credit, now it's $45-$50
asobrasil has joined #ruby
<xibalba> i should ask my work to pay
jibi has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<matti> Hanmac: I used to work on embedded devices and WiFi ...
<platzhirsch> By the way, what's if you just study at a community college?
nhhagen has quit [Remote host closed the connection]
<platzhirsch> isn't that legitimate?
p4d4w4n has joined #ruby
<matti> xibalba: You have to be crazy to study in the US.
<matti> xibalba: Unless you are dirt rich.
b00stfr3ak has quit [Ping timeout: 245 seconds]
asobrasil has joined #ruby
<xibalba> ha, what choice do i have? i was born here
<matti> xibalba: You finish and you are in debt already.
asobrasil has quit [Max SendQ exceeded]
kpshek has joined #ruby
thevishy has quit [Ping timeout: 260 seconds]
<matti> xibalba: UK is cheaper.
<xibalba> yeah, i put my wife through school. she only had $5k in debt
<platzhirsch> Well it's too late to tell now matti ;)
* Hanmac maybe wanted to study a bit but i would need abi for that
io_syl has joined #ruby
<xibalba> matti, only for its citizens
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<matti> xibalba: Woo some English girl ;]
<platzhirsch> come to Germany, we have cookies
shadoi has joined #ruby
<xibalba> ha i wish
<xibalba> i can't speak a word of German
<matti> Hanmac: Haha
<xibalba> Bratwurst?
<matti> xibalba: They are classes in English.
<platzhirsch> xibalba: that should suffice
<matti> xibalba: Education in Poland is free on any level
<matti> xibalba: Also, classes in English ;s
<platzhirsch> xibalba: what college are you attending?
<matti> xibalba: Granted, its not MIT ;p
elux has quit [Quit: Leaving...]
<xibalba> i only went to a local community college
mmitchell has quit [Ping timeout: 272 seconds]
<platzhirsch> ah ok
<platzhirsch> and how high are the fees there?
<xibalba> now about $50 per credit
<xibalba> use to be $12
<xibalba> less than 10 years ago
mengu has quit [Remote host closed the connection]
<platzhirsch> and how many credits do you need to make for a bachelor's degree
<platzhirsch> 180?
mmitchel_ has quit [Ping timeout: 260 seconds]
asobrasil has joined #ruby
p4d4w4n has quit [Client Quit]
<xibalba> i think so
asobrasil has quit [Max SendQ exceeded]
batchitcray has quit [Ping timeout: 240 seconds]
liamkeily has joined #ruby
<matti> 360
<matti> IIRC
<platzhirsch> well, that's about the same loan I have to pay back to the state
<matti> Its 360 in UK.
<xibalba> brb
kitak_ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
thevishy has joined #ruby
asobrasil has joined #ruby
duggiefresh has quit [Remote host closed the connection]
kitak_ has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<platzhirsch> 360 would be different :D I always thought community colleges are free
<platzhirsch> mostly
CpuID has joined #ruby
<matti> platzhirsch: Is education in Germany free?
asobrasil has joined #ruby
* matti has no idea.
<platzhirsch> Matti: yes
aryaching_ has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<matti> Same then.
<platzhirsch> you have to pay a small fee, for your ticket, but it's not comparable
<matti> Yeah
interactionjaxsn has quit [Remote host closed the connection]
<matti> 150k in the US? Nuts.
<matti> I rather save that and buy a house.
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<matti> Or invest in own business.
interactionjaxsn has joined #ruby
mikepack has joined #ruby
<platzhirsch> I don't know. It's easy to see from the perspective abroad :)
<platzhirsch> s/see/say
LiquidInsect has joined #ruby
aryaching has quit [Ping timeout: 245 seconds]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
dev1x is now known as rfx86
ItSANgo has quit [Quit: Leaving...]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
d2dchat has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 252 seconds]
asobrasil has quit [Max SendQ exceeded]
<matti> ;p
<shevy> that debt-system is a true perversion
<matti> +1
CpuID has quit [Ping timeout: 245 seconds]
asobrasil has joined #ruby
<matti> shevy: Well said.
slash_join is now known as slash_nick
asobrasil has quit [Max SendQ exceeded]
<platzhirsch> Ivy-league is a perversion
nettoweb has quit [Quit: nettoweb]
interactionjaxsn has quit [Ping timeout: 252 seconds]
mikepack has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
<platzhirsch> How would you get all keys from a hash, also the nested ones?
<shevy> by sanitizing the hash, then calling .keys on it
<shevy> :D
jrhe has quit [Quit: jrhe]
nhhagen has joined #ruby
<matti> For sanitising hash use Domestos.
virtualize has quit [Quit: Leaving...]
havenn has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
havenwood has quit [Read error: Connection reset by peer]
<platzhirsch> I'd rather sanitize it than santise
duggiefresh has joined #ruby
breakingthings has quit []
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
alekst has quit [Quit: Leaving...]
thevishy has quit [Remote host closed the connection]
bradhe has joined #ruby
m8 has quit [Quit: Sto andando via]
zombiebit has quit [Quit: alem buysa kral ruby]
sailias has quit [Ping timeout: 272 seconds]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
iamjarv__ has joined #ruby
nwertman has quit [Quit: leaving]
<bnagy> platzhirsch: simple recursion is probably the most readable
<apeiros> Hash#unretardize
Lewis has joined #ruby
<platzhirsch> haha
tylersmith has quit [Read error: Connection reset by peer]
<platzhirsch> Hash you are drunk, go home
<apeiros> Hash#soberize ?
iamjarv__ has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
jrhe has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
zeeraw has joined #ruby
<bnagy> def deep_keys(hsh, keys=[]) keys.concat hsh.keys; hsh.values.select {|v| v.respond_to? :keys} ...
<bnagy> blah blah
schaary_ has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
asobrasil has joined #ruby
<platzhirsch> yeah :)
asobrasil has quit [Max SendQ exceeded]
drag00n has joined #ruby
<apeiros> what about hashes as values?!?!?!?
Zai00 has joined #ruby
<bnagy> you mean as keys?
<matti> HashBrown#deep_fried
<apeiros> errr, d'uh, yes
<bnagy> true, dint handle em, my bad
johnmilton has quit [Remote host closed the connection]
<platzhirsch> it's alright, maybe I implement it differently. Doing too much premature optimization at the moment
iamjarvo_ has quit [Ping timeout: 250 seconds]
<apeiros> platzhirsch: use proper classes.
jmimi has quit [Ping timeout: 264 seconds]
<apeiros> deeply nested primitive containers are bad, m'key?
<platzhirsch> It's apeiros with the ABSTRACTION SLEDGEHAMMER
asobrasil has joined #ruby
<apeiros> yes, an abstraction a day helps to keep the psychiatrist away.
asobrasil has quit [Max SendQ exceeded]
<platzhirsch> :)
BraddBitt is now known as clindsay
coldmethod has joined #ruby
* apeiros ponders whom to (miss-)attribute that quote…
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
terrellt has joined #ruby
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<terrellt> Metaprogramming question - how do I dynamically define an instance method from within a module that was extended?
<apeiros> terrellt: are you sure your terminology is correct?
<terrellt> Yes.
schaary_ has quit [Quit: Textual IRC Client: www.textualapp.com]
asobrasil has joined #ruby
<apeiros> i.e., was it really the module on which extend was called?
asobrasil has quit [Max SendQ exceeded]
<terrellt> A class extended a module, that module needs some metacode to define an instance method.
iamjarvo_ has joined #ruby
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenn has quit [Ping timeout: 260 seconds]
jmimi has joined #ruby
<apeiros> yeah, no, I don't think your terminology fits. please paste the code of what you're doing.
mercwithamouth has joined #ruby
<apeiros> (then we don't have to guess what you mean by what you say)
phipes has quit [Read error: Connection reset by peer]
iamjarvo_ has quit [Client Quit]
<terrellt> Fair point. One moment.
asobrasil has joined #ruby
phipes has joined #ruby
asobrasil has quit [Max SendQ exceeded]
CpuID has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
<terrellt> https://gist.github.com/terrellt/302bf8b35f5fb3813565#file-rdf_properties-rb-L36-L46 Trying to replace this with something like define_method. Best idea i have in me is to use include instead, and use the self.class.extend ClassMethods piece.
komodo has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
tylersmith has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
zz_jrhorn424 is now known as jrhorn424
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
shedd has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
stonevil has quit [Remote host closed the connection]
asobrasil has quit [Max SendQ exceeded]
tjbiddle has quit [Quit: tjbiddle]
stonevil has joined #ruby
mercwithamouth has quit [Ping timeout: 250 seconds]
MattStratton has joined #ruby
<apeiros> not sure - why do you want to replace that? o0
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
d45h has quit []
agjacome has quit [Ping timeout: 246 seconds]
michaeldeol has joined #ruby
<terrellt> It's hard to look at and debug what's essentially a string is all.
momomomomo has quit [Quit: momomomomo]
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
araujo has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 272 seconds]
fdelacruz has quit [Quit: EPIC5-1.1.6[1699] - amnesiac : Press [ESC] to detonate or any other key to explode]
araujo has joined #ruby
jerius has quit [Ping timeout: 246 seconds]
<apeiros> well, you can almost 1:1 replace it with a define_method, you only need an if/else for the parent
pwh has quit []
Tentra has quit [Ping timeout: 250 seconds]
davy_ has quit [Remote host closed the connection]
asobrasil has joined #ruby
<apeiros> if self < ActiveFedora::Datastream then define_method("#{name}=") do |*args| parent.set_value(name, *args) end …
asobrasil has quit [Max SendQ exceeded]
<apeiros> and the else without `parent.`
jkline has joined #ruby
<apeiros> though IMO the string variant is better
<terrellt> Is there some way I can do self.send(:something) and get self
<terrellt> ?
<terrellt> And what makes the string variant better in your opinion?
freerobby has quit [Quit: Leaving.]
<apeiros> why so complicated? self is self
stonevil has quit [Ping timeout: 264 seconds]
asobrasil has joined #ruby
<terrellt> Because if I can do that then I can set parent to a symbol and just do it once - self.send(:parent).set_value
asobrasil has quit [Max SendQ exceeded]
asobrasil has joined #ruby
<terrellt> Bah, self.send(parent)
asobrasil has quit [Max SendQ exceeded]
<apeiros> use __send__ if you don't know what self is
asobrasil has joined #ruby
asobrasil has quit [Max SendQ exceeded]
marz_skilex has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has quit [Ping timeout: 245 seconds]
peregrine81 has quit []
pyx has joined #ruby
asobrasil has joined #ruby
pyx has quit [Client Quit]
asobrasil has quit [Max SendQ exceeded]
freerobby has joined #ruby
sergicles has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
nhhagen has quit [Remote host closed the connection]
enape_101 has quit []
<terrellt> Is something like https://gist.github.com/terrellt/737328b7ecd690f2c14d not possible?
amacgregor has joined #ruby
joaoh82 has joined #ruby
sailias has joined #ruby
<apeiros> add a method `self` as `def self; self; end`
ItSANgo has joined #ruby
<apeiros> >> x = "wee!"; def x.self; self; end; x.__send__(:self)
<eval-in_> apeiros => "wee!" (https://eval.in/78218)
DeProdigy has quit [Ping timeout: 250 seconds]
jchristi has quit [Ping timeout: 250 seconds]
<terrellt> That works, but that's a little unfortunate.
davy_ has joined #ruby
nateberkopec has quit [Quit: Leaving...]
aspires has quit []
s2013 has quit [Ping timeout: 246 seconds]
nowthatsamatt has quit [Quit: nowthatsamatt]
<jkline> what does Ruby -S (capital S) do?
<Hanmac> jkline: ruby --help says: " look for the script using PATH environment variable"
simoz has joined #ruby
bean__ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jkline> sigh, the website I was reading does have that...
Lewis has quit [Remote host closed the connection]
simoz2 has quit [Ping timeout: 245 seconds]
<jkline> must be old
charliesome has joined #ruby
freerobby has quit [Quit: Leaving.]
zz_tsykoduk is now known as tsykoduk
pwh has joined #ruby
niklasb has quit [Ping timeout: 260 seconds]
phipes has quit [Remote host closed the connection]
duggiefr_ has joined #ruby
shime has joined #ruby
Lewis has joined #ruby
tjbiddle has joined #ruby
roolo has joined #ruby
MattStratton has quit [Remote host closed the connection]
ringaroses has joined #ruby
charliesome has quit [Ping timeout: 246 seconds]
<speakingcode-wor> anyone use geminabox to host private gems? is it possible for a client without geminabox to push to a geminbox server via gem push w/ some flag to specify the location?
cdolan has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 272 seconds]
tjbiddle has quit [Client Quit]
dkamioka has joined #ruby
<speakingcode-wor> oh, --host
stringoO has quit [Quit: stringoO]
duggiefresh has quit [Ping timeout: 250 seconds]
polaco has quit [Quit: HTTP/1.1 410 Gone]
IceDragon has quit [Ping timeout: 265 seconds]
IceDragon has joined #ruby
danman has quit [Quit: danman]
freerobby has joined #ruby
coffeina has joined #ruby
polaco has joined #ruby
drugdiq has joined #ruby
burlyscudd has joined #ruby
<drugdiq> hi what is a good debugger to check execution steps for ruby ?
mootpointer has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
elux has joined #ruby
tylersmith has joined #ruby
jrhe has quit [Quit: jrhe]
havenwood has joined #ruby
Rollabun_ has quit [Remote host closed the connection]
benweint has quit [Quit: Computer has gone to sleep.]
kpshek has quit []
jinie has quit [Quit: ZNC - http://znc.in]
Tentra has joined #ruby
joaoh82 has quit [Remote host closed the connection]
Rollabunna has joined #ruby
<Lewis> drugdiq: I'm not sure actually. I know in rails there's debugger
Monie has joined #ruby
shedd has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Monie has quit [Max SendQ exceeded]
<drugdiq> ruby-debug says Can't handle 1.9.x yet
tylersmith has quit [Read error: Connection reset by peer]
Monie has joined #ruby
tylersmith has joined #ruby
komodo has quit [Ping timeout: 250 seconds]
mojjojo has quit [Quit: mojjojo]
benweint has joined #ruby
Nogbit has joined #ruby
xcv has quit [Read error: Connection reset by peer]
xcv has joined #ruby
simoz2 has joined #ruby
fmendez has joined #ruby
aryaching has joined #ruby
mansi has quit [Remote host closed the connection]
Rollabunna has quit [Ping timeout: 246 seconds]
mansi has joined #ruby
drumusician has quit [Ping timeout: 246 seconds]
shedd has quit [Ping timeout: 250 seconds]
simoz has quit [Ping timeout: 250 seconds]
TigerWolf has joined #ruby
jlast_ has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
freerobby has quit [Quit: Leaving.]
phantummm has quit [Quit: phantummm]
DeProdigy has joined #ruby
coffeina has quit [Quit: Wychodzi]
mojjojo has joined #ruby
kitak_ has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 246 seconds]
<shevy> Hanmac when will you release a gem for wxwidget :P
Deele has quit [Ping timeout: 260 seconds]
<Hanmac> when the core classes are maked, (samples can be added later ;P)
justincampbell_ has joined #ruby
enebo has quit [Quit: enebo]
mansi has quit [Ping timeout: 245 seconds]
dopie has joined #ruby
freerobby has joined #ruby
<dopie> anyone ever use phantomjs with poltergeist here?
coldmethod has quit [Remote host closed the connection]
<Hanmac> shevy did you see my big rewrite i posted to you?
justincampbell_ has left #ruby [#ruby]
sambao21 has quit [Quit: Computer has gone to sleep.]
justincampbell has joined #ruby
<justincampbell> dopie: i have
charliesome has joined #ruby
jlast has quit [Ping timeout: 272 seconds]
freerobby1 has joined #ruby
jlast_ has quit [Ping timeout: 265 seconds]
MattStratton has joined #ruby
clov3r has quit []
xcv has quit [Remote host closed the connection]
xcv has joined #ruby
freerobby2 has joined #ruby
sheap has joined #ruby
freerobby1 has quit [Read error: Connection reset by peer]
<justincampbell> #phillyrb is starting and being livestreamed https://www.youtube.com/watch?v=n3ovgi6Y-sk
freerobby has quit [Ping timeout: 252 seconds]
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
<shevy> Hanmac yeah but I need a gem!
kh019267 has quit [Ping timeout: 250 seconds]
dkamioka has quit [Remote host closed the connection]
d2dchat has joined #ruby
joaoh82 has joined #ruby
xcv has quit [Ping timeout: 246 seconds]
justsee has joined #ruby
colonolGron has quit [Quit: Lost terminal]
gestahlt has quit [Quit: ChatZilla 0.9.90.1 [Firefox 25.0.1/20131115105702]]
MattStratton has quit [Ping timeout: 264 seconds]
kostine has quit [Quit: kostine]
hadees has joined #ruby
kostine has joined #ruby
cpruitt has quit [Quit: cpruitt]
ambushsabre has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elux has quit [Quit: Leaving...]
CpuID has quit [Quit: This computer has gone to sleep]
shime has quit [Ping timeout: 264 seconds]
emocakes has joined #ruby
cpruitt has joined #ruby
kostine has quit [Client Quit]
p4d4w4n has joined #ruby
nhhagen has joined #ruby
sheap has left #ruby [#ruby]
Lewis has quit [Remote host closed the connection]
jibi has quit [Quit: .]
coca_rails has joined #ruby
drag00n has quit [Ping timeout: 252 seconds]
nettoweb has joined #ruby
Lewix has joined #ruby
nobitanobi has joined #ruby
michaeldeol has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
pwh has quit []
hashpuppy has quit [Quit: Textual IRC Client: www.textualapp.com]
CpuID has joined #ruby
coca_rails has quit [Ping timeout: 245 seconds]
klaut has quit [Remote host closed the connection]
ffranz has quit [Read error: Connection reset by peer]
justsee has quit [Ping timeout: 260 seconds]
zomgbie has quit [Read error: Connection reset by peer]
kiba has joined #ruby
zomgbie has joined #ruby
ahawkins has quit [Ping timeout: 245 seconds]
shedd has joined #ruby
jekt has quit [Quit: This computer has gone to sleep]
agjacome has joined #ruby
Lewix has quit [Remote host closed the connection]
valesk has quit [Read error: Connection reset by peer]
davy_ has quit [Remote host closed the connection]
batchitcray has joined #ruby
hiall has joined #ruby
lfox has quit [Quit: ZZZzzz…]
rootshift has joined #ruby
Lewix has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
L8D has joined #ruby
joaoh82 has quit [Remote host closed the connection]
Lewix has quit [Changing host]
Lewix has joined #ruby
shedd has quit [Ping timeout: 265 seconds]
Lewix has quit [Remote host closed the connection]
<shevy> hmm if I want to find a specific line in a file, that has something like /fox/
<shevy> how could I return the number? like "the word fox can be found on line 33"
phipes has joined #ruby
blackmesa has quit [Quit: WeeChat 0.4.2]
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros> shevy: find_index
<shevy> ah cool