apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p327: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com
i_s has joined #ruby
jsaak has joined #ruby
havenn has quit [Remote host closed the connection]
kirun has quit [Quit: Client exiting]
mengu has quit [Remote host closed the connection]
jrunning_ has quit [Ping timeout: 255 seconds]
Xeago has quit [Remote host closed the connection]
freeayu has joined #ruby
samuel02 has quit [Ping timeout: 251 seconds]
mmitchel_ has joined #ruby
arya has joined #ruby
jenrzzz has joined #ruby
mmitchell has quit [Ping timeout: 246 seconds]
havenn has joined #ruby
schleppy1 has quit [Quit: Leaving.]
Yarou_ has joined #ruby
branon has joined #ruby
<shevy> I would
<shevy> I dont even know .chunk
<shevy> hmmmm
<shevy> [1, 1, 3, 3, 1, 4].chunk {|x| x }.to_a # => [[1, [1, 1]], [3, [3, 3]], [1, [1]], [4, [4]]]
tomsthumb has quit [Quit: Leaving.]
<shevy> what's this doing?
Yarou has quit [Ping timeout: 252 seconds]
branon has quit [Read error: Connection reset by peer]
invisime has joined #ruby
carlyle has joined #ruby
apeiros has joined #ruby
Aiur has quit [Quit: Computer has gone to sleep.]
jlwestsr has joined #ruby
apeiros_ has quit [Ping timeout: 260 seconds]
<davidcelis> chunking, obviuosly
v0n has quit [Ping timeout: 246 seconds]
Aiur has joined #ruby
jrist is now known as jrist-afk
<shevy> what does that mean
ephemerian has quit [Quit: Leaving.]
<shevy> "Creates an enumerator for each chunked elements. The consecutive elements which have same block value are chunked."
<davidcelis> so what you just did was
<davidcelis> it hits the first element and goes [element, [what else is this element?]]
havenn has quit [Ping timeout: 246 seconds]
<davidcelis> until it hits an element that is not that element
Dookie has quit [Ping timeout: 250 seconds]
<shevy> hmm
<davidcelis> hence [1, [1, 1]]
ninegrid has joined #ruby
<davidcelis> because there are two consecutive 1s
<shevy> ahhhh
<shevy> now I get it, thanks
<davidcelis> sure
jackdanger has joined #ruby
<tsou> shevy: [1, 1, 3, 3, 1, 4].chunk {|x| x % 2 }.to_a #=> [[1, [1, 1, 3, 3, 1]], [0, [4]]]
emergion has joined #ruby
hotovson has quit [Remote host closed the connection]
carlyle has quit [Remote host closed the connection]
Spaceghostc2c has quit [Excess Flood]
kolbe has left #ruby [#ruby]
breefield has joined #ruby
Guest11213 has joined #ruby
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
schleppy has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
love_color_text has joined #ruby
Yarou_ has quit [Ping timeout: 248 seconds]
generalissimo has joined #ruby
volty has joined #ruby
shufflebot has quit [Quit: Leaving.]
bricker has joined #ruby
x77686d has quit [Quit: x77686d]
<Aiur> So MailChimp doesn't return valid JSON..
cakehero has quit [Quit: Computer has gone to sleep.]
<Aiur> So in the course of trying to parse it correctly, I accidentally made 70 campaigns.
_nitti has joined #ruby
<apeiros> Aiur: example of mailchimps invalid json?
tommyvyo_ has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
<Aiur> They just return a string.
tommyvyo_ is now known as tommyvyo
<Aiur> ie "s6dfa4s3"
<apeiros> you mean, no container?
thone has joined #ruby
<apeiros> i.e., no object or array as root object, which is mandatory
lenovodroid has quit [Ping timeout: 264 seconds]
jimeh has quit [Quit: Computer has gone to sleep.]
yakko has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
<Aiur> exactly.
ttt has joined #ruby
<apeiros> I'd report that as a bug
<Aiur> Didn't help that a ton of libraries parsed that correctly for awhile
<apeiros> json standard is pretty clear about that
<Aiur> Yep. Sure they're aware too, it's the most common violation.
_nitti has quit [Ping timeout: 252 seconds]
byennen has quit [Remote host closed the connection]
<apeiros> if you know which methods return that, you could just wrap it in : JSON.parse("[#{value}]").first
thone_ has quit [Ping timeout: 246 seconds]
niklasb has quit [Ping timeout: 260 seconds]
<apeiros> or you could use YAML to parse it. slower, but should work
<apeiros> (JSON is a proper subset of yaml, partial json too)
broohaha has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
headius has quit [Quit: headius]
ejdyksen has quit []
platzhirsch has left #ruby [#ruby]
Axsuul has quit [Remote host closed the connection]
breefield has quit [Quit: breefield]
trevortwining has joined #ruby
shufflebot has joined #ruby
xnm has joined #ruby
ffranz has quit [Quit: Leaving]
yshh has quit [Remote host closed the connection]
Russell^^ has quit [Quit: Russell^^]
mmitchell has joined #ruby
lenovodroid has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
kolbe has joined #ruby
<the_jeebster> can redis handle nested hashes?
<the_jeebster> or does redis allow nested hashes?
mmitchel_ has quit [Ping timeout: 246 seconds]
<rking> Hehe
<rking> What would the point be without nested hashes?
<rking> "Here's yer table. Enjoy."
kolbe has left #ruby [#ruby]
<the_jeebster> I just ask cause I can't seem to do so. perhaps I can upload a gist...
fgro has quit [Quit: Lost terminal]
shufflebot has quit [Quit: Leaving.]
Aiur has quit [Quit: Computer has gone to sleep.]
gbchaosmaster has joined #ruby
Nisstyre has quit [Quit: Leaving]
<the_jeebster> failwhale
shufflebot has joined #ruby
jds has joined #ruby
Nisstyre has joined #ruby
<the_jeebster> rking: any ideas?
hsbt has quit [Read error: Connection reset by peer]
<rking> Wellll, it just seems like it'd be crazy if it didn't somehow support the idea.
hsbt has joined #ruby
<the_jeebster> rking: I agree. just not sure what the exact syntax is if that's not working
<the_jeebster> this works fine: $redis.mapped_hmset('test', { 'campaigns' => { 'id' => 1 } })
shufflebot has quit [Client Quit]
<the_jeebster> but once I try to nest further, no bueno
apeiros has quit [Remote host closed the connection]
<rking> Is it nesting further that fails, or mixing Arrays that fails?
<rking> E.g. does this work?: { 'campaigns' => [ 1, 2, 3] }
<rking> Gotta go though.
medik has joined #ruby
medik has quit [Excess Flood]
gabrielrotbart has quit [Read error: Connection reset by peer]
medik has joined #ruby
<gbchaosmaster> rking: You can use Arrays as hash values.
jds has quit [Ping timeout: 255 seconds]
yshh has joined #ruby
gabrielrotbart has joined #ruby
yakko has quit [Read error: Connection reset by peer]
stkowski has quit [Quit: stkowski]
awarner_ has joined #ruby
yakko has joined #ruby
jackdanger has quit [Quit: Leaving.]
machty has joined #ruby
bwlang has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<the_jeebster> rking: that works, but strangely, upon retrieval with hmget, I get only the first value of the array returned when querying the key
Michael__ has quit [Remote host closed the connection]
jackdanger has joined #ruby
awarner has quit [Ping timeout: 246 seconds]
bluOxigen has quit [Ping timeout: 255 seconds]
jrunning_ has joined #ruby
<X-Jester> the_jeebster: can you do myhash["campaigns"].each do |blah| ?
<X-Jester> i.e. does any other way of retrieving the value give you an array?
<the_jeebster> nah, it's strange
havenn has joined #ruby
shufflebot has joined #ruby
shufflebot has quit [Client Quit]
<X-Jester> you can debug a bit by dumping the .class method from that object and see if it's still an array
shufflebot has joined #ruby
apok has quit [Remote host closed the connection]
apok has joined #ruby
arya has quit [Ping timeout: 260 seconds]
jackdanger has quit [Quit: Leaving.]
pac1 has joined #ruby
danneu has joined #ruby
breefield has joined #ruby
45PABEQGG has quit [Remote host closed the connection]
trevortwining has quit [Quit: trevortwining]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
trevortwining has joined #ruby
chimkan_ has quit [Quit: chimkan_]
arya has joined #ruby
<the_jeebster> X-Jester: so strange. class returned is an Array, but only one value is returned
JStoker has quit [Excess Flood]
rtd_ has quit [Quit: rtd_]
joeycarmello has joined #ruby
bricker has quit [Ping timeout: 256 seconds]
chrisja has quit [Quit: leaving]
spaceinvader has joined #ruby
joeycarmello has quit [Remote host closed the connection]
shufflebot has quit [Ping timeout: 248 seconds]
mrsolo has quit [Quit: Leaving]
breefield has quit [Quit: breefield]
fred909 has joined #ruby
joeycarmello has joined #ruby
seanstickle has joined #ruby
Michael__ has joined #ruby
icole has quit [Remote host closed the connection]
love_color_text has quit [Remote host closed the connection]
ninegrid has quit [Ping timeout: 265 seconds]
amalrikMaia has joined #ruby
uberusha1imus is now known as uberushaximus
ninegrid has joined #ruby
tyfighter has quit [Quit: tyfighter]
schleppy1 has joined #ruby
stephenjudkins has joined #ruby
schleppy has quit [Ping timeout: 256 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
davidcelis has quit [Quit: K-Lined.]
love_color_text has joined #ruby
r4um has quit [Ping timeout: 248 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
r4um has joined #ruby
mneorr_ has joined #ruby
paolooo has joined #ruby
ebobby has quit [Ping timeout: 248 seconds]
joeycarmello has quit [Remote host closed the connection]
JStoker has joined #ruby
broohaha has quit [Quit: Computer has gone to sleep.]
nogui has joined #ruby
<nogui> hey #ruby; I have an array of 1's & 0's; it's 8 long, is there a way to make a byte out of this array of bits?
paolooo has quit [Client Quit]
dankest has quit [Quit: Leaving...]
love_color_text has quit [Remote host closed the connection]
<seanstickle> Array#pack
<nogui> right now I have [..].join.to_i(2).to_s(16) ; is there a better way? (I thought I could use .pack but it doesn't seem to support that)
<blazes816> ['10101010'].pack('B*')
<nogui> seanstickle: what string do I pass in then?
<nogui> blazes816: the array is [1, 0, 1, 0, 1, 1, 0, 1] - a series of Fixnums
love_color_text has joined #ruby
<volty> yap, something like a.inject(0) { |b, e| b << 1 + el == "1" ? 1 : 0}
SCommette has joined #ruby
i_s has quit [Quit: i_s]
<blazes816> [my_ary.join('')].pack('B*')
<heftig> [1,0,0,1,1].inject { |acc,x| 2 * acc + x }
<volty> or just like blazes816 but before a.map { |el| el.to_s }.joi )
arya has quit [Ping timeout: 256 seconds]
jrunning_ has quit [Ping timeout: 255 seconds]
<volty> cute, don't even to_s
<nogui> heftig: oh, nice! Thanks
lenovodroid has quit [Ping timeout: 256 seconds]
tomsthumb has joined #ruby
Takehiro_ has joined #ruby
chimkan_ has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
mrluc has quit [Ping timeout: 246 seconds]
Michael__ has quit [Remote host closed the connection]
brianpWins has quit [Ping timeout: 244 seconds]
arya has joined #ruby
Takehiro_ has quit [Remote host closed the connection]
ninegrid has quit [Ping timeout: 252 seconds]
davidokner has joined #ruby
<davidokner> It would be nice to see rubymine GUI remade with JavaFX from Swing.
xyzodiac has joined #ruby
slainer68 has joined #ruby
ninegrid has joined #ruby
`brendan has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
lusory has quit [Read error: Connection reset by peer]
LouisGB has quit [Ping timeout: 260 seconds]
fyolnish has joined #ruby
Michael__ has joined #ruby
blazes816 has quit [Quit: blazes816]
alexim has quit [Quit: sleep]
slainer68 has quit [Ping timeout: 248 seconds]
ikaros has quit [Quit: Ex-Chat]
arya has quit [Ping timeout: 265 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
rtd has joined #ruby
love_color_text has quit [Remote host closed the connection]
phantasm66 has joined #ruby
seanyo has joined #ruby
apeiros_ has joined #ruby
Trioke has quit [Ping timeout: 255 seconds]
volty has quit [Quit: Konversation terminated!]
arya has joined #ruby
dankest has joined #ruby
Slivka has quit [Read error: Connection reset by peer]
SCommette has quit [Quit: SCommette]
voodoofish430 has quit [Quit: Leaving.]
uberushaximus has left #ruby [#ruby]
v0n has joined #ruby
apeiros_ has quit [Ping timeout: 255 seconds]
samphippen has quit [Quit: Computer has gone to sleep.]
gabrielrotbart has joined #ruby
R3dy has quit [Ping timeout: 244 seconds]
joeycarmello has joined #ruby
xsbeats has quit [Ping timeout: 255 seconds]
savage- has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
chrisramon has joined #ruby
Michael__ has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
arya has quit [Ping timeout: 264 seconds]
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
mneorr_ has quit [Read error: Connection reset by peer]
ninegrid has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
havenn has quit [Ping timeout: 255 seconds]
brianpWins has joined #ruby
ossareh_ has quit [Ping timeout: 260 seconds]
banister_ has joined #ruby
rakunHo has joined #ruby
arya has joined #ruby
ninegrid has joined #ruby
fred909 has quit [Ping timeout: 260 seconds]
dankest has quit [Quit: Leaving...]
stephenjudkins has quit [Quit: stephenjudkins]
jenrzzz has quit [Ping timeout: 252 seconds]
breefield has joined #ruby
straind` has quit [Read error: Connection reset by peer]
straind has joined #ruby
invisime has quit [Quit: Leaving.]
jenrzzz has joined #ruby
mneorr has quit [Remote host closed the connection]
gridaphobe has quit [Ping timeout: 244 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
dankest has joined #ruby
tomsthumb has quit [Quit: Leaving.]
rakl has quit [Quit: sleeping]
riley526 has quit [Remote host closed the connection]
breefield has quit [Quit: breefield]
xsbeats has joined #ruby
xsbeats has quit [Client Quit]
generalissimo has quit [Remote host closed the connection]
xsbeats has joined #ruby
xyzodiac has quit [Ping timeout: 248 seconds]
lmickh has joined #ruby
xyzodiac has joined #ruby
xyzodiac has quit [Client Quit]
jamesaxl has quit [Read error: Operation timed out]
xyzodiac has joined #ruby
jamesaxl has joined #ruby
lampe2 has quit [Quit: Leaving.]
lampe2 has joined #ruby
arya has quit [Ping timeout: 250 seconds]
Takehiro_ has joined #ruby
broohaha has joined #ruby
yakko has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
bjeanes has joined #ruby
lampe2 has quit [Remote host closed the connection]
_alejandro has joined #ruby
generalissimo has joined #ruby
lampe2 has joined #ruby
arya has joined #ruby
arya has quit [Ping timeout: 252 seconds]
mahmoudimus has joined #ruby
gurps has quit [Quit: bye]
joeycarmello has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
dankest has quit [Quit: Leaving...]
katherinem13 has left #ruby [#ruby]
arya has joined #ruby
katherinem13 has joined #ruby
Hanmac has quit [Ping timeout: 246 seconds]
Guest11213 is now known as Spaceghostc2c
jeremywrowe has joined #ruby
breefield has joined #ruby
karakedi has joined #ruby
jeremywrowe has left #ruby [#ruby]
pcarrier has quit []
amalrikMaia has left #ruby [#ruby]
danktamagachi has joined #ruby
seanyo_ has joined #ruby
seanyo has quit [Ping timeout: 260 seconds]
shorne has quit [Ping timeout: 260 seconds]
mmitchell has quit [Remote host closed the connection]
Takehiro_ has quit [Remote host closed the connection]
danktamagachi has quit [Ping timeout: 244 seconds]
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
medik has quit [Quit: medik has no reason]
mascool has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
pu22l3r has joined #ruby
fir_ed has quit [Ping timeout: 246 seconds]
phantasm66 has quit [Quit: *sleeeeep*]
gurps has joined #ruby
nat2610 has joined #ruby
joast has quit [Quit: Leaving.]
phantasm66 has joined #ruby
jackdanger has joined #ruby
caleb_io has joined #ruby
the_jeebster has quit [Quit: Leaving.]
headius has joined #ruby
arya has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
joeycarmello has joined #ruby
Yarou_ has joined #ruby
phantasm66 has quit [Quit: *poof*]
rakl has joined #ruby
joast has joined #ruby
arya has joined #ruby
<zastern> Can somebody remind me what the % operation here is called, so I can google it (hah). puts "Let's talk about %s." % name
Yarou has quit [Ping timeout: 260 seconds]
joeycarmello has quit [Remote host closed the connection]
<zastern> oh right format strings
robbyoconnor has joined #ruby
joeycarmello has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
joeycarmello has quit [Remote host closed the connection]
luminous has quit [Ping timeout: 252 seconds]
Cicloid has quit [Remote host closed the connection]
Yarou__ has joined #ruby
xyzodiac has joined #ruby
joeycarmello has joined #ruby
rtd has quit [Quit: rtd]
generalissimo has quit [Remote host closed the connection]
g-ram has quit [Quit: Computer has gone to sleep.]
Yarou_ has quit [Ping timeout: 248 seconds]
havenn has joined #ruby
Yarou_ has joined #ruby
berserkr1 has quit [Quit: Leaving.]
Yarou__ has quit [Ping timeout: 256 seconds]
luminous has joined #ruby
arya has quit [Ping timeout: 255 seconds]
arya has joined #ruby
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
rezzack has quit [Quit: Leaving.]
mikepack has joined #ruby
Yarou_ has quit [Ping timeout: 255 seconds]
cakehero has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
shiin has quit [Quit: Computer has gone to sleep.]
generalissimo has joined #ruby
locriani has quit [Read error: Connection reset by peer]
nat2610 has quit [Quit: Leaving.]
g-ram has joined #ruby
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
locriani_ has joined #ruby
pac1 has quit [Quit: I got it one line of code at a time]
rezzack has joined #ruby
Yarou_ has joined #ruby
g-ram has quit [Client Quit]
locriani_ has quit [Read error: Connection reset by peer]
locriani has joined #ruby
Yarou has quit [Ping timeout: 265 seconds]
havenn has quit [Remote host closed the connection]
locriani has quit [Read error: Connection reset by peer]
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
eka has quit [Remote host closed the connection]
michaelmartinez has joined #ruby
locriani has joined #ruby
karakedi has quit [Ping timeout: 246 seconds]
skaczor has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
locriani_ has joined #ruby
locriani has quit [Read error: Connection reset by peer]
nari has joined #ruby
rtd has joined #ruby
Michael has joined #ruby
Michael is now known as Guest88861
apok_ has joined #ruby
apok_ has quit [Client Quit]
jekotia has quit [Quit: nuuuuuuuuuuu]
bwlang has left #ruby [#ruby]
locriani_ has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 260 seconds]
locriani has joined #ruby
apok has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
xsbeats_ has joined #ruby
xsbeats has quit [Read error: Connection reset by peer]
arya has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
judd7 has quit [Quit: judd7]
tomsthumb has joined #ruby
locriani_ has joined #ruby
babinho has quit [Ping timeout: 256 seconds]
locriani has quit [Read error: Connection reset by peer]
joofsh has joined #ruby
tjbiddle has quit [Ping timeout: 246 seconds]
chimkan_ has quit [Quit: chimkan_]
arya has quit [Ping timeout: 264 seconds]
rezzack has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
_veer has quit [Quit: Leaving]
mkruger has joined #ruby
breefield has quit [Read error: Connection reset by peer]
breefield has joined #ruby
arya has joined #ruby
xsbeats_ has quit [Ping timeout: 260 seconds]
nari has quit [Ping timeout: 260 seconds]
locriani_ has quit [Read error: Connection reset by peer]
locriani has joined #ruby
`brendan has quit [Read error: Connection reset by peer]
locriani has quit [Read error: Connection reset by peer]
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
mkruger has quit [Quit: Konversation terminated!]
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
Quix0te has joined #ruby
locriani has joined #ruby
locriani has quit [Read error: Connection reset by peer]
locriani has joined #ruby
kil0byte has joined #ruby
locriani has quit [Read error: Connection reset by peer]
locriani has joined #ruby
Guest88861 has quit [Remote host closed the connection]
ryanf has quit [Quit: leaving]
radic has joined #ruby
radic_ has quit [Ping timeout: 260 seconds]
chrisramon has quit [Quit: chrisramon]
Axsuul has joined #ruby
arya has quit [Ping timeout: 252 seconds]
chimkan has joined #ruby
andrew__ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
andrew__ is now known as andrewhl
arya has joined #ruby
byennen has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
tehlulz has joined #ruby
joeycarmello has joined #ruby
jlogsdon_ has quit [Remote host closed the connection]
chrxn_ has joined #ruby
jarred has joined #ruby
andreime has joined #ruby
cpruitt has quit [Quit: cpruitt]
Trioke has joined #ruby
chrxn has quit [Ping timeout: 248 seconds]
chrxn_ is now known as chrxn
gabrielrotbart has joined #ruby
slainer68 has joined #ruby
r0bby has joined #ruby
Kudos has quit [Ping timeout: 264 seconds]
slainer68 has quit [Ping timeout: 260 seconds]
arya has quit [Ping timeout: 252 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
ryanf has joined #ruby
robbyoconnor has quit [Ping timeout: 250 seconds]
fyolnish has quit [Remote host closed the connection]
fyolnish has joined #ruby
adeponte has quit [Remote host closed the connection]
Michael has joined #ruby
arya has joined #ruby
Michael is now known as Guest2219
byennen has quit [Remote host closed the connection]
byennen has joined #ruby
rh1n0 has joined #ruby
xsbeats has joined #ruby
freakazoid0223 has joined #ruby
headius has quit [Quit: headius]
joofsh has quit [Remote host closed the connection]
Kudos has joined #ruby
arya has quit [Ping timeout: 248 seconds]
bluesnow has joined #ruby
<bluesnow> I'm getting an undefined method error when trying to access an object's attribute.
jarred has quit [Quit: jarred]
<bluesnow> Any idea why that's happening?
<postmodern> bluesnow, there's no reader method for it maybe?
jlast has quit [Remote host closed the connection]
<bluesnow> postmodern: oh, duh. I must be tired. Thanks for the help!
seanstickle has quit [Quit: seanstickle]
neurotech has joined #ruby
neurotech has quit [Client Quit]
roadt_ has joined #ruby
arya has joined #ruby
ossareh has joined #ruby
[F4R7C0P] has left #ruby [#ruby]
rtd has quit [Remote host closed the connection]
rtd has joined #ruby
ossareh has quit [Remote host closed the connection]
v0n has quit [Read error: Connection reset by peer]
macmartine has joined #ruby
tommyvyo_ has joined #ruby
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
elkclone has quit [Read error: Connection reset by peer]
v0n has joined #ruby
shorne has joined #ruby
freakazoid0223 has quit [Ping timeout: 246 seconds]
byennen has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 265 seconds]
ananthakumaran has joined #ruby
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bluesnow has left #ruby [#ruby]
chimkan has quit [Remote host closed the connection]
charliesome has joined #ruby
chimkan has joined #ruby
byennen has joined #ruby
caleb_io has quit [Quit: caleb_io]
ryanlecompte has joined #ruby
Guest24042 has joined #ruby
burgestrand1 has joined #ruby
wargasm has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Quit: Computer has gone to sleep.]
burgestrand has quit [Ping timeout: 256 seconds]
charliesome has quit [Ping timeout: 260 seconds]
xyzodiac has joined #ruby
<pdtpatrick> Question - anyone know of a kerberos module for ruby that's similar to http://pypi.python.org/pypi/kerberos
mikepack has joined #ruby
tobyo has quit [Ping timeout: 252 seconds]
EyesIsMine has quit [Remote host closed the connection]
joeycarmello has quit [Remote host closed the connection]
adeponte has joined #ruby
bigmac has quit [Quit: Leaving]
burgestrand1 has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
andrewhl has quit [Remote host closed the connection]
nogui has quit [Quit: WeeChat 0.3.9.2]
v0n has quit [Read error: No route to host]
Elico has quit [Ping timeout: 260 seconds]
arya has quit [Ping timeout: 246 seconds]
jlast has joined #ruby
Elico has joined #ruby
stephenjudkins has joined #ruby
broohaha has quit [Quit: Computer has gone to sleep.]
EyesIsMine has joined #ruby
schleppy has joined #ruby
schleppy1 has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit: Computer has gone to sleep.]
tommyvyo_ is now known as tommyvyo
arya has joined #ruby
caleb_io has joined #ruby
generalissimo has quit [Remote host closed the connection]
h4mz1d has joined #ruby
xsbeats has quit [Ping timeout: 255 seconds]
lenovodroid has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
djdb has joined #ruby
zf_ has joined #ruby
breefield has quit [Quit: breefield]
zf has quit [Read error: Connection reset by peer]
axl_ has quit [Quit: axl_]
xyzodiac has joined #ruby
pucks has joined #ruby
<pucks> Hello.
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
x82_nicole has joined #ruby
zaargy has joined #ruby
<zaargy> i need to access standard lib docs locally. shouldn't e.g. rdoc Dir work?
<zaargy> what's teh best way to do this
<zaargy> ?
v0n has joined #ruby
<postmodern> zaargy, try `gem server` or use YARD `yard server --gems`
<postmodern> zaargy, although `gem server` will only host the previously generated rdocs
<postmodern> zaargy, so if you have --no-rdoc set, it wont auto-generat them i think
<postmodern> zaargy, YARD will auto-generate docs on the fly for any gem
<zaargy> yeah. that helps a bit. thanks.
rtd_ has joined #ruby
<postmodern> zaargy, ah for stdlib docs, check $ruby/share/doc/ruby/
jlast has quit [Remote host closed the connection]
rtd has quit [Read error: Operation timed out]
xyzodiac has quit [Quit: Computer has gone to sleep.]
swex_ has joined #ruby
michaelmartinez has quit [Quit: Check it, Wreck it http://www.caffeineindustries.com/blog]
joeycarmello has joined #ruby
caleb_io has quit [Quit: caleb_io]
swex has quit [Ping timeout: 252 seconds]
mikepack has quit [Remote host closed the connection]
a_a_g has joined #ruby
araujo has quit [Quit: Leaving]
codecop has joined #ruby
<zaargy> thanks
pu22l3r has quit [Remote host closed the connection]
kiwnix has quit [Quit: Saliendo]
andreime has quit [Quit: Konversation terminated!]
Guest24042 has quit [Read error: Connection reset by peer]
rippa has joined #ruby
isaacs has joined #ruby
<isaacs> hi, I've got a quick question about Dir.glob. Does Dir.glob("**.rb") scan subdirs looking for *.rb files, or would you need to do Dir.glob("**/*.rb")?
<isaacs> I could've sworn I've seen "**.rb" in examples and such, but it seems to only supprot the Bash4 style **/*.rb in mri 187 or 19
jackdanger has quit [Quit: Leaving.]
burgestrand has joined #ruby
lenovodroid has quit [Ping timeout: 255 seconds]
codecop has quit [Quit: Išeinu]
schleppy has quit [Quit: Leaving.]
zzyybb has joined #ruby
sheerun_ has joined #ruby
Villadelfia_ has joined #ruby
ksk_ has joined #ruby
Blue_Ice_ has joined #ruby
ksk has quit [Ping timeout: 245 seconds]
sheerun has quit [Ping timeout: 250 seconds]
Villadelfia has quit [Ping timeout: 250 seconds]
Villadelfia_ is now known as Villadelfia
Blue_Ice has quit [Ping timeout: 260 seconds]
Nowaker has quit [Ping timeout: 264 seconds]
Nowaker has joined #ruby
regedare1 has joined #ruby
regedarek has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 246 seconds]
pucks has quit []
r0bby_ has joined #ruby
Brainix has quit [Quit: Brainix]
r0bby_ is now known as robbyoconnor
jackdanger has joined #ruby
gcds has joined #ruby
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
r0bby has quit [Ping timeout: 246 seconds]
LucidDreamZzZ has joined #ruby
gcds has quit [Client Quit]
haxrbyte has joined #ruby
tagrudev has joined #ruby
mercwithamouth has joined #ruby
ctwiz has joined #ruby
lampe2 has quit [Remote host closed the connection]
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
<ryanf> isaacs: I have only ever seen **/*.rb
krz has joined #ruby
<ryanf> it seems easy enough to check in irb if you have any ruby project's source code handy though...
<rking> ryanf: Traitor!!
haxrbyte_ has joined #ruby
<ryanf> haha
<isaacs> ryanf: yeah, i can't find any examples in the wild now of **.rb
segv- has joined #ruby
<isaacs> ryanf: and irb seems quite clear that ** is only relevant if it's the whole path part, same as in bash
LucidDreamZzZ has joined #ruby
emanu has quit [Quit: emanu]
<isaacs> ryanf: i was all set to add support for that to node-glob tonight :)
<ryanf> isaacs: you could be a trendsetter :)
jackdanger has quit [Quit: Leaving.]
<isaacs> ryanf: actually, now that i look, my only reason for thinking ruby did this was people complaining thatnode-glob *doesn't*, and saying "well, ruby does"
ebouchut_ has joined #ruby
* isaacs is served right for believing hearsay
<ryanf> does anything? I've never seen that before
haxrbyte has quit [Ping timeout: 246 seconds]
hotovson_ has joined #ruby
<isaacs> ryanf: no! nothing does!
<ryanf> haha
<ryanf> crazy!
<isaacs> ryanf: i thought this was a ruby innovation or something
topek has joined #ruby
FredLe has joined #ruby
<isaacs> ryanf: i'm not going to set that trend, though. there's a special place in hell for people who add features to glob implementations.
<ryanf> actually, speaking of inconsistent glob implementations
<ryanf> are you treating **/*.rb as including files in pwd?
<ryanf> I'm pretty sure inconsistency on that question has bitten me before
<ryanf> maybe between ruby and bash
ebouchut_ has quit [Client Quit]
<ryanf> yep
<ryanf> ruby and zsh include pwd, bash doesn't
zommi has joined #ruby
<rking> Stupid bash.
<rking> What are you supposed to say? {.,**}/*.rb ?
JohnBat26 has joined #ruby
<ryanf> well, that does work
<ryanf> although you get the pwd files as "./whatever.rb", which is unsightly
<isaacs> ryanf: i'm including the pwd, i believe. but i thought bash did too?
ebouchut_ has joined #ruby
<ryanf> maybe more recent versions do
<ryanf> but the one that comes with os x doesn't (at least by default)
<isaacs> $ echo **/*.js
<isaacs> minimatch.js node_modules/lru-cache/lib/lru-cache.js node_modules/lru-cache/test/basic.js node_modules/lru-cache/test/memory-leak.js test/basic.js test/brace-expand.js test/caching.js test/defaults.js
<ryanf> bash-3.2$ echo **/*.rb
<ryanf> slick_stats/aggregate_attachment_views.rb tasks/shared.rb
<ryanf> obviously the implication here is that pwd has .rb files in it
<isaacs> $ echo $BASH_VERSION
<isaacs> 4.1.0(1)-release
realniko_ has joined #ruby
<ryanf> I think 3.2 is an ancient version
<ryanf> haha yeah
<isaacs> ryanf: that's because 3.2 doesn't have **
Muz has quit [Ping timeout: 260 seconds]
<isaacs> ryanf: so ** === *
<ryanf> :O
<isaacs> ryanf: even on 4, you have to shopt -s globstar
<ryanf> well, that explains that
Muz has joined #ruby
realniko has quit [Ping timeout: 245 seconds]
<isaacs> afaict, all implementations of ** are either identical, or *
<ryanf> cool
<ryanf> the world makes more sense
Nowaker has quit [Ping timeout: 265 seconds]
<isaacs> same with zsh
Nowaker has joined #ruby
gabrielrotbart has quit [Remote host closed the connection]
<isaacs> tum% zsh --version
<isaacs> zsh 4.3.11 (i386-apple-darwin11.0)
<isaacs> yes, it does make so much more sense now
<rking> isaacs: Do you support {alt,er,nation} ?
<isaacs> rking: yes.
jamesaxl has quit [Ping timeout: 244 seconds]
<isaacs> rking: i support everything that bash 4 does, exactly the same way that bash4 does, and even use a lot of the same tests, and compare all my test cases against what bash returns.
<isaacs> rking: i figure that's the defacto standard.
rezzack has joined #ruby
<isaacs> supporting both {alt,er,nation} and also @(alt|er|nation) is tricky, because thye're not the same sort of thing, at all
jamesaxl has joined #ruby
caleb_io has joined #ruby
<isaacs> so you have to split the {,,,} first, and get an array of patterns, and then handle the (|||) after, since they can't span path portions
<isaacs> sorry, nerding out on globs.
jhchabran has joined #ruby
<rking> isaacs: Why not push things forward and go with more zsh-style stuff?
mahmoudi_ has joined #ruby
byennen has quit [Remote host closed the connection]
<isaacs> rking: what kind of globs does zsh add?
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
<rking> Oh man, *so many*.
<rking> I'll have to look at "Hey I can be Zsh, too" Bash 4.0 to be sure, but 1s
<rking> isaacs: Here are a few examples: http://zzapper.co.uk/zshtips.html
wf2f has quit [Client Quit]
jackdanger has joined #ruby
<rking> man zshexpn for the whole scoop (though, the manpage is starved of examples)
<isaacs> rking: right
<isaacs> rking: the ~ and () stuff is neat
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
jlogsdon has joined #ruby
caleb_io has quit [Quit: caleb_io]
mahmoudi_ has quit [Client Quit]
cj3kim has quit [Quit: This computer has gone to sleep]
<rking> extended_glob does get a bit crazy, but I think parts of it are worthwhile for something like this.
samuel02 has joined #ruby
xbayrockx has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
<isaacs> rking: otoh, i could just not do it, which is probably almost as good, and certainly way easier.
h4mz1d has quit [Ping timeout: 246 seconds]
<isaacs> rking: maybe some kind soul will send a pull req with tests and documentation some day :)
<rking> zsh has some tricks to counterbalance it on the shell, like url-quote-magic (so URLs don't always fail due to '?'s and such)
chimkan__ has joined #ruby
<rking> isaacs: Yeah, just riffing on it, not necessarily important.
<isaacs> rking: yeah. people say nice things about zsh. i still like bash just fine, though
<isaacs> at this point, i'm not interested in a shell i get to think about
<rking> Well, there's a big difference between 'get to think about' and 'have to think about'
Mon_Ouie has quit [Ping timeout: 246 seconds]
wf2f has quit [Ping timeout: 255 seconds]
xpen has joined #ruby
jlogsdon has quit [Remote host closed the connection]
<rking> I've used zsh as bash-plus-a-little for a very long time, only now really starting to dig in.
<postmodern> bash 4 has really improved
ryanlecompte has quit [Remote host closed the connection]
<postmodern> also writing shell scripts that support zsh is kind of a pain
<postmodern> zsh does various things much differently than bash
tuannat has joined #ruby
<isaacs> postmodern ++
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<postmodern> also for complex tasks, I use ripl with plugins
<isaacs> postmodern: writing portable shell scripts make browser dev look easy
<postmodern> ripl is cool in that you can extend it by injecting modules
chimkan has quit [Ping timeout: 250 seconds]
<postmodern> i wrote a ripl plugin that can run !commands
chimkan__ has quit [Ping timeout: 260 seconds]
tehlulz has quit [Ping timeout: 260 seconds]
<postmodern> isaacs, totally
<postmodern> isaacs, you either have to avoid various fancy features, or code against a POSIX shell
<postmodern> for instance, zsh indexes arrays starting at 1, not 0
<isaacs> postmodern: yeah. coding against the subset of sh, ksh-as-sh, ksh97-as-sh, and bash-as-sh, is hideous
<isaacs> postmodern: like, there's no way to do if(!cond)...
<postmodern> also dash does not support [[
<isaacs> postmodern: you have to do if [ cond ]; then (exit 0); else ... fi
<postmodern> yeah
<isaacs> oh, i forgot about dash!
<isaacs> and ash, too!
<isaacs> gah
<postmodern> dash doesn't support {} globs
tonini has joined #ruby
<postmodern> also makes writing portable Makefiles hard
<rking> Wait, no way to do "if(!cond)" ?
<rking> Why not?
dankest has joined #ruby
<rking> if ! false; then echo hi; fi
stephenjudkins has quit [Quit: stephenjudkins]
applesarefruits has joined #ruby
mercwithamouth has quit [Ping timeout: 255 seconds]
stephenjudkins has joined #ruby
<postmodern> rking, [ ! false ] doesn't work
xpen_ has joined #ruby
mneorr has joined #ruby
rezzack has quit [Ping timeout: 250 seconds]
<rking> But, "[" is a program. That's not its semantics that it would run a command like `false` in there.
<postmodern> er wait that doesn't work at all :P
<rking> [ ! -e foo ] && echo hi ← Works fine
jackdanger has quit [Quit: Leaving.]
<rking> Oh crap, I'm wrong. Running it on Heirloom sh gives sadness.
xpen has quit [Ping timeout: 246 seconds]
applesarefruits has quit [Ping timeout: 265 seconds]
margle has joined #ruby
cj3kim has joined #ruby
ebouchut_ has quit [Quit: This computer has gone to sleep]
huoxito has quit [Quit: Leaving]
RudyValencia has quit [Ping timeout: 265 seconds]
areil has joined #ruby
RudyValencia has joined #ruby
vasile has quit [Ping timeout: 260 seconds]
kil0byte_ has joined #ruby
shorne has quit [Ping timeout: 260 seconds]
banister_ has quit [Ping timeout: 264 seconds]
rakl has quit [Ping timeout: 246 seconds]
pen has joined #ruby
kil0byte has quit [Ping timeout: 256 seconds]
<pen> I'm running bundler and I got this error
<pen> usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/bundler-1.2.2/lib/bundler/definition.rb:107:in `block in resolve_remotely!': undefined method `remote!' for :rubygem:Symbol (NoMethodError)
<pen> when I tried to run bundle install
xpen_ has quit [Read error: Connection timed out]
<pen> in a folder I have a Gemfile which I only have 3 lines: source :rubygem; gem 'sinatra'; gem 'thin'
<pen> what is this remote!?
rakl has joined #ruby
heftig has quit [Quit: leaving]
xpen has joined #ruby
<segv-> i have no idea why the error message is what it is, but i'm guessing that, since it can't call remote! on :rubygem, and all my gemfiles have :rubygems (note the trailing s) it's just a typo.
<pen> oh yea, it is a typo problem
<pen> segv-: thanks lol
elsifaka has joined #ruby
morf has joined #ruby
<pen> that is a misleading error message
ChampS666 has joined #ruby
atno|Zzz is now known as atno
<isaacs> rking: works fine, yes. not on actual sh
<isaacs> rking: or ksh
<isaacs> rking: er, maybe ksh does have that.. might be thinking of dash or ash
isaacs has left #ruby [#ruby]
<segv-> pen: yes, it certainly is.
tjbiddle has joined #ruby
matrixise has quit [Ping timeout: 246 seconds]
beiter has joined #ruby
chendo has quit [Ping timeout: 264 seconds]
RudyValencia has quit [Quit: Hacked By Chinese!]
maesbn has joined #ruby
chendo_ has joined #ruby
RudyValencia has joined #ruby
RudyValencia has quit [Read error: Connection reset by peer]
eldariof has joined #ruby
RudyValencia has joined #ruby
aganov has joined #ruby
hackerdude has quit [Remote host closed the connection]
hamed_r has joined #ruby
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
king313 has joined #ruby
Yarou_ has quit [Ping timeout: 265 seconds]
ninegrid has quit [Ping timeout: 264 seconds]
lele has quit [Ping timeout: 246 seconds]
_guy has quit []
lele has joined #ruby
zigomir has joined #ruby
jprovazn has joined #ruby
timonv has quit [Remote host closed the connection]
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
kf8a has joined #ruby
workmad3 has joined #ruby
jds has joined #ruby
cj3kim has joined #ruby
babinho has joined #ruby
devdazed has quit [Ping timeout: 255 seconds]
leifmadsen has joined #ruby
blitzrage has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
DarthGandalf has quit [Ping timeout: 264 seconds]
Morkel has joined #ruby
devdazed has joined #ruby
tehlulz has joined #ruby
mahmoudimus has joined #ruby
mahmoudi_ has joined #ruby
Chryson has quit [Quit: Leaving]
kf8a has quit [Quit: Computer has gone to sleep.]
pencilcheck has joined #ruby
pen has quit [Read error: Connection reset by peer]
byennen has joined #ruby
blaxter|2 has joined #ruby
tehlulz has quit [Ping timeout: 246 seconds]
stephenjudkins has joined #ruby
mahmoudimus has quit [Ping timeout: 256 seconds]
arturaz has joined #ruby
DarthGandalf has joined #ruby
lolmaus has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
blaxter|2 has quit [Client Quit]
Slivka has joined #ruby
byennen has quit [Ping timeout: 246 seconds]
dr_bob has joined #ruby
lampe2 has joined #ruby
wedgeV_ has quit [Read error: Operation timed out]
bluOxigen has joined #ruby
arya has quit [Ping timeout: 256 seconds]
arya has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
Bootstrapper has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
rakl has quit [Ping timeout: 252 seconds]
Yarou_ has joined #ruby
leifmadsen has quit [Read error: Connection reset by peer]
blitzrage has quit [Quit: Peas out homey]
rakl has joined #ruby
seanyo_ has quit [Read error: Connection reset by peer]
arya has quit [Ping timeout: 255 seconds]
Yarou has quit [Ping timeout: 248 seconds]
locriani has quit [Ping timeout: 260 seconds]
tuannat has quit [Ping timeout: 264 seconds]
Ivo has quit [Read error: Connection reset by peer]
devdazed has quit [Ping timeout: 255 seconds]
Averna has joined #ruby
devdazed has joined #ruby
Ivo has joined #ruby
tomsthumb has quit [Ping timeout: 265 seconds]
swex_ has quit [Remote host closed the connection]
SoleSoul has joined #ruby
swex has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
locriani has joined #ruby
tomsthumb has joined #ruby
<SoleSoul> Hi. What's the difference between self.var and @var in a class? I know @@var is a class variable and @var is an instance variable but what is self.var?
Virunga has joined #ruby
Yarou_ has quit [Ping timeout: 264 seconds]
shorne has joined #ruby
ninegrid has joined #ruby
grzywacz has quit [Quit: :wq]
vasile has joined #ruby
tuannat has joined #ruby
tuannat has quit [Max SendQ exceeded]
tuannat has joined #ruby
tuannat has quit [Max SendQ exceeded]
tuannat has joined #ruby
hoelzro|away is now known as hoelzro
tuannat has quit [Max SendQ exceeded]
<hoelzro> SoleSoul: self.var just invokes the method 'var' on self
<hoelzro> or, if you do self.var = value, it invokes 'var='
tuannat has joined #ruby
tuannat has quit [Max SendQ exceeded]
tobinharris has joined #ruby
tuannat has joined #ruby
matthewrobbins has joined #ruby
kil0byte has joined #ruby
<SoleSoul> hoelzro: I think I understand. So if I have an accessor for an instance variable I should use self.var = , and if I don't have an accessor I use @var = . Is that correct?
kil0byte_ has quit [Ping timeout: 255 seconds]
lampe2 has quit [Remote host closed the connection]
<hoelzro> well, I would use the accessor regardless
<hoelzro> so, yes =)
senny has joined #ruby
<SoleSoul> thank you :)
ninegrid has quit [Quit: leaving]
ChampS666 has quit [Ping timeout: 260 seconds]
kil0byte_ has joined #ruby
k610 has joined #ruby
tuannat has quit [Max SendQ exceeded]
vasile has quit [Ping timeout: 244 seconds]
vasile has joined #ruby
burgestrand has quit [Ping timeout: 244 seconds]
kil0byte has quit [Ping timeout: 255 seconds]
tuannat has joined #ruby
jds has quit [Remote host closed the connection]
tuannat has quit [Max SendQ exceeded]
tuannat has joined #ruby
tuannat has quit [Max SendQ exceeded]
BoomCow has joined #ruby
hemanth has quit [Read error: Connection reset by peer]
tuannat has joined #ruby
hemanth has joined #ruby
xclite has quit [Ping timeout: 246 seconds]
mneorr has quit [Remote host closed the connection]
fooo has quit [Ping timeout: 260 seconds]
mneorr has joined #ruby
lampe2 has joined #ruby
fooo has joined #ruby
vlad_starkov has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
machty_ has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
Dave_ has quit [Ping timeout: 244 seconds]
burgestrand has joined #ruby
lampe2 has quit [Remote host closed the connection]
BoomCow has quit [Read error: Operation timed out]
arya has joined #ruby
ly- has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
chendo_ has quit [Ping timeout: 246 seconds]
tomsthumb has quit [Quit: Leaving.]
BiHi has joined #ruby
chendo_ has joined #ruby
chendo_ has quit [Changing host]
chendo_ has joined #ruby
dankest has quit [Quit: Leaving...]
Grieg has joined #ruby
Grieg has quit [Changing host]
Grieg has joined #ruby
_alejandro has quit [Ping timeout: 246 seconds]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
_alejandro has joined #ruby
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
chussenot has joined #ruby
chendo_ has quit [Ping timeout: 265 seconds]
matrixise has joined #ruby
chendo_ has joined #ruby
vasile has quit [Ping timeout: 265 seconds]
williamcotton has quit [Read error: Connection reset by peer]
Iszak has joined #ruby
king313 has quit [Read error: Connection reset by peer]
pencilcheck has quit [Read error: Connection reset by peer]
Elhu has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
pen has joined #ruby
mneorr has quit [Remote host closed the connection]
rohit has joined #ruby
mneorr has joined #ruby
vlad_starkov has joined #ruby
jimeh has joined #ruby
blacktulip has joined #ruby
xpen has quit [Ping timeout: 256 seconds]
freeayu has quit [Quit: 离开]
kil0byte has joined #ruby
apeiros_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
rdark has joined #ruby
Bane_ has joined #ruby
robotmay has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<witchdoc> hi all
kil0byte_ has quit [Ping timeout: 264 seconds]
nemesit has joined #ruby
ping-pong has quit [Ping timeout: 276 seconds]
Bane__ has quit [Ping timeout: 260 seconds]
diahane has joined #ruby
<diahane> hello guys, take a look at http://bitfungus.org/ , if you can help is totally open source! sorry for my bad english :P
diahane has left #ruby [#ruby]
king313 has joined #ruby
matrixise has quit [Ping timeout: 252 seconds]
JStoker has quit [Excess Flood]
xpen has joined #ruby
JStoker has joined #ruby
samuel02 has quit [Remote host closed the connection]
matrixise has joined #ruby
a_a_g has quit [Quit: Leaving.]
a_a_g has joined #ruby
nomenkun has joined #ruby
nemesit|osx has joined #ruby
nemesit has quit [Ping timeout: 250 seconds]
LouisGB has joined #ruby
ikaros has joined #ruby
slainer68 has joined #ruby
samuel02_ has joined #ruby
timonv has joined #ruby
Vainoharhainen has joined #ruby
elaptics`away is now known as elaptics
JStoker has quit [Excess Flood]
zzyybb has quit [Remote host closed the connection]
sonne_ has quit [Quit: ZNC - http://znc.in]
sonne has joined #ruby
sonne has quit [Changing host]
sonne has joined #ruby
samuel02_ has quit [Ping timeout: 252 seconds]
Blue_Ice_ is now known as Blue_Ice
ping-pong has joined #ruby
a_a_g has quit [Ping timeout: 246 seconds]
heftig has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
a_a_g has joined #ruby
fyolnish has quit [Remote host closed the connection]
JStoker has joined #ruby
fyolnish has joined #ruby
lolcathost has joined #ruby
wallerdev has quit [Read error: Connection reset by peer]
wallerdev_ has joined #ruby
Zai00 has joined #ruby
fyolnish has quit [Ping timeout: 244 seconds]
ephemerian has joined #ruby
<Lemtzas> Any ideas on why a Struct's []s would complain about being unable to convert Symbol into Integer?
lolcathost has quit [Quit: lag]
berserkr has joined #ruby
king313 has quit [Quit: Saliendo]
arya has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
tommyvyo has quit [Quit: Computer has gone to sleep.]
shiin has joined #ruby
arya has joined #ruby
<postmodern> Lemtzas, Struct#[] in 1.8/1.9 only accepts Integer indexes
<postmodern> Lemtzas, in Ruby 2.0 it excepts Integers and Symbols
workmad3 has joined #ruby
jds has joined #ruby
ctwiz is now known as dpg
cdt_ has joined #ruby
lemonsparrow has joined #ruby
adeponte has quit [Remote host closed the connection]
<lemonsparrow> how can I convert a hash {:min => 1, :max => 2} into array and back forth ?
<Lemtzas> Exciting. Is that a Bug?
noxoc has joined #ruby
<heftig> lemonsparrow: {:min => 1, :max => 2}.to_a
<heftig> lemonsparrow: Hash[ [[:min, 1], [:max, 2]] ]
jds has quit [Ping timeout: 260 seconds]
<lemonsparrow> heftig: hash to string.. sorry not to array my bad
<heftig> you could use json
<heftig> or yaml
<heftig> or marshal
Bootstrapper has joined #ruby
<heftig> the latter is compact, because binary (not printable)
reinaldob has joined #ruby
punkrawkR has joined #ruby
arya has quit []
arya has joined #ruby
<lemonsparrow> array = ["a.net", "b.com"] I would like to convert it to string and then back to array how can I do it ?
<heftig> lemonsparrow: same as Hash
Bootstrapper has quit [Read error: Operation timed out]
x82_nicole has quit [Quit: Computer has gone to sleep.]
<Lemtzas> postmodern: In 1.9.3, symbols seem to work properly right after I create the struct instance, but fail after I pass it as a parameter to an initialize() in another file.
<heftig> Lemtzas: could you gist some sample code that shows your problem?
<lemonsparrow> heftig: ["a.net", "b.com"].to_s will give me "[\"a.net\", \"b.com\"]" but how to get the array back from it ?
troessner has joined #ruby
<heftig> lemonsparrow: don't do that
<lemonsparrow> heftig: then?
<heftig> use json or marshal
<lemonsparrow> could you show an example
<heftig> of which?
nomenkun has quit [Read error: Connection reset by peer]
<lemonsparrow> heftig: i HAVE AN array of domains. I want to save it as string and work on it as array
Rix has quit [Ping timeout: 245 seconds]
<heftig> require 'json'; str = ["a.net", "b.com"].to_json; arr = JSON.parse(str)
<Lemtzas> ...disregard me...I'm a dumbass
nomenkun has joined #ruby
<heftig> str = Marshal.dump(["a.net", "b.com"]); arr = Marshal.load(str)
<lemonsparrow> heftig: thanks
troessner_ has joined #ruby
dertyp has joined #ruby
tuan_nat has joined #ruby
gyre007 has joined #ruby
tuannat has quit [Read error: Operation timed out]
Rix has joined #ruby
ttt has quit [Remote host closed the connection]
nemesit|osx has quit [Read error: Connection reset by peer]
toto_ has joined #ruby
Axsuul has quit [Ping timeout: 250 seconds]
tvw has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
beiter has quit [Ping timeout: 264 seconds]
ttt has joined #ruby
beiter has joined #ruby
timmow has joined #ruby
myonebuddy has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty has joined #ruby
arya has quit []
<heftig> lemonsparrow: actually, Marshal, YAML and JSON all implement the dump(x), load(s) interface
sspiff has joined #ruby
<heftig> just pick whatever format you like best
<lemonsparrow> heftig: I liked json more :)
Slivka has quit [Remote host closed the connection]
codecaster has joined #ruby
pcarrier has joined #ruby
pen has quit [Read error: Connection reset by peer]
<lemonsparrow> heftig: now I need to save a hash as a string . how to do that ?
pen has joined #ruby
polymar has joined #ruby
<heftig> lemonsparrow: same way
<lemonsparrow> heftig: could you show an example.. I have {:min => 1, :max => 2} need to save this hash as array and work on it as hash
matchaw_ has quit [Read error: Connection reset by peer]
<heftig> str = {:min => 1, :max => 2}.to_json
<heftig> h = JSON.parse(str)
jlwestsr has quit [Ping timeout: 246 seconds]
<heftig> ah, it's not quite transparent
<heftig> h = JSON.parse(str, symbolize_names: true)
dertyp has quit [Quit: Leaving...]
pcarrier has quit [Ping timeout: 264 seconds]
pcarrier has joined #ruby
<lemonsparrow> heftig: so h = JSON.parse(str, symbolize_names: true) will give me h = {:min => 1, :max => 2} ?
<lemonsparrow> heftig: thanks
cascalheira has joined #ruby
alup has quit [Remote host closed the connection]
lenovodroid has joined #ruby
mahmoudi_ has quit [Quit: Computer has gone to sleep.]
samuel02 has joined #ruby
65MABKLVI has joined #ruby
tuan_nat has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
burgestrand has quit [Read error: Connection reset by peer]
burgestrand1 has joined #ruby
ExxKA has joined #ruby
<ExxKA> Hi Guys. Is there a way I can add a root ca which will be trusted by net/http.rb, without editing the source code? I am trying to debug active merchant over an ssl connection and I need it to trust my debuggers certificate.
ianfleeton has joined #ruby
lenovodroid has quit [Ping timeout: 256 seconds]
Yarou has joined #ruby
kevinykchan has joined #ruby
fyolnish has joined #ruby
DaZ has quit [Read error: Operation timed out]
iPhoneMRZ has joined #ruby
Yarou_ has joined #ruby
Yarou has quit [Ping timeout: 255 seconds]
DaZ has joined #ruby
<workmad3> ExxKA: I think what you basically need to do is add your certificate to the certificates trusted by the openssl lib that ruby was compiled against
soc42 has joined #ruby
SoleSoul has quit [Quit: WeeChat 0.3.9.2]
<ExxKA> I have now gone down the path of configuring my rvm instance of to trust the certificate, but I can't figure out how to do it properly
<ExxKA> Hi workmad3, that's also my strategy, but I am not sure about where ruby checks for certificates
<workmad3> did you use openssl installed through rvm when you compiled ruby?
<workmad3> or did you use a system installed openssl?
<ExxKA> I downloaded dvm using homebrew
<ExxKA> I am on Mac X
<ExxKA> rvm*
<workmad3> that doesn't answer the question
<ExxKA> That's as close as I can come to an answer I am afraid, my other answer is, I do not know
wallerdev_ has quit [Quit: wallerdev_]
<ExxKA> is there a way I can check for the answer to your question?
<workmad3> right, so that means your first task is to find out what openssl installation your ruby is using ;
<workmad3> )
Yarou has joined #ruby
<ExxKA> Yes
<ExxKA> :)
<ExxKA> Have you got a hint for that?
Yarou_ has quit [Ping timeout: 246 seconds]
ABK has joined #ruby
iPhoneMRZ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
Yarou_ has joined #ruby
arvindravi has joined #ruby
<k610> can i call my gem "gtalk" or is that copyrighted ?
<ExxKA> k610, I suppose it is used by google talk?
<workmad3> ExxKA: well, first, have you ever installed openssl with rvm?
<workmad3> ExxKA: which would mean you ran a command like 'rvm package install openssl' iirc, and you'd have done that before installing ruby
<ExxKA> nope
<ExxKA> I am quite certain i haven't
<workmad3> ExxKA: right, so that means that you're dealing with the system installed openssl
chussenot_ has joined #ruby
<ExxKA> and when i look in my .rvm directory I have found a folder ssl/ with a cert.pem and a certs/ folder
pen has quit [Remote host closed the connection]
<workmad3> ExxKA: because I'm guessing by extension that you never downloaded and compiled openssl by hand ;)
Yarou has quit [Ping timeout: 256 seconds]
<ExxKA> there's also a configuration file detailing how the files are used, so I got the impression that I could override the certs by using these files
<ExxKA> But it doesn't seem to pick up my changes
<ExxKA> workmad3, that is true
<workmad3> ExxKA: so now, for your distribution, figure out how to install the cert as a trusted cert - I'd suggest starting here: http://gagravarr.org/writing/openssl-certs/others.shtml#ca-openssl
<ExxKA> I am a believer in pre-packaged software
samuel02 has quit [Remote host closed the connection]
<ExxKA> So ruby would use these paths, and not the .rvm/ssl path?
<workmad3> it's not *ruby* that does this stuff
<workmad3> it's openssl
<ExxKA> ~/.rvm/usr/ssl, sry
chussenot has quit [Ping timeout: 246 seconds]
chussenot_ is now known as chussenot
<ExxKA> Okay, I thought ruby would choose it's own paths for root ca's and not the default ones from openssl
<workmad3> and where openssl trusts certs from is dependent on how it's compiled and configured
<ExxKA> My bad
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
withnale has quit [Excess Flood]
Yarou_ has quit [Ping timeout: 248 seconds]
yshh has quit [Remote host closed the connection]
withnale has joined #ruby
<workmad3> you can certainly manually trust certs for a specific app using the openssl library, but that would require code changes
withnale has quit [Excess Flood]
<workmad3> and .rvm/usr/ssl would be where an rvm package installed version of openssl would store stuff ;)
robustus has joined #ruby
withnale has joined #ruby
withnale has quit [Remote host closed the connection]
Yarou has joined #ruby
tvw has quit [Remote host closed the connection]
<ExxKA> That was my deduction aswell..
<ExxKA> But It doe not seem to change anything
withnale has joined #ruby
<ExxKA> Maybe it was because I didn't name my certificate correctly
jenrzzz has quit [Ping timeout: 265 seconds]
zz_chrismcg is now known as chrismcg
<workmad3> ExxKA: no, it's because you aren't dealing with an rvm installed openssl
<ExxKA> In the article you linked to the author suggests that the certificate should be named according to its hash value
<workmad3> ExxKA: you're dealing with an openssl that has no awareness of .rvm/usr/ssl
<ExxKA> what makes you say that?
<ExxKA> let me rephrase
rohit has quit [Quit: Leaving]
<workmad3> ExxKA: you've got an rvm installed *ruby*, not an rvm installed openssl
<ExxKA> How can I be certain about that assumption? The original error thrown comes from a ruby version within .rvm
<ExxKA> ok
Yarou_ has joined #ruby
withnale has quit [Client Quit]
<workmad3> ExxKA: which is why I asked you if you'd installed openssl through rvm
<ExxKA> Then I am still confused why rvm has its own ssl directory.
<workmad3> because you can install openssl through rvm
<ExxKA> Heheh okay :)
vlad_starkov has joined #ruby
<ExxKA> My confusion grows by the second
<workmad3> otherwise I wouldn't have asked you if you'd done that ;)
Marius has joined #ruby
Marius has quit [Remote host closed the connection]
Marius has joined #ruby
Yarou has quit [Ping timeout: 252 seconds]
<ExxKA> Ok
Ethan2 has joined #ruby
Ethan2 has quit [Changing host]
Ethan2 has joined #ruby
<workmad3> ExxKA: or at least, that's my understanding of it ;)
rakl has quit [Quit: sleeping]
<workmad3> ExxKA: if the guide doesn't work, maybe the openssl binding compiled into ruby *is* looking at that .rvm directory and you've just got a naming issue
<workmad3> ExxKA: but I'd certainly start by installing your cert into the trusted cert store of your system openssl
<ExxKA> Thanks for the guide and all your time :)
<ExxKA> I hope it will work
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
undersc0re97 has quit [Ping timeout: 260 seconds]
<ExxKA> Grrr… still hasn't solved it
<ExxKA> I will try and move the certs to the .rvm specific folder
Yarou_ has quit [Ping timeout: 256 seconds]
Rix has quit [Ping timeout: 260 seconds]
chussenot has quit [Remote host closed the connection]
chussenot has joined #ruby
ninegrid has joined #ruby
Yarou_ has joined #ruby
Yarou has quit [Ping timeout: 265 seconds]
ianfleeton has quit [Quit: ianfleeton]
<ExxKA> No luck
Lemtzas has quit [Ping timeout: 255 seconds]
machty has quit [Ping timeout: 248 seconds]
rohit has joined #ruby
hamed_r has quit [Ping timeout: 264 seconds]
mikecmpbll has joined #ruby
danneu has quit [Read error: Operation timed out]
<mikecmpbll> if i have a bunch of name : number pairs, what's the best way to get a list of all with the highest number
<mikecmpbll> atm i'm looping twice, first to find what the highest number is, then a second time to find everyone with that highest number.. feels like there will be a better way.
tvw has joined #ruby
Ethan2 has quit [Quit: Leaving]
undersc0re97 has joined #ruby
<mikecmpbll> wait .. nvm
Rix has joined #ruby
Guest2219 has quit [Read error: Connection reset by peer]
schaary has joined #ruby
Michael_ has joined #ruby
fyolnish has quit [Remote host closed the connection]
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
ircmouser has joined #ruby
senny has quit [Remote host closed the connection]
Yarou_ has quit [Ping timeout: 256 seconds]
<ExxKA> workmad3, I used IRB to instantiate OpenSSL and read the default config file path
<ExxKA> It points to a file within ~.rvm/
<ExxKA> so I guess that's where I need to go
emergion has joined #ruby
apeiros_ has joined #ruby
codecaster has quit [Read error: Connection reset by peer]
robert_ has joined #ruby
Yarou_ has joined #ruby
codecaster has joined #ruby
pcarrier has quit []
alup has joined #ruby
tk___ has joined #ruby
Takehiro has joined #ruby
Slivka has joined #ruby
Takehiro has quit [Remote host closed the connection]
ExxKA has quit [Quit: This computer has gone to sleep]
withnale has joined #ruby
Yarou has quit [Ping timeout: 255 seconds]
browndawg has joined #ruby
ExxKA has joined #ruby
Takehiro has joined #ruby
browndawg has left #ruby [#ruby]
Takehiro has quit [Remote host closed the connection]
<ExxKA> Sry, got disconnected
hoelzro is now known as hoelzro|away
robert_ has quit [Ping timeout: 276 seconds]
niklasb has joined #ruby
g-ram has joined #ruby
Takehiro has joined #ruby
codecaster has quit [Quit: Leaving.]
Takehiro has quit [Remote host closed the connection]
larissa has joined #ruby
hoelzro|away is now known as hoelzro
lampe2 has joined #ruby
lampe2 has quit [Read error: Connection reset by peer]
matthewrobbins has quit [Ping timeout: 244 seconds]
Yarou has joined #ruby
lampe2 has joined #ruby
Michael_ has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 255 seconds]
L1 has quit [Remote host closed the connection]
Yarou_ has quit [Ping timeout: 248 seconds]
matthewrobbins has joined #ruby
kil0byte_ has joined #ruby
cmarques has joined #ruby
Michael_ has joined #ruby
polymar has quit [Remote host closed the connection]
polymar has joined #ruby
beiter has quit [Ping timeout: 244 seconds]
lkba has quit [Ping timeout: 265 seconds]
kil0byt__ has joined #ruby
kil0byte has quit [Ping timeout: 250 seconds]
Michael_ has quit [Remote host closed the connection]
<ExxKA> workmad3, are you still around?
Lemtzas has joined #ruby
toto_ has quit [Quit: Leaving...]
kil0byte_ has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
ToTo has joined #ruby
polymar has quit [Ping timeout: 250 seconds]
dr_bob has quit [Quit: Leaving.]
matthewrobbins has quit [Quit: matthewrobbins]
<evelyette> hi
<evelyette> I'm downloading the image like this: http://dpaste.com/838904/ ... is there any way to get the width and height of the image ?
samuel02 has joined #ruby
tvw has quit [Ping timeout: 246 seconds]
xpen has quit [Remote host closed the connection]
tehlulz has joined #ruby
lampe2 has quit [Read error: Connection reset by peer]
polymar has joined #ruby
BiHi has quit [Quit: Computer has gone to sleep]
Michael_ has joined #ruby
ToTo has quit [Quit: Leaving...]
Michael_ has quit [Remote host closed the connection]
bier has quit [Ping timeout: 265 seconds]
bier_ has quit [Ping timeout: 246 seconds]
matthewrobbins has joined #ruby
workmad3_ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
Yarou_ has joined #ruby
postmodern has quit [Quit: Leaving]
<k610> can i add a README.yard? when i gem build ?
soc42 has quit [Remote host closed the connection]
Yarou has quit [Ping timeout: 252 seconds]
CrazyHorse18 has joined #ruby
samphippen has joined #ruby
tehlulz has quit [Read error: Connection reset by peer]
rohit has quit [Quit: Leaving]
bier_ has joined #ruby
elaptics is now known as elaptics`away
tehlulz has joined #ruby
bier has joined #ruby
Seventoes has quit [Ping timeout: 252 seconds]
sheerun_ has quit [Remote host closed the connection]
dpg has quit [Quit: dpg]
jamesaxl has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby
elaptics`away is now known as elaptics
beiter has joined #ruby
senny has joined #ruby
Seventoes has joined #ruby
chussenot has quit [Quit: chussenot]
workmad3_ is now known as workmad3
rhys has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
h8R has joined #ruby
pcarrier has joined #ruby
lenovodroid has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
pcarrier has quit [Ping timeout: 256 seconds]
hotovson_ has quit [Remote host closed the connection]
gbchaosmaster has quit [Ping timeout: 252 seconds]
pcarrier has joined #ruby
Elhu has joined #ruby
leifmadsen has joined #ruby
Yarou has joined #ruby
Yarou has joined #ruby
Yarou has quit [Changing host]
niklasb has joined #ruby
answer_42 has joined #ruby
lenodroid has joined #ruby
Yarou_ has quit [Ping timeout: 248 seconds]
codecaster has joined #ruby
Yarou__ has joined #ruby
lenovodroid has quit [Ping timeout: 246 seconds]
Yarou has quit [Ping timeout: 244 seconds]
lenodroid has quit [Read error: Connection reset by peer]
rlb3 has joined #ruby
xyzodiac has joined #ruby
carloslopes has joined #ruby
rlb3 has left #ruby [#ruby]
BiHi has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
shevy has quit [Read error: Operation timed out]
nomenkun has joined #ruby
nomenkun_ has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
nomenkun_ has quit [Read error: Connection reset by peer]
nomenkun has quit [Read error: No route to host]
KevinSjoberg has joined #ruby
fyolnish has joined #ruby
nomenkun has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
tehlulz has quit [Quit: tehlulz]
kil0byte has joined #ruby
nomenkun has quit [Remote host closed the connection]
senny has quit [Remote host closed the connection]
nomenkun has joined #ruby
a_a_g has quit [Quit: Leaving.]
codecaster has quit [Quit: Leaving.]
kil0byt__ has quit [Ping timeout: 248 seconds]
xyzodiac has quit [Quit: Computer has gone to sleep.]
alcy has joined #ruby
ExxKA has quit [Quit: This computer has gone to sleep]
tvw has joined #ruby
nanderoo has joined #ruby
<alcy> Hello, can someone tell why in this snippet - http://pastebin.com/MuvLq6V0 - add & change work as expectec - adding a key or editing one and `pp conf` reflects that, but destroy doesn't change the conf, it shows the original val
freeayu has joined #ruby
cakehero has joined #ruby
kil0byte_ has joined #ruby
enroxorz-work has joined #ruby
proshot has quit [Quit: Leaving]
sailias has joined #ruby
s1n4 has joined #ruby
lenodroid has joined #ruby
kil0byte has quit [Ping timeout: 265 seconds]
<alcy> in the same snippet @conf = nil works
s1n4 has left #ruby [#ruby]
<phelps> alcy: @conf and conf are not the same thing
habib has joined #ruby
<habib> hey everyone. does anyone use texplay?
vlad_starkov has quit [Remote host closed the connection]
<alcy> phelps: yea, but modifications invoked using conf work if they edit the var, but not when destroying it ?
tvw has quit [Ping timeout: 246 seconds]
schaerli has joined #ruby
samphippen has joined #ruby
iamjarvo has joined #ruby
hotovson has joined #ruby
<phelps> alcy: maybe because conf is calling the def and not the variable
<phelps> if you change the def conf to def conf_init, the code breaks because conf isn't defined
<phelps> conf is accessing a method not a variable
<phelps> I'm not really sure
ABK has quit [Ping timeout: 260 seconds]
<phelps> alcy: yeah, I think thats whats going on
tpe11etier_ has quit [Quit: tpe11etier_]
<alcy> phelps: how does that explain add & change methods working, but not the destroy method ?
fasta has quit [Remote host closed the connection]
linoj has joined #ruby
<alcy> phelps: oh, I am aware that working with @conf will work fine
niklasb has quit [Ping timeout: 256 seconds]
<alcy> phelps: just trying to see why, when using a method to access the instance var - the destroy method doesnt work
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Elhu has quit [Quit: Computer has gone to sleep.]
lenodroid has quit [Ping timeout: 256 seconds]
yshh has joined #ruby
strg has joined #ruby
Elhu has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
prajjwal has joined #ruby
<phelps> alcy: I think its only removed the method in the local scope of that def
prajjwal has left #ruby [#ruby]
<phelps> if you puts the .class of conf inside that method, its NilClass as it should be
<phelps> I honestly am not sure
<phelps> interesting puzzle
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
ttt has quit [Remote host closed the connection]
<phelps> thats the only way it works correctly
<phelps> I'm sure that the conflicting variable and def names are the issue
Neomex has joined #ruby
Neomex has quit [Client Quit]
leifmadsen has quit [Quit: Peas out homey]
<alcy> phelps: i tried changing it to conf_init... destroy still didnt work
jeffreybaird has joined #ruby
skattyadz has joined #ruby
<phelps> alcy: look at these 2 examples no _init http://codepad.org/iE7hiG8E, with _init http://codepad.org/SyF8SFrI
samuel02 has quit [Remote host closed the connection]
<phelps> the big one being, undefined local variable or >method<
ffranz has joined #ruby
prajjwal has joined #ruby
Doc_X has joined #ruby
allanm__ has joined #ruby
mark_locklear has joined #ruby
<alcy> phelps: weird not sure whats happening
prajjwal has left #ruby [#ruby]
<phelps> I'm sure that its calling the method to get the value when they share the method name
<phelps> and the ||= is causing it to become a sort of singleton
<phelps> once you set it to nil
<phelps> the ||= creates a new instance of the var
allanm_ has quit [Ping timeout: 246 seconds]
<phelps> someone a bit smarter needs to chime in
<alcy> yeah I admit I personally don't know much, trying to understand/make someone else's code to work
leifmadsen has joined #ruby
<phelps> the code is just plain wrong to start, so thats an easy fix
<phelps> why/how it works as much as it does though, thats something else
<alcy> heh, I suppose it was made to be easy or something, cant say myself, other places in the code/lib do use the instance var directly
ExxKA has joined #ruby
samuel02 has joined #ruby
<phelps> alcy: thats exactly whats going on http://codepad.org/hHWPnnHH
regedare1 is now known as regedarek
krawchyk has joined #ruby
ephemerian has left #ruby [#ruby]
dreinull has joined #ruby
lkba has joined #ruby
<habib> enyone used texplay?
blitzrage has joined #ruby
Eplemosen has joined #ruby
<phelps> alcy: alright, yeah, thats whats going on here, inside the destroy method, conf = nil, is just setting the conf method to nil for that scope, outside the scope its the same value it was when it was last modified
<phelps> alcy: and the modifications work inside other scopes because the OR, making it a sort of singleton
thisirs has joined #ruby
leifmadsen has quit [Ping timeout: 246 seconds]
dv__ has quit [Read error: Connection reset by peer]
tvw has joined #ruby
invisime has joined #ruby
xyzodiac has joined #ruby
mentus has joined #ruby
<alcy> phelps: thanks for spending time on it, I don't fully grok singletons but I am somewhat understanding your point about the scope
[Neurotic] has quit [Remote host closed the connection]
browndawg has joined #ruby
nemesit has joined #ruby
whitedawg has joined #ruby
dv_ has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
shevy2 has joined #ruby
dEPy has joined #ruby
shevy2 is now known as shevy
<mentus> hello
sailias has quit [Quit: Leaving.]
<phelps> alcy, the array access on the method causes some confusion, those ['foo']['bar'] don't actually do anything
<mentus> i am irritated that the ruby inferior process in emacs is repeating my input before printing the actual result of an expression
joofsh has joined #ruby
sepp2k has joined #ruby
<mentus> someone knows how to change it?
ncw has joined #ruby
ner0x has joined #ruby
<rking> mentus: Tried ruby-dev.el ? https://github.com/pry/pry/wiki/ruby-dev.el
xsbeats has joined #ruby
<shevy> mentus no idea, I use an enhanced notepad as my main editor of choice :)
<alcy> phelps: you mean hash access or... am I really not qualified to be understanding this ? :)
<browndawg> shevy: Notepad++?
<phelps> alcy: me calling it an array is a carryover from other languages
<shevy> browndawg hehe ... nah, not exactly... but in spirit, yes. I am more into the GTK-based editors
<phelps> alcy: I do mean hash though
<shevy> on windows I would opt for notepad++ though as first choice these days
<shevy> on linux, I dunno.. sublime one day perhaps, or geany... but I still like bluefish 1.x the most. it's better than the later bluefishes
SegFaultAX has quit [Read error: Operation timed out]
Guest63674 has quit [Read error: Operation timed out]
<shevy> the best would be to be able to use different components, and build your own editor in precisely the way you would want to have it
<browndawg> shevy: :) You're thinking of vim or emacs
<shevy> :(
lusory has joined #ruby
<shevy> it's always those two ...
<mentus> rking: thanks for the tip. i will try out ruby-dev.el
<browndawg> shevy: Was a heavy npp user until about two years ago. Got vim. Never looked back.
<shevy> hehe
<shevy> like rking !
<browndawg> shevy: who?
<alcy> phelps: thanks again
<rking> __ᴠɪᴍ__
tectonic_ has quit [Ping timeout: 246 seconds]
<browndawg> rking: +1
<shevy> rking here, he is the vim god of ruby
arusso has quit [Ping timeout: 246 seconds]
rcs has quit [Ping timeout: 245 seconds]
reinaldob has quit [Remote host closed the connection]
<phelps> alcy: np, was interesting little bit i normally wouldn't have thought of
<rking> Haha, anything but. =P
tr4656 has quit [Ping timeout: 245 seconds]
<browndawg> shevy: Nice
sj26 has quit [Read error: Operation timed out]
tommyvyo has joined #ruby
<shevy> browndawg hmm have you used another nick in the past and have you been on #ruby-lang then?
<browndawg> shevy: Yes, why?
dpn` has quit [Ping timeout: 255 seconds]
<shevy> I dunno, you seemed familiar... I am no longer on #ruby-lang due to the "you must be registered to speak" change
Guest24042 has joined #ruby
anekos has quit [Ping timeout: 276 seconds]
elsifaka has quit [Quit: Veloma e!]
thorncp has quit [Ping timeout: 246 seconds]
bwlang has joined #ruby
<rking> shevy: Why don't you register with Freenode?
<browndawg> shevy: I rarely am on irc
Tarential has quit [Ping timeout: 260 seconds]
ahuman has quit [Ping timeout: 256 seconds]
undyingr1ge has quit [Read error: Operation timed out]
epochwolf has quit [Ping timeout: 245 seconds]
anekos has joined #ruby
<browndawg> shevy: Haven't been here in a while
<shevy> rking oh I am, just too lazy to autoregister
strtok has quit [Ping timeout: 246 seconds]
hola123 has joined #ruby
<shevy> browndawg I see I see, well as long as you still like ruby!
<browndawg> shevy: But I'm crazy about vim so I might have tired to shove it down your throat before :D
tr4656 has joined #ruby
thorncp has joined #ruby
undyingrage has joined #ruby
<shevy> I used to use vim for a while
<originale> whats |=
<shevy> perhaps a year or two
chussenot has joined #ruby
<shevy> I collected knowledge into a page... it got larger and larger
TomRone has quit [Ping timeout: 244 seconds]
sj26 has joined #ruby
<shevy> I noticed vim changes your brain a lot, a bit like ruby yes?
ahuman has joined #ruby
<browndawg> shevy: I can't imagine why you'd switch back
<browndawg> shevy: Indeed.
<shevy> I didnt like the brain changes from vim
Guest20802 has joined #ruby
<browndawg> shevy: I guess its a matter of preference
<rking> originale: a |= b is like a = a | b, assign the bitwise OR of a and b to a.
<shevy> I think an editor should stay very very simple and small all the time, everywhere
rcs has joined #ruby
<ner0x> Anyone use the falcon patch in dev/prod?
arusso has joined #ruby
<shevy> browndawg yeah, probably
<browndawg> shevy: Use whatever you're most comfortable with
tectonic has joined #ruby
mentus has left #ruby ["rcirc on GNU Emacs 24.1.1"]
<originale> rking: ty
<shevy> browndawg when I looked at vim-functions, I was disgusted
samphippen has quit [Quit: Computer has gone to sleep.]
<browndawg> shevy: Well, vimscript isn't the best thing around.
<browndawg> shevy: But you rarely have to write vimscript unless you want to.
xyzodiac has quit [Remote host closed the connection]
SegFaultAX has joined #ruby
TomRone has joined #ruby
<shevy> well, I like to know that I can easily change things when I have to
<browndawg> shevy: Emacs, then. Easily extended with lisp.
<shevy> ewwwwwwwwww
<browndawg> :D
<shevy> in the vim vs. emacs war, I tend to be more on vim's side slightly
<shevy> the basic keybindings are nice... 5dd ... p and P for paste ... that is simple
<shevy> goto line 55 ... :55
<shevy> but it does not stop there, there is a lot more :\
hola123 is now known as arkiver
<rking> There's 'vile' to get those in emacs
<shevy> and gvim is just a joke really, it's worse than pure vim alone
<browndawg> shevy: Not looking to start an editor war here. Both are extremely powerful. I like typing out vim commands better than using emacs modifiers. A matter of preferenc.
<rking> Now, I don't use gvim for much, but it's not 'worse'.
<browndawg> yeah
epochwolf has joined #ruby
<shevy> rking it looks like a happy graphical editor, but it stinks! it's slower than vim too!
<alcy> phelps: actually, taking hashes out of the picture - the behavior is different of simple variables http://pastebin.com/58XPUZEr
<browndawg> shevy: Get rid of the toolbars and menu. Use it like console vim.
LucidDreamZzZ has quit [Ping timeout: 276 seconds]
<alcy> phelps: both methods result in foo having val bar
<shevy> using vim feels like driving a lamborghini, using gvim feels like sitting in a horse cart
<sie> Why does IO.popen'ed apps that wait for input in stdin steal input from irb/shell?
<shevy> browndawg, hehe yeah
<sie> s/does/do?
<browndawg> shevy: Um, what?
strtok has joined #ruby
<shevy> sie good question
v0n has joined #ruby
kil0byte has joined #ruby
<shevy> a question for rking :)
judd7 has joined #ruby
spike|spiegel has quit [Quit: WeeChat 0.3.9.2]
<rking> sie: What would you want it to do?
<phelps> alcy because foo without it is calling a local variable I think
CrazyHorse18 has quit [Quit: Leaving.]
Tarential has joined #ruby
<ner0x> Also, anyone use rvm + capistrano for deployment?
<sie> rking, I'd want it to not steal input from the shell, but only wait for input through the IO pipe it returned.
<sie> rking, do IO.popen("rev") in shell and see what happens when you type anything.
kil0byte_ has quit [Ping timeout: 246 seconds]
Znudzon has joined #ruby
jlwestsr has joined #ruby
mikecmpbll has joined #ruby
<rking> Oh, OK. 1min
<ner0x> Also kind of confused why I have to use .bash_profile rather than .bashrc for RVM
<shevy> hehe
LucidDreamZzZ has joined #ruby
<shevy> ner0x, the neverending questions of increasing complexity :)
<Znudzon> Hi. I am trying to use rcharts lib. But after installation from gem repository when I would like to use it in my code i am getting : 'ffi_lib': Could not open library 'lib.so': lib.so cannot open shared object file: No such file or directory. Any ideas ?
<shevy> ner0x, it's probably somewhere in the RVM scripts that it sources from that file, rather than .bashrc
<browndawg> ner0x: I think its because your bash_profile is sourced only at login, but your bashrc is sourced every time you open a new terminal.
pcarrier has quit []
<browndawg> ner0x: They just want you to initialize their stuff once, not everytime you open a new terminal. At least I _think_ thats it.
seanstickle has joined #ruby
<alcy> phelps: without what ?
<ner0x> Hrm. I do notice that it's only when I open a login shell that it works.
<ner0x> Something about rvm being a function rather than a script?
eka has joined #ruby
<shevy> Znudzon, I saw that error before... not sure how to solve it. ffi_lib, that is libffi is it not?
<browndawg> ner0x: Um what? It should work if you put it in your bashrc
<shevy> ftp://sourceware.org/pub/libffi/libffi-3.0.11.tar.gz
samuel02 has quit [Remote host closed the connection]
<phelps> alcy: http://codepad.org/k5V3sRLg there should be 2 'foo hit'
samphippen has joined #ruby
<phelps> but there isn't
<phelps> changefoo isn't actually calling the foo method here
proshot has joined #ruby
<phelps> its creating a local variable named foo
<shevy> foo must be the most often used name for a variable
edenc has quit [Quit: ZNC - http://znc.sourceforge.net]
R3dy has joined #ruby
edenc has joined #ruby
<phelps> that combined with bar and baz
<phelps> then probably bang
<alcy> phelps: ah, and when using hashes - it resorts to invoking the method instead ? how does that happen ?
<seanstickle> bang?
<seanstickle> foo, bar, bas, then quux
habib has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<seanstickle> bas -> baz
<seanstickle> It is known
spike|spiegel has joined #ruby
<shevy> hmm quux?
tomzx has joined #ruby
<phelps> I know, but I've never seen people actually use the actualy metasyntactic set
<phelps> :| english fail
<seanstickle> standard list of metasyntactic variables used in syntax examples" often used in the United States is: foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud.
<shevy> curious that we seem to rarely need more than 3 different variable names... foo bar baz ...
<seanstickle> I use it all the time. :D
<shevy> lol seanstickle
kil0byte_ has joined #ruby
<shevy> omg... waldo
<shevy> I shall never in my life name a variable "waldo"
<seanstickle> You probably never got past garply
<shevy> true :)
<phelps> alcy I don't know why that happens though
<shevy> alcy you need to always try to "think" a bit how the ruby parser sees the code you feed it
<phelps> alcy but it looks like it is whats going on
iamjarvo has quit [Quit: Computer has gone to sleep.]
elaptics is now known as elaptics`away
blitzrage has quit [Quit: Peas out homey]
kil0byte has quit [Ping timeout: 248 seconds]
<shevy> def test; bla = 'hello world'; end <-- the ruby parser will assume that this must be a local variable
<shevy> hmm
<shevy> I better test this and compare with self.bla =
akemrir has joined #ruby
<invisime> Today's Arcane Incantation of the Day:
<invisime> (['%02x']*8).join(':')%(0..8).to_a.map{rand(2**8)}
<invisime> points to whomever can tell me what it does. ;-)
<invisime> shevy and Hanmac1 might have to be exempt.
<shevy> Znudzon, I was wrong... libffi gives me libffi.so, not lib.so hmm... no idea what is "lib.so" ...
<seanstickle> Random IPv6 generator?
<phelps> shevy: the problem with alcy code is that there is a variable and method with the same name, which causes the odd behavior
R3dy has quit [Ping timeout: 246 seconds]
Rym has joined #ruby
<shevy> yeah
<invisime> seanstickle: you're on the right track.
<shevy> I am often surprised by my own ruby code too, especially old code :)
schaerli has quit [Remote host closed the connection]
<ner0x> browndawg: Why does rvm automatically put the sourcing line in .zprofile and .bash_profile ?
ananthakumaran has quit [Quit: Leaving.]
elaptics`away is now known as elaptics
troessner_ has quit [Quit: Leaving]
troessner has quit [Quit: Leaving]
<browndawg> ner0x: Because that should only get sourced once? Although some systems may source .bash_profile for each new terminal window.
llaskin has left #ruby [#ruby]
<browndawg> ner0x: I don't see any reason why it shouldn't work if you put it in your bashrc
<shevy> In file included from dl.c:104:0:
<shevy> callback.func:78:33: error: expected ')' before '(' token
<shevy> hmmm
<shevy> I can no longer compile ruby 1.8.7x
<shevy> but I can compile 1.9.x
<phelps> invisime: random MAC address gen ?
<ninegrid> i'm trying to mockup some infinite scrolling in a rails app using will_paginate over an array (so I don't have to create a model and populate a db)... this works on the initial page load, it pulls the first page from the array and renders them with the partial correctly.. however when i scroll to the bottom and my javascript calls for the next page i get 500 errors saying that the objects in my array are not ActiveModel-compatible obje
<phelps> looks like a mac address to me
<invisime> phelps: we have a winnar!
<phelps> fun fun
chrismcg is now known as zz_chrismcg
<ninegrid> question is, is there a workaround to this? why would the initial page load work correctly, but calls to next page are not? also if i manually write the url to specific pages it works correctly there as well
<invisime> just something I decided to add to spice up some automated tests. :-D
Elhu has quit [Quit: Computer has gone to sleep.]
lamba has quit [Ping timeout: 246 seconds]
answer_42 has quit [Ping timeout: 255 seconds]
<phelps> invisime: saved for the obscure occasion I ever need a random mac address
lamba has joined #ruby
ABK has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
GoGoGarrett has joined #ruby
<invisime> also, seanstickle: if you wanted the version for IPv6 generation, is just:
<invisime> (['%04x']*8).join(':')%(0..8).to_a.map{rand(2**16)}
MarcWeber has left #ruby [#ruby]
<seanstickle> Since when are MAC addresses 64 bytes?
yshh has quit [Remote host closed the connection]
ttt has joined #ruby
Elhu has joined #ruby
<invisime> seanstickle: ah, good point. this is for a somewhat obscure wireless protocol.
<seanstickle> Which one?
whitedawg1 has joined #ruby
hipstar has joined #ruby
whitedawg1 has left #ruby [#ruby]
whitedawg has quit [Ping timeout: 256 seconds]
_nitti has joined #ruby
King_of_the_poon has joined #ruby
Znudzon has quit [Quit: If at first you don't succeed, skydiving is not for you]
<phelps> xbee + arduino is always fun
King_of_the_poon has left #ruby [#ruby]
<invisime> for a normal mac, the code would be:
<invisime> (['%02x']*6).join(':')%(0..6).to_a.map{rand(2**8)}
robustus has quit [Ping timeout: 255 seconds]
jrist-afk is now known as jrist
<invisime> phelps take note. I gave you something not quite right for what you thought you were getting. XD
<apeiros_> a mac address is only 6 bytes?
pcarrier has joined #ruby
polymar has quit [Remote host closed the connection]
<apeiros_> hah, indeed
ttt has quit [Ping timeout: 276 seconds]
tonini has quit [Remote host closed the connection]
a_a_g has joined #ruby
pcarrier has quit [Read error: Operation timed out]
robustus has joined #ruby
ABK has quit [Read error: Connection reset by peer]
arkiver has quit [Ping timeout: 246 seconds]
geekbri has joined #ruby
ABK has joined #ruby
ly- has quit [Remote host closed the connection]
pcarrier has joined #ruby
senny has joined #ruby
lolmaus has quit []
levabalkin has joined #ruby
atno__ has joined #ruby
atno has quit [Read error: Connection reset by peer]
machty has joined #ruby
reactormonk has quit [Ping timeout: 260 seconds]
Spaceboy has quit [Read error: Operation timed out]
freeayu has quit [Remote host closed the connection]
atno__ has quit [Ping timeout: 252 seconds]
sailias has joined #ruby
ncw has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
pcarrier has quit []
Spaceboy has joined #ruby
ABK has quit [Read error: Connection reset by peer]
dukedave has joined #ruby
atno has joined #ruby
<gyre007> has anyone here ever used backup gem to backup a database ?
Elhu has joined #ruby
ABK has joined #ruby
<GeekOnCoffee> gyre007: your database almost certainly has better backup tooling then anything you'd write in ruby
arturaz has quit [Ping timeout: 246 seconds]
<ner0x> browndawg: Odd, it does work. Why does RVM install it to .bash_profile then?
dr_bob has joined #ruby
<gyre007> GeekOnCoffee: this is a small DB and I like that backup gem handles encryption automatically
<ner0x> browndawg: Actually, it looks like you don't even need the .bash_profile loaded.
beiter has quit [Read error: Connection reset by peer]
<GeekOnCoffee> gyre007: okay, so whats the question?
bbttxu has quit [Quit: bbttxu]
<gyre007> I wonder if I can specify multiple DB backup jobs in one model and just call particular job rather than call backup on the whole model which will be performing backups of all backup jobs defined in that model
<gyre007> basically...I want one model....with mutliple backup definitions/jobs ...and call backup per job...not per model...
atno__ has joined #ruby
iamjarvo has joined #ruby
niklasb has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
atno has quit [Ping timeout: 250 seconds]
v0n has quit [Read error: Operation timed out]
macabre has joined #ruby
skaczor has joined #ruby
phantasm66 has joined #ruby
R3dy has joined #ruby
coderhut has joined #ruby
<ner0x> I'm reading about geocoder, is this the typical solution for geocoding in ruby?
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
vlad_starkov has joined #ruby
flori has quit [Quit: leaving]
<coderhut> Hello, i am new to ruby and want to know how can i make initial characters of all words in string capital?
<ner0x> coderhut: the API docs are very good for things like this.
<ner0x> coderhut: It's a good idea to peruse the docs for any class you are new to. The answer to that question is definitely there.
niklasb has quit [Ping timeout: 260 seconds]
<coderhut> ner0x: http://www.ruby-doc.org/core-1.9.3/String.html i tried finding it on this link but couldnt get any.
<ner0x> coderhut: It's there for sure.
<coderhut> php has ucwords but couldnt find any best solution in ruby
stopbit has joined #ruby
luminous has quit [Quit: leaving]
Virunga has quit [Remote host closed the connection]
<ner0x> coderhut: Read through the method descriptions until you see something you recognize. You'll learn about functions you didn't know about and will use as well.
adambeynon has joined #ruby
<ner0x> coderhut: Hint: 'case'
king313 has joined #ruby
<coderhut> ner0x: its not there :( it only changes first word or single word thats it. I want whole string words initial characters to be capital
<phelps> String doesn't have an identically functional "ucwords"
_alejandro has quit [Remote host closed the connection]
<ner0x> coderhut: You're trying to capitalize the first letter of a word? Or multiple words?
<sie> rking, How did it go?
<phelps> capitalize with split and map will do the trick
<coderhut> like "this is test string" to "This Is Test String"
<seanstickle> coderhut: 'some string'.split(' ').map {|w| w.capitalize }.join(' ')
gcds has joined #ruby
<seanstickle> Also, there are crafty regex ways, but the margin here is too small to contain them
BigO has joined #ruby
tk___ has quit [Quit: ばいばい]
kalleth has quit [Quit: No Ping reply in 180 seconds.]
samuel02 has joined #ruby
kalleth has joined #ruby
mntzn has joined #ruby
<coderhut> seanstickle: thanks dear it worked efficiently :)
rhys has quit [Quit: Leaving]
bbttxu has joined #ruby
<seanstickle> coderhut: you are welcome snuggins
<coderhut> :)
<mntzn> Hi, I'm doing 1array - 2array, but sometimes 2nd array is passed as a string, how can I avoid getting errors when doing array difference?
arya has joined #ruby
<seanstickle> [array2].flatten
Snugug has joined #ruby
NiteRain has joined #ruby
zalmoxes has joined #ruby
tomzx has quit [Quit: tomzx]
nga4 has joined #ruby
<zalmoxes> i'm trying to install the bdb gem and dont quite understand why it's not working. can someone help me troubleshoot this http://pastebin.com/ssAZATua
<mntzn> seanstickle: thanks!
dmerrick has joined #ruby
<seanstickle> mntzn: sure thing
pencilcheck has joined #ruby
<mntzn> what are [] brackets do/called? (wanna a make a google search about this)
<Xeago> square brackets
<mntzn> thanks captain
nga4 has quit [Client Quit]
<phelps> seanstickle: .gsub(/\b(\w|['-])+\b/){|w| w.capitalize}
<phelps> :p
nga4 has joined #ruby
<alcy> phelps: seems right to me, waddya think ? http://stackoverflow.com/a/13628594/397509
<phelps> alcy: yeah, exactly what I thought was going on
x77686d has joined #ruby
<alcy> phelps: alright, cool.
<phelps> I just didn't understand how it was passing the arguments to the method
<phelps> I guess i was trying to overanalyze it
<alcy> heh maybe :)
NiteRain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
larissa has quit [Quit: Leaving]
d2dchat has joined #ruby
solidoodlesuppor has joined #ruby
polymar has joined #ruby
sandstrom has joined #ruby
<sandstrom> How can I turn a base64 string into an io object (without writing a TempFile or similar)?
<phelps> actually,
<phelps> .gsub(/\w+/) { |w| w.capitalize }
<phelps> works just as well
joshman_ has joined #ruby
shorne has quit [Ping timeout: 255 seconds]
carlyle has joined #ruby
akemrir has quit [Quit: WeeChat 0.3.9.2]
coderhut has quit [Quit: Page closed]
matt_ has joined #ruby
pcarrier has joined #ruby
<matt_> hey all
matt_ is now known as Guest56876
Guest56876 has quit [Client Quit]
zommi has quit [Quit: Leaving.]
mwmnj has joined #ruby
<mwmnj> Hey all
mikecmpbll has quit [Quit: Computer has gone to sleep.]
<mwmnj> Noobie question
<mwmnj> I am trying to modify a gem and test the changes locally
<mwmnj> So I have a file, test.rb that uses the gem, and the gem library repo cloned next to this file
<mwmnj> How do I tell ruby I want to use the library I have cloned locallt?
ahuman has quit [Quit: No Ping reply in 180 seconds.]
ahuman has joined #ruby
awarner has joined #ruby
awarner has quit [Remote host closed the connection]
<mwmnj> gem install 'mygem' puts the gem at /Users/matt/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/gems/1.9.1/gems/mygem
awarner_ has quit [Read error: Connection reset by peer]
awarner has joined #ruby
<mwmnj> And if I modify the file directly there, I can see the changes reflected when running "ruby test.rb"
<mwmnj> But I want to modify the gem in the git repo...
pcarrier has quit [Ping timeout: 256 seconds]
Eplemosen has quit [Read error: Operation timed out]
zastern has quit [Remote host closed the connection]
bigkevmcd has quit [Quit: outta here]
bigkevmcd has joined #ruby
pcarrier has joined #ruby
Eplemosen has joined #ruby
tagrudev has quit [Remote host closed the connection]
sheerun has joined #ruby
huoxito has joined #ruby
banisterfiend has joined #ruby
niklasb has joined #ruby
Snugug has quit [Quit: Snugug]
shevy has quit [Read error: Connection reset by peer]
shevy2 has joined #ruby
Eplemosen has quit [Client Quit]
topek has quit [Quit: Leaving.]
nateberkopec has joined #ruby
axl_ has joined #ruby
jlast has joined #ruby
Spaceboy has quit []
leifmadsen has joined #ruby
rippa has joined #ruby
ltsstar has joined #ruby
rakunHo has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<rking> sie: Sorry man, got super distracted and now I don't have time
<rking> Don't forget about Process.spawn if you need some more advanced handling, though I can't think of why you would.
SCommette has joined #ruby
<sie> It's okay, do your things. : ]
schaerli has joined #ruby
joeycarmello has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 256 seconds]
joeycarmello has joined #ruby
mikepack has joined #ruby
pogo has quit [Ping timeout: 245 seconds]
u89 has joined #ruby
<mwmnj> Anyone with ruby gem packaging experience around?
thestereobus has joined #ruby
eldariof has quit [Ping timeout: 246 seconds]
ehc has joined #ruby
<shevy2> mwmnj depends
shevy2 is now known as shevy
<shevy> what do you wanna do mwmnj
<mwmnj> shevy: I think this is likely a noob issue
aganov has quit [Remote host closed the connection]
<mwmnj> I have a gem installed at /Users/matt/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/gems/1.9.1/gems/mygem
<shevy> hmm so this is also rvm related
<mwmnj> I am referencing that gem in a file, test.rb, with "require 'mygem'"
samphippen has quit [Quit: Computer has gone to sleep.]
<thestereobus> I've got an interesting problem. I have 38k cities in a database and I have to send a message to each one via AMQP, perform some calculations, and update the city's timestamp in an Mongo database. The entire batch of cities has to be hit every 15 minutes.
<shevy> I can tell you without rvm. this code would work for most gems
<mwmnj> If I modify that gem at its location, deep within rvm, I can see those changes reflected when running test.rb
<thestereobus> I've made a daemon and am fooling around with EventMachine
<shevy> mwmnj without rvm, when I make a change to a gem, I reinstall the gem
apeiros_ has quit [Remote host closed the connection]
_alejandro has joined #ruby
<shevy> (after the change)
<thestereobus> but even using EM.defer the daemon eventually falls on its face and eats up CPU
<mwmnj> shevy: My issue is that I want to modify that gem "locally"
<shevy> this is the same issue I have. I solve it by simply reinstalling the gem, or more accurately, I use setup.rb actually
<mwmnj> I have the gem repo cloned on my desktop
<shevy> I have an alias to "r2", I run this and the gem/project is installed
<burgestrand1> mwmnj: why are you doing this?
<thestereobus> is EventMachine the right way to go about doing this?
burgestrand1 is now known as burgestrand
Virunga has joined #ruby
<Xeago> thestereobus: why EM?
zigomir has quit [Quit: zigomir]
<shevy> mwmnj, setup.rb came before gems were used, it installs things into ruby SITEDIR
<burgestrand> thestereobus: perhaps try some worker solution, have you looked at sidekiq? EM is kind of complex to get right in itself, and requires special care about which libraries you use.
fooo has quit [Quit: leaving]
<shevy> but with gems, it would only be one extra step, I could write a ruby script that does that
<thestereobus> Xeago: mostly to ensure the timeliness of it… happening every 15 minutes
<thestereobus> it's serving ads, basically
<shevy> alias make_gem='gem build *.gemspec'
<shevy> :D
<Xeago> EM for repeating actions?
<thestereobus> right
<Xeago> isn't em used for event oriented models?
<sie> shevy, What's your job?
<mwmnj> burgestrand1: I want to modify the gem, test the changes, and then commit the changes to the repo it came from
<burgestrand> Xeago: has a concept of timers and intervals
<shevy> sie hmm? non-programming related, I just like ruby
<Xeago> in any case, what burgestrand said, sidekiq looks promising for that
<thestereobus> yeah. I'm doing an interval of 15.minutes / number of cities
<sie> shevy, can has pm/
schaary has quit [Quit: Leaving.]
<shevy> gotta reboot soon to change something in xorg-server
<burgestrand> the only tricky thing about sidekiq would be the scheduling, but you can do that with sidekiq as well.
<shevy> if I dont come back, I ran into problems :P
<thestereobus> so it's doing like 5 ops every second or so
<Xeago> there's a good railscasts about sidekiq
ryanlecompte has joined #ruby
iamjarvo has quit [Ping timeout: 256 seconds]
<burgestrand> no need to use rails with sidekiq though, in case you aren’t already using rails
<thestereobus> cool. I guess a message queue / worker solution might also work
<mwmnj> shevy: so there is no way to reference that gem file directly via an absolute path or anything to my desktop?
akemrir has joined #ruby
<shevy> mwmnj it's really nothing special, gems are only archives
<thestereobus> I'm using rails in my mainline app but this daemon is just ruby + em + mongoid
<Xeago> thestereobus: the cities list is relatively static, right?
<mwmnj> The idea is to no have to navigate all the way within rvm any time I want to test these changes
<shevy> mwmnj hmm? I use about 20.000 aliases, about 2000 of these are ruby related. I call my ruby scripts directly via scripts, and my projects in ruby
<thestereobus> Xeago: yeah, it is. the daemon calculates the list on boot and it doesn't change
<burgestrand> mwmnj: use bundler
<shevy> ok need to kill xorg now...
shevy has quit [Quit: ""]
Drewch has quit [Ping timeout: 265 seconds]
Liothen has quit [Remote host closed the connection]
<waxjar> jeez, 20.000 aliases :p
<burgestrand> mwmnj: http://gembundler.com/gemfile.html — search page for :path
<Xeago> tbh, I don't really get the problem, calculate the time it takes to do 1000 cities, and spawn enough workers and partition their work.. ?
<thestereobus> so it's not really a messaging problem, I don't think
iamjarvo has joined #ruby
<thestereobus> the main problem is that it has to pull the ad from the db and do some calculations, which are intensive and cause a synchronous queue to backup
shevy2 has joined #ruby
<mwmnj> burgerstrand: is there some type of "gloabl" gemfile within my main ruby dir where I can specify paths?
<mwmnj> *"global"
x82_nicole has joined #ruby
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dmiller has joined #ruby
pogo has joined #ruby
<shevy2> hmm
shevy2 is now known as shevy
<waxjar> you can (temporarily) override the location bundler fetches a gem from with the bundle command mwmnj
<ninegrid> im trying to mockup some infinite scrolling using will_paginate over an array (to avoid actually creating a model and populating the database...) so, this works until i scroll to the bottom then im throwing 500 errors that the Fixnums in my array are not ActiveModel-compatible objects that return a valid partial path... what would be a quick work around to this?
<ninegrid> the thing is, the intial page load pulls the correct number of per_page items from the array and renders them correctly with the partial, I can also visit page urls directly, ie ?page=20 and this works too... its just that when my javascript tries to fetch the next page that i hit this error
x82_nicole has quit [Client Quit]
<Xeago> thestereobus: you'll have to make your data redundant available
v0n has joined #ruby
<mwmnj> waxjar: but otherwise, all I need to do is specify the dependencies in a gemfile next to the test.rb file i am attempting to run and do "bundle install"?
<waxjar> yep
<thestereobus> I've got a mongo replica set that will help
<mwmnj> Ok, ill give that a try, thanks :)
schaary has joined #ruby
rh1n0 has joined #ruby
polymar has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
generalissimo has joined #ruby
<waxjar> bundle config local.GEM_NAME /path/to/local/git/repository is the syntax to override which gem is used
Rym has quit [Quit: Rym]
reinaldob has joined #ruby
beiter has joined #ruby
carlzulauf has quit [Ping timeout: 260 seconds]
andrewhl has joined #ruby
schaary has left #ruby [#ruby]
<thestereobus> I've already got AMQP in my infrastructure. Do you think Sidekiq is redundant? Should I just build consumers for an AMQP queue?
carlzulauf has joined #ruby
xclite has joined #ruby
samphippen has joined #ruby
<Xeago> what do you put in your AMQP?
<mwmnj> waxjar: "There are no gemspecs at /Users/mmeyer/Programming/ruby"
<shevy> :D the joy of bundler?
<thestereobus> currently AMQP feeds a node.js daemon that sends pubsub messages to browsers via websockets. it is what will ultimately be sending the ads to the client.
<thestereobus> using faye
<waxjar> mwmnj is ruby a folder with a git repository in it? it's used for individual gems
<Xeago> and every t-minutes your amqp gets filled right?
<mwmnj> waxjar: yea, ruby has a folder "mygem" which is a got repo
<mwmnj> It is what I am trying to install and modify
geggam has joined #ruby
<thestereobus> every fraction of a second the daemon responsible for calculating what ad is shown sends a the ad message to AMQP
<waxjar> mwmnj: use bundle config local.mygem ~/mmeyer/Programming/ruby/mygem
<thestereobus> the nodejs and AMQP queue is not the bottleneck - it's the calculations
<Xeago> calculations based on data from database?
<thestereobus> right
Goopyo_ has joined #ruby
<Xeago> and that data can't be made more available?
reactormonk has joined #ruby
mntzn has quit [Quit: Lost terminal]
<Xeago> or prefetched/precalculated?
<Xeago> hmm, I think this is the precalculation right?
<mwmnj> waxjar: that is the "global" overide?
<Xeago> which is taking too long
<waxjar> yes, the global override for mygem
<thestereobus> precalculation is an option
<waxjar> well, i say that but i'm not sure if it's global or not :p
<thestereobus> the db is keeping up okay
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
Goopyo has quit [Ping timeout: 244 seconds]
Goopyo_ is now known as Goopyo
u89 has quit [Ping timeout: 256 seconds]
beiter has quit [Quit: beiter]
<Xeago> does the db respond fast enough?
cj3kim has joined #ruby
jprovazn has quit [Quit: Leaving]
<thestereobus> generally I think it does
<mwmnj> waxjar: hmm, doesn't look like that worked
oponder has joined #ruby
<mwmnj> Do I still need to run bundle install?
<thestereobus> I see it start out with 5% CPU utilization then it grows slowly
<mwmnj> and have require "bundler/setup" in my test.rb file?
<thestereobus> by the time I kill it it's hit 70%
cj3kim has quit [Client Quit]
<waxjar> i think you need to run bundle install yea, as bundler reads the stuff it needs to require from gemfile.lock
byennen has joined #ruby
invisime1 has joined #ruby
<mwmnj> same "There are no gemspecs at" error
x77686d has quit [Remote host closed the connection]
ABK has quit [Read error: Connection reset by peer]
tomsthumb has joined #ruby
x77686d has joined #ruby
invisime has quit [Disconnected by services]
invisime1 is now known as invisime
ABK has joined #ruby
<invisime> damn ghosts.
<waxjar> is there a gem spec file in the mygem folder?
<thestereobus> well thanks for the insights
<mwmnj> no
<mwmnj> just a Gemfile
elaptics is now known as elaptics`away
<waxjar> ah, well you need a .gemspec to call something a gem :)
<waxjar> otherwise bundler doesn't know what to do, it's just a folder of random files and subfolders
<mwmnj> ah so this is rails 101, not bundler specific
<mwmnj> *ruby 101
schaerli has quit [Remote host closed the connection]
<mwmnj> lol
maesbn has quit [Remote host closed the connection]
<waxjar> yea, rubes standard library includes ruby gems, which is sort of a package manager for ruby libraries
u89 has joined #ruby
<waxjar> *ruby
<waxjar> Bundler builds on that
<zalmoxes> can someone help me figure out why i get these biuld errors http://pastebin.com/ssAZATua
alejandro_ has joined #ruby
a_a_g has quit [Quit: Leaving.]
morf has quit [Quit: eof]
<mwmnj> waxjar
burgestrand has quit [Quit: Leaving.]
<mwmnj> waxjar: oh wait, there is a gemspec file in the mygem folder
reinaldob has quit [Remote host closed the connection]
<mwmnj> I am running bundle install in its containing folder, "/ruby"
<waxjar> mwmnj, can i first ask what you're trying to do?
_alejandro has quit [Ping timeout: 246 seconds]
hackerdude has joined #ruby
<mwmnj> make changes to a gem without needing to go all the way into where it is usually installed via "gem install"
solidoodlesuppor has quit [Ping timeout: 244 seconds]
<mwmnj> Users/mmeyer/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/gems/1.9.1/gems/
<mwmnj> is where it is installed
bjeanes has quit [Ping timeout: 246 seconds]
<waxjar> ok, well, if you've changed the gem locally, you cd into the folder you'd like to use it from
<waxjar> and run bundle install from there
solidoodlesuppor has joined #ruby
ninp0 has joined #ruby
nwertman has quit [Remote host closed the connection]
<waxjar> if you run it in the folder where the modified gem lives, it tries to look up the Gemfile there and install its dependencies
a_a_g has joined #ruby
bjeanes has joined #ruby
samuel02 has quit [Remote host closed the connection]
infinitiguy has joined #ruby
<mwmnj> ah ha, yea that was it, just needed to be within mygem dir
hipstar has quit [Quit: Leaving]
<mwmnj> waxjar: ty
<waxjar> yw :)
<shevy> waxjar is the king
ismell has quit [Read error: Operation timed out]
sie has quit [Quit: WeeChat 0.3.7]
joeycarmello has quit [Remote host closed the connection]
<waxjar> is that so? :p
rh1n0 has quit [Quit: Linkinus - http://linkinus.com]
<shevy> yes
<shevy> the king of bundler :D
matrixise has quit [Ping timeout: 264 seconds]
atno__ has quit [Read error: Connection reset by peer]
EyesIsMine has quit [Quit: Leaving]
atno__ has joined #ruby
Cicloid has joined #ruby
alejandro_ has quit [Read error: Connection reset by peer]
<waxjar> lol. they just have decent docs :p
_alejandro has joined #ruby
matrixise has joined #ruby
Guest33668 is now known as issyl0
cakehero has quit [Ping timeout: 252 seconds]
i_s has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
akemrir has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
arturaz has joined #ruby
jekotia has joined #ruby
nwertman has joined #ruby
u89 has quit [Remote host closed the connection]
gcds has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 260 seconds]
gcds has joined #ruby
skattyadz has quit [Quit: skattyadz]
ismell has joined #ruby
polymar has joined #ruby
machty_ has joined #ruby
love_color_text has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty_ is now known as machty
Banistergalaxy has joined #ruby
hoelzro is now known as hoelzro|away
s1n4 has joined #ruby
cardoni has joined #ruby
eph3meral has quit [Quit: eph3meral]
matrixise has quit [Ping timeout: 260 seconds]
gridaphobe has joined #ruby
joeycarmello has joined #ruby
kil0byte_ has quit [Remote host closed the connection]
Elfix has joined #ruby
kil0byte has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
Aiur has joined #ruby
dukedave has quit [Quit: Leaving.]
ABK has quit [Read error: Connection reset by peer]
cardoni has quit [Quit: cardoni]
ABK has joined #ruby
J-_-L has joined #ruby
kil0byte has quit [Ping timeout: 250 seconds]
cakehero has joined #ruby
J-_-L has quit [Client Quit]
Morkel has quit [Quit: Morkel]
mwmnj has quit [Quit: Page closed]
Nanuq has quit [Ping timeout: 246 seconds]
danneu has joined #ruby
Nanuq has joined #ruby
nat2610 has joined #ruby
s1n4 has left #ruby ["leaving"]
ryanlecompte has quit [Remote host closed the connection]
skattyadz has joined #ruby
roadt_ has quit [Ping timeout: 248 seconds]
philcrissman has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
leifmadsen has quit [Ping timeout: 256 seconds]
codecop has joined #ruby
niklasb has joined #ruby
jackbrownhf has joined #ruby
akemrir has joined #ruby
J-_-L has joined #ruby
leifmadsen has joined #ruby
<ner0x> If I clearly have bundler installed but it's not showing up in the path... is that a rvm problem?
dukedave has joined #ruby
EyesIsMine has joined #ruby
<Xeago> ner0x: could be
dmiller has quit [Ping timeout: 250 seconds]
<thestereobus> I think my problem was that the AMQP.start method that I was calling inside event machine does an implicit EM.run… which was inside my EM.run
<ner0x> Xeago: rvm, gem, ruby work fine.
<ner0x> which bundle has it installed to .rvm/bin/bundle
timonv has quit [Remote host closed the connection]
dmiller has joined #ruby
dankest has joined #ruby
<ner0x> Ah, I had to move the .bash_profile source into .bashrc.
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Slivka has quit [Read error: Connection reset by peer]
brianpWins has quit [Quit: brianpWins]
stkowski has joined #ruby
r4um_ has joined #ruby
Xeago has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
banisterfiend has quit [Ping timeout: 246 seconds]
r4um has quit [Ping timeout: 256 seconds]
BiHi has quit [Read error: Operation timed out]
solidoodlesuppor has quit [Ping timeout: 265 seconds]
<shevy> seems bundler issues are overtaking #ruby
strg has quit [Ping timeout: 264 seconds]
solidoodlesuppor has joined #ruby
joeycarmello has quit [Remote host closed the connection]
rakl has joined #ruby
moted has joined #ruby
_bart has joined #ruby
joeycarmello has joined #ruby
<shevy> hmm how many package managers in ruby do we have
<shevy> we have (1) machomebrew
<shevy> what else?
arietis has joined #ruby
polymar has quit [Remote host closed the connection]
<seanstickle> We have others besides gem?
<seanstickle> I had no idea
twopoint718 has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
ebobby has joined #ruby
x77686d has quit [*.net *.split]
joshman_ has quit [*.net *.split]
ltsstar has quit [*.net *.split]
withnale has quit [*.net *.split]
bapa has quit [*.net *.split]
maz-dev has quit [*.net *.split]
jeedey has quit [*.net *.split]
rdark has quit [*.net *.split]
shaman42_ has quit [*.net *.split]
oddraisin has quit [*.net *.split]
musl has quit [*.net *.split]
lamba has quit [*.net *.split]
alcy has quit [*.net *.split]
tomku has quit [*.net *.split]
Nowaker has quit [*.net *.split]
Muz has quit [*.net *.split]
Drager has quit [*.net *.split]
sts has quit [*.net *.split]
Gadgetoid_ has quit [*.net *.split]
lorn has quit [*.net *.split]
Emmanuel_Chanel has quit [*.net *.split]
mkillebrew has quit [*.net *.split]
udk has quit [*.net *.split]
mattp_ has quit [*.net *.split]
theoros has quit [*.net *.split]
<lemonsparrow> I have an array of objects @results and ech object has an attribute content_type. I want to remove all objects from the array content_type == Idea.to_s any single line way for it ?
Drager has joined #ruby
sts has joined #ruby
oddraisin has joined #ruby
shaman42 has joined #ruby
UdontKnow has joined #ruby
ltsstar has joined #ruby
UdontKnow has quit [Changing host]
UdontKnow has joined #ruby
Gadgetoid has joined #ruby
Nowaker has joined #ruby
mkillebrew has joined #ruby
Muz has joined #ruby
lamba has joined #ruby
BiHi has joined #ruby
<GeekOnCoffee> seanstickle: ditto… machomebrew is new to me
mattp_ has joined #ruby
maz-dev has joined #ruby
Emmanuel_Chanel has joined #ruby
sts is now known as Guest36259
joshman_ has joined #ruby
tomku has joined #ruby
<GeekOnCoffee> oh… homebrew
<seanstickle> lemonsparrow: Enumerable#reject
matthewrobbins has quit [Quit: matthewrobbins]
answer_42 has joined #ruby
musl has joined #ruby
lorn has joined #ruby
jeedey has joined #ruby
<seanstickle> home-brew is a ruby package manager?
Doc_X_ has joined #ruby
<lemonsparrow> seanstickle: I know rehject but @results.reject(&:content_type == Idea.to_s) didnt work
geekbri_ has joined #ruby
hackerdu_ has joined #ruby
andrewhl_ has joined #ruby
withnale has joined #ruby
<seanstickle> lemonsparrow: try it without the &:
bapa has joined #ruby
<seanstickle> And with the {|x| … } stuff
elaptics`away is now known as elaptics
<lemonsparrow> seanstickle: `content_type' for main:Object
<shevy> seanstickle well written in ruby
<seanstickle> shevy: ohhh...
<shevy> python has emerge :(
<lemonsparrow> @results.reject(content_type == Idea.to_s)
<seanstickle> shevy: I thought you meant FOR ruby
<shevy> well for ruby is not so much work, I think I am beginning to understand why there are so few general package managers out there
<lemonsparrow> seanstickle: @results.reject{|x| x.content_type == Challenge.to_s} worked
pcarrier has quit []
<seanstickle> lemonsparrow: there you go
_bart_ has joined #ruby
davidcelis has joined #ruby
<lemonsparrow> seanstickle: thanks :)
x82_nicole has joined #ruby
rakl has quit [Write error: Connection reset by peer]
Doc_X has quit [Write error: Connection reset by peer]
theoros has joined #ruby
ehc has quit [Read error: Connection reset by peer]
ehc_ has joined #ruby
rakl has joined #ruby
ryanlecompte has joined #ruby
ksk has joined #ruby
twopoint718 has quit [Ping timeout: 246 seconds]
alcy has joined #ruby
andrewhl has quit [Read error: No buffer space available]
ksk_ has quit [Read error: Connection reset by peer]
_bart has quit [Read error: No buffer space available]
_bart_ is now known as _bart
alcy has quit [Client Quit]
tjbiddle has joined #ruby
alvaro_o has joined #ruby
hackerdude has quit [Ping timeout: 250 seconds]
geekbri has quit [Ping timeout: 250 seconds]
Quix0te has quit [Ping timeout: 250 seconds]
Quix0te has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
Iszak has quit [Quit: Textual IRC Client: www.textualapp.com]
carlyle has joined #ruby
alex__c2022 has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
love_color_text has quit [Remote host closed the connection]
Drager has quit [Changing host]
Drager has joined #ruby
love_color_text has joined #ruby
a_a_g has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
fir_ed has joined #ruby
love_color_text has quit [Remote host closed the connection]
Aiur has quit [Quit: Computer has gone to sleep.]
blazes816 has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
Aiur has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
<elliottcable> shevy!
<elliottcable> shevy: /join #elliottcable, come say hi (=
gridapho` has joined #ruby
<elliottcable> shevy: (it's a bit like the new #RubyForce. Maybe.)
jackbrownhf has quit [Quit: Sto andando via]
nemesit has quit [Ping timeout: 246 seconds]
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gridaphobe has quit [Ping timeout: 260 seconds]
issyl0 has left #ruby [#ruby]
Elhu has joined #ruby
caleb_io has joined #ruby
brianpWins has joined #ruby
malte_ has quit [Quit: malte_]
noxoc has quit [Ping timeout: 252 seconds]
<thestereobus> turns out opening and closing an AMQP connection every .12 seconds is inefficient :P
arvindravi has quit [Quit: leaving]
answer_42 has quit [Read error: Connection reset by peer]
jekotia_ has joined #ruby
tenmilestereo has joined #ruby
nomenkun_ has joined #ruby
wermel has joined #ruby
jekotia has quit [Ping timeout: 246 seconds]
jekotia_ is now known as jekotia
carloslopes has quit [Remote host closed the connection]
slash_nick has joined #ruby
thisirs has quit [Remote host closed the connection]
Xeago has joined #ruby
LouisGB has quit [Ping timeout: 264 seconds]
nomenkun has quit [Ping timeout: 260 seconds]
nomenkun_ has quit [Ping timeout: 244 seconds]
adeponte has joined #ruby
ebobby has quit [Ping timeout: 248 seconds]
mneorr has joined #ruby
love_color_text has joined #ruby
lemonsparrow has quit [Quit: Page closed]
noxoc has joined #ruby
<zalmoxes> how do I add a custom path to ruby
eldariof has joined #ruby
blitzrage has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
<zalmoxes> if i installed a module somewhere in $HOME instead of /usr
answer_42 has joined #ruby
Elhu has joined #ruby
Elhu has quit [Client Quit]
sandstrom_ has joined #ruby
tommyvyo has quit [Ping timeout: 250 seconds]
leifmadsen has quit [Ping timeout: 255 seconds]
lenovodroid has joined #ruby
lenovodroid has quit [Client Quit]
lenovodroid has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<cableray> $LOAD_PATH I think
sandstrom_ has quit [Read error: Operation timed out]
<cableray> wait, that sounds wrong...
mahmoudimus has joined #ruby
love_color_text has quit [Remote host closed the connection]
<cableray> $GEM_PATH
<apeiros_> zalmoxes: require/load are about files, not modules
sandstrom has quit [Ping timeout: 260 seconds]
<apeiros_> (a file may contain a module)
c0rn has joined #ruby
<apeiros_> and yeah, $LOAD_PATH if it's a plain library, $GEM_PATH for rubygems
<cableray> apeiros_: I think zalmoxes means a gem. Correct?
<apeiros_> (where $GEM_PATH is an env var and $LOAD_PATH a ruby global)
<apeiros_> cableray: no idea, he says "module" which is wrong eitherway…
<apeiros_> so it depends on what he meant
Xeago has quit [Ping timeout: 246 seconds]
<cableray> yeah, I figured module in this context meant gem.
<cableray> since gems are called modules in some other languages.
alexim has joined #ruby
alexim has quit [Client Quit]
BiHi has quit [Quit: Computer has gone to sleep]
axl_ has quit [Read error: Connection reset by peer]
schaerli has joined #ruby
axl_ has joined #ruby
Mon_Ouie has joined #ruby
blitzrage is now known as leifmadsen
gridapho` is now known as gridaphobe
JohnBat26 has joined #ruby
JohnBat26 has quit [Client Quit]
Xeago has joined #ruby
JohnBat26 has joined #ruby
dpn` has joined #ruby
thestereobus has quit [Quit: thestereobus]
red5 has joined #ruby
<red5> when i define "class A; a=1; end ". is "a" a constant ?//
philcrissman has quit [Remote host closed the connection]
Vainoharhainen has quit [Quit: Leaving...]
<red5> how i access "a" using metaprogramming ?//
carloslopes has joined #ruby
rippa has quit [Ping timeout: 252 seconds]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
carloslopes has quit [Remote host closed the connection]
tjbiddle has joined #ruby
<shevy> no
<shevy> constants always start with upper case character
rippa has joined #ruby
philcrissman has joined #ruby
<shevy> class A; B=1; end # would work, as in A::B
Spaceboy has joined #ruby
<shevy> class A; b=1; end # can never work, as in A::b - no chance
<shevy> you could however cheat, and use a method
wallerdev has joined #ruby
<shevy> where A::b(), i.e. A::b would give you the value you desire
<red5> shevy: is there any awy to access "a" ?
<shevy> hmm
<shevy> a local variable on a class?
<shevy> I do not think this is possible red5. you could either make it a constant, upcase. or a method. or an ivar like @a, but a = "bla" on a class, I do not think this will ever work
libryder has joined #ruby
<libryder> hey hey!
havenn has joined #ruby
headius has joined #ruby
breefield has joined #ruby
brimil01 has joined #ruby
<shevy> hi libryder
<shevy> are you riding on libs?
dgethings has joined #ruby
<libryder> i contain the kernel and other important libraries
Xeago has quit [Ping timeout: 256 seconds]
<libryder> is it possible to manually set the time in ruby? i am creating two objects and i need the created_at to be a day apart but i am not creating the object directly. it's being done via callback.
<libryder> i'm looking at a gem called timecop but i was wondering if there was an easier way
<libryder> this is for tests btw, not the actual app
slainer68 has quit [Remote host closed the connection]
Xeago has joined #ruby
timonv has joined #ruby
<zalmoxes> cableray: apeiros_ i mean i installed tokyocabinet in /home/zalmoxes/local
<zalmoxes> how do i add that so a ruby file that requires tokyocabinet loads it from there
noxoc has quit [Quit: noxoc]
phanousit has joined #ruby
segv- has quit [Quit: segv-]
<apeiros_> zalmoxes: a) why don't you install it correctly? b) how did you install it there?
phanousit is now known as siameseguy
carlyle_ has joined #ruby
<siameseguy> hello
<siameseguy> is it wrong to place string literals in an if statement?
<zalmoxes> i added the home folder to $RUBYLIB
ExxKA has quit [Quit: Leaving]
<zalmoxes> apeiros_: i dont have write permission to /usr/local
axl_ has quit [Quit: axl_]
<zalmoxes> compiled tokyocabinet in my homefolder instad
<GeekOnCoffee> zalmoxes: take it from someone who's been there… beat your sysadmin until he lets you do it right
<apeiros_> siameseguy: it's pointless
caleb_io has quit [Quit: caleb_io]
<apeiros_> siameseguy: since a string literal is always true
<apeiros_> i.e., it's the same as writing: if true then …
senny has quit [Remote host closed the connection]
<havenn> siameseguy: No error but throws warning, doesn't make sense to do it.
internet_user has joined #ruby
Xeago has quit [Remote host closed the connection]
carlyle has quit [Ping timeout: 245 seconds]
cdt_ has quit [Ping timeout: 246 seconds]
<siameseguy> i need to check for the right user input. so how would i do it?
caleb_io has joined #ruby
k610 has joined #ruby
carlyle has joined #ruby
dgethings has quit [Quit: dgethings]
<apeiros_> zalmoxes: so youhave /home/zalmoxes/local/tokyocabinet/lib ? if so, add that to $LOAD_PATH within rubycode
<apeiros_> probaly also have to add /home/zalmoxes/local/tokyocabinet/ext
carloslopes has joined #ruby
d3c has joined #ruby
<havenn> siameseguy: What are you validating for? Presence? Or is it something else that makes input 'right'?
timonv has quit [Remote host closed the connection]
<apeiros_> siameseguy: paste the code
internet_user has quit [Remote host closed the connection]
<apeiros_> ruby tells you that you wrote something like `if "foo" then`, which is equivalent to just `if true then` (as said, makes no sense)
<shevy> siameseguy (1) fetch user input (2) pass it into a method that does the proper checks
carlyle_ has quit [Ping timeout: 245 seconds]
<havenn> siameseguy: unless move.empty?
<apeiros_> siameseguy: @real_places = "a1" or "a2" or "a3" or "b1" or "b2" or "b3" or "c1" or "c2" or "c3"
<apeiros_> what should that do?
<havenn> siameseguy: It is going to be a String (true) either way.
<shevy> 19
<shevy> 20
<shevy> 22
<shevy> 23
<shevy> 21
<shevy> 24
<shevy> 25
<shevy> 26
<shevy> 27
<shevy> 29
<shevy> 30
<shevy> 28
<apeiros_> because what it *does* is it'll assign "a1" to @real_places, nothing else
gcds has quit [Read error: Connection reset by peer]
<shevy> 31
<shevy> 32
<shevy> 33
<shevy> 34
<shevy> 35
<siameseguy> if the user inputs one of those then an X goes into the hash
<shevy> 36
shevy was kicked from #ruby by apeiros_ [come back]
shevy has joined #ruby
<shevy> 39
<shevy> 40
<shevy> 41
<apeiros_> gah
<shevy> 42
shevy was kicked from #ruby by apeiros_ [come back]
<havenn> He's iterating out of control!
<apeiros_> yeah, probably some kind of snafu
<seanstickle> shevy always was a lazy evaluator
<havenn> haha
<apeiros_> told him to contact me when he fixed it :)
<apeiros_> siameseguy: you want a Set and test for Set#include?(move)
ChampS666 has joined #ruby
<apeiros_> @real_places = %w[a1 a2 …].to_set
<apeiros_> (require 'set' before)
fir_ed has quit [Ping timeout: 255 seconds]
frem has joined #ruby
billy_ran_away has joined #ruby
<billy_ran_away> Anybody use pry?
<eka> billy_ran_away: here
<slash_nick> yah
<billy_ran_away> Why am I getting a no method for IRB.try_require
<billy_ran_away> ?
<slash_nick> they're pretty responsive in #pry
<billy_ran_away> oh thank you
jenrzzz has joined #ruby
darthdeus has joined #ruby
DrShoggoth has joined #ruby
<slash_nick> Naming convention question... I need to namespace classes per version...so 1.1.1, 1.1.2, etc... So I need semantic names, would you just do like ubuntu (Alpha Asshole, BetaBarber, etc), or have you seen something else used?
s1n4 has joined #ruby
trevortwining has quit [Quit: trevortwining]
darthdeus has quit [Read error: Connection reset by peer]
darthdeu has joined #ruby
<apeiros_> slash_nick: I'd just replace . with _
<atmosx> hello
<atmosx> I might passed medicinal chemistry
<atmosx> I might not, but who cares? right.
<seanstickle> Is that like a pretend sort of chemistry?
benlieb has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<seanstickle> Like quantum alchemy?
<slash_nick> apeiros_: like module OneOneOne?
<atmosx> seanstickle: it's organic chemistry basically
proshot is now known as statarb3
<apeiros_> slash_nick: no, like X_1_1_1
<seanstickle> Oh, well, that makes more sense
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<johnmilton> lets make some drugs :)
Aiur has quit [Quit: Computer has gone to sleep.]
<atmosx> why not
* atmosx goes under the shower
<atmosx> the idiot of the basketball team pissed me off
dmerrick has quit [Quit: dmerrick]
<atmosx> Can't wait next Tuesdday's practice
longwayround has joined #ruby
<atmosx> anyone saw the movie "Lincoln" ?
heftig has quit [Quit: leaving]
<longwayround> Beginner Ruby programmer here. Can anyone take the time to explain why begin puts "wtf" end while false works? Thanks.
<GeekOnCoffee> atmosx: yeah, it was good
<slash_nick> same reason "puts 'wtf'" works?
<GeekOnCoffee> longwayround: begin end while will always run it first
<GeekOnCoffee> longwayround: while false do end won't
<longwayround> GeekOnCoffee: but why? that's inconsistent with puts "wtf" while false how come it's different.
<longwayround> slash_nick: if you've got nothing helpful to contribute, don't. thanks
<apeiros_> because it's considered a do/while loop
dr_bob has quit [Quit: Leaving.]
<havenn> longwayround: neither 'begin .. end' nor 'while false' do anything. You just have: puts 'wtf'
<apeiros_> havenn: yes, it does
<atmosx> GeekOnCoffee: nice, I hope at least is based on some actual facts, you never know with hollywood
<havenn> apeiros_: Ah, yup you are right, read it wrong.
<apeiros_> it's a do/while loop, and it's treated differently from normal <action> while <condition>
<longwayround> havenn: sorry, i'm confused now, is it not valid syntax?
theRoUS has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
<reactormonk> apeiros_, still got yer @ - banhammer lately?
<apeiros_> longwayround: it's the syntax for a do/while loop and treated specially.
<havenn> longwayround: Listen to apeiros_, I haven't had my coffee and am talking gibberish.
<apeiros_> reactormonk: sure, never lost it
<apeiros_> reactormonk: reminds me… shevy hasn't contacted me yet…
<longwayround> @apeiros_: so it's a conincidence that it looks like a normal X while ... construct?
<apeiros_> longwayround: you can see it that way, yes.
<apeiros_> afaik matz regrets that part about ruby
<apeiros_> exactly for the reason that it's inconsistent
<longwayround> ok, i can live with that. thanks everyone! (apart from slash_nick)
skattyadz has quit [Quit: skattyadz]
timmow has quit [Quit: is having a nap]
caleb_io has quit [Quit: caleb_io]
nignaztic has joined #ruby
mascool has joined #ruby
<slash_nick> class Transaction < X_1_1_1::Transaction end..... can I use a variable or method that returns X_1_1_1 in place of X_1_1_1?
dankest is now known as dankest|away
<siameseguy> can someone tell me what the number 0 and 1 do in line 7 and 8 please? http://pastie.org/5454109
<apeiros_> slash_nick: hu? I thought you wanted to *namespace*
itnomad has joined #ruby
<apeiros_> you actually name classes by that? that's icky beyond reason…
longwayround has quit [Quit: Page closed]
<slash_nick> apeiros_:
<slash_nick> no
<apeiros_> ah, missed the ::
<apeiros_> I think for inheritance, arbitrary expressions are allowed, as long as they evaluate to a class
<slash_nick> class Transaction < CheetahCub::X_1_1_1::Transaction end... want to use a variable to determine which transaction class to inherit from
<atmosx> x_1_2_#_$_5 thanks god ctrl+p exists..
<apeiros_> slash_nick: const_get
<slash_nick> class Transaction < CheetahCub::expression::Transaction end .... this is kosher then, apeiros_
<apeiros_> slash_nick: no
<havenn> siameseguy: The 'a' on lines 7-8 refer to the a on 6. The first element of a is a[0], the second is a[1] and so on.
robotmay has quit [Remote host closed the connection]
fred909 has joined #ruby
<siameseguy> thanks havenn
darthdeu has quit [Quit: Linkinus - http://linkinus.com]
<apeiros_> slash_nick: well, technically yes, since CheetahCub::expression is the same as CheetahCub.expression, so if CheetahCub has a class method `expression` which returns a module/class which in turn contains Transaction - then yes
Cicloid_ has joined #ruby
machty has quit [Ping timeout: 246 seconds]
<slash_nick> thanks apeiros_, I'm understanding
Cicloid has quit [Ping timeout: 250 seconds]
cakehero has quit [Quit: Computer has gone to sleep.]
<apeiros_> I'd probably rather go with: class Transaction < some_method(…)
bricker has joined #ruby
buibex has joined #ruby
<apeiros_> e.g. class Transaction < YourLib::Transaction(version)
bluOxigen has quit [Ping timeout: 255 seconds]
chussenot has quit [Quit: chussenot]
a_a_g has joined #ruby
wermel has quit [Remote host closed the connection]
nignaztic has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
codezombie has joined #ruby
Bootstrapper has joined #ruby
Russell^^ has joined #ruby
thestereobus has joined #ruby
machty has joined #ruby
Zai00 has quit [Quit: Zai00]
caleb_io has joined #ruby
zigomir has joined #ruby
chimkan has joined #ruby
voodoofish430 has joined #ruby
nomenkun has joined #ruby
thestereobus has quit [Ping timeout: 244 seconds]
ebobby has joined #ruby
ebobby is now known as Guest89267
<codezombie> does anyone have any experience with minimagick and concurrency? I seem to be having a hell of a time getting my image processor running on threads. I've puts together a simple read/write test here: https://gist.github.com/941ad717b36fb9b1e4d7
havenn has quit [Remote host closed the connection]
nomenkun has quit [Ping timeout: 246 seconds]
jaap- has joined #ruby
havenn has joined #ruby
frem has quit [Quit: Computer has gone to sleep.]
ABK has quit [Read error: Connection reset by peer]
<reactormonk> codezombie,
<reactormonk> ... just fork
<apeiros_> codezombie: let me guess - your script never finishes all the work?
<codezombie> apeiros_: right
<apeiros_> codezombie: ruby only waits for Thread.main to finish
ABK has joined #ruby
Scriptwriter has joined #ruby
<codezombie> apeiros_: then why would the run method finish, but not the run_m?
<reactormonk> Threads.join
<apeiros_> for all other threads, *you* are responsible to let the main thread wait for.
<apeiros_> codezombie: uh, because you thread?
arturaz has quit [Ping timeout: 246 seconds]
havenn has quit [Read error: No route to host]
Guest89267 has quit [Ping timeout: 255 seconds]
caleb_io has quit [Quit: caleb_io]
Xeago has joined #ruby
<reactormonk> codezombie, if you where an evil overlord, would you check if your right hand tells you that your base is read to blow up?
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
lenodroid has joined #ruby
<codezombie> that analogy didn't help me at all lol
<codezombie> though, I appreciated it.
lenovodroid has quit [Ping timeout: 264 seconds]
rtd_ has quit [Quit: rtd_]
akemrir has quit [Quit: WeeChat 0.3.9.2]
matrixise has joined #ruby
jrajav has joined #ruby
soyapi has joined #ruby
Slivka has joined #ruby
error_code has joined #ruby
lenodroid has quit [Ping timeout: 264 seconds]
ABK has quit [Read error: Connection reset by peer]
caleb_io has joined #ruby
ABK has joined #ruby
cakehero has joined #ruby
browndawg has left #ruby [#ruby]
twopoint718 has quit [Ping timeout: 260 seconds]
icole has joined #ruby
cakehero has quit [Client Quit]
invisime has quit [Quit: Leaving.]
Quix0te has joined #ruby
Quix0te has quit [Changing host]
alex__c2022 has quit [Ping timeout: 246 seconds]
lampe2 has joined #ruby
elaptics is now known as elaptics`away
dankest|away is now known as dankest
elaptics`away is now known as elaptics
nomenkun has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
d3c has quit [Quit: Sleep]
trevortwining has joined #ruby
pencilcheck has quit [Remote host closed the connection]
dmerrick has joined #ruby
Marius has quit [Remote host closed the connection]
mascool has quit [Quit: WeeChat 0.3.9]
slainer68 has joined #ruby
mascool has joined #ruby
slainer68 has quit [Read error: Connection reset by peer]
slainer68 has joined #ruby
horrror has joined #ruby
leifmadsen has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
siameseguy has quit [Quit: siameseguy]
cascalheira has quit [Quit: Linkinus - http://linkinus.com]
navid has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
areil has quit [Remote host closed the connection]
<navid> anyone worked with the tire gem? How do you specify what the remote elasticsearch ip address is? I don't want to use the default '
ckrailo has joined #ruby
mahmoudimus has joined #ruby
elaptics is now known as elaptics`away
d3c has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
<navid> nm got it. answer: there is a Tire::Configuration.url method
dankest has quit [Quit: Linkinus - http://linkinus.com]
dankest has joined #ruby
polymar has joined #ruby
carloslopes has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
bigkevmcd has quit [Read error: Connection reset by peer]
dmiller has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
dmiller has joined #ruby
cakehero has joined #ruby
Cluster444 has quit [Quit: Leaving]
arturaz has joined #ruby
heftig has joined #ruby
cakehero has quit [Client Quit]
geekbri_ has quit [Remote host closed the connection]
keyvan has quit [Remote host closed the connection]
moted has quit [Remote host closed the connection]
phantasm66 has joined #ruby
leifmadsen has joined #ruby
Dave_ has joined #ruby
moted has joined #ruby
mikeit has joined #ruby
d3c has quit [Quit: Quit]
dankest is now known as dankest|away
ABK has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
ABK has joined #ruby
banister_ has joined #ruby
the_jeebster has joined #ruby
tommyvyo_ has joined #ruby
elaptics is now known as elaptics`away
phantasm66 has quit [Ping timeout: 255 seconds]
bjeanes has quit [Ping timeout: 246 seconds]
mikeit has left #ruby ["Leaving"]
seanstickle has quit [Quit: seanstickle]
elaptics`away is now known as elaptics
polymar has quit [Remote host closed the connection]
pen has joined #ruby
rippa has quit [Ping timeout: 250 seconds]
phantasm66 has joined #ruby
axl_ has joined #ruby
timonv has joined #ruby
bjeanes has joined #ruby
<slash_nick> Looking for a work-around for the need/desire to dynamically change the superclass of a class... are mixins something I should look at?
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
<Hanmac> slash_nick neigher superclass nor mixins allow the change of a superclass
geekbri has joined #ruby
<banister_> andrewhl_: mixins do
<banister_> Hanmac:
<banister_> in all but name
ABK has quit [Read error: Connection reset by peer]
<cableray> slash_nick: why do you need this? I can't think of a use case for it.
<andrewhl_> banister_: wrong andrew, i think
ABK has joined #ruby
mark_locklear has quit [Remote host closed the connection]
<Hanmac> banister_ with mixins you could add stuff, but you cant remove it later
<banister_> they're not technically 'classes' but when you include a mixin you're changing the super pointer, it'll now look up methods in the mixin before it looks them up in the previous super class
<slash_nick> Need to be able to remove
<banister_> Hanmac: yeah
<banister_> slash_nick: cant
<banister_> :)
skattyadz has joined #ruby
<slash_nick> oi
J-_-L has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
iPhoneMRZ has joined #ruby
J-_-L has joined #ruby
<slash_nick> ApiWrapper::Transaction.save ... I want it to check the version by ApiWrapper::Configuration.version then use ApiWrapper::X_<VERSION>::Transaction.save accordingly
<cableray> slash_nick: maybe you should be using composition instead?
<slash_nick> composition is a new word, 1s
gyre007 has quit [Remote host closed the connection]
buibex has quit [Remote host closed the connection]
iPhoneMRZ has quit [Client Quit]
Spaceboy has quit []
phantasm66 has quit [Quit: *sleeeeep*]
oponder has quit [Remote host closed the connection]
<cableray> slash_nick: instead of inheriting, have the object you would have inherited from be an object variable.
<slash_nick> composition ~ composed_of? Am I looking in the right place?
<cableray> and pass methods to that object.
s1n4 has quit [Quit: leaving]
banister_ is now known as banisterfiend
moshee has quit [Ping timeout: 260 seconds]
<slash_nick> cableray: i didn't understand that, sorry =\
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
kirun has joined #ruby
ABK has quit [Read error: Connection reset by peer]
ABK has joined #ruby
<cableray> class Composed; def initialize(composed_of);@composed_of=composed_of;end def do_something;@composed_of.do_something;end;end;
<cableray> and yup, design patterns will help.
dankest|away is now known as dankest
<cableray> I still don't understand why you need to change the superclass, slash_nick.
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jenrzzz has joined #ruby
Electrical has joined #ruby
malte_ has joined #ruby
red5 has left #ruby [#ruby]
<cableray> also, I don't think my example is exactly composition. but it's close.
tvw has quit [Remote host closed the connection]
<Electrical> hi all. i got an array with sub arrays in it.. and i need to sort it based on an entry in that sub array.. https://gist.github.com/4171593 in this case i need to sort on the required = true part ( see last value in the array )
<cableray> I think composition would create a new instance of the composed_of class on init.
<banisterfiend> Electrical: sort_by
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
ABK has quit [Read error: Connection reset by peer]
<Electrical> banisterfiend Im trying that one yeah. not completely understand how to do it. ( im more into php ... )
<banisterfiend> Electrical: array.sort_by { |sub_array| sub_array.last }
babykosh has joined #ruby
ABK has joined #ruby
jgn has joined #ruby
<banisterfiend> but im just guessing, cos i dont understand your gist :)I
<jgn> whats the Ruby equivalent of type() in python?
<banisterfiend> jgn: obj.class i guess
<jgn> ty
leifmadsen has quit [Ping timeout: 252 seconds]
<banisterfiend> jgn: type() returns class of the object?
<jgn> yeah
<Electrical> banisterfiend: the gist is the array :-)
navid has quit [Quit: navid]
<banisterfiend> Electrical: so u have one large array, whose elements are smaller arrays, and u want to sort them based on the last element of each smaller array?
Spaceboy has joined #ruby
<slash_nick> cableray: I don't want to pass the version in with every request... I'd like to be able to change the api version on the fly, thereby changing the method that gets called when I call Transaction.save
joel has joined #ruby
mikeit has joined #ruby
<joel> does ruby have an equiv of perl's += ?
<slash_nick> <<
<slash_nick> ugh
<Electrical> not the last element but the required element in each sub array. and sub arrays that have the required flag should come first then.
<slash_nick> joel: ignore that
<cableray> slash_nick: yeah, sounds like you want composition.
Banistergalaxy has quit [Remote host closed the connection]
geekbri has quit [Remote host closed the connection]
<joel> slash_nick: :)
eldariof has quit []
<cableray> slash_nick: so make the api you want for the request a variable for your class.
<joel> looks like .concat() is the only way O.o
Spaceboy has quit [Client Quit]
<cableray> slash_nick: gist it and I can take a closer look
itnomad has quit [Quit: Leaving]
<slash_nick> ok cableray :)
<banisterfiend> Electrical: are you sure oyu're not calling your hash an arary?
<cableray> joel: no, there is a += (or is it =+, one sec)
<joel> it's not +=
mneorr has joined #ruby
<joel> hrm, mayvbe it is. wtf.
<cableray> it is +=.
carlyle_ has joined #ruby
<cableray> what class it for>
<cableray> ?
<Electrical> banisterfiend: euhm.. could be.. but i can go trough it with the .each function.
<Electrical> im far from experianced with ruby :-(
gridaphobe has quit [Ping timeout: 252 seconds]
<cableray> Electrical: you need to look up how to use blocks, sounds like.
rakl has quit [Quit: sleeping]
carlyle has quit [Ping timeout: 245 seconds]
ABK has quit [Read error: Connection reset by peer]
<babykosh> doing some rspec... how to write "method should return a non empty array"?
codezombie has quit [Quit: Linkinus - http://linkinus.com]
techazard has joined #ruby
ABK has joined #ruby
<banisterfiend> Electrical: your data is pretty confused
<banisterfiend> it's an array, containing arrays which contain an array which has hashes
<banisterfiend> or something
leifmadsen has joined #ruby
workmad3 has joined #ruby
<cableray> babykosh: its(:method){should_not be_empty} should work
Chryson has joined #ruby
Spaceboy has joined #ruby
<babykosh> cableray got it, thanks
<Electrical> banisterfiend: its an array with arrays.. and those sub arrays have items. and on 1 of those items i want to sort the array
<cableray> and maybe a few other tests, like also test if it is an array (or rather behaves like an array would be better) an isn't nil.
benlieb has quit [Quit: benlieb]
<slash_nick> cableray: https://gist.github.com/4171697 ... It doesn't work as desired, but this is where I'm at
gbchaosmaster has joined #ruby
<slash_nick> (currently i'm stuck on whatever version is default)
nemesit has joined #ruby
lenodroid has joined #ruby
shevy2 has joined #ruby
<shevy2> require 'mkmf'
<shevy2> LoadError: cannot load such file -- mkmf
mneorr has quit [Remote host closed the connection]
<shevy2> is this normal??
danneu has quit [Quit: WeeChat 0.3.8]
benlieb has joined #ruby
benlieb has quit [Client Quit]
carlyle_ has quit [Read error: Connection reset by peer]
tobinharris has quit [Quit: tobinharris]
carlyle has joined #ruby
Averna has quit [Quit: Leaving.]
crossfire_ has joined #ruby
<slash_nick> can i get what i'm after using delegates? dynamically changing what a method is delegating
<slash_nick> to
dankest is now known as dankest|away
ABK has quit [Read error: Connection reset by peer]
shevy2 is now known as shevy
mneorr has joined #ruby
trevortwining has quit [Quit: trevortwining]
ABK has joined #ruby
Elico has quit [Ping timeout: 255 seconds]
Iszak has joined #ruby
Imlostina has joined #ruby
<slash_nick> use a method missing to delegate whatever's called to whatever it should be delegated to
Imlostina is now known as e
Xeago has quit [Remote host closed the connection]
e is now known as iFail
crossfire_ is now known as crossfire|away
iFail is now known as iCelebrity
workmad3 has quit [Ping timeout: 260 seconds]
nanderoo has quit [Quit: Leaving.]
nignaztic has joined #ruby
<dukedave> I have an array of objects and I'd like to filter them by passing in criteria, at the moment I just do this with find_all's on the array each time I need to filter, but I'd like to DRY this up. Where is a good place to put my method? Extend the array?
<iCelebrity> hi all.
<slash_nick> cableray: the delegates approach seems to work... Transaction.new.save
Guest24042 has quit [Quit: Guest24042]
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<cableray> yup, that's what I was writing up.
stephenjudkins has joined #ruby
codecop has quit [Quit: Išeinu]
lenodroid has quit [Ping timeout: 260 seconds]
ABK has quit [Read error: Connection reset by peer]
<slash_nick> ah didn't work like i expected... (changing version didn't change the output)
zigomir has quit [Quit: zigomir]
ABK has joined #ruby
hadees has joined #ruby
<slash_nick> forgot the method missing
bwlang has left #ruby [#ruby]
cakehero has joined #ruby
ABK has quit [Client Quit]
<slash_nick> problem is the delegate method only gets evaluated when the class is loaded
techazard has quit [Quit: This computer has gone to sleep]
leifmadsen has quit [Quit: Peas out homey]
burgestrand has joined #ruby
<cableray> slash_nick: try those changes in the gist out.
caleb_io has quit [Quit: caleb_io]
<slash_nick> yessir cableray
<cableray> i didn't test it, but i think it works.
<slash_nick> forwardable? one sec, will let ya know
dankest|away is now known as dankest
jenrzzz has quit [Ping timeout: 260 seconds]
<cableray> if you're using rails and active_support you can just use delegate instead.
<slash_nick> it's in core cool
<cableray> yup.
tyfighter has joined #ruby
<slash_nick> const_missing Forwardable?
<cableray> if you don't want the delegate public, change :transaction_delegate to :@transaction_delegate
schaerli has quit [Remote host closed the connection]
<cableray> hmm.
<slash_nick> I bumped it up in context... it's in module CheetahCub instead of class Transaction
<slash_nick> it did say const_missing CheetahCub::Transaction::Forwardable
arya_ has joined #ruby
<cableray> Try ::Forwardable
<slash_nick> ok
rakl has joined #ruby
jenrzzz has joined #ruby
<slash_nick> same
<cableray> hm.
danshultz has joined #ruby
arya has quit [Ping timeout: 244 seconds]
<slash_nick> activesupport is in the gemspec
Electrical has left #ruby [#ruby]
arya_ is now known as arya
<iCelebrity> hey all
sepp2k1 has joined #ruby
danneu has joined #ruby
sepp2k has quit [Ping timeout: 246 seconds]
<cableray> slash_nick: then yeah, you can use delegate instead of forwardable.
v0n has quit [Ping timeout: 246 seconds]
<slash_nick> howso
mikeit has quit [Quit: Leaving]
workmad3 has joined #ruby
<slash_nick> i had delegate :save, :save, to: expression::Transaction ... but it seems to only get evaluated once
yshh has joined #ruby
jamesaxl has joined #ruby
<cableray> delegate :method, :other_method, to: :@variable
<cableray> i'll change it in the gist
<slash_nick> ok...
<rking> So, why does the first work and the second fail, here: https://gist.github.com/5a30850c42921aa9b1ff
<rking> Oh shucks
<rking> I'm reading those docs wrong
<rking> (I thought it was saying it's an alias of attr_accessor, but if you 'Click to View Source' you can see it calls rb_mod_attr_reader())
seanstickle has joined #ruby
<cableray> slash_nick: gtg for a bit here. see if you can get it to work.
noxoc has joined #ruby
dankest is now known as dankest|away
<slash_nick> cableray: it works, thanks!... wanna take it a small step further so I'll play with that.
volty has joined #ruby
axl_ has quit [Quit: axl_]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
<slash_nick> trying to see if there's a way to delegate any method called on a class to another class
elaptics is now known as elaptics`away
s0ber_ has joined #ruby
sandstrom has joined #ruby
sandstrom has joined #ruby
sandstrom has quit [Changing host]
<slash_nick> instead of defining delegate each expected method
tvw has joined #ruby
Iszak has quit []
luckydiamond has joined #ruby
s0ber has quit [Ping timeout: 265 seconds]
s0ber_ is now known as s0ber
<luckydiamond> Does Ruby have anything like Haskell's Quickcheck? I Googled but found only vague comments and a dead project. Any info?
iCelebrity has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<seanstickle> luckydiamond: see, this is where you need to explain what the heck you're talking about
axl_ has joined #ruby
<seanstickle> luckydiamond: and not expect everyone in the channel to know Haskell packages like the back of their hand
<Beoran_> what is Quickcheck and what does it do
<seanstickle> Beoran_: ++
<luckydiamond> seanstickle: John Hughes' random testing framework? there was a paper on it at the 2000 International Conference on Functional Programming
<seanstickle> Well, lucky me. I didn't happen to attend the 2000 International Conference on Functional Programming.
brimil01 has quit [Read error: Connection reset by peer]
<seanstickle> Which, to this day, I regret.
v0n has joined #ruby
andrewhl_ has quit [Remote host closed the connection]
krawchyk has quit [Remote host closed the connection]
J-_-L has quit [Quit: Leaving.]
<luckydiamond> Basically, when writing unit tests you have to come up with test values, in QuickCheck, you write conditions that must hold and it randomly comes up with millions of test cases for you, and it's very good at finding edge cases
<seanstickle> Ah, that is a very nice explanation. I am unfamiliar with anything Ruby specific.
<seanstickle> There is *this* sort of thing: http://hexawise.com/
rezzack has joined #ruby
<seanstickle> Which is quite different, but I share because combinatorial testing seems interesting.
<luckydiamond> seanstickle: it solves the problem of all your tests passing, but that's because you wrote code to pass just those tests
Synthead has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<luckydiamond> seanstickle: i find that when i program Haskell code with Quickcheck I find that Quickcheck will produce a failing test case and i'll go aaaah, i never even thought about that input
<Beoran_> well, then, You'll have ti implemet this yourself in ruby,it seems, but I doubt it will be very hard.
<luckydiamond> roger
nwertman has quit [Ping timeout: 264 seconds]
<seanstickle> luckydiamond: that seems like a pretty neat thing
<Beoran_> tests can be defined as lambdas, and then you jsut have to generate random input for those lambdas
jekotia has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<seanstickle> luckydiamond: there was a Ruby test framework that randomly changed the tests to force them to fail and made sure they did, to check that you weren't writing trivial tests.
Marius has joined #ruby
<seanstickle> luckydiamond: sort of kind of related
<Beoran_> of corse, the hardt hing is how to test if the test is correct with the input bein grandom...
ctwiz has joined #ruby
volty has quit [Quit: Konversation terminated!]
[Neurotic] has joined #ruby
<Beoran_> anyway gottago no
luckydiamond has quit [Quit: Page closed]
philcrissman has quit [Remote host closed the connection]
chimkan has quit [Quit: chimkan]
k611 has joined #ruby
cmarques has quit [Read error: Operation timed out]
xclite has quit [Ping timeout: 246 seconds]
shevy has left #ruby [#ruby]
shevy2 has joined #ruby
<shevy2> test
<shevy2> stupid ban
nwertman has joined #ruby
jlast has quit [Remote host closed the connection]
<seanstickle> Well, you shouldn't have been iterating out of control. :)
<seanstickle> What was that all about, anyways?
otters has quit [Ping timeout: 265 seconds]
cousine has joined #ruby
NackNick has joined #ruby
k610 has quit [Ping timeout: 260 seconds]
<shevy2> a copy/paste mispaste
<shevy2> dunno how it happened
<shevy2> I was on fedora gnome3
<shevy2> now I am back on linuxmint
Spami has quit [Quit: This computer has gone to sleep]
<shevy2> but this was the last time I ever used unity or gnome3
TheHunter_1039 has joined #ruby
<shevy2> \o/
<seanstickle> shevy2: you are unbanned. go forth and do no evil.
shevy2 is now known as shevy
TheHunter_1039 has quit [Client Quit]
<apeiros_> shevy: why didn't you contact me? told you to…
_nitti has quit [Remote host closed the connection]
<apeiros_> ah, seanstickle already unbanned you. ok. thx @ seanstickle
<shevy> thanks
<cableray> slash_nick: take a look at this: http://stackoverflow.com/questions/9914400/delegate-all-method-calls-on-a-model-to-an-association the first example is what you want.
<joel> does anyone in here use rubymine? I did a gem install on a test gem, but it's not showing up on my external libraries, thus forth not available in my project :\
_nitti has joined #ruby
geggam has quit [Remote host closed the connection]
ctwiz is now known as dpg
<rking> joel: I blame RVM.
<joel> rking: I'm not using rvm :)
<joel> rking: looks like rubymine for some retarded reasons requires it to be in the gemfile.
<rking> I still blame RVM.
arturaz has quit [Ping timeout: 256 seconds]
amerine_ has joined #ruby
<ddd> rking: you would
<rking> joel: Yeah, that's doing you a favor
<rking> You really don't want gems to be involved that aren't in the Gemfile
amerine_ has left #ruby [#ruby]
<joel> sure I do.
<joel> I'm just quickly testing something.
<ddd> hoel actually no thats it respecting the Gemfile as it should be since the Gemfile is the decider of what gems an app needs when you're using bundler.
<ddd> err joel even
ewag has quit [Ping timeout: 260 seconds]
Xeago has quit [Remote host closed the connection]
<ddd> its respecting the way bundler works, which is good, not retarded
<joel> it's just one more change to keep track of, which is retarded.
jlwestsr has quit [Quit: Ex-Chat]
<shevy> that's the trait of viruses... they are contagious and spread
<joel> if it wanted to automatically manage my gemfile when I go to do a require on something not in the gemfile, that would be fine, but it better damn well remove it when I remove the require line, but it shouldn't require me to make a ton of changes to test something out.
<ddd> umm its not a ton of changes. its two. A) the addition to the Gemfile, and B) the require. Don't want to work within the software's constraints then just don't use bundler
<ddd> :shrug:
jlast has joined #ruby
Xeago has joined #ruby
Lite_ has joined #ruby
<Lite_> Got a quick ruby 1.8 question.
<Lite_> Does string[2..-1] work in 1.8 or is that just 1.9?
freakazoid0223 has joined #ruby
elliottcable is now known as RangeError
<ddd> ∵ ruby -e "var = \"my_string\" ; puts \"#{var[2..-1]}\" "
<ddd> _string
<ddd> ruby 1.8.7 (2012-10-12 patchlevel 371)
ChampS666 has quit [Ping timeout: 246 seconds]
<gbchaosmaster> Lite_: Works here.
<Lite_> okay thanks
<Lite_> Writing a scriplet for a friend but don't have access to 1.8 atm.
billy_ran_away has quit []
philcrissman has joined #ruby
elux has joined #ruby
joel has quit [Quit: ChatZilla 0.9.89 [Firefox 17.0/20121119183901]]
<shevy> hehe
ChampS666 has joined #ruby
jrajav has quit [Quit: I tend to be neutral about apples]
rtd has joined #ruby
<burgestrand> Lite_: behaves differently when it comes to multibyte characters, keep it in mind if you fiddle with those
<burgestrand> (1.9 vs 1.8)
davidcelis has quit [Quit: K-Lined.]
catepillar has quit [Quit: leaving]
gyre007 has joined #ruby
headius has quit [Quit: headius]
RangeError is now known as elliottcable
bedouin has joined #ruby
nga4 has quit []
shorne has joined #ruby
linoj has quit [Quit: linoj]
sailias has quit [Quit: Leaving.]
workmad3 has quit [Ping timeout: 255 seconds]
catepillar has joined #ruby
twopoint718 has joined #ruby
twopoint718 has quit [Changing host]
twopoint718 has joined #ruby
k610 has joined #ruby
Troy^ has left #ruby ["WeeChat 0.3.7"]
k611 has quit [Ping timeout: 255 seconds]
<Lite_> ah, thanks burgestrand
<Lite_> I knew there was a difference in there somewhere.
iamjarvo has quit [Quit: Computer has gone to sleep.]
<Lite_> I just couldn't remember what exactly.
jenrzzz has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
centipedefarmer has joined #ruby
davidcelis has joined #ruby
philcrissman has quit [Read error: Connection reset by peer]
dankest|away is now known as dankest
crossfire|away has quit [Quit: Page closed]
jrist is now known as jrist-afk
answer_42 has quit [Ping timeout: 246 seconds]
sandstrom has quit [Quit: sandstrom]
jenrzzz has quit [Ping timeout: 248 seconds]
chussenot has joined #ruby
babykosh has quit [Quit: babykosh]
tommyvyo has quit [Quit: Computer has gone to sleep.]
jenrzzz has joined #ruby
flip_digits has joined #ruby
stephenjudkins has joined #ruby
gridaphobe has joined #ruby
<burgestrand> Lite_: yeah, in 1.8 the index is for bytes, whereas in 1.9 it is for characters.
joeycarmello has quit [Remote host closed the connection]
<burgestrand> index and length, that is.
Z_Mass has joined #ruby
<bedouin> guys - are both of these acceptable --> match 'signout' => 'sessions#destroy', :as => 'signout' VS match 'signout', to: 'sessions#destroy', as: 'signout' ??
<bedouin> what's the difference?
atno__ is now known as atno|Zzz
rtd has quit [Quit: rtd]
dreinull has quit [Remote host closed the connection]
a_a_g has quit [Quit: Leaving.]
<shevy> bedouin not sure I see the difference
<shevy> hmm
<shevy> it just uses the new hash syntax
<shevy> so yeah bedouin, for ruby 1.9.3 this should be the same
<shevy> in ruby 1.8.x it would not work
i_s has quit [Quit: i_s]
<bedouin> shevy: one guy committed the the 2nd part... which did not compile on another computer
<bedouin> thanks shevy - so this is evolution of ruby (or rails?)
i_s has joined #ruby
<Hanmac> (because the other computer has shity ruby :D)
<gbchaosmaster> bedouin: The other computer is probably using 1.8, update it.
<flip_digits> is there a way to break a sting up over multiple lines?
<TTilus> flip_digits: just insert newline
joeycarmello has joined #ruby
<gbchaosmaster> bedouin: It's an upgrade to Ruby's syntax. When using symbols as keys to a hash, {:a => 1, :b => 2} can become the much nicer {a: 1, b: 2}.
<shevy> bedouin it is a syntax change in ruby, rails influenced a lot of it though, but it was matz's decision
pyr0commie has joined #ruby
<flip_digits> TTilus thanks
<TTilus> flip_digits: then, of course, you get string with newlines in it
<TTilus> flip_digits: whats the case?
<R3dy> Does ruby have any way to do code signing?
<flip_digits> TTilus I cant have newlines in the string. It's for a url
<TTilus> flip_digits: if you have loads of formatted stuff, you might want to use heredoc
<TTilus> flip_digits: ah, url
gcds_ has joined #ruby
<R3dy> maybe it goes by another name. I'm not getting much luck searching "Ruby Code Signing"
<TTilus> flip_digits: and it is so long you wanna split it?
<flip_digits> TTilus yes ti's more than 80 chars so...
<TTilus> flip_digits: "http://ho.st/stuff/starts" +
<flip_digits> thanks!
<TTilus> flip_digits: "/and/goes/on/and" +
<TTilus> flip_digits: "/on/and/on"
<flip_digits> cool I see!
gcds_ has quit [Read error: Connection reset by peer]
moshee has quit [Ping timeout: 256 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
_nitti has quit [Remote host closed the connection]
<TTilus> or you could have host = "ho.st"; path = "/and/goes/on/and/on/and/on" and then do "http://#{host}#{path}"
freakazoid0223 has quit [Quit: Leaving]
<flip_digits> TTilus thanks a lot!
<TTilus> np
h4mz1d has joined #ruby
<TTilus> R3dy: not that im aware of
<TTilus> R3dy: but then again, wouldn't be the first time i'm totally wrong :)
<R3dy> LOL
headius has joined #ruby
DrShoggoth has quit [Read error: Connection reset by peer]
<bedouin> gbchaosmaster: shevy: thank you guys - Mac OS X comes with 1.8.7
jenrzzz has quit [Ping timeout: 265 seconds]
love_color_text has joined #ruby
<shevy> hmm
ltsstar has quit [Quit: ltsstar]
<phelps> R3dy: providing a md5 hash of the code would be the same as code signing
<gbchaosmaster> bedouin: Get rid of it if you can and install with RVM.
Brainix has joined #ruby
<shevy> hehe
rumba has joined #ruby
tbrock has joined #ruby
elux has quit [Quit: Bye!]
zalmoxes has left #ruby [#ruby]
Zai00 has joined #ruby
daro_ has joined #ruby
daro_ has quit [Remote host closed the connection]
guns has joined #ruby
baroquebobcat has joined #ruby
baroquebobcat has quit [Client Quit]
yakko has joined #ruby
zf_ has quit [Read error: Operation timed out]
haxrbyte has joined #ruby
Dave_ has quit [Ping timeout: 265 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
maskact has joined #ruby
nari has joined #ruby
otters has joined #ruby
machty has quit [Read error: Connection reset by peer]
machty has joined #ruby
ner0x has quit [Quit: Leaving]
berserkr has quit [Quit: Leaving.]
maskact has quit [Quit: Textual IRC Client: www.textualapp.com]
noxoc has quit [Quit: noxoc]
jenrzzz has joined #ruby
tehlulz has joined #ruby
bbttxu has quit [Quit: bbttxu]
nomenkun has quit [Remote host closed the connection]
jarred_ has joined #ruby
Lite_ has left #ruby [#ruby]
Slivka has quit [Remote host closed the connection]
PetePorty has joined #ruby
PetePorty has quit [Changing host]
PetePorty has joined #ruby
blacktulip has quit [Remote host closed the connection]
gyre007 has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 244 seconds]
c0rn has quit [Quit: Computer has gone to sleep.]
ikaros has quit [Quit: Ex-Chat]
king313 has quit [Ping timeout: 246 seconds]
v0n has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
joshman_ has quit [Ping timeout: 252 seconds]
axl_ has quit [Quit: axl_]
caleb_io has joined #ruby
SJr has quit [Read error: Operation timed out]
kil0byte has joined #ruby
dpg has quit [Quit: dpg]
ikaros has joined #ruby
frem has joined #ruby
jaap- has quit [Quit: Leaving.]
Zai00 has quit [Quit: Zai00]
macabre has quit [Remote host closed the connection]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
SJr has joined #ruby
alanp_ has joined #ruby
mikepack has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
gabrielrotbart has joined #ruby
alanp has quit [Ping timeout: 246 seconds]
codezombie has joined #ruby
h4mz1d has quit [Ping timeout: 265 seconds]
mercwithamouth has quit [Ping timeout: 265 seconds]
gbchaosmaster has quit [Read error: Operation timed out]
Virunga has quit [Read error: Connection reset by peer]
jeffreybaird has quit [Quit: jeffreybaird]
codezombie has quit [Client Quit]
Virunga has joined #ruby
mikepack has joined #ruby
ltsstar has joined #ruby
carlyle has quit [Remote host closed the connection]
jlast has quit [Remote host closed the connection]
king313 has joined #ruby
king313 has joined #ruby
king313 has quit [Changing host]
ltsstar has quit [Client Quit]
riley526 has joined #ruby
ephemerian has joined #ruby
dobbymoodge has joined #ruby
ircmouser has quit [Remote host closed the connection]
<dobbymoodge> Is there any way to get context-sensitive help in irb? For example in ipython I can type 'int?' and get the python docs on the int type
<eka> dobbymoodge: did you try with ri ?
elaptics`away is now known as elaptics
<eka> dobbymoodge: ex ri Date
daniel_- has joined #ruby
<eka> dobbymoodge: you need to have documentation installed
<dobbymoodge> eka: I can use ri from the command line, but I was hoping there was an even friendlier interface to the system rdocs
jlast has joined #ruby
Michael_ has joined #ruby
<eka> you can use that inside pry
<eka> dobbymoodge: did you try pry?
emergion has joined #ruby
twopoint718 has quit [Ping timeout: 256 seconds]
<dobbymoodge> eka: Either I have weird expectations of what should be in ri or I don't have it set up; for example ri rand doesn't give me any documentation for rand
<dobbymoodge> what's pry?
<eka> dobbymoodge: it's like ipython... the better irb
<dobbymoodge> eka: I'm assuming it's a gem I can install?
Xeago has quit [Remote host closed the connection]
<eka> dobbymoodge: right... gem install pry
stephenjudkins has quit [Quit: stephenjudkins]
dkannan has quit [Remote host closed the connection]
<dobbymoodge> eka: Awesome, that looks promising
dkannan has joined #ruby
<eka> dobbymoodge: :)
<dobbymoodge> eka: I'm learning Ruby, in case you couldn't tell. :)
<eka> dobbymoodge: you come from python? I'm also learning :)
<eka> dobbymoodge: https://github.com/pry/pry
jarred_ has quit [Read error: Connection timed out]
<dobbymoodge> eka: Also, I'm an idiot and hadn't installed ruby-doc
jarred_ has joined #ruby
<dobbymoodge> eka: I wouldn't say I come from python, just that I've been there recently
<eka> dobbymoodge: when you install ruby I think it's installed.. you can also try rvm to manage your ruby versions...
<eka> ok
pyx has joined #ruby
gbchaosmaster has joined #ruby
stopbit has quit [Quit: Leaving]
<dobbymoodge> eka: I'm just using the OS packages for ruby for now
<eka> dobbymoodge: what os?
Michael_ has quit [Remote host closed the connection]
_nitti has joined #ruby
Michael_ has joined #ruby
jekotia has joined #ruby
tenmilestereo has quit [Quit: Leaving]
caleb_io has quit [Quit: caleb_io]
hadees has quit [Quit: hadees]
solidoodlesuppor has quit [Remote host closed the connection]
jarred_ has quit [Ping timeout: 252 seconds]
<dobbymoodge> eka: Fedora 17
headius has quit [Quit: headius]
<the_jeebster> processing a csv in ruby, creating integer ranges for each row and each item in the instance dumped into redis…sooooo slow :(
<eka> dobbymoodge: I would recommend that you try: https://rvm.io/ there is the guide on how to install and use... you will get latest version of ruby with that... and don't forget to check the requirements for rvm
stephenjudkins has joined #ruby
_nitti has quit [Ping timeout: 256 seconds]
<eka> dobbymoodge: https://rvm.io/rvm/install/
dEPy has quit []
<tbrock> hey guys anyone here use cucumber much?
c0rn has joined #ruby
cousine has quit [Remote host closed the connection]
zf has joined #ruby
<tbrock> hey guys anyone here use cucumber much?
<tbrock> ah sorry
stephenjudkins has quit [Client Quit]
cousine has joined #ruby
cousine has quit [Remote host closed the connection]
timonv has joined #ruby
jarred_ has joined #ruby
pyr0commie has quit [Remote host closed the connection]
melder has quit [Remote host closed the connection]
pyr0commie has joined #ruby
<dobbymoodge> eka: I'll check it out
hotovson has quit [Remote host closed the connection]
nari has quit [Ping timeout: 246 seconds]
jaap- has joined #ruby
senj has joined #ruby
<slash_nick> Know of a method to return whether a string is xml or json?
kil0byte has quit [Remote host closed the connection]
<slash_nick> string.as_json == string ? puts "It's JSON" : puts "Not JSON" is too hacky
invisime has joined #ruby
mercwithamouth has joined #ruby
<danneu> you can factor out the puts
charliesome has joined #ruby
<_alejandro> slash_nick: string.count("<") > 15 ? puts "It's XML" : puts "JSON" ;-)
<slash_nick> lol
<slash_nick> pretty functional... danneu, factor out?
kil0byte has joined #ruby
<danneu> the whole line is an expression, so you can just pass it to puts
theRoUS has quit [Ping timeout: 244 seconds]
guns has quit [Quit: guns]
emergion has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
<slash_nick> puts string.as_json == string ? "It's JSON" : "Not JSON"
<danneu> NOW WE'RE TALKIN
the_jeebster has quit [Ping timeout: 260 seconds]
<slash_nick> obviously puts isn't part of the plan ;)
<danneu> i know
<slash_nick> putz
king313 has quit [Quit: Saliendo]
<slash_nick> that sounds harsh... i'm not namecalling!
<danneu> but contrived examples arent gonna refactor themselves
<danneu> someone's gotta do it
machty has quit [Quit: machty]
<slash_nick> lol
<dobbymoodge> how would I sum an array of ints in ruby?
the_jeebster has joined #ruby
hotovson_ has joined #ruby
<danneu> [1,2,3].inject(:+)
<danneu> [1,2,3].reduce(:+) perhaps more clear
jaap- has quit [Ping timeout: 264 seconds]
<dobbymoodge> danneu: ah, cool
mikepack has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
<danneu> dobbymoodge: if you're using Rails, i believe it defines Array#sum even
mikepack has joined #ruby
CrazyHorse18 has joined #ruby
jlast has quit [Remote host closed the connection]
<slash_nick> @array.inject(:+)
<slash_nick> I like it because (:+) looks like an emoticon with a cute + nose
<gbchaosmaster> slash_nick: D'awww.
TomRone has quit [Ping timeout: 246 seconds]
<gbchaosmaster> Cannot unsee.
<slash_nick> Do you want to?
<dobbymoodge> slash_nick: What does @array mean? is that a dereference?
<gbchaosmaster> I... don't think so.
<gbchaosmaster> dobbymoodge: Instance variable.
<danneu> he just used it to represent arbitrary array
<dobbymoodge> ah
BigO has quit [Remote host closed the connection]
<slash_nick> @array = [1,2]; @array.inject(:+) # => 3
BigO has joined #ruby
<dobbymoodge> hmm, why does [rand(6),rand(6),rand(6)].inject(:+) yield 0?
hadees has joined #ruby
<slash_nick> lol...
<charliesome> dobbymoodge: by chance
<danneu> haha
<gbchaosmaster> dobbymoodge: It doesn't... always.
<dobbymoodge> charliesome: every time?
<charliesome> nope
<slash_nick> same reason it yields 3... and 4
<gbchaosmaster> dobbymoodge: I just got 10
<dobbymoodge> agh, wtf
<gbchaosmaster> Now 9
<dobbymoodge> now it's playing nice
<gbchaosmaster> etc.
<dobbymoodge> weird.
<charliesome> i got 7 before, don't forget 7
<danneu> if it's every time then youve got a motherfuckin yahtzee on your hands
gabrielrotbart has quit [Remote host closed the connection]
<dobbymoodge> I guess it did it 3 times in a row
<danneu> and you should play the lotto today
<gbchaosmaster> dobbymoodge: Shouldn't played the powerball
<slash_nick> charliesome: rand(1..6)
<gbchaosmaster> *Shoulda
<slash_nick> replace rand(6) with rand(1..6) and it'll never return 0
timonv has joined #ruby
<slash_nick> ...will never return less than 3
<dobbymoodge> slash_nick: Just got that
<gbchaosmaster> slash_nick: Challenge accepted.
<slash_nick> lol
* gbchaosmaster monkey patches Range
* slash_nick never says never again
<dobbymoodge> So what's the smart way to reduce that repeated rand()?
<charliesome> 10.times.map { rand(whatever) }
<dobbymoodge> aah
soyapi has quit [Ping timeout: 255 seconds]
g-ram has quit [Quit: Computer has gone to sleep.]
cakehero has quit [Quit: Computer has gone to sleep.]
<slash_nick> array = []; 3.times { array << rand(1..6)}; array.inject(:+)
<slash_nick> charliesome: yours is better
<banisterfiend> charliesome: dat nasty
<banisterfiend> charliesome: Array.new(10) { rand(whatever) }
<slash_nick> aww
BigO has quit [Ping timeout: 246 seconds]
<charliesome> banisterfiend: TIL. i've always been using the times.map trick
<gbchaosmaster> 10.times.reduce(0) { |a, b| a + rand(1..6) }
<gbchaosmaster> He wanted to reduce it, that's probably best?
<danneu> yeah i was just going to the array docs to see the constructor version
<banisterfiend> slash_nick: mine is best
<banisterfiend> :D
<dobbymoodge> OK, so my Fighter is going to have STR 8. Damn.
<slash_nick> banisterfiend: agreed
<slash_nick> dobbymoodge: sounds fun
<dobbymoodge> gbchaosmaster: hehe
<danneu> [].tap { |array| 10.times { array << rand(6) } }
<danneu> dat tap
xAndy is now known as xandy
<dobbymoodge> slash_nick: My go-to "learning a language" app is an AD&D stats generator
<charliesome> tap is great
<slash_nick> is there a bot in here... tired of tabbing and pasting
<charliesome> >> p 10.times.map { rand }
<eval-in> charliesome: Output: "[0.22152035900643963, 0.9770143579559576, 0.8329957824168737, 0.49059690274329826, 0.17242463750408588, 0.22057343573471921, 0.6826496396568955, 0.11904182969897559, 0.2012982511765561, 0.5643394585512934]\n" (http://eval.in/4072)
<slash_nick> p Array.new(10) { rand(rand(1)..6) }
<slash_nick> I can't play
<charliesome> you need >>
<gbchaosmaster> slash_nick: Prepend with a >>.
jaygen has quit [Read error: Operation timed out]
slainer68 has quit [Remote host closed the connection]
<slash_nick> >> p Array.new(10) { rand(rand(1)..6) }
<eval-in> slash_nick: Output: "[3, 4, 0, 2, 0, 3, 3, 0, 0, 5]\n" (http://eval.in/4073)
dmiller has quit [Remote host closed the connection]
jaygen has joined #ruby
slainer68 has joined #ruby
SCommette has quit [Quit: SCommette]
<danneu> >> Array.new(10).fill( -> { rand(6) }).map(&:call)
<eval-in> danneu: Output: "" (http://eval.in/4074)
<danneu> whoops
_alejandro has quit [Remote host closed the connection]
<danneu> needed p
gabrielrotbart has joined #ruby
<charliesome> it might be a good idea to wrap expressions in a method, then call that method and p the result
zooz has joined #ruby
<charliesome> in the bot
<zooz> hi people
<charliesome> hi
<danneu> you guys waste all those cpu cycles with rand(6). i fill array with lazy procs
<zooz> how would you check if there are duplicate keys in a hash?
invisime has quit [Quit: Leaving.]
<seanstickle> zooz: there aren't
<seanstickle> zooz: that was easy!
R3dy has quit [Ping timeout: 260 seconds]
<bedouin> guys why is it that puts "a\tb" outputs exactly a\tb vs a<tab>b ? what am I doing wrong
dmerrick has quit [Quit: dmerrick]
<charliesome> bedouin: are you using single quotes?
<zooz> seanstickle, I understand that duplicate keys kind of defeat the purpose of a hash :-)
<bedouin> charliesome: double quotes...
malte_ has quit [Quit: malte_]
dmiller has joined #ruby
<seanstickle> zooz: so, question answered then. excellent.
<charliesome> bedouin: it should output "a<tab>b"
pyr0commie has quit [Remote host closed the connection]
<danneu> bedouin: literal representation will preserve the \t character. only when evaluated to display chars will \t be rendered
<bedouin> charliesome: ok maybe my console is messed up... thank you1
<zooz> I basically need to iterate through a hash, do something with key value pairs and fail if there are duplicate keys
pyr0commie has joined #ruby
xandy is now known as xAndy