havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.0; 2.2.4; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
<Ox0dea> Is this fake code?
sudoubuntu has joined #ruby
<shellie_> depends on your definition of fake code; the module's are as per my "production" code, I just reduced the example to the minimum, both for simplcitiy and not sharing my companys code
<havenwood> >> define_method :method_missing, &:to_s; foo + bar + baz
<ruby[bot]> havenwood: # => "foobarbaz" (https://eval.in/547078)
halfamind has joined #ruby
bollullera has quit [Excess Flood]
uglybandersnatch has left #ruby [#ruby]
andywojo has joined #ruby
SenpaiSilver has quit [Ping timeout: 240 seconds]
Azure|dc is now known as Azure
<Ox0dea> havenwood: There was a Destroy All Software where Bernhardt demonstrated a sort of "Euler's identity" of Ruby.
<Ox0dea> It was something like `define_method :method_missing, &:instance_eval`, but that wasn't quite it.
LoneHerm_ has joined #ruby
Billias has quit [Ping timeout: 264 seconds]
Madplatypus has joined #ruby
chouhoulis has quit [Remote host closed the connection]
andywojo has quit [Ping timeout: 264 seconds]
chouhoulis has joined #ruby
Chagel has joined #ruby
Billias has joined #ruby
blackmes1 has quit [Ping timeout: 268 seconds]
LoneHerm_ has quit [Remote host closed the connection]
lalalaaa has quit [Quit: Lost terminal]
SCHAAP137 has quit [Quit: Leaving]
Chagel has quit [Ping timeout: 244 seconds]
<shevy> will the madness never stop
AccordLTN has joined #ruby
<Ox0dea> havenwood: https://eval.in/547083
<zacts> hi rubyists
<havenwood> zacts: hi!
<havenwood> Ox0dea: hmmm :)
<Ox0dea> havenwood: It's so Voldemort.
duckpuppy has joined #ruby
hightower3 has quit [Ping timeout: 252 seconds]
<Nawn> Bonjour!
<Nawn> :)
ljames has quit []
<zacts> salut
duckpuppy has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
marr has quit [Ping timeout: 260 seconds]
amclain has quit [Quit: Leaving]
Nawn has quit [Quit: Leaving]
Didac has quit [Ping timeout: 248 seconds]
jhack has joined #ruby
th0m has quit [Quit: Leaving]
makenoise has joined #ruby
andywojo has joined #ruby
johnmilton has joined #ruby
Ebok has joined #ruby
halfamind has quit [Quit: Leaving.]
makenoise has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
halfamind has joined #ruby
banister has joined #ruby
GodFather has quit [Ping timeout: 276 seconds]
toretore has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
polysics has joined #ruby
davedev24 has joined #ruby
IrishGringo has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 268 seconds]
User458764 has joined #ruby
jhack has quit [Quit: jhack]
IrishGringo has joined #ruby
maletor has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
polysics has quit [Ping timeout: 250 seconds]
nando293921 has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ericlee has quit [Ping timeout: 268 seconds]
CloCkWeRX has quit [Ping timeout: 244 seconds]
nando293921 has joined #ruby
PlasmaStar has quit [Ping timeout: 268 seconds]
<shevy> your french accent scared him away zacts!
hahuang65 has joined #ruby
PlasmaStar has joined #ruby
makenoise has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
ruby-lang394 has joined #ruby
<ruby-lang394> yoppp
LoneHerm_ has joined #ruby
ruby-lang394 has quit [Client Quit]
rehat has joined #ruby
CloCkWeRX has joined #ruby
maletor has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
LoneHerm_ has quit [Ping timeout: 250 seconds]
bry4n_ has joined #ruby
Aviio has quit [Remote host closed the connection]
andywojo has quit [Ping timeout: 250 seconds]
goglosh has quit [Quit: leaving]
bry4n_ has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
hahuang65 has quit [Ping timeout: 268 seconds]
xlegoman has quit [Quit: xlegoman]
eljimbo has quit [Quit: This computer has gone to sleep]
bkxd has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
johnmilton has quit [Ping timeout: 240 seconds]
arescorpio has joined #ruby
LoneHerm_ has joined #ruby
eljimbo has joined #ruby
pawnbox has joined #ruby
andywojo has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
pawnbox has quit [Ping timeout: 244 seconds]
nodejunkie has joined #ruby
polysics has joined #ruby
x0f_ has joined #ruby
x0f has quit [Ping timeout: 276 seconds]
goglosh has joined #ruby
_blizzy_ has joined #ruby
andywojo has quit [Ping timeout: 268 seconds]
Ebok has quit [Quit: Leaving]
poguez_ has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
krz has joined #ruby
andywojo has joined #ruby
diego1 has joined #ruby
diego2 has joined #ruby
diegoviola has quit [Ping timeout: 276 seconds]
davedev24 has quit []
diego1 has quit [Ping timeout: 246 seconds]
krz has quit [Ping timeout: 260 seconds]
andywojo has quit [Ping timeout: 264 seconds]
diego3 has joined #ruby
makenoise has quit []
rake_db_migrate has joined #ruby
baweaver has quit [Remote host closed the connection]
andywojo has joined #ruby
diego2 has quit [Ping timeout: 244 seconds]
baweaver has joined #ruby
Suntzu has joined #ruby
diego3 has quit [Changing host]
diego3 has joined #ruby
diego3 is now known as diegoviola
A124 has quit [Read error: Connection reset by peer]
armyriad has quit [Ping timeout: 268 seconds]
greg__ has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind1 has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
A124 has joined #ruby
greg__ has quit [Client Quit]
blt has quit [Ping timeout: 244 seconds]
greg__ has joined #ruby
greg__ has quit [Max SendQ exceeded]
greg__ has joined #ruby
greg__ has quit [Max SendQ exceeded]
andywojo has quit [Ping timeout: 244 seconds]
armyriad has joined #ruby
jtdowney has quit [Quit: ZNC]
ecksit has quit []
jtdowney has joined #ruby
jtdowney has joined #ruby
jtdowney has quit [Changing host]
htmldrum has quit [Ping timeout: 264 seconds]
andywojo has joined #ruby
bry4n_ has joined #ruby
RegulationD has joined #ruby
Axy has joined #ruby
<Ox0dea> baweaver: Can I see your Reducible#index?
<Ox0dea> I can't figure out how to make it feel appropriately functional.
<baweaver> &ri Enumerable#index
<`derpy> No results
statelesscode has quit [Quit: statelesscode]
<baweaver> so much for being lazy there
<Ox0dea> Oh.
rkazak has quit [Quit: Sleep.....ing....]
<Ox0dea> Well, I made one anyway. :P
solocshaw1 has joined #ruby
<Ox0dea> So stateful, though.
solocshaw has quit [Remote host closed the connection]
solocshaw1 is now known as solocshaw
Mia has quit [Ping timeout: 244 seconds]
<baweaver> got a gist?
<baweaver> I'll do a public version of it later and comment it
sudoubuntu has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
dex7 has quit [Quit: WeeChat 1.3]
<baweaver> probably headed out fairly soon to finish filing away some paperwork for annual reviews
<baweaver> that and I think I forgot to eat again. Nasty habit, that.
duckpuppy has joined #ruby
stardiviner has joined #ruby
<Ox0dea> I read somewhere that code has all the vitamins and nutrients one needs.
<baweaver> It helps you C#
<smathy> badum tish
yqt has quit [Ping timeout: 260 seconds]
<Ox0dea> I'm pretty sure you were right about #lazy being the only one that's egregiously hard to do with a reduction.
<Ox0dea> It's possible, but you have to muck with an explicit Fiber.
<baweaver> pretty much
andywojo has quit [Ping timeout: 260 seconds]
<baweaver> also, -1 on index if it doesn't find
<Ox0dea> Classic comedy.
<baweaver> ah, index_of
Beast_ has joined #ruby
* baweaver is trippy
<baweaver> nevermind
<baweaver> looks roughly the same as I'd probably do.
duckpuppy has quit [Ping timeout: 276 seconds]
htmldrum has joined #ruby
<Ox0dea> baweaver: You'd initialize with a 2-tuple and you know it.
<Ox0dea> I seent it.
* baweaver whistles
ur5us has quit [Remote host closed the connection]
<Ox0dea> I forget what exactly it was that you did with a single massive reduction, though.
andywojo has joined #ruby
<baweaver> probably using a hash as a state accumulator
<Ox0dea> Aye, rings all the bells.
<baweaver> reduce({max: 0, min: 0}) { |state, i| }
<baweaver> something like that
<baweaver> though that wouldn't work
<baweaver> not the point
<baweaver> I prefer that to an arraylike tuple
<baweaver> more descriptive, though slightly more resource intensive
Dimik has quit [Ping timeout: 244 seconds]
<baweaver> line 26, memo
<baweaver> does &:> work on nil?
<baweaver> :>
<baweaver> It's smiling at you Ox0dea
<baweaver> ah, that one
<Ox0dea> Ruby has the greatest number of smiley-resembling operators of any mainstream language.
<Ox0dea> Quite fitting.
<Ox0dea> baweaver: What about Line 26?
vsdfs has joined #ruby
<baweaver> >> 10 > nil
<ruby[bot]> baweaver: # => comparison of Fixnum with nil failed (ArgumentError) ...check link for more (https://eval.in/547121)
<Ox0dea> >> nil &.< 42
<ruby[bot]> Ox0dea: # => nil (https://eval.in/547122)
<baweaver> nevermind
<baweaver> not thinking
<baweaver> first number is memo
noService has joined #ruby
<Ox0dea> Oui.
gregf has joined #ruby
<baweaver> The programming gods have forsaken me today
<baweaver> or it's ze whisky
<baweaver> probably both.
<Ox0dea> "Where will you be when the Ballmer peak hits?"
<baweaver> screwing with State Machine for Rails
chipotle has joined #ruby
andywojo has quit [Ping timeout: 244 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mistermocha has joined #ruby
<baweaver> mmm, speaking of which, chipotle does sound good. Good call chipotle
kentnl has joined #ruby
kent\n has quit [Ping timeout: 268 seconds]
<Ox0dea> That looks really nifty.
<baweaver> especially for launching aws instances and keeping tabs on their state changes throughout the app
<baweaver> and doing things like cleanup on certain states
andywojo has joined #ruby
noService has quit [Ping timeout: 246 seconds]
statelesscode has joined #ruby
<baweaver> anyways, food time :D
<baweaver> cheers
baweaver has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
polysics has joined #ruby
andywojo has quit [Ping timeout: 250 seconds]
sudoubuntu has joined #ruby
andywojo has joined #ruby
rkazak has joined #ruby
noService has joined #ruby
graphettion has joined #ruby
bkxd has joined #ruby
quazi has joined #ruby
kam270 has quit [Ping timeout: 252 seconds]
goglosh has quit [Quit: leaving]
andywojo has quit [Ping timeout: 244 seconds]
polysics has quit [Ping timeout: 260 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
bkxd has quit [Ping timeout: 248 seconds]
<Kharma> Does anyone know of a way to securely store a dB password inside of a script so that dB calls can be made automatically?
halfamind1 has quit [Quit: Leaving.]
<Ox0dea> Kharma: Why inside the script and not in an environment variable?
<Kharma> You mean an environment variable on the local system right?
preyalone has joined #ruby
<Kharma> Ox0dea: If so it's because the code is going to be run on up to 30 machines (roughly) and setting the variables on each system would be one extra step. It's definitely an option but was checking if there was a way to do it without local environment variables.
<Ox0dea> Kharma: To be clear, all ~30 machines need to see the same value, yeah?
<Kharma> Correct
<Ox0dea> Is it liable to change?
matp has quit [Remote host closed the connection]
matp has joined #ruby
<Kharma> Only based on password policies. So roughly every 90 days
<Kharma> Code base is maintained in local git which makes updating much simpler
<Ox0dea> Well, even if coordination isn't of the utmost priority, it's still sanest to have them all read from the same source.
<Ox0dea> It might feel like overkill now, but you'd benefit in the long run from spinning them up with Chef.
ensyde_ has joined #ruby
<Ox0dea> You'd still want Chef to read an environment variable and share it around, though.
braincrash has quit [Quit: bye bye]
<Kharma> Not familiar with chef. Will check it out when I get a moment.
braincrash has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
ruby-lang527 has joined #ruby
<ruby-lang527> Hey guys
<benzrf> hi
<ruby-lang527> I feel like this is something that should be really easy, but I can't figure out a way to do it, and google is yielding nothing
<ruby-lang527> So I want to do a math equation, with the first argument, and return the output as a variable
<ruby-lang527> like argend = ARGV.first + 10
<ruby-lang527> But that doesn't work, and I feel like I'm missing something easy
<Ox0dea> ruby-lang527: ARGV contains Strings.
<ruby-lang527> Okay, so what am I missing?
mekul has quit [Read error: Connection reset by peer]
<ruby-lang527> Obviously I need to set argv as an integer
<ruby-lang527> Or, at least the first argument
Axy has quit [Ping timeout: 240 seconds]
<Ox0dea> >> '1'.to_i + 1 # ruby-lang527
<ruby[bot]> Ox0dea: # => 2 (https://eval.in/547123)
diegoviola has quit [Quit: WeeChat 1.4]
halfamind has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
gix has quit [Ping timeout: 248 seconds]
htmldrum has joined #ruby
ur5us has joined #ruby
fedexo has joined #ruby
rake_db_migrate has quit [Remote host closed the connection]
djbkd has joined #ruby
dc4 has joined #ruby
gix has joined #ruby
htmldrum has quit [Ping timeout: 264 seconds]
rake_db_migrate has joined #ruby
ByronJohnson has quit [Ping timeout: 244 seconds]
<ruby-lang527> I didn't think about the fact that ARGV.first is counted as a variable
<ruby-lang527> But it makes total since now
<ruby-lang527> sense, also :P
ByronJohnson has joined #ruby
<chipotle> baweaver: eat up! so my chipotle stock can rise!
tristanp has joined #ruby
halfamind has quit [Quit: Leaving.]
<Ox0dea> ruby-lang527: Almost everything in Ruby is an "expression", to use the technically correct term.
<Ox0dea> And if you've got a value, you've got an Object, on which you can invoke all kinda of methods.
<Ox0dea> >> 'foo'.methods.size
<ruby[bot]> Ox0dea: # => 170 (https://eval.in/547125)
baweaver has joined #ruby
quazi has quit [Quit: Page closed]
ruby-lang527 has quit [Ping timeout: 250 seconds]
lemur has joined #ruby
htmldrum has joined #ruby
baweaver_ has joined #ruby
baweaver has quit [Disconnected by services]
baweaver_ is now known as baweaver
baweaver is now known as lemur_
lemur_ is now known as baweaver
polysics has joined #ruby
lemur has quit [Ping timeout: 244 seconds]
rake_db_migrate has quit [Remote host closed the connection]
rake_db_migrate has joined #ruby
bb010g has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
David_H_Smith has joined #ruby
nhhc has joined #ruby
ericlee has joined #ruby
Musashi007 has joined #ruby
David_H__ has quit [Ping timeout: 260 seconds]
youch has joined #ruby
eljimmy has quit [Quit: Leaving]
Limix has joined #ruby
Limix has quit [Client Quit]
moeabdol has joined #ruby
<baweaver> Ox0dea: think I should make that reduce enumerable bit into a tutorial?
youch has quit [Ping timeout: 244 seconds]
xxneolithicxx has joined #ruby
xxneolithicxx has quit [Max SendQ exceeded]
xxneolithicxx has joined #ruby
<Ox0dea> baweaver: Probably better to cover #map as well for that sort of thing.
<baweaver> Maybe, but this is more of a
* Ox0dea feels a pun coming.
<baweaver> Hey look, everything can be implemented with reduce!
<baweaver> type of thing
<Ox0dea> Oh.
<baweaver> A good pun is its own reword Ox0dea
<Ox0dea> And, but, well, it's more like "look at all this contrivance".
<baweaver> Kinda, but at the same time it's teaching recursion and TCO without them realizing it.
<baweaver> until I mention it at the very end.
chouhoulis has joined #ruby
<Ox0dea> Maybe I just picked bad ones? Some of them would end up being really clean, but a lot of them'll be atrocious.
<baweaver> potentially
<Ox0dea> I hate that #index with a passion, and it's not even supposed to be in there; not sure how that bodes.
<baweaver> I'll rank them on annoyance later.
<baweaver> lazy I'm not doing
<baweaver> it's beyond my level of understanding to properly explain
<Ox0dea> Oh, I also tried to snag test/ruby/test_enum.rb, but it doesn't run correctly outside of the harness. :/
<baweaver> sounds about right.
krz has joined #ruby
eljimbo has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 252 seconds]
Chagel has joined #ruby
IrishGringo has quit [Ping timeout: 250 seconds]
PlasmaStar has quit [Ping timeout: 260 seconds]
PlasmaStar has joined #ruby
karioleez has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
tristanp has quit [Remote host closed the connection]
bluOxigen has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
rmulligan has joined #ruby
_ko1 has joined #ruby
moeabdol has quit [Quit: WeeChat 1.4]
duckpuppy has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
chipotle has quit [Quit: cheerio]
shmuli has quit [Remote host closed the connection]
duckpuppy has quit [Ping timeout: 244 seconds]
vsdfs has quit [Remote host closed the connection]
ascarter has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
bkxd has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
nando293921 has quit [Quit: Lost terminal]
howdoi has joined #ruby
pawnbox has joined #ruby
nando293921 has joined #ruby
ascarter has quit [Max SendQ exceeded]
ascarter has joined #ruby
ascarter has quit [Client Quit]
rmulliga` has joined #ruby
shmuli has joined #ruby
rmulliga` has quit [Remote host closed the connection]
rake_db_migrate has quit [Remote host closed the connection]
shmuli has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 276 seconds]
nando293921 has quit [Client Quit]
thoraxe has quit [Ping timeout: 244 seconds]
vsdfs has joined #ruby
shmuli has joined #ruby
IrishGringo has joined #ruby
Cohedrin_ has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
diegoaguilar has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
Cohedrin has quit [Ping timeout: 244 seconds]
thoraxe has joined #ruby
polysics has joined #ruby
x0f_ has quit [Ping timeout: 276 seconds]
x0f has joined #ruby
polysics has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
freerobby has quit [Quit: Leaving.]
nanoz has joined #ruby
dnewkerk has joined #ruby
x0f has quit [Ping timeout: 246 seconds]
astrobun_ has joined #ruby
Suntzu has joined #ruby
x0f has joined #ruby
Rickmast_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
David_H__ has joined #ruby
aqoom has joined #ruby
r0bby_ has joined #ruby
David_H_Smith has quit [Ping timeout: 246 seconds]
robbyoconnor has quit [Ping timeout: 244 seconds]
diegoaguilar has joined #ruby
vdamewood has quit [Quit: Life beckons.]
skydiver has joined #ruby
nanoz has quit [Ping timeout: 248 seconds]
chipotle has joined #ruby
pwnd_nsfw` has joined #ruby
Macaveli has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
ta_ has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 268 seconds]
full_throttle has joined #ruby
full_throttle has left #ruby [#ruby]
baweaver has joined #ruby
aqoom has quit [Quit: WeeChat 1.3]
mistermo_ has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
workmad3 has joined #ruby
livcd has quit [Ping timeout: 260 seconds]
zast has quit [Remote host closed the connection]
pwnd_nsfw` has quit [Ping timeout: 240 seconds]
sandelius has joined #ruby
sandelius has quit [Client Quit]
sandelius has joined #ruby
Inside has quit [Ping timeout: 276 seconds]
hxegon has joined #ruby
arescorpio has quit [Remote host closed the connection]
nando293921 has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
mistermocha has joined #ruby
nando293921 has quit [Client Quit]
Xiti has quit [Quit: Xiti]
DoubleMalt has joined #ruby
rkazak has joined #ruby
ceej_ has joined #ruby
krz has quit [Read error: Connection reset by peer]
krz has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
ceej has quit [Ping timeout: 252 seconds]
karioleez has quit [Remote host closed the connection]
Cohedrin has joined #ruby
tristanp has joined #ruby
polysics_ has joined #ruby
Cohedrin_ has quit [Ping timeout: 246 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
krz has quit [Ping timeout: 252 seconds]
User458764 has joined #ruby
BTRE has quit [Ping timeout: 276 seconds]
IrishGringo has quit [Ping timeout: 268 seconds]
aeterne has quit [Read error: Connection reset by peer]
darkf has quit [Read error: Connection reset by peer]
darkf has joined #ruby
BTRE has joined #ruby
halfamind has joined #ruby
nando293921 has joined #ruby
nando293921 has quit [Client Quit]
roelof has joined #ruby
halfamind has quit [Ping timeout: 252 seconds]
nando293921 has joined #ruby
kp666 has joined #ruby
nando293921 has quit [Client Quit]
<roelof> Can someone help me figure out why rspec fails here ? https://gist.github.com/rwobben/991a5a6b19fb3586ec9a2255559a536d
GitGud has joined #ruby
nando293921 has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
Musashi007 has quit [Read error: No route to host]
Musashi007 has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
krz has joined #ruby
<baweaver> What does times return?
<baweaver> >> 1.times {}
<ruby[bot]> baweaver: # => 1 (https://eval.in/547143)
<baweaver> >> 4.times {}
<ruby[bot]> baweaver: # => 4 (https://eval.in/547145)
<baweaver> >> 4.times { :doesnt_matter }
<ruby[bot]> baweaver: # => 4 (https://eval.in/547146)
<baweaver> roelof:
<baweaver> also, make sure to use the .rb extension in gist for syntax highlighting
<oz> (check the yielded-value instead of the return-value)
<baweaver> ....?
<roelof> oke, so I have to find another way to yield several times so I can for example add 3 to it
<baweaver> n.times.reduce(yield, :+)
djbkd has quit [Remote host closed the connection]
<baweaver> though remember times starts with 0 on the index.
<roelof> so adder(3) does this for example ( 6.succ.succ.succ)
duncannz has joined #ruby
<baweaver> >> 3.times.reduce(5, :succ)
<ruby[bot]> baweaver: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/547147)
<baweaver> >> 3.times.reduce(5, &:succ)
<ruby[bot]> baweaver: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/547148)
<roelof> baweaver: and :+ is the sames as sum += 1 ?
<baweaver> fine fine, just a sec.
pawnbox has quit [Remote host closed the connection]
<baweaver> >> 3.times.reduce(5) { |a, _| a.succ }
<ruby[bot]> baweaver: # => 8 (https://eval.in/547149)
<baweaver> I keep forgetting reduce doesn't play nicely with shorthand blocks
pawnbox has joined #ruby
tmtwd has joined #ruby
<baweaver> you're folding onto the yielded value (5) with the function succ essentially
rkazak has quit [Ping timeout: 260 seconds]
<baweaver> &ri Enumerable#reduce
<baweaver> Reduce admittedly has some nasty carryovers from older ruby...
rmulliga` has joined #ruby
saneax_AFK is now known as saneax
<roelof> baweaver: oke, but what if you do not know the number after the reduce , or it has to work with several numbers ?
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
Coldblackice has quit [Ping timeout: 248 seconds]
<baweaver> the initial value?
<roelof> yep
<baweaver> initial_value = block_given? ? yield : default_value_here
<roelof> for this test the initial values are zero and later 5
rmulligan has quit [Ping timeout: 268 seconds]
<roelof> thanks, I will play and experiment with it
Macaveli has joined #ruby
rkazak has joined #ruby
langy has joined #ruby
lsmola has joined #ruby
pawnbox has quit [Remote host closed the connection]
solars has joined #ruby
pawnbox has joined #ruby
_blizzy_ has quit [Ping timeout: 246 seconds]
hxegon has quit [Quit: BRB]
djbkd has joined #ruby
emilkarl has joined #ruby
<roelof> baweaver: last question how do I call adder with a block which has only the value 5 . I tried adder do { 5} end and adder do 5 end but both gives runtime errors ?
e4xit has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
User458764 has quit [Read error: Connection reset by peer]
<baweaver> >> def adder(n=1) n.times.reduce(yield){|a,_|a.succ} end; adder(5) { 1 }
<ruby[bot]> baweaver: # => 6 (https://eval.in/547159)
karioleez has joined #ruby
<baweaver> >> def adder(n=1) default = block_given? ? yield : 1; n.times.reduce(default){|a,_|a.succ} end; adder(5) { 1 }
<ruby[bot]> baweaver: # => 6 (https://eval.in/547160)
e4xit has joined #ruby
Boohbah has left #ruby [#ruby]
Beast_ has quit [Quit: Leaving]
<baweaver> puts returns nil
<baweaver> so that code does not match to what you said.
mistermocha has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
<baweaver> See the above
Devalo has quit [Remote host closed the connection]
cd-rum has joined #ruby
astrobun_ has quit [Remote host closed the connection]
aganov has joined #ruby
pawnbox has joined #ruby
<roelof> oke, and with 6 add 3 it looks like this adder(6) { 3 } ???
<baweaver> yep
<baweaver> though that's not really how an adder should work in any case.
<baweaver> A generic FP adder would take an initial value and return a function that can be called to continually accumulate
<roelof> wierd, when I look at the spec file I see this : expect(adder(3) do 5 end).to eq(8)
htmldrum has quit [Ping timeout: 244 seconds]
<baweaver> use braces instead of do end when testing like that
<baweaver> easier to read
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<roelof> so I would expect to see adder(3) {5} ?
<baweaver> yep
RegulationD has joined #ruby
phredus has quit [Remote host closed the connection]
<baweaver> >> adder = -> init { -> n { init + n } }; add_3 = adder(3); (1..5).map(&add_3)
<ruby[bot]> baweaver: # => undefined method `adder' for main:Object (NoMethodError) ...check link for more (https://eval.in/547161)
Suntzu has quit [Read error: Connection reset by peer]
<roelof> Thanks, now I see it. I think I get up to early. Not complete awake
<baweaver> >> adder = -> init { -> n { init + n } }; add_3 = adder.call(3); (1..5).map(&add_3)
<ruby[bot]> baweaver: # => [4, 5, 6, 7, 8] (https://eval.in/547162)
* baweaver keeps forgetting lambdas can't be called with parens
<roelof> I thought I understand this after ruby monk but still a lot to learn :(
scepticulous has joined #ruby
graphettion has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
blt has joined #ruby
dionysus69 has quit [Remote host closed the connection]
htmldrum has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
aufi has joined #ruby
duckpuppy has joined #ruby
lxsameer has joined #ruby
sudoubuntu has joined #ruby
shmuli has quit [Remote host closed the connection]
brt has joined #ruby
duckpuppy has quit [Ping timeout: 248 seconds]
dionysus69 has quit [Remote host closed the connection]
mistermocha has joined #ruby
bkxd has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
neanderslob_ has joined #ruby
anisha has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
astrobun_ has joined #ruby
<roelof> baweaver: thanks again and have a good evening/day
<baweaver> np
brt has quit [Quit: peace]
bkxd has quit [Ping timeout: 244 seconds]
nando293921 has quit [Ping timeout: 244 seconds]
tmtwd has quit [Read error: Connection reset by peer]
firstdayonthejob has quit [Ping timeout: 268 seconds]
pandaant has joined #ruby
tmtwd has joined #ruby
roelof has quit [Quit: Page closed]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hk238 has joined #ruby
bluOxigen has quit [Ping timeout: 276 seconds]
sekrit has quit [Changing host]
sekrit has joined #ruby
Musashi007 has quit [Quit: Musashi007]
jdelaney has joined #ruby
andikr has joined #ruby
Musashi007 has joined #ruby
RubyPadawan_ has joined #ruby
atmosx has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Suntzu has joined #ruby
Dimik has joined #ruby
RubyPadawan_ is now known as RubyJedi-ing
bigkevmcd has joined #ruby
sandstrom has joined #ruby
sandstrom has quit [Client Quit]
langy has quit [Ping timeout: 248 seconds]
htmldrum has quit [Ping timeout: 244 seconds]
codecop has joined #ruby
codecop_ has joined #ruby
codecop_ has quit [Remote host closed the connection]
dn` has joined #ruby
shmuli has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
tristanp has quit [Ping timeout: 250 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
chipotle has joined #ruby
astrobun_ has quit [Remote host closed the connection]
ta_ has joined #ruby
statelesscode has quit [Quit: statelesscode]
tristanp has joined #ruby
biberu has joined #ruby
jdelaney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 264 seconds]
<zenspider> baweaver: .call or []... so adder[3] would work
<zenspider> and... I think .() ?
<baweaver> yeah, I was getting used to scala again
<zenspider> but that's newfangled ruby
<baweaver> all 3 work
pawnbox has quit [Remote host closed the connection]
<zenspider> and I rather don't like it :)
<baweaver> I just have a habit of using parens for it
x0f has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
<baweaver> then I see the error and wonder for a few minutes, remember, and then realize what I did.
bluOxigen has joined #ruby
x0f has joined #ruby
<zenspider> *nod* me too
<baweaver> here's to hoping ruby 3 fixes that.
<zenspider> I just like [] over .call... just uglier
tmtwd has quit [Remote host closed the connection]
<baweaver> or .()
<baweaver> that'd really confuse me at a glance
ta__ has joined #ruby
ur5us has quit [Remote host closed the connection]
<baweaver> call is the most explicit, [] almost gets me to think array/hash from a glance
ur5us has joined #ruby
<baweaver> then again I'm using Scala heavily instead of Ruby for work now.
cd-rum has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> about the same as using semicolons in ruby or accidentally console.log()ing everything
vsdfs has quit [Ping timeout: 244 seconds]
ericlee has quit [Ping timeout: 268 seconds]
ta_ has quit [Ping timeout: 276 seconds]
<baweaver> context switch leads to interesting code some times.
dionysus69 has joined #ruby
vondruch has quit [Ping timeout: 276 seconds]
fedexo has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
sandstrom has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
GitGud is now known as GG
rmulliga` has quit [Remote host closed the connection]
mark2 has joined #ruby
tristanp has quit [Ping timeout: 268 seconds]
Alayde has joined #ruby
<colegatron> Hello.
ericlee has joined #ruby
tristanp has joined #ruby
jdelaney has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mhoungbo has joined #ruby
pwnd_nsfw has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
sandelius has joined #ruby
rmulligan has joined #ruby
jdelaney has quit [Client Quit]
htmldrum has joined #ruby
SCHAAP137 has joined #ruby
lkba_ has joined #ruby
AndChat-43764 has joined #ruby
shmuli has quit [Remote host closed the connection]
skade has joined #ruby
mwlang has quit [Quit: mwlang]
anisha has quit [Quit: Leaving]
berserk_ren has quit [Remote host closed the connection]
Alayde has quit [Ping timeout: 260 seconds]
htmldrum has quit [Ping timeout: 260 seconds]
lkba has quit [Ping timeout: 246 seconds]
CloCkWeRX has joined #ruby
kam270 has joined #ruby
last_staff has joined #ruby
David_H_Smith has joined #ruby
dnewkerk has quit [Quit: dnewkerk]
David_H__ has quit [Ping timeout: 240 seconds]
astrobun_ has joined #ruby
full_throttle has joined #ruby
vondruch has joined #ruby
null__ has joined #ruby
bkxd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
atmosx_alt has joined #ruby
ItSAN____ has joined #ruby
DrCode has quit [Ping timeout: 250 seconds]
Papierkorb has quit [Ping timeout: 276 seconds]
crank1988 has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Ping timeout: 268 seconds]
M-Kodo has quit [Ping timeout: 268 seconds]
duderonomy has quit [Ping timeout: 250 seconds]
Cyrus has quit [Ping timeout: 250 seconds]
majuscule has quit [Ping timeout: 268 seconds]
apeiros has quit [Ping timeout: 268 seconds]
jinie has quit [Ping timeout: 250 seconds]
pikajude has quit [Ping timeout: 250 seconds]
atmosx has quit [Ping timeout: 268 seconds]
Macaveli has quit [Ping timeout: 268 seconds]
armyriad has quit [Ping timeout: 268 seconds]
RubyJedi-ing_ has joined #ruby
armyriad has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
kam270 has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 260 seconds]
DrCode has joined #ruby
smoose has quit [Ping timeout: 250 seconds]
rmulligan has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
smoose has joined #ruby
duncannz has quit [Ping timeout: 250 seconds]
iNs has quit [Ping timeout: 250 seconds]
speakingcode has quit [Ping timeout: 250 seconds]
rmulligan has joined #ruby
RubyJedi-ing has quit [Ping timeout: 268 seconds]
Guest70829 has quit [Ping timeout: 268 seconds]
djellemah has quit [Ping timeout: 268 seconds]
rmulligan has quit [Remote host closed the connection]
Some-body_ has joined #ruby
crank1988 has joined #ruby
atmosx_alt is now known as atmosx
Papierkorb has joined #ruby
Macaveli has joined #ruby
htmldrum has joined #ruby
bweston92 has quit [Ping timeout: 250 seconds]
DarthGandalf has quit [Ping timeout: 250 seconds]
djbkd has quit [Remote host closed the connection]
pikajude has joined #ruby
pikajude has quit [Changing host]
pikajude has joined #ruby
Some-body_ is now known as DarthGandalf
speakingcode has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest63020
M-Kodo has joined #ruby
jinie has joined #ruby
iNs has joined #ruby
djellemah has joined #ruby
Cyrus has joined #ruby
apeiros has joined #ruby
Chagel has joined #ruby
Cyrus is now known as Guest78435
_blizzy_ has joined #ruby
duncannz has joined #ruby
majuscule has joined #ruby
colegatron has joined #ruby
bweston92 has joined #ruby
shmuli has joined #ruby
rmulligan has joined #ruby
rmulligan has quit [Remote host closed the connection]
Chagel has quit [Ping timeout: 260 seconds]
TheHodge has joined #ruby
benlieb has joined #ruby
edwinvdgraaf has joined #ruby
htmldrum has quit [Ping timeout: 248 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ur5us has joined #ruby
Vlat- has joined #ruby
Vlat- has left #ruby [#ruby]
tmtwd has joined #ruby
skade has joined #ruby
ferr has joined #ruby
skade has quit [Read error: Connection reset by peer]
skade has joined #ruby
jaruga_ has joined #ruby
skade has quit [Client Quit]
moeabdol has joined #ruby
jaruga_ has quit [Client Quit]
benlieb has quit [Quit: benlieb]
benlieb has joined #ruby
tildes has joined #ruby
benlieb has quit [Client Quit]
the_drow has joined #ruby
anisha has joined #ruby
skade has joined #ruby
htmldrum has joined #ruby
c4ss1e has joined #ruby
full_throttle has left #ruby [#ruby]
Skelz0r has quit [Ping timeout: 244 seconds]
blaxter has joined #ruby
jt__ has quit [Remote host closed the connection]
yardenbar has joined #ruby
htmldrum has quit [Ping timeout: 260 seconds]
ta__ has quit [Remote host closed the connection]
ta_ has joined #ruby
RegulationD has joined #ruby
armyriad has quit [Ping timeout: 244 seconds]
armyriad has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mtkd has quit [Ping timeout: 248 seconds]
ta__ has joined #ruby
ssiris has quit [Quit: End of Line]
mtkd has joined #ruby
ta_ has quit [Ping timeout: 268 seconds]
Skelz0r has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
duckpuppy has joined #ruby
ta__ has quit [Ping timeout: 248 seconds]
blt has quit [Ping timeout: 244 seconds]
htmldrum has joined #ruby
Dimik has quit [Ping timeout: 276 seconds]
krz has quit [Ping timeout: 250 seconds]
full_throttle has joined #ruby
full_throttle has left #ruby [#ruby]
duckpuppy has quit [Ping timeout: 246 seconds]
jmorgado has joined #ruby
ta_ has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
htmldrum has quit [Ping timeout: 276 seconds]
karioleez has quit [Remote host closed the connection]
the_drow has joined #ruby
karioleez has joined #ruby
krz has joined #ruby
shmuli has quit [Remote host closed the connection]
alexherbo2 has quit [Quit: WeeChat 1.4]
duderonomy has joined #ruby
ta_ has quit [Remote host closed the connection]
the_drow has quit [Read error: Connection reset by peer]
clauswitt has joined #ruby
rvchangue has quit [Ping timeout: 244 seconds]
rake_db_migrate has joined #ruby
baweaver has joined #ruby
ta_ has joined #ruby
blt has joined #ruby
the_drow has joined #ruby
shmuli has joined #ruby
Musashi007 has joined #ruby
rake_db_migrate has quit [Ping timeout: 250 seconds]
zeroDivisible has joined #ruby
shmuli has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 250 seconds]
ruid has joined #ruby
marr has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
Musashi007 has quit [Quit: Musashi007]
benlieb has joined #ruby
nhhc has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
blackmes1 has joined #ruby
Mon_Ouie has joined #ruby
codecop has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 264 seconds]
moeabdol1 has joined #ruby
nano- has quit [Ping timeout: 276 seconds]
nano- has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
Vlat- has joined #ruby
benlieb has quit [Quit: benlieb]
blackgoat has joined #ruby
karioleez has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
karioleez has joined #ruby
krz has joined #ruby
AndChat-43764 has quit [Ping timeout: 276 seconds]
bkxd has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
skydiver has quit [Ping timeout: 264 seconds]
blackgoat has quit [Client Quit]
mistermocha has joined #ruby
blackgoat has joined #ruby
blackgoat has quit [Client Quit]
platzhirsch has joined #ruby
terlar has joined #ruby
blackgoat has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
codecop has joined #ruby
Nahra has quit [Ping timeout: 248 seconds]
the_drow has quit [Read error: Connection reset by peer]
the_drow has joined #ruby
mistermocha has quit [Ping timeout: 244 seconds]
platzhirsch has left #ruby [#ruby]
rvchangue has joined #ruby
Chagel has joined #ruby
akkmaxon has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
htmldrum has joined #ruby
Chagel has quit [Ping timeout: 240 seconds]
akkmaxon has quit [Client Quit]
maxim__ has joined #ruby
skydiver has joined #ruby
krz has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
kam270 has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
sandelius has joined #ruby
terlar has quit [Ping timeout: 264 seconds]
skade has quit [Quit: Computer has gone to sleep.]
skydiver has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
krz has joined #ruby
patrick_star_2 has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
skade has joined #ruby
dasher00 has quit [Ping timeout: 260 seconds]
auzty has joined #ruby
dasher00 has joined #ruby
yfeldblum has quit [Ping timeout: 248 seconds]
Nahra has joined #ruby
patrick_star_3 has quit [Ping timeout: 264 seconds]
n008f4g_ has joined #ruby
Vlat- has quit [Quit: Vlat-]
colegatron has quit [Remote host closed the connection]
RubyJedi-ing has joined #ruby
saneax is now known as saneax_AFK
evidex has joined #ruby
RubyJedi-ing_ has quit [Ping timeout: 244 seconds]
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
astrobun_ has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
Gasher has joined #ruby
skydiver has joined #ruby
saneax_AFK is now known as saneax
<Steve_Jobs> I can't seem to show the braille character on the command line that's part of the output of a program
<Steve_Jobs> ⡤
<Steve_Jobs> that looks like a square to me but should be braille
<Steve_Jobs> any ideas?
<Mon_Ouie> Looks fine here, probably just your terminal settings that don't render it as you'd expect it
<workmad3> Steve_Jobs: it's 3 dots here... sounds like you don't have a font installed with full unicode codepoints for your terminal
anisha has quit [Ping timeout: 260 seconds]
<Steve_Jobs> workmad3: I tried all fonts.. which one are you using?
<Steve_Jobs> Mon_Ouie: what font are you using?
<workmad3> "I tried all fonts" really? There are millions of them :P
<Steve_Jobs> is it just the font?
<Steve_Jobs> workmad3: well the ones on this machine...
anisha has joined #ruby
<Mon_Ouie> My terminal uses Deja Vu
<workmad3> Steve_Jobs: I use OS X monaco for unicode code-points in iterm2 on my mac
<Steve_Jobs> ok.. xterm shows it.. weird
TvL2386 has quit [Ping timeout: 240 seconds]
skydiver has quit [Ping timeout: 252 seconds]
sepp2k has joined #ruby
terlar has joined #ruby
TvL2386 has joined #ruby
tvw has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vlat- has joined #ruby
htmldrum has quit [Ping timeout: 244 seconds]
sandelius has joined #ruby
the_drow has quit [Ping timeout: 252 seconds]
Vlat- has quit [Client Quit]
the_drow has joined #ruby
<lxsameer> hey people, does ruby store or cache the VM bytecodes any where ?
dmolina has joined #ruby
<Mon_Ouie> No, it recompiles everytime
<lxsameer> Mon_Ouie: hmm does ruby provides any solution to just run the bytecode ? I mean we give it to ruby as a param
<Mon_Ouie> Last time I check there was code to store/load bytecode to/from a file, but it's commented out for some reason
n008f4g_ has quit [Ping timeout: 244 seconds]
bronson has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
bronson_ has quit [Ping timeout: 244 seconds]
Emmanuel_Chanel has joined #ruby
diegoaguilar has joined #ruby
htmldrum has joined #ruby
<lxsameer> Mon_Ouie: hmmm thanks for the info, but I was wondering why ruby does not use such solution ( similar to python byte codes ) ?
Couch has joined #ruby
<Mon_Ouie> I don't know the answer to that, unfortunately
<workmad3> lxsameer: mostly because they're still moving towards it... ruby only went fully bytecode internally in 1.9, and hasn't hashed out all the details of what saved bytecode should look like yet
the_drow has joined #ruby
<lxsameer> Mon_Ouie: thanks
<workmad3> the code Mon_Ouie pointed out for saving/loading bytecode is a step towards it (it was introduced in 2.3 iirc)
RegulationD has joined #ruby
<lxsameer> workmad3: happy to hear it
<lxsameer> workmad3: thanks for the info man
bkxd has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<aep> is there a quick and dirty way to generate a rest commandline app that litteraly just calls some http stuff?
RegulationD has quit [Ping timeout: 260 seconds]
ocbtec has joined #ruby
<lxsameer> aep: on top of my head you can do it with e small hack on tor classes
<aep> tor?
<lxsameer> aep: yeah Tor gem
bkxd has quit [Ping timeout: 244 seconds]
slackbotgz has joined #ruby
<aep> uuuh
<lxsameer> it's a utility which allows you write cli apps more easily
<aep> ah!
<_ko1> lxsameer: FYI: https://github.com/ko1/yomikomu
duckpuppy has joined #ruby
<lxsameer> _ko1: thanks koichi-san
poguez_ has quit [Quit: Connection closed for inactivity]
elaptics`away is now known as elaptics
dANOKELOFF has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 276 seconds]
saneax is now known as saneax_AFK
dionysus69 has quit [Ping timeout: 246 seconds]
c0x has joined #ruby
saneax_AFK is now known as saneax
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
bollullera has joined #ruby
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
jmignault has quit [Ping timeout: 260 seconds]
Spami has joined #ruby
krz has quit [Ping timeout: 250 seconds]
drptbl has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
<rahc> how can I intercept any addition to an array object using a proxy?
ur5us has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 264 seconds]
<rahc> apeiros recommended SimpleDelegator but I can't see how that will help beyond providing pre-made method_missing methods, etc.
ur5us has joined #ruby
<jhass> rahc: redefine the methods you want to intercept on your SimpleDelegator subclass
<rahc> jhass: which methods would I need to intercept?
<jhass> &ri Array
<rahc> jhass: do you know which methods?
<jhass> go through the list, I'd probably miss a couple
<rahc> so you don't know
<rahc> thanks anyway
dipnlik has joined #ruby
jtdowney has quit [Quit: ZNC]
<jhass> I'm simply not doing your work for you ;)
RubyJedi-ing has quit [Ping timeout: 244 seconds]
<rahc> jhass: there are no expectations on you to do anything
<toretore> there isn't a single entry-point to adding values to an array
ur5us has quit [Ping timeout: 276 seconds]
<rahc> toretore: thank you
nodejunkie has quit [Ping timeout: 252 seconds]
<jhass> right, like compiling a comprehensive list of methods that could add elements to an array ;)
Suntzu has joined #ruby
emilkarl has joined #ruby
astrobun_ has joined #ruby
<rahc> jhass: there is an exepectation on you to *not* do some things
<rahc> jhass: in particular, there is an expectation that you will refrain from responding to someone's question if you can't help them
<jhass> well, your question didn't contain the fact I added, that you should redefine the methods which add elements to your array
<rahc> jhass: you can't help me
slackbotgz has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 252 seconds]
ncopa has quit [Ping timeout: 240 seconds]
astrobun_ has quit [Ping timeout: 248 seconds]
<toretore> rahc: these are the methods you have to override on Array to properly subclass or proxy it w/r to addition, afaik: ["self.from_array", "self.try_convert", "<<", "[]=", "collect!", "map!", "concat", "fill", "replace", "insert", "push", "unshift"]
<toretore> now stop being an ass
ncopa has joined #ruby
<rahc> umm.. thanks
<rahc> I wasn't expecting someone to come out with a list but thanks :-)
<toretore> + initialize which takes args too
dANOKELOFF has quit []
rodfersou has joined #ruby
<toretore> and Array.from_array doesn't exist
andywojo has joined #ruby
weckl has joined #ruby
<gregf_> should'nt implementing method_missing be enough?
<gregf_> >> class Foo; attr_accessor :arr;def initialize; @arr = [];end; def [](ind); @arr[ind];end; def method_missing(meth, *args, &bl); m = @arr.method(meth); m.(*args) if m;end;end;f = Foo.new();f.push(1).push(2).push(3).pop; p f # like that?
<ruby[bot]> gregf_: # => #<Foo:0x41c792f0 @arr=[1, 2]> ...check link for more (https://eval.in/547339)
sergey_makagon has joined #ruby
<rahc> gregf_: be enough for what?
<rahc> gregf_: that class doesn't solve my problem
Rickmasta has joined #ruby
<gregf_> rahc: then im afraid you'll have to think a bit more ;)
<gregf_> btw, what jhass suggested was quite helpful imho :|
andywojo has quit [Ping timeout: 268 seconds]
<rahc> gregf_: you're confused
<rahc> gregf_: I'm not looking for help solving my problem
<rahc> I've moved on from the few minutes ago when I asked
<rahc> toretore was helpful
bluOxigen_ has joined #ruby
<gregf_> rahc: looks like you're being a bit too curt.. when anyone suggests something .. you need to appreciate for what they do.. else no one will want to help :| *runs*
bluOxigen has quit [Ping timeout: 244 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sandelius has joined #ruby
<rahc> gregf_: on IRC, I've found there are two types of people: (1) people who are helpful, and (2) people who need to sit on IRC channels interacting with people giving obvious, useless or unhelpful suggestions in order to feed their own egos
<rahc> gregf_: I feel I don't need to appreciate the latter type
<sandelius> rahc BINGO
arthurnn has quit [Ping timeout: 276 seconds]
<manveru> rahc: i can be both :D
<gregf_> rahc: so , which one do you belong to?
<gregf_> but meh.. *goes off to do some better work*
chipotle has quit [Quit: cheerio]
skislak has joined #ruby
dipnlik has quit [Quit: dipnlik]
GodFather has joined #ruby
BlackW0lf has joined #ruby
johnmilton has joined #ruby
auzty has quit [Quit: Leaving]
<BlackW0lf> hi all im having an issue after i settup ruby for an application on my vps last week,
dipnlik has joined #ruby
<BlackW0lf> /usr/bin/env: ruby: No such file or directory
araujo has quit [Quit: Leaving]
<BlackW0lf> its ruby 2.1.5 and im running as root
araujo has joined #ruby
<BlackW0lf> looking around the internet ive found afew people having this issues with multiple solutions but none seam to work for me
r0b3rt has joined #ruby
gagrio|trng is now known as gagrio
Ropeney has joined #ruby
<BlackW0lf> anyone have any surgestions?
<djellemah> BlackW0lf: there are several ways to install ruby. Which one did you use?
binaryplease1 has joined #ruby
ldnunes has joined #ruby
<BlackW0lf> generaly followed that guide, i worked untill i restarted the server now to run the app it just errors
binaryplease has quit [Ping timeout: 244 seconds]
skade has joined #ruby
ldnunes has quit [Client Quit]
ldnunes has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<jhass> you did the RVM step as root too?
krz has joined #ruby
<BlackW0lf> yeah i would have
<jhass> well, you weren't supposed to
<BlackW0lf> ahh
<BlackW0lf> ok how do i restart quickly?
<jhass> https://rvm.io/support/troubleshooting second to last step to get rid of RVM
<jhass> s/step/entry/
<jhass> then just redo as user
<BlackW0lf> ty
binaryplease1 is now known as binaryplease
maxim__ has quit [Remote host closed the connection]
rake_db_migrate has joined #ruby
platzhirsch has joined #ruby
andywojo has joined #ruby
blackmes1 has joined #ruby
pwnd_nsfw is now known as xX_i_love_Elixir
xX_i_love_Elixir is now known as pwnd_nsfw
ruid has quit [Ping timeout: 260 seconds]
willc has joined #ruby
willc has left #ruby [#ruby]
Chagel has joined #ruby
rake_db_migrate has quit [Ping timeout: 250 seconds]
Mon_Ouie has joined #ruby
andywojo has quit [Ping timeout: 276 seconds]
Chagel has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
rake_db_migrate has joined #ruby
trinaldi has joined #ruby
crameth has joined #ruby
andywojo has joined #ruby
crameth has quit [Max SendQ exceeded]
M-mistake has quit [Remote host closed the connection]
M-Kodo has quit [Remote host closed the connection]
M-shine has quit [Remote host closed the connection]
dvinciguerra_ has joined #ruby
FooMunki has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
crameth has joined #ruby
crameth has quit [Max SendQ exceeded]
gagrio is now known as gagrio-mtg
andywojo has quit [Ping timeout: 244 seconds]
crameth has joined #ruby
hanmac has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
c0x has quit [Ping timeout: 260 seconds]
gagrio-mtg has quit [Ping timeout: 244 seconds]
dipnlik has quit [Quit: dipnlik]
dipnlik has joined #ruby
BlackW0lf has left #ruby [#ruby]
hanmac has joined #ruby
bkxd has quit [Ping timeout: 264 seconds]
jorum has joined #ruby
antgel has joined #ruby
M-shine has joined #ruby
dc4 has quit [Ping timeout: 240 seconds]
bry4n_ has quit [Ping timeout: 268 seconds]
chipotle has joined #ruby
gagrio has joined #ruby
rake_db_migrate has quit [Remote host closed the connection]
IrishGringo has joined #ruby
hogetaro has quit [Quit: Leaving...]
Zai00 has joined #ruby
duckpuppy has joined #ruby
GG is now known as timeup
DoubleMalt has joined #ruby
krz has quit [Ping timeout: 248 seconds]
tjvc has joined #ruby
clauswitt has quit [Quit: Textual IRC Client: www.textualapp.com]
tjvc has quit [Changing host]
tjvc has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
aegis3121 has joined #ruby
aegis3121 has quit [Read error: Connection reset by peer]
M-Kodo has joined #ruby
Denart_ has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
skade has quit [Quit: Computer has gone to sleep.]
toretore has quit [Ping timeout: 244 seconds]
aegis3121 has joined #ruby
hogetaro has joined #ruby
nobitanobi has joined #ruby
lxsameer has quit [Quit: WeeChat 1.4]
aegis312_ has joined #ruby
sdothum has joined #ruby
codecop has quit [Remote host closed the connection]
brendan- has joined #ruby
aegis3121 has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Remote host closed the connection]
<aep> if i require a local .gem file in my Gemfile...
<aep> Using swagger_client 1.0.0 from source at ./ruby-client
<aep> how do i require that in my actual code?
<aep> require 'swagger_client' doesnt work
bluOxigen_ has quit [Ping timeout: 248 seconds]
imperator has joined #ruby
<hanmac> i dont think require works that way
Zai00 has quit [Read error: Connection reset by peer]
<adaedra> aep: did you run your code with bundle exec?
<aep> oh duh. of course that was the solution, thanks adaedra
<adaedra> :)
Zai00 has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 244 seconds]
aupadhye has joined #ruby
andywojo has joined #ruby
<aep> how do i catch the second argument in: fail SomeError.new(bla), "message" ?
pawnbox has quit [Remote host closed the connection]
c4ss1e has quit [Ping timeout: 240 seconds]
sudoubuntu has joined #ruby
baweaver has joined #ruby
blackmes1 has quit [Ping timeout: 244 seconds]
Zai00 has joined #ruby
blackgoat has quit [Quit: WeeChat 1.4]
M-mistake has joined #ruby
timeup is now known as GG
madgen has joined #ruby
rake_db_migrate has joined #ruby
nobitanobi has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
baweaver has quit [Ping timeout: 246 seconds]
rake_db_migrate has quit [Ping timeout: 250 seconds]
halfamind has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rake_db_migrate has joined #ruby
weckl has quit [Ping timeout: 248 seconds]
last_staff has quit [Quit: last_staff]
nfk|laptop has joined #ruby
voidDotClass has joined #ruby
<voidDotClass> I have some code that looks like this: items.each do |item| process_item(item) end
madgen has joined #ruby
<voidDotClass> but that looks too verbose
<voidDotClass> in java i could do items.map( this::process_item)
<voidDotClass> is there anything like that here, e.g method references?
<aegis312_> There are for methods you would call ON the object
<adaedra> items.each(&method(:process_item))
dionysus69 has joined #ruby
nando293921 has joined #ruby
weckl has joined #ruby
Zai00 has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
<voidDotClass> adaedra aegis312_ anything more readable?
<adaedra> no
<aegis312_> nope
nobitanobi has joined #ruby
Zai00 has joined #ruby
<aegis312_> adaedra: does that incur any overhead every time through the loop?
<adaedra> As aegis312_ said, if it were an instance method on item, you could have just done items.each(&:process_item)
<adaedra> aegis312_: no idea
emilkarl has quit [Quit: Textual IRC Client: www.textualapp.com]
skade has joined #ruby
nando293921 has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
FooMunki has quit [Quit: FooMunki]
kobain has joined #ruby
gagrio has quit [Ping timeout: 248 seconds]
bkxd has quit [Ping timeout: 240 seconds]
<aegis312_> Looks like it takes just a shade longer for something really simple: https://gist.github.com/jon2992/ea7de8f694910ddf5770867f4c707672
diegoaguilar has quit [Ping timeout: 250 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
roelof has joined #ruby
<roelof> Hello, I have this challenge : Try changing the value of Argument::Truth in the following exercise. I did Argment::Truth = "No, you're not" but then I see a security error on Ruby Monk
<roelof> How to solve this ?
WhoooAhhh has joined #ruby
<adaedra> link?
fumduq has quit [Ping timeout: 276 seconds]
<roelof> adaedra: link to the exercise ?
<adaedra> yes
<adaedra> You have a typo.
hxegon has joined #ruby
WhoooAhhh has quit [Client Quit]
<roelof> adaedra: thanks
<roelof> was looking for that one a long time :(
jmignault has joined #ruby
trinaldi has quit [Quit: WeeChat 1.5-dev]
rake_db__ has joined #ruby
ekinmur has joined #ruby
polysics has joined #ruby
rake_db_migrate has quit [Ping timeout: 248 seconds]
ekinmur has quit [Remote host closed the connection]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrgrieves has joined #ruby
karioleez has quit [Read error: Connection reset by peer]
darkf has quit [Quit: Leaving]
karioleez has joined #ruby
arthurnn has joined #ruby
sgambino has joined #ruby
polysic__ has joined #ruby
jorum has quit [Ping timeout: 264 seconds]
polysics_ has quit [Ping timeout: 276 seconds]
fmcgeough has joined #ruby
sudoubuntu has joined #ruby
sudoubuntu has quit [Client Quit]
gagrio has joined #ruby
_aeris_ has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
nobitanobi has quit [Remote host closed the connection]
polysics has quit [Ping timeout: 244 seconds]
diegoaguilar has joined #ruby
roelof has quit [Quit: Page closed]
pawnbox has quit [Remote host closed the connection]
<_aeris_> hello #ruby :)
pawnbox has joined #ruby
aegis312_ has quit [Read error: Connection reset by peer]
<_aeris_> i can’t find any doc about contributing and how to run test, and if possible test related to an extension :)
<_aeris_> i can run them with make test-all, but long :'(
shredding has joined #ruby
sudoubuntu has joined #ruby
greenbigfrog has joined #ruby
sudoubuntu has quit [Client Quit]
Chagel has joined #ruby
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
kfpratt has joined #ruby
<greenbigfrog> How can I make sure that a certain ruby version is used for execution? f.e. that the script just exists if version is below 2.2
leftpad has joined #ruby
rbennacer has joined #ruby
<Mon_Ouie> You can check the RUBY_VERSION constant. Also for gems you can specify the required ruby version inside the gemspec.
rbennacer has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
mrgrieves has quit [Ping timeout: 248 seconds]
rbennacer has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
pawnbox has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nanoz has joined #ruby
freerobby has joined #ruby
joonty has joined #ruby
malconis has joined #ruby
<Bish> hi, i might be stupid
<Bish> but how do i parse urlencoded queries with ruby?
<Bish> >> URI::Escape.unescpae "test=y"
<ruby[bot]> Bish: # => uninitialized constant URI (NameError) ...check link for more (https://eval.in/547395)
<leftpad> hmm, it seems kind of complicated to install ruby. Why don't they put installer releases on rubylang.org like https://golang.org/dl/ ?
<Bish> >> URI::Escape.unescape "test=y"
<ruby[bot]> Bish: # => uninitialized constant URI (NameError) ...check link for more (https://eval.in/547396)
<Bish> :(
<adaedra> require 'uri' is maybe what you want.
<adaedra> leftpad: for what system
<adaedra> ?
<Bish> nope, just didn't do that in that little snipped
anisha has quit [Quit: Leaving]
_stu_ has joined #ruby
ocbtec has quit [Quit: leaving]
<leftpad> adaedra : OSX
<Bish> >> require 'uri'; URI.unescape "test=3&test2=5"
<ruby[bot]> Bish: # => "test=3&test2=5" (https://eval.in/547397)
<Bish> it's not what i want :( i want to parse that uri
ocbtec has joined #ruby
ocbtec has quit [Client Quit]
<shevy> URI.parse ?
<adaedra> leftpad: you have multiple solutions: used the 2.0 provided by recent OS X, use homebrew (brew install ruby, or for olders, brew install homebrew/versions/ruby21), use something like ruby-build or ruby-install, coupled with rbenv or chruby if you need to switch often or rvm which does all. It depends on your needs.
ocbtec has joined #ruby
kfpratt has quit []
<Bish> shevy: well that does parse the whole url, i just want to parse the query part ( after the ? )
<shevy> hmm that reminds me of the way how the CGI module makes a hash out of these
<Bish> quite simple problem, but i am unable to find the answer :D
pandaant has quit [Remote host closed the connection]
Begi has joined #ruby
<Bish> i could sure, split by & and regex the rest, but there got to be a better way
<shevy> I don't remember how it does but it is stored in what .params method returns
big|bad|wolf has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
halfamind has joined #ruby
<shevy> hmm
jorum has joined #ruby
<Bish> HLEP
<workmad3> >> require 'cgi'; CGI.parse("foo=bar&fizz=buzz")
<ruby[bot]> workmad3: # => {"foo"=>["bar"], "fizz"=>["buzz"]} (https://eval.in/547398)
<havenwood> leftpad: Here's a walkthrough for ruby-install/chruby with OS X: http://ryanbigg.com/2015/06/mac-os-x-ruby-ruby-install-chruby-and-you/
<leftpad> adaedra : I'm sure rbenv and rvm are great (once I figure out how to use them). I tried brew but had to manually create a softlink to start using it. A nice ruby2.3.0.darwin-amd64.pkg would be nice to get started.
<shevy> huh strange
kfpratt has joined #ruby
halfamind has quit [Read error: Connection reset by peer]
<shevy> I just tested it in irb and it did not work. I am glad the bot called workmad3 got it to work! :D
RegulationD has joined #ruby
<adaedra> leftpad: bleh no.
halfamind has joined #ruby
<Bish> workmad3: that's actually what i want, still do i really need CGI only for that?
<leftpad> havenwood : thanks
<havenwood> leftpad: Installing the brew package should create the link automatically if you don't have something in front of it. Would be happy to help get brew setup properly.
halfamind has quit [Read error: Connection reset by peer]
<shevy> Bish it's really almost tiny, look at view source of params there: https://gist.github.com/shevegen/3c3b00860fb5bfb328f9a79dd06a3299
halfamind1 has joined #ruby
halfamind1 has quit [Client Quit]
imperator has left #ruby ["Leaving"]
<Bish> and why is the result an array?
<shevy> does an array start with {
<Bish> oh, i see already
<Bish> i mean the values of the hash
<workmad3> Bish: because then it can handle multiple params with the same name
<shevy> I guess you can change the method body to return a string value there
Begi has left #ruby [#ruby]
<Bish> workmad3: yeah i figured
ChiefAlexander has joined #ruby
dstarh has joined #ruby
Zai00 has quit [Quit: Zai00]
swills has joined #ruby
Tempesta has quit [Quit: See ya!]
Zai00 has joined #ruby
zlude has joined #ruby
<zlude> Hey! I'm learning ruby and how to parse JSON, there is a beautiful way to get the objects better than this? "puts player['playerstats']['stats'][0]['value']" ?
<shevy> is this not already beautiful ;)
<greenbigfrog> Mon_Ouie: ty
<shevy> you could probably replace the [0] with .first
<SebastianThorn> and ' with ", but that might just be me ;)
<shevy> there is also a hash-like variant with methods ... but I am not sure if this is a good idea
<oddmunds> there _has_ to be some library that lets you do puts player.playerstats.stats.first.value
<shevy> :)
ocbtec has quit [Quit: leaving]
<SebastianThorn> .missing_method
n008f4g_ has joined #ruby
<adaedra> zlude: player.dig('playerstats', 'stats', 0, 'value')
<adaedra> (note, this is a bit different than yours)
Guest2272 has joined #ruby
<zlude> adaedra, thx.
RegulationD has quit [Ping timeout: 248 seconds]
big|bad|wolf has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Zai00 has quit [Read error: Connection reset by peer]
<adaedra> zlude: #dig will return nil at first nil value instead of raising an exception, be careful if you don't want this behavior.
Zai00 has joined #ruby
<adaedra> oddmunds: there's ostruct, but it's not a good solution.
<oddmunds> yeah, maybe you can pack the whole thing in a bunch of classes
stannard has joined #ruby
last_staff has joined #ruby
freerobby has quit [Quit: Leaving.]
skade has quit [Quit: Computer has gone to sleep.]
big|bad|wolf has joined #ruby
infernix has quit [Ping timeout: 244 seconds]
al2o3-cr has joined #ruby
big|bad|wolf has quit [Client Quit]
Zai00 has quit [Ping timeout: 250 seconds]
tvon has quit [Quit: System is sleeping...]
ruid has joined #ruby
Donkoko has joined #ruby
kariolee_ has joined #ruby
sandelius has joined #ruby
zast has joined #ruby
whippythellama has joined #ruby
nanoz has quit [Read error: Connection reset by peer]
karioleez has quit [Ping timeout: 276 seconds]
nanoz has joined #ruby
Guest2272 has quit [Read error: Connection reset by peer]
tjvc has quit [Quit: Leaving]
cdg has joined #ruby
aganov has quit [Remote host closed the connection]
Zai00 has joined #ruby
infernix has joined #ruby
bry4n_ has joined #ruby
Tempesta has joined #ruby
Saklovich has joined #ruby
Saklovich was kicked from #ruby by ChanServ [Banned: trolling]
<shevy> huh Saklovich
Es0teric has joined #ruby
n008f4g_ has quit [Ping timeout: 252 seconds]
nanoz] has joined #ruby
nanoz has quit [Ping timeout: 276 seconds]
dhollinger has joined #ruby
<rahc> what does "||=" do?
greenbigfrog has left #ruby [#ruby]
<rahc> I can't seem to find any documentation on it
<Donkoko> rahc: sets default value
<Donkoko> so if no value is passed, the variable/array will get the default value set by "||="
<rahc> I see
<rahc> thanks
<zlude> I have this array
<zlude> players = {
<zlude> 'fisune' => '76561198060075860',
<zlude> 'leo' => '76561198076788976'
<zlude> }
<zlude> how to get value from fisune or leo
<ddv> ugly syntax detected ^
<zlude> ddv, how's the best way to not ugly?
<shevy> did you not ask this just a moment before
<zlude> not the same thing
<SebastianThorn> that is not an array
skade has joined #ruby
hightower3 has joined #ruby
<SebastianThorn> players['leo']
<havenwood> zlude: That's a Hash.
light2045 has joined #ruby
<havenwood> zlude: Ask it its class: players.class
gregf has joined #ruby
tvon has joined #ruby
<zlude> but instead of player['leo'] it need to be a variable.. player['variable']
<SebastianThorn> you should do a 1-2h reading on ruby
<SebastianThorn> just loose the ''
<havenwood> zlude: That's a String, a local variable would be a bare word, no quotes.
freerobby has joined #ruby
abyx has joined #ruby
tvw has quit []
blandflakes has joined #ruby
tvw has joined #ruby
pawnbox has quit [Remote host closed the connection]
<shevy> zlude one way would be to define a method that does it; players = { 'fisune' => '76561198060075860', 'leo' => '76561198076788976' }; variable = 'leo'; players.fetch(variable); if you need it generalized, write a method that returns the proper entry
skweek has joined #ruby
Guest58241 has joined #ruby
kentnl is now known as kent\n
codecop_ has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
ocbtec has joined #ruby
Zai00 has joined #ruby
pawnbox_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
rake_db__ has quit [Remote host closed the connection]
pawnbox_ has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
Es0teric has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
CasBaIT has joined #ruby
griffindy has joined #ruby
moeabdol1 has quit [Ping timeout: 246 seconds]
bry4n has joined #ruby
bry4n_ has quit [Ping timeout: 268 seconds]
skade has quit [Quit: Computer has gone to sleep.]
polysic__ has quit []
Zai00 has joined #ruby
RegulationD has joined #ruby
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Chagel has quit [Ping timeout: 252 seconds]
madgen has quit [Ping timeout: 276 seconds]
moeabdol1 has joined #ruby
hosttor has joined #ruby
dipnlik has quit [Quit: dipnlik]
scepticulous has quit [Ping timeout: 240 seconds]
madgen has joined #ruby
tvon has quit [Quit: Peace out, y'all!]
ChiefAlexander has quit [Remote host closed the connection]
ChiefAlexander has joined #ruby
polysics has joined #ruby
krz has joined #ruby
last_staff has quit [Quit: last_staff]
dipnlik has joined #ruby
ruid has quit [Ping timeout: 276 seconds]
jgt has joined #ruby
kariolee_ has quit [Remote host closed the connection]
ChiefAlexander_ has joined #ruby
ChiefAlexander has quit [Read error: Connection reset by peer]
tildes has quit [Remote host closed the connection]
d0nn1e has quit [Ping timeout: 248 seconds]
qhp has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
jmignault has joined #ruby
pawnbox has joined #ruby
d0nn1e has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
Guest38 has joined #ruby
aegis3121 has joined #ruby
bkxd has joined #ruby
Zai00 has quit [Read error: Connection reset by peer]
pawnbox has quit [Remote host closed the connection]
nfk|laptop has quit [Ping timeout: 246 seconds]
pawnbox has joined #ruby
Mia has joined #ruby
whippythellama has quit [Ping timeout: 276 seconds]
ceej_ has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
ceej has joined #ruby
Zai00 has joined #ruby
<rahc> there is an attribute in a class, @assets, declared with attr_accessor
bkxd has quit [Ping timeout: 260 seconds]
<rahc> somehow the attribute is changing
_stu_ has quit [Quit: _stu_]
<rahc> Config id: 30405620, assets id: 30404500, paths id: 30404280
<rahc> the later..
<rahc> config id: 30405620, assets id: 30888300, paths id: 30887840
<rahc> I've created a method, "def assets=(value)"
saneax is now known as saneax_AFK
_stu_ has joined #ruby
<rahc> in the class
rodfersou is now known as rodfersou|lunch
tmtwd has joined #ruby
<rahc> I would expect it to get called when the assets attribute is assigned with the new object
bkxd has joined #ruby
<rahc> however, this method doesn't print anything
<rahc> there is also no other code in the class that touches the object
<rahc> s/object/attribute/
<rahc> how could the object id of an attribute's value change, without the attribute being assigned to?
dionysus69 has joined #ruby
jamesbrink has joined #ruby
codecop_ has quit [Remote host closed the connection]
rippa has joined #ruby
phpwebdev has joined #ruby
dipnlik has quit [Quit: dipnlik]
<madgen> where is the code that calls this
<rahc> madgen: are you asking me?
<madgen> yup
x77686d has joined #ruby
<rahc> there's a stack trace
uod has joined #ruby
ixti has joined #ruby
rake_db_migrate has joined #ruby
whippythellama has joined #ruby
uod has quit [Max SendQ exceeded]
uod has joined #ruby
aufi has quit [Ping timeout: 276 seconds]
<rahc> madgen: any idea?
uod has quit [Max SendQ exceeded]
uod has joined #ruby
<madgen> rahc: not really, but the chances are you have a configuration error in your Rakefile rather than rails being broken
<madgen> also when you say later the object id changes do you mean in successive runs?
<rahc> madgen: no, same run just later in execution
whippythellama has quit [Ping timeout: 246 seconds]
<madgen> It may be a different instance of Configuration
<rahc> madgen: there's the Rakefile
n008f4g_ has joined #ruby
<rahc> madgen: the object id for the configuration class is the same
blaxter has quit [Quit: foo]
goodroot has quit [Quit: WeeChat 1.4]
jmignault has quit [Remote host closed the connection]
terlar has quit [Ping timeout: 244 seconds]
<rahc> that's the "config id" at the start of the lines I pasted into the channel above
jmignault has joined #ruby
<madgen> hmm, sorry not entirely sure, but if i were you i'd check the following /srv/www/obs/api/config/application.rb:10:in `<top (required)>'
tjvc has joined #ruby
tjvc has quit [Changing host]
tjvc has joined #ruby
GnuYawk has joined #ruby
<rahc> madgen: check it for what? :-)
GnuYawk has joined #ruby
GnuYawk has quit [Changing host]
the_drow has quit [Quit: This computer has gone to sleep]
<rahc> class Application < Rails::Application
<rahc> that's the line
bkxd has quit [Ping timeout: 244 seconds]
<rahc> which is as one would expect
<rahc> that just initiates the instantiation of the Application class
<rahc> how can I determine what is changing the assets attribute?
GnuYawk has quit [Remote host closed the connection]
<rahc> if "assets=" doesn't catch it, is there anything else that will?
<rahc> there surely must be otherwise it would be the same object id
<brent_> I'm trying to run bundle and it keeps failing due to inability to install eventmachine 1.0.3
<rahc> so the question is: what
<rahc> ?
freerobby has quit [Quit: Leaving.]
Zai00 has quit [Ping timeout: 244 seconds]
andikr has quit [Remote host closed the connection]
mtkd has quit [Ping timeout: 248 seconds]
platzhirsch has left #ruby [#ruby]
ItSAN____ has quit [Quit: Leaving...]
freerobby has joined #ruby
<brent_> though i have eventmachine 1.2 installed fine
GnuYawk has joined #ruby
<havenwood> brent_: This fails for me as well: gem install eventmachine -v 1.03
<brent_> can i alter the gemfile.lock and change the eventmachine version listed
<brent_> right, can't figure out why
<havenwood> brent_: bundle update eventmachine
<brent_> it says to find a lock at specific location, but no log exists
<brent_> log*
mtkd has joined #ruby
mikecmpbll has joined #ruby
<brent_> havenwood: looks like that got past eventmachine now fails on json v 1.8.1
mistermocha has joined #ruby
<brent_> should i do the same for json?
mistermocha has quit [Remote host closed the connection]
GG is now known as Bruh
jmignault has quit [Quit: rcirc on GNU Emacs 24.5.1]
mistermocha has joined #ruby
jmignault has joined #ruby
Bruh is now known as Homie
tubuliferous has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
<havenwood> brent_: 1.8.1 is a few years old so worth a shot.
<brent_> huzzah! bundle update eventmachine json worked
Zai00 has joined #ruby
<havenwood> brent_: nice
<brent_> thanks for the tip
<havenwood> you're welcome
diegoaguilar has quit [Ping timeout: 276 seconds]
fedexo has joined #ruby
sergey_makagon has quit []
<brent_> havenwood: is 'bundle update *packages' the same as 'bundle' without updating necessary package versiosn?
Homie is now known as GG
light2045 has quit [Read error: Connection reset by peer]
karmatr0n has joined #ruby
<havenwood> brent_: Just `bundle` is `bundle install`. See: bundle help update
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
<brent_> okay, so do budnle update, then bundle install
chouhoulis has joined #ruby
daytime is now known as fed
mhoungbo has quit [Ping timeout: 244 seconds]
<havenwood> brent_: Typically you don't often use `bundle update` unless you're updating specific gems, since it changes the Gemfile.lock possibly dramatically.
djbkd has joined #ruby
<havenwood> brent_: A `bundle install` will install the gem versions from the Gemfile.lock.
<havenwood> brent_: For an app you want everyone using the same gem versions, and typically you don't want to break things, so you bundle to install the Gemfile.lock gems.
<brent_> okay
babblebre has joined #ruby
<havenwood> brent_: For a gem's bundle you add the Gemfile.lock to the .gitignore and you bundle to freshly resolve the deps. See more about why: http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
chouhoulis has quit [Ping timeout: 246 seconds]
Snowy has quit [Remote host closed the connection]
elifoster has joined #ruby
<brent_> thanks, i'll take a look
djbkd has quit [Ping timeout: 244 seconds]
<brent_> would you possibly know about this error? http://hastebin.com/zeloyoyuso.vbs ran right after bundle isntall
B1n4r10 has joined #ruby
<havenwood> brent_: Try prefixing the command with: bundle exec
<havenwood> brent_: bundle exec rake ...
Trynemjoel has quit [Quit: Quitting]
<havenwood> (That runs the command from the "context of the bundle" (using the specific gems from the Gemfile.lock))
diegoaguilar has joined #ruby
Trynemjoel has joined #ruby
ta_ has quit [Remote host closed the connection]
<brent_> that worked
GnuYawk has quit [Ping timeout: 248 seconds]
mhoungbo has joined #ruby
[Butch] has joined #ruby
<brent_> havenwood: do you have a tl/dr summary of what rake does? i'm going over it's github page, but sounds like it has many uses?
n008f4g_ has quit [Ping timeout: 244 seconds]
<jaroslav> brent_: rake ~= Ruby Make
<jaroslav> it's not 100% true, but imho quite a good approximation
marxarelli has joined #ruby
<jaroslav> (that will not help much, if you don't know GNU Make)
<brent_> so in my exmpale above, the rake db:create db:migrate db:seed, was making a database w/ those features?
ramfjord has joined #ruby
freerobby has quit [Quit: Leaving.]
failshell has joined #ruby
<jaroslav> brent_: tldr version would be that rake is a simple specific language which allows to easily describe 'tasks' and dependencies between them
<jaroslav> brent_: simple scenario that comes to my mind would be: imagine you are writing ruby code, and you want to publish it as a gem
<jaroslav> brent_: before publishing new version of that gem, you'd like to run tests
pawnbox_ has joined #ruby
pawnbox has quit [Read error: No route to host]
<jaroslav> brent_: so the whole sequence would be: 1/ run tests, 2/ if they succeed, build gem, 3/ push gem to gemserver
joconcepts has quit [Remote host closed the connection]
dipnlik has joined #ruby
<jaroslav> brent_: in Rakefile you can define a task 'publish' which is responsible for pushing gem to gemserver, and declare it as *depends* on building gem
symm- has joined #ruby
<jaroslav> brent_: then the task 'build' and task 'test', with appropriate dependencies described
<jaroslav> brent_: when you have all of that, you can simply do: 'rake publish'
<jaroslav> brent_: and it will make sure tests are run, gem is built, and only then it is pushed to server
amclain has joined #ruby
bollullera has quit [Excess Flood]
shredding has quit [Ping timeout: 276 seconds]
<brent_> jaroslav thanks for the explanation, does give me an understanding
Zai00 has quit [Read error: Connection reset by peer]
<brent_> so rake's commands are limited to what in the Rakefile correct?
<shevy> it's ruby code
<jaroslav> brent_: it doesn't necessarily have to be a file called 'Rakefile', but yes, rake can only perform tasks that are described *somewhere*
B1n4r10 has quit [Ping timeout: 260 seconds]
tjohnson has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
joonty has quit [Ping timeout: 260 seconds]
<brent_> this is the rakefile http://hastebin.com/kixodeqece.pas included. Curious how that 'rake db:create db:migrate db:seed' command relates to taht
<jaroslav> brent_: as you see this file requires ../config/application
<jaroslav> and runs a #load_tasks method of Application class
freerobby has joined #ruby
<jaroslav> brent_: find that fili, open it, and find the method load_tasks -> you'll figure out where does it read tasks from
mhoungbo has quit [Ping timeout: 248 seconds]
<jaroslav> brent_: that way you would be able to see what are the possible tasks available, and what they do
mhoungbo has joined #ruby
antgel has quit [Ping timeout: 276 seconds]
rkazak has joined #ruby
smathy has joined #ruby
Zai00 has joined #ruby
jlebrech has joined #ruby
blt has quit [Ping timeout: 248 seconds]
chouhoulis has joined #ruby
<brent_> jaroslav, appears to be a module w/ an empty class
wldcordeiro has quit [Quit: WeeChat 1.3]
rkazak has quit [Ping timeout: 248 seconds]
<brent_> i do appreciate the explanation, really helped clear it up
chouhoulis has quit [Remote host closed the connection]
karioleez has joined #ruby
baweaver has joined #ruby
mtkd has quit [Ping timeout: 260 seconds]
<jaroslav> brent_: no problem, maybe it's in a different file
mtkd has joined #ruby
<jaroslav> brent_: just go to the main directory of that app, and run: # grep -R "db:create" .
<jaroslav> brent_: yes, there is a dot at the end, after space
<jaroslav> brent_: it will show you all the files, where "db:create" string can be found
failshell has quit []
fedexo has quit [Ping timeout: 268 seconds]
CloCkWeRX has quit [Quit: Leaving.]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<brent_> hmm, nothing
<jlebrech> I want to do a nested group_by of an array then run aggregate methods on the grouped data. where can i find a decent book or blog on this?
<brent_> i did find a db folder w/ seeds.rb and a migrate folder
<jlebrech> I can do this in sql very easily, but I want it all in memory
Alayde has joined #ruby
mark2 has quit [Remote host closed the connection]
shmuli_ has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
nofacade has joined #ruby
GnuYawk has joined #ruby
sepp2k has quit [Quit: Leaving.]
maletor_ has joined #ruby
joconcepts has joined #ruby
karioleez has quit [Remote host closed the connection]
maletor has quit [Ping timeout: 250 seconds]
rake_db_migrate has quit [Remote host closed the connection]
rake_db_migrate has joined #ruby
aeterne has joined #ruby
stan has quit [Quit: Leaving]
rake_db_migrate has quit [Remote host closed the connection]
musl has joined #ruby
ChiefAlexander_ has quit [Remote host closed the connection]
hightower2 has joined #ruby
weckl has quit [Quit: Leaving]
PedramT has joined #ruby
<shevy> a whole book about group_by? :D
mikecmpbll has quit [Ping timeout: 276 seconds]
<shevy> guess the primary resource would be the official docu http://ruby-doc.org/core-2.3.0/Enumerable.html#method-i-group_by
htmldrum has joined #ruby
<jlebrech> shevy: sure, difference examples as alternatives to sql
<jlebrech> I want to nest group_bys
rodfersou|lunch is now known as rodfersou|afk
<apeiros> jlebrech: I suggest you just do it and show the code here
hightower3 has quit [Ping timeout: 252 seconds]
PedramT has quit [Ping timeout: 240 seconds]
stan has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
madgen has joined #ruby
sandelius has joined #ruby
mhoungbo has quit [Ping timeout: 264 seconds]
dipnlik has quit [Quit: dipnlik]
baweaver has quit [Remote host closed the connection]
d10n-work has joined #ruby
parduse has joined #ruby
djbkd has joined #ruby
smathy has joined #ruby
jmorgado has quit [Ping timeout: 240 seconds]
phredus has joined #ruby
GnuYawk has quit [Ping timeout: 276 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
benlieb has joined #ruby
parduse has quit [Client Quit]
malconis has joined #ruby
edwinvdgraaf has quit [Ping timeout: 244 seconds]
zeroDivisible has quit [Ping timeout: 276 seconds]
Guest13 has joined #ruby
karioleez has joined #ruby
<Guest13> guys, I've just installed rvm + ruby, but now every time I open a tab on terminal on OS X it start executing something in background for 1/2 sec...
<Guest13> any idea?
skweek has quit [Ping timeout: 248 seconds]
nando293921 has joined #ruby
<mozzarella> the rvm script?
htmldrum has quit [Ping timeout: 250 seconds]
dipnlik has joined #ruby
platzhirsch has joined #ruby
solars has quit [Ping timeout: 240 seconds]
Zai00 has quit [Read error: Connection reset by peer]
mhoungbo has joined #ruby
swills has quit [Quit: Leaving]
platzhirsch has quit [Client Quit]
<Guest13> mozzarella yes
Donkoko has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
Donkoko has joined #ruby
Donkoko has quit [Remote host closed the connection]
bry4n has quit [Read error: Connection reset by peer]
CasBaIT has quit [Quit: Leaving...]
sandelius has quit [Quit: Textual IRC Client: www.textualapp.com]
Donkoko has joined #ruby
<Donkoko> Hey everyone. I am trying to generate an xml in my Rails app(3.2). For some reason the builder doesn't like the `.tag!` method and it completely breaks the response. Any ideas? https://gist.github.com/DonKoko/6595d5491fc2d2688aa144c43785a25f
Lomex has joined #ruby
joonty has joined #ruby
codecop has joined #ruby
nanoz] has quit [Ping timeout: 244 seconds]
Zai00 has joined #ruby
mikecmpbll has joined #ruby
skislak has quit [Ping timeout: 248 seconds]
Guest58241 has quit [Read error: Connection reset by peer]
TomyLobo has joined #ruby
Guest13 has quit [Quit: Textual IRC Client: www.textualapp.com]
swills has joined #ruby
Snowy has joined #ruby
codecop has quit [Ping timeout: 260 seconds]
Couch has quit [Ping timeout: 276 seconds]
joonty has quit [Ping timeout: 264 seconds]
djbkd has quit [Quit: My people need me...]
codecop has joined #ruby
maletor_ has quit [Quit: Textual IRC Client: www.textualapp.com]
solars has joined #ruby
ramfjord has quit [Ping timeout: 264 seconds]
Devalo has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
chouhoulis has joined #ruby
fumduq has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmolina has quit [Quit: Leaving.]
dmolina has joined #ruby
Canar has joined #ruby
akkad has joined #ruby
e4xit has quit [Quit: Right I'm out!]
djbkd has joined #ruby
nando293921 has quit [Quit: Lost terminal]
wldcordeiro has joined #ruby
davedev24 has joined #ruby
dmolina has quit [Ping timeout: 244 seconds]
ferr has quit [Ping timeout: 268 seconds]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
GG is now known as Socialdawg
elifoster has quit [Ping timeout: 250 seconds]
jlebrech has quit [Remote host closed the connection]
davedev2_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
evidex has quit [Remote host closed the connection]
n1colas has quit [Quit: WeeChat 1.4]
chouhoulis has joined #ruby
davedev24 has quit [Ping timeout: 248 seconds]
n008f4g_ has joined #ruby
rake_db_migrate has joined #ruby
Dimik has joined #ruby
postmodern has joined #ruby
Zai00 has quit [Quit: Zai00]
ChiefAlexander has joined #ruby
madgen has quit [Ping timeout: 244 seconds]
polysics_ has joined #ruby
bry4n has joined #ruby
Chunlea_ has quit [Ping timeout: 248 seconds]
rmulligan has joined #ruby
Snowy_ has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
polysics has quit [Ping timeout: 248 seconds]
dipnlik has quit [Quit: dipnlik]
<karioleez> Does anyone have any experience with ioctl and its interface with ruby ?
dipnlik has joined #ruby
dipnlik has quit [Client Quit]
a1fa has joined #ruby
ChiefAlexander has quit [Ping timeout: 276 seconds]
n1colas has joined #ruby
<a1fa> is there a way to automatically convert a file to utf-8 from * while doing CVS.foreach? also, is it possible to make CVS.foreach accept headers that are not quoted?
baweaver has joined #ruby
last_staff has joined #ruby
ChiefAlexander has joined #ruby
platzhirsch has joined #ruby
Snowy_ has quit [Quit: ragequit]
Aaklo has joined #ruby
ta_ has joined #ruby
Aaklo has left #ruby [#ruby]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rodfersou|afk is now known as rodfersou
platzhirsch has left #ruby [#ruby]
<RickHull> a1fa: you may need to instantiate CSV first
baweaver has quit [Ping timeout: 250 seconds]
sepp2k has joined #ruby
Zai00 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
<RickHull> CSV.new(file_contents, options).each do row # rather than CSV.foreach(filename) do row
<RickHull> the options hash should provide what you need
_stu_ has quit [Quit: _stu_]
crameth has quit [Quit: crameth]
spider-mario has joined #ruby
mtkd has joined #ruby
ramfjord has joined #ruby
Cohedrin has joined #ruby
mikecmpbll has joined #ruby
mhoungbo has quit [Ping timeout: 250 seconds]
gatman has joined #ruby
Chunlea_ has joined #ruby
<a1fa> RickHull: i see
<smathy> a1fa, there are gems out there which guess at encodings based on the prevalence of common/likely word-like characters.
<smathy> a1fa, but the real answer is: tell your users to give you a UTF8 encoded file.
baweaver has joined #ruby
<a1fa> thanks smathy, i am just preparing for the inevitable
<smathy> a1fa, and rescue ArgumentError and fail back to your user telling them that their file wasn't UTF8
<a1fa> not a bad idea. i will do that
tristanp has quit []
baweaver has quit [Remote host closed the connection]
joonty has joined #ruby
tristanp has joined #ruby
<a1fa> RickHull: foreach also takes the same options hash
<a1fa> unless we are talking about HeaderConverters.. ?
djbkd has quit [Remote host closed the connection]
Balzrael has joined #ruby
<smathy> a1fa, none of those options will help you with the encoding of the incoming file.
<kellabyte> how did people do things before the dig method? I need to make something run on an older version of ruby
sepp2k has quit [Read error: Connection reset by peer]
<apeiros> they wrote code
<a1fa> smathy: that was a follow up on my 2nd question, regarding of unquoted headers
djbkd has joined #ruby
<a1fa> smathy: csv files suck, especially with new lines in them
<kellabyte> was there another less than ideal but somewhat elegant way to solve what dig does?
<smathy> a1fa, ahh - heh, sorry, I didn't see it.
<kellabyte> apeiros: thanks for that answer lol
<a1fa> smathy: no worries -- honestly, i'd rather not use csv. but people like their "sheets"
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pawnbox_ has quit [Remote host closed the connection]
<smathy> kellabyte, they chained conditionals, or wrote their own version of dig.
sepp2k has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
DoubleMalt has quit [Ping timeout: 244 seconds]
<shevy> kellabyte usually by calling a method which will handle the access properly
tvw has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
<kellabyte> ok that makes sense, thanks
Noldorin has joined #ruby
<Noldorin> what does this mean?
<Noldorin> ERROR: Loading command: install (LoadError)
<Noldorin> failed to load encoding (Windows-31J)
<Noldorin> ERROR: While executing gem ... (NoMethodError)
<Noldorin> undefined method `invoke_with_build_args' for nil:NilClass
<Noldorin> doing a gem install
<shevy> what is the name of the gem?
madgen has joined #ruby
shmuli_ has quit [Remote host closed the connection]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
Cohedrin_ has joined #ruby
<Noldorin> shevy, rmate
<shevy> hmm
blackmes1 has joined #ruby
lsmola has quit [Ping timeout: 248 seconds]
<shevy> the gem author probably did not anticipate this encoding or the error setup
<shevy> aha
<Noldorin> shevy, it's on an embedded Linux so maybe that's not helping?
<shevy> what ruby version do you use?
<Noldorin> 2.2.3
<shevy> hmm ok
<shevy> thought that could be a problem but is not
<shevy> one line was: $KCODE = "U" if RUBY_VERSION < "1.9"
Cohedrin has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
<shevy> the gem author is probably not very experienced
<shevy> the file in the lib/ subdirectory is a 100% copy paste of the file in the bin/ directory
baweaver has quit [Remote host closed the connection]
<Noldorin> I see heh
<Noldorin> shevy, so what's the easiest fix?
<shevy> rmate.rb is https://gist.github.com/shevegen/4ccbe4a3449c1b32892d6568472cf9d9 - but I think the author probably never tested it on windows or that encoding; there is not a lot of code there though, you can probably copy/paste it and try to load it and see what part fails exactly
<shevy> I am not sure
<shevy> copy paste that file into a local file and try to run it?
<Noldorin> to be honest I don't know a lot about gem files (barely anything)
<shevy> perhaps the encoding
<Noldorin> I'm not on Windows FYI
<shevy> yeah but you get some encoding error
<shevy> I did a gem install and it worked for me
<Noldorin> yes. windows encoding?
<shevy> have a look at strings such as: "Connect: ‘#{server_info}’"
<shevy> I don't get a proper output from that
<shevy> no idea what is Windows-31J sorry; the gem seems to work on my linux system though :)
<Noldorin> yeah heh
TheHodge has quit [Quit: Connection closed for inactivity]
sandstrom has quit [Ping timeout: 250 seconds]
<shevy> it's not a lot of code though, only 200 lines
blackmes1 has quit [Ping timeout: 264 seconds]
DoubleMalt has joined #ruby
firstdayonthejob has joined #ruby
<miah> ^- windows-31j
shmuli has joined #ruby
dnewkerk has joined #ruby
baweaver has joined #ruby
Donkoko has quit [Remote host closed the connection]
sauvin has quit [Read error: Connection reset by peer]
ssiris has joined #ruby
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
baweaver has quit [Remote host closed the connection]
cjbischof_ has joined #ruby
Socialdawg is now known as GG
<Noldorin> shevy, miah I'm quite the noob when it comes to ruby/gem. what do I do now? :)
elifoster has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
<shevy> hmm
<shevy> provided that the code would work on your system
<shevy> can you start irb?
Cohedrin has joined #ruby
millerti has joined #ruby
<Noldorin> it used to work some time ago...I don't know about this newer version though
Cohedrin_ has quit [Ping timeout: 276 seconds]
skydiver has joined #ruby
mdw has joined #ruby
chouhoul_ has joined #ruby
<shevy> guess that is the end :)
ta_ has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
polyidus has joined #ruby
<karioleez> has anyone worked with ioctl and ruby ?
<Noldorin> shevy, yep :)
blackmesa has joined #ruby
chouhoulis has quit [Ping timeout: 244 seconds]
ta_ has joined #ruby
djbkd has quit [Remote host closed the connection]
platzhirsch has joined #ruby
millerti has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
Synthead has joined #ruby
blackmes1 has quit [Ping timeout: 260 seconds]
PedramT has joined #ruby
eljimmy has joined #ruby
GG has left #ruby ["It's not such a bad thing <3"]
duderonomy has quit [Ping timeout: 276 seconds]
djbkd has quit [Ping timeout: 244 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sandstrom has joined #ruby
<Noldorin> shevy, so?
djbkd has joined #ruby
rippa has joined #ruby
duderonomy has joined #ruby
scepticulous has joined #ruby
darkxploit has joined #ruby
<shevy> Noldorin what so?
<Noldorin> shevy, sorry, I thought you were going to tell me how to get around this encoding issue..
chouhoul_ has quit [Remote host closed the connection]
<shevy> ah
<shevy> I have no idea about this encoding
leftpad has quit [Read error: Connection reset by peer]
<Noldorin> okay hm
<shevy> I am also not sure how you have it either, you wrote:
<shevy> <Noldorin> I'm not on Windows FYI
chouhoulis has joined #ruby
growGROW has joined #ruby
<Noldorin> shevy, I'm thinking because the Gem file is written in a Windows encoding?
<shevy> I don't think so, it works fine here
ruby-lang058 has joined #ruby
agent_white has joined #ruby
<shevy> >file rmate.rb
<shevy> rmate.rb: a /usr/bin/env ruby script, UTF-8 Unicode text executable
<Noldorin> shevy, okay. so this actually happens with *any* gem. wow.
<shevy> something must be weird in your setup
<shevy> my gem version is 2.6.2
MuffinPimp has joined #ruby
ruby-lang058 has quit [Client Quit]
<shevy> and you wrote that it happened before
<shevy> you did something naughty!
<Noldorin> aha!
<shevy> btw did you try to manually download the .gem, and then run: "gem install ./*.gem" on it? wget https://rubygems.org/downloads/rmate-1.5.8.gem
<shevy> ack
<shevy> aaaah
<Noldorin> hehe
<shevy> I found a gem that had only text written in cyrillic yesterday
<shevy> the author was even using ruby gtk3
Ishido has joined #ruby
<shevy> it also worked on my system but I can't read anything
<Noldorin> impressive
polyidus has quit [Quit: Later]
speaking1ode has quit [Ping timeout: 244 seconds]
MuffinPimp has quit [Remote host closed the connection]
<shevy> hehe
<shevy> the gem name was bconv... let me show a partial screenshot
polyidus has joined #ruby
MuffinPimp has joined #ruby
kobain has quit [Ping timeout: 260 seconds]
<shevy> that was it http://shevegen.square7.ch/screenshot.png ... the black background is just from kde konsole terminal, the rest is the gtk3 widget
tref has joined #ruby
<shevy> obviously it does something with resolution :P
GodFather has quit [Ping timeout: 260 seconds]
speaking1ode has joined #ruby
<Noldorin> what are you using it for? :)
<Noldorin> heh
noService has quit [Read error: Connection reset by peer]
_blizzy_ has quit [Quit: Leaving]
frem has joined #ruby
<shevy> I was not really using it, just testing it out since I use ruby-gtk too
<shevy> the structure was defined in a big XML file though
jenrzzz has joined #ruby
jenrzzz has joined #ruby
<shevy> glade... I don't like XML :(
ta_ has quit [Read error: Connection reset by peer]
<Noldorin> I see
cdg has quit [Remote host closed the connection]
joonty has joined #ruby
mrmortondk has joined #ruby
<Noldorin> all working now \o/
<shevy> cool
<shevy> you wrestled encoding into submission
AckZ has quit []
<Noldorin> shevy, also, who does like XML? :P
ur5us has joined #ruby
<Noldorin> indeed
platzhirsch has left #ruby [#ruby]
<shevy> yeah well
<Noldorin> there was some ruby-enc-extra package that fixed it. also just upgrading to entware-ng
<shevy> I think these big XML files are generated by some editor, so perhaps it is really easy to build up widgets like that, if you use such an editor
Synthead has quit [Remote host closed the connection]
<shevy> like you have those widget-building thingies on windows
<Noldorin> I see
<shevy> for ruby, I like the approach from the old shoes more ... http://shoesrb.com/
<Noldorin> shevy, I used to do WPF from the XML end on Windows... that was 'fun'
<shevy> Not necessarily that specific API... but something like that would be nice for ruby-gtk / ruby-gnome.
<shevy> hehe
<Noldorin> shoes looks cool
<Noldorin> yeah
<shevy> yeah it was a very cool idea when it was written... already like 10 years ago or so...
diegoaguilar has quit [Ping timeout: 250 seconds]
ur5us has quit [Read error: No route to host]
ur5us has joined #ruby
noService has joined #ruby
ta_ has joined #ruby
nofacade has quit [Ping timeout: 248 seconds]
ipg has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
solars has quit [Ping timeout: 268 seconds]
pawnbox has joined #ruby
n008f4g_ has quit [Ping timeout: 244 seconds]
growGROW has quit [Remote host closed the connection]
Eiam_ has joined #ruby
ipg has quit [Client Quit]
<Noldorin> shevy, yeah. just hasn't been updated/modernised for other graphical toolkits it seems?
pawnbox has quit [Ping timeout: 250 seconds]
madgen has quit [Ping timeout: 250 seconds]
<frem> Shoves was never supposed to really fit in with other desktop apps, it seems like. _why liked kinda quirky one-off things.
benlieb has quit [Quit: benlieb]
yfeldblum has joined #ruby
mhoungbo has joined #ruby
<frem> Hopefully the JRuby port will make it easier for them to maintain compatibility with newer toolkits.
aegis3121 has joined #ruby
polysics has joined #ruby
hxegon is now known as hxegon_AFK
qpls has quit [Disconnected by services]
tvw has joined #ruby
hxegon_AFK is now known as hxegon
hosttor has quit [Ping timeout: 268 seconds]
skydiver has quit [Ping timeout: 248 seconds]
millerti has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
xaxisx has joined #ruby
diegoaguilar has joined #ruby
polysics_ has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
karmatr0n has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
elaptics is now known as elaptics`away
IrishGringo has quit [Ping timeout: 248 seconds]
PedramT has quit [Remote host closed the connection]
abyx has quit [Quit: This computer has gone to sleep]
rmulligan has quit [Remote host closed the connection]
tref has quit [Quit: tref]
rmulligan has joined #ruby
noServic1 has joined #ruby
ruby-lang664 has joined #ruby
benlieb has joined #ruby
icarus has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
noService has quit [Ping timeout: 246 seconds]
last_staff1 has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
last_staff1 is now known as last_staff
karmatr0n has joined #ruby
noServic1 has quit [Ping timeout: 246 seconds]
polyidus has quit [Quit: Later]
poguez_ has joined #ruby
dc4 has joined #ruby
elifoster has quit [Ping timeout: 264 seconds]
B1n4r10 has quit [Ping timeout: 248 seconds]
polyidus has joined #ruby
x77686d has quit [Quit: x77686d]
dnewkerk has quit [Quit: dnewkerk]
B1n4r10 has joined #ruby
YP-QMUL-W has quit [Read error: Connection reset by peer]
abyx has joined #ruby
dvinciguerra_ has quit [Ping timeout: 246 seconds]
elifoster has joined #ruby
abyx has quit [Client Quit]
stevednd has joined #ruby
abyx has joined #ruby
codecop has quit [Remote host closed the connection]
Musashi007 has joined #ruby
Aviio has joined #ruby
skweek has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
Tricon has joined #ruby
Aviio has quit []
dvinciguerra_ has joined #ruby
frozenfoxx has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
Begi has joined #ruby
goglosh has joined #ruby
hxegon is now known as hxegon_AFK
gatman has quit [Remote host closed the connection]
xaxisx has quit [Quit: xaxisx]
<frozenfoxx> Could anyone give me a quick-n-dirty way to reopen $stdin for writing? I know you're normally not supposed to but for testing a particular bit of code that works perfect with ARGF but not at all with other forms of input it would help me greatly.
<frozenfoxx> Basically so I can do a "$stdin << "some string" " or "ARGV << "some string" "
xaxisx has joined #ruby
dn` has quit [Quit: dn`]
infinitiguy has joined #ruby
infinitiguy has left #ruby [#ruby]
<shevy> $stdin.reopen ?
gatman has joined #ruby
gatman has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
dvinciguerra_ has quit [Ping timeout: 240 seconds]
_stu_ has joined #ruby
Canar has quit [Quit: WeeChat 1.4]
Canar has joined #ruby
YP-QMUL-W has joined #ruby
stannard has quit [Remote host closed the connection]
<smathy> frozenfoxx, you can't write to $stdin.
pawnbox has joined #ruby
x77686d has joined #ruby
stannard has joined #ruby
dvinciguerra_ has joined #ruby
x77686d has quit [Client Quit]
<smathy> frozenfoxx, I doubt that you're really asking the right question here, are you trying to test something that reads from stdin and you want to stub $stdin out so it returns a known string you want to provide in your test?
shmuli has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
BSaboia has joined #ruby
<smathy> frozenfoxx, $stdin = StringIO.new "foo"; gets # => "foo"
Jackneill has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
benlieb has quit [Quit: benlieb]
pawnbox has quit [Ping timeout: 264 seconds]
rmulliga` has joined #ruby
codezomb has joined #ruby
n008f4g_ has joined #ruby
rmulliga` has quit [Remote host closed the connection]
x77686d has joined #ruby
karmatr0n has quit [Ping timeout: 240 seconds]
YP-QMUL-W has quit [Read error: Connection reset by peer]
malconis has quit [Ping timeout: 246 seconds]
<Ox0dea> You can totally write to stdin.
malconis has joined #ruby
millerti has quit [Read error: Connection reset by peer]
hxegon_AFK is now known as hxegon
freerobby has quit [Quit: Leaving.]
<Ox0dea> It's how modern terminals provide mouse support, for instance. You enable that mode with some escape sequence, and then it writes coordinates and button states to stdin.
YP-QMUL-W has joined #ruby
<frozenfoxx> shevy: hmm, interesting.
shmuli has joined #ruby
<frozenfoxx> Ox0dea: I thought you could, yeah.
ChiefAlexander has quit [Remote host closed the connection]
mistermocha has quit [Remote host closed the connection]
<Ox0dea> frozenfoxx: That said, your mentioning `$stdin << foo` and `ARGV << foo` in the same breath does not bode well.
<Ox0dea> Those are just... very different things.
mistermocha has joined #ruby
<frozenfoxx> Ox0dea: making either work would be fine for my test, though I really wouldn't be too happy if it's "the" solution as there should be a cleaner way to do it. If you want to know the whole context, the code I'm working with is here: https://github.com/frozenfoxx/hack-doom/blob/master/gloom/app/channels/doom_channel.rb
chipotle has joined #ruby
<frozenfoxx> Essentially if you replace line 29 with line 30 and punch in text in the console you started the rails app in, everything works appropriately. It blocks until you enter text and hit enter, and outputs it from line 31 as you'd expect.
polyidus has quit [Quit: Later]
<Ox0dea> frozenfoxx: Do you know what ARGF is?
x77686d has quit [Quit: x77686d]
<frozenfoxx> If you do this with the pipe, it either infinintely blocks on line 29 (never moves forward ever, even if you write into $inpipe) OR if you change it for "while line = @outpipe.gets" then it infinitely spams "nil" which is the default you pull out of the pipe.
<frozenfoxx> Ox0dea: Yes, the continuous stream of arguments from the launching of the program.
<Ox0dea> frozenfoxx: No, that's not quite right.
<Ox0dea> You've got ARGV and ARGF conflated.
<smathy> Ox0dea, well sure, the system writes to the other side of stdin, as it does with anything we read from stdin, but just because your keyboard "writes to stdin" that doesn't mean STDIN is writable in this context of a ruby test.
<Ox0dea> smathy: Sure, I concede that it'd have to be reopened, but there's nothing special about /dev/fd/0 that prevents it being opened for writing.
<frozenfoxx> Ox0dea: as a special note, I *don't* want to try to use either $stdin or ARGF for this, it just happens to be doing exactly what I want right now. I figure if I can understand how that works then I can try to make something similar that will do what I want.
davedev2_ has quit [Remote host closed the connection]
malconis has quit [Remote host closed the connection]
<frozenfoxx> I just currently fail to understand what I'm doing wrong with the pipe *or* what I should replace it with since it either blocks forever or spams nil forever.
<shevy> hehe
malconis has joined #ruby
<shevy> a nil-spam pipe
<frozenfoxx> Ox0dea: last time I checked ARGV was the array and ARGF was the stream from it, but admittedly I could be totally wrong
polyidus has joined #ruby
cdg has joined #ruby
znz_jp has quit [Ping timeout: 250 seconds]
cdg has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 264 seconds]
cdg has joined #ruby
gigetoo has quit [Ping timeout: 264 seconds]
<Ox0dea> frozenfoxx: I guess it makes sense to think of it that way, but the stream is wrapped around *all* the file arguments, and defaults to $stdin.
blackmesa has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
crazydiamond has quit [Remote host closed the connection]
<frozenfoxx> Ox0dea: gotcha. For my purposes it's probably most correct to say to allows ARGV to be written to, it just would happen to work by accident if I did it with $stdin as well. Really the "right" answer though is I need to know what I'm doing wrong with the IO.pipe OR find a replacement.
DoubleMalt has quit [Remote host closed the connection]
<frozenfoxx> Ox0dea: From what I understand "@outpipe.read" *should* block...unless it gets a string in it from @inpipe.write. I've tried it with "a string" and "a string\n" and neither seems to work, just sits there forever.
DoubleMalt has joined #ruby
whippythellama has joined #ruby
Musashi007 has joined #ruby
<frozenfoxx> And then the "while = @outpipe.gets" spams nil infinitely since that's the default value in a pipe, doesn't matter if I try to write to @inpipe.puts "a string", it never gets there through all the nil spam either. I feel like I'm using the wrong tool since ARGV and the console does this perfectly, but I need it to do this from the "def relay()" instead of the console.
DoubleMalt has quit [Remote host closed the connection]
<frozenfoxx> I just feel like I'm missing something obvious.
DoubleMalt has joined #ruby
PedramT has joined #ruby
Musashi007 has quit [Client Quit]
kobain has joined #ruby
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
krz has quit [Ping timeout: 244 seconds]
_stu_ has quit [Quit: _stu_]
blackmesa has quit [Ping timeout: 276 seconds]
Musashi007 has joined #ruby
Eiam_ has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
karmatr0n has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
dc4 has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
<Ox0dea> frozenfoxx: What's the IO.pipe for when you're using #popen2?
djbkd has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<Ox0dea> At any rate, see what happens if you just nix the `.read` on Line 29.
<Ox0dea> That's blocking because you're asking it to consume what it can only assume is infinite input.
<Ox0dea> Streams can be processed "lazily" if you just ask for their lines as an enumeration (#each_line).
polyidus has quit [Ping timeout: 260 seconds]
<frozenfoxx> Ox0dea: the #popen2 is for supplying input/output in realtime to an external process without blocking it (hence the Thread.new). I was thinking I could try the same thing, but I wasn't sure it would work.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<frozenfoxx> Ox0dea: that makes sense about the .read, 'll try that when I get home
karmatr0n has quit [Ping timeout: 264 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
Lomex has quit [Remote host closed the connection]
<Ox0dea> frozenfoxx: #popen2 gives you either side of a pipe.
karmatr0n has joined #ruby
Zai00 has quit [Quit: Zai00]
voidDotClass has quit [Ping timeout: 276 seconds]
rake_db_migrate has quit [Read error: Connection reset by peer]
<Ox0dea> The IO.pipe call there and what you're doing with the results is the source of my confusion.
yfeldblum has quit [Ping timeout: 248 seconds]
rake_db_migrate has joined #ruby
joonty has quit [Ping timeout: 276 seconds]
Zai00 has joined #ruby
ChiefAlexander has joined #ruby
<braderhart> Anyone able to help debug getting an old Ruby app running in a new enviornment?
johnmilton has quit [Remote host closed the connection]
<havenwood> braderhart: Ask away.
Begi has left #ruby [#ruby]
blackmesa has joined #ruby
<braderhart> havenwood: Thank you. I'm going to reimport source to start from scratch and then I'll show the errors I get
blackgoat has joined #ruby
freerobby has joined #ruby
mhoungbo has quit [Quit: Quitte]
malconis has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 260 seconds]
Jackneill has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
malconis has joined #ruby
zeroDivisible has joined #ruby
jackjackdripper has joined #ruby
<frozenfoxx> Ox0dea: Hmm, I see.
<frozenfoxx> Ox0dea: it's entirely possible I got wayyyyy too down in the weeds to see I could've just been using the Open3 command variables as class variables to access outside of it. Thanks for bringing it up, I had a feeling this was way too hard and that'd be why
jsaak has joined #ruby
<frozenfoxx> Ox0dea: I'll give all of those (remove the .read, and just use the straight-up variables I created earlier as class varaibles) a shot tonight.
<Ox0dea> frozenfoxx: Well, you'll catch flak from certain folks for introducing instance variables outside of #initialize, but it's not a sin or anything.
icarus has quit [Ping timeout: 276 seconds]
<frozenfoxx> Ox0dea: I think with what I'm doing it's already a sin. The Rails folks told me when I had a question about the websocket implementation "don't use beta software." Which would be fine, if I could accomplish this without it (i'm *not* a web dev, more devops and security)
gigetoo has joined #ruby
<Ox0dea> They tell people not to use Action Cable in #RoR?
<braderhart> havenwood: Okay.. first issue after running bundle install I get... Fetching https://github.com/platform45/gdata.git
n008f4g_ has quit [Ping timeout: 248 seconds]
<braderhart> Then a prompt for a Username
<frozenfoxx> Ox0dea: yep, just last week.
<Ox0dea> Interesting.
<braderhart> So I should modify that Gem to use a new URL... correct?
icarus has joined #ruby
PedramT has quit [Ping timeout: 250 seconds]
<shevy> there be madness on that channel!
<braderhart> Do I modify just the Gemfile or the Gemfile.lock?
<frozenfoxx> Ox0dea: I'll be honest, I don't get it. Rails 5 has already been great for me, I just didn't fully understand how to hook it up.
jpfuentes2 has joined #ruby
<frozenfoxx> Ox0dea: this is literally the *very* last piece of my multi-month project and Rails made the rest of the standup so easy for a newbie like me that I can really understand why people like it.
bkxd has joined #ruby
<frozenfoxx> ...then I made the horrible mistake of saying I was new but needed ActionCable.
<frozenfoxx> The last time I asked about this stuff (faye, em-websocket, etc) I was told to use Rails 5 since ActionCable is about to make all that pointless, so I wasn't super-happy about it.
<havenwood> braderhart: Do you know where the gem currently lives?
<frozenfoxx> Anyway, enough of me ranting on, sorry about that. I really appreciate the help everybody, I can't wait to try this tonight.
hahuang65 has joined #ruby
* frozenfoxx reallllllly likes using Ruby, especially in a system capacity and with Puppet
<braderhart> havenwood? I believe there should be a local copy on production and then I have a Gemfile.lock that shows a version
<braderhart> So I'm guessing this is it: https://rubygems.org/gems/gdata/versions/1.1.1
<havenwood> braderhart: What does the Gemfile.lock line say?
GodFather has joined #ruby
<havenwood> braderhart: Do you know why someone forked the project and pointed it to the repo instead of the gem itself?
Musashi007 has quit [Quit: Musashi007]
<braderhart> Nope, unfortunately I'm just tasked with trying to get the app running in a new enviornment
Madplatypus has joined #ruby
<ruby[bot]> braderhart: we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/5a57cb85a87b5722e84e943b7662c9f7
<ruby[bot]> braderhart: irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
David_H_Smith has quit []
agent_white has quit [Quit: brb]
bkxd has quit [Ping timeout: 260 seconds]
<Radar> oh snap
ChiefAlexander has quit [Remote host closed the connection]
n008f4g_ has joined #ruby
Devalo has quit [Remote host closed the connection]
htmldrum has joined #ruby
ChiefAlexander has joined #ruby
davedev24 has joined #ruby
<braderhart> :-P
<braderhart> Nah, ruby[bot] is cool with buggy bots!
pawnbox has joined #ruby
dopie has joined #ruby
chipotle has quit [Quit: cheerio]
moeabdol1 has quit [Ping timeout: 244 seconds]
<benzrf> braderhart: using irccloud?
aegis3121 has quit [Ping timeout: 252 seconds]
<benzrf> shame on you
<benzrf> don't you know that service as a software substitute is killing freedom
<benzrf> smh
frozenfoxx has left #ruby [#ruby]
sudoubuntu has joined #ruby
<braderhart> yep... fully aware that i should be setting up my own irc bouncer with a db for chat history, etc
pawnbox has quit [Ping timeout: 244 seconds]
wolffles has joined #ruby
chipotle has joined #ruby
aegis3121 has joined #ruby
<adaedra> ZNC ♥️
crime has joined #ruby
<benzrf> braderhart: znc is pretty easy to set up :)
<braderhart> i'll get there again soon
<benzrf> but i was being ~70% facetious
benlieb has joined #ruby
parduse has joined #ruby
<braderhart> for now let's not pick on the irccloud newb too much
<goglosh> how do I reference the function + ?
<braderhart> maybe you can help me with my gem issue and then i'll setup znc to appease the haters
<Mon_Ouie> There isn't a function +, there are multiple methods called + in different classes
<goglosh> oh...
<Mon_Ouie> >> [Fixnum.instance_method(:+), Float.instance_method(:+)]
<ruby[bot]> Mon_Ouie: # => [#<UnboundMethod: Fixnum#+>, #<UnboundMethod: Float#+>] (https://eval.in/547577)
<Mon_Ouie> Also see Object#method
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
<goglosh> thanks that solves my doubt :)
jgt1 has joined #ruby
Begi1 has joined #ruby
Begi1 is now known as Begi
<goglosh> and the action of sending a message
skade has joined #ruby
<goglosh> is it a language object in itself?
rodfersou has quit [Quit: leaving]
bob434 has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<goglosh> like... is object.foo syntactic sugar for something like main.send_message(object, :foo) ?
jgt has quit [Ping timeout: 264 seconds]
<Ox0dea> >> 17.send :+, 25 # goglosh
<ruby[bot]> Ox0dea: # => 42 (https://eval.in/547585)
<Ox0dea> So yeah, that's a viable way to think of it, even if it's not actually what's happening under the hood.
last_staff has quit [Quit: last_staff]
<goglosh> Ox0dea: awesome.
<goglosh> What actually happens though?
<adaedra> Magic.
<Ox0dea> Your code gets parsed and compiled down to bytecode, then that's what gets interpreted.
<goglosh> oh of course
karmatr0n has joined #ruby
<Ox0dea> There's a dedicated VM instruction for #+, for instance.
skade has quit [Client Quit]
<Ox0dea> >> RubyVM::INSTRUCTION_NAMES.grep /plus/
<ruby[bot]> Ox0dea: # => ["opt_plus"] (https://eval.in/547586)
<goglosh> efficiency?
<Ox0dea> The "opt" means "optimized", yeah.
<goglosh> there's access to the VM as well?
<Ox0dea> You can get hold of pretty much any aspect of the system, but the VM is finicky.
ceej has quit [Ping timeout: 244 seconds]
gatman has joined #ruby
<Ox0dea> Some insight: https://eval.in/547587
rkazak has quit [Ping timeout: 244 seconds]
ldnunes has quit [Quit: Leaving]
lkba has joined #ruby
baweaver has quit [Remote host closed the connection]
<goglosh> I understand 1% of that
<goglosh> :putobject
<goglosh> it's a stack-based VM then?
<Ox0dea> You got it.
pawnbox has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
Beast has joined #ruby
duckpuppy has quit [Ping timeout: 244 seconds]
ceej has joined #ruby
<goglosh> this is fun
<Ox0dea> Welcome to Ruby. :)
<goglosh> :) thx
sandstrom has joined #ruby
karmatr0n has quit [Ping timeout: 246 seconds]
gregf has joined #ruby
<Steve_Jobs> I have need to maintain and deploy to an old 10.10 ubuntu server with ruby 1.9.2
pawnbox has quit [Ping timeout: 250 seconds]
h99h9h88 has joined #ruby
edwinvdgraaf has joined #ruby
icarus has quit [Quit: leaving]
magikid has joined #ruby
<Steve_Jobs> any issues with trying to work with these old versions
<shevy> you have my comforts
<Steve_Jobs> :(
swills has joined #ruby
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n008f4g_ has quit [Ping timeout: 240 seconds]
<Steve_Jobs> as long as I can develop against a 14.04 image with ruby 1.9.2 and use capistrano
Begi has left #ruby [#ruby]
smathy_ has joined #ruby
smathy has quit [Disconnected by services]
karmatr0n has joined #ruby
smathy_ is now known as smathy
scottymeuk has left #ruby ["Textual IRC Client: www.textualapp.com"]
YP-QMUL-W has quit [Ping timeout: 244 seconds]
moei has quit [Quit: Leaving...]
jmignault has quit [Ping timeout: 244 seconds]
aupadhye has quit [Ping timeout: 276 seconds]
<shevy> as long as ruby itself is functional
<goglosh> can't you upgrade?
<Steve_Jobs> no :/
<goglosh> also what makes an ubuntu version different from another?
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> if you have access to $HOME or /tmp and have a compiler
<havenwood> Steve_Jobs: Brightbox maintains Ruby package for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<goglosh> what good is an operating system if it can get deprecated?
stantona has quit [Ping timeout: 250 seconds]
PlasmaStar has quit [Ping timeout: 264 seconds]
karioleez has quit [Remote host closed the connection]
<havenwood> Steve_Jobs: 1.9 and 2.0 are past end-of-life so you'll need to provide security patches yourself or get them from a non-official source.
<Steve_Jobs> there's a legacy install that everyone is afraid to touch
<Steve_Jobs> v2 an v3 will be modern stuff and upgraded regularly
diegoaguilar has quit [Ping timeout: 260 seconds]
mostlybadfly has joined #ruby
PlasmaStar has joined #ruby
<Steve_Jobs> but v1 needs to be around for a few months and some functionality added
Trynemjoel has quit [Ping timeout: 244 seconds]
<Steve_Jobs> the consesus is that upgrading would be more effort
<workmad3> "Needs to be around for a few months" - code for 'this crap ain't never going away'
<shevy> :)
<Steve_Jobs> workmad3: I would ordinarily agree
Trynemjoel has joined #ruby
Didac has joined #ruby
<workmad3> Steve_Jobs: just ignore me btw, I get cynical after 10pm :)
<Steve_Jobs> I'm always cynical :)
<workmad3> Steve_Jobs: well yeah... I'm cynical before 10pm too ;)
DoubleMalt has quit [Remote host closed the connection]
<Steve_Jobs> anyway.. this little adventure will be "fun"
<goglosh> just
<goglosh> stay away from hammers and the like mkay?
<Steve_Jobs> so the web app will be on one docker image and the db on another
yfeldblum has joined #ruby
<Steve_Jobs> just for dev on ruby 1.9.2
<Steve_Jobs> then capistrano is there for deployment
bob434 has quit [Quit: Leaving]
ensyde_ has quit [Ping timeout: 268 seconds]
gatman has quit []
htmldrum has quit [Ping timeout: 246 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
karioleez has joined #ruby
<Steve_Jobs> an old version of that :/
diegoaguilar has joined #ruby
Coldblackice has joined #ruby
<Steve_Jobs> havenwood: thanks for the link
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crime has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
karioleez has quit [Ping timeout: 248 seconds]
elifoster has quit [Ping timeout: 244 seconds]
karmatr0n has quit [Ping timeout: 244 seconds]
<Steve_Jobs> if I have a docker image with 1.9.3 on it, how easy is it to downgrade it to 1.9.2 in the dockerfile?
Trynemjoel has joined #ruby
parduse has quit []
pawnbox has quit [Ping timeout: 264 seconds]
sudoubuntu has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.4]
parduse has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
fumihiro has joined #ruby
jero_ has quit [Ping timeout: 252 seconds]
parduse has quit [Client Quit]
blackmesa has quit [Ping timeout: 276 seconds]
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
karioleez has joined #ruby
uod has quit [Quit: Textual IRC Client: www.textualapp.com]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
htmldrum has joined #ruby
karmatr0n has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
Musashi007 has joined #ruby
neanderslob___ has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
zenspider has quit [Quit: bye]
karioleez has quit [Ping timeout: 240 seconds]
neanderslob___ is now known as neanderslob
neanderslob_ has quit [Ping timeout: 248 seconds]
ChiefAlexander has quit [Quit: Leaving...]
baweaver has joined #ruby
ujjain has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
PlasmaStar has quit [Ping timeout: 250 seconds]
ramfjord has joined #ruby
stantona has joined #ruby
ujjain has joined #ruby
ujjain has quit [Changing host]
ujjain has joined #ruby
xaxisx has quit [Ping timeout: 244 seconds]
blackmesa has joined #ruby
rmulligan has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
dhollinger has quit [Quit: WeeChat 1.4]
Noldorin has left #ruby ["Textual IRC Client: www.textualapp.com"]
rmulligan has joined #ruby
PlasmaStar has joined #ruby
duckpuppy has joined #ruby
safe has joined #ruby
ta_ has quit [Remote host closed the connection]
stannard has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
andywojo has quit [Ping timeout: 264 seconds]
Balzrael has quit [Quit: Leaving]
gregf has quit [Quit: WeeChat 1.4]
fostertheweb has joined #ruby
duckpuppy has quit [Ping timeout: 268 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
millerti has joined #ruby
karioleez has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
<havenwood> Steve_Jobs: What breaks in 1.9.3 that works in 1.9.2?
Beast has quit [Quit: Leaving]
zenspider has joined #ruby
millerti has quit [Read error: Connection reset by peer]
ocbtec has quit [Quit: leaving]
karioleez has quit [Ping timeout: 260 seconds]
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> havenwood: a lot
stannard has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 276 seconds]
<baweaver> It was a breaking change iirc
<baweaver> though why in the world someone's using either is another very relevant question
<baweaver> considering they're both long deprecated
jenrzzz has quit [Ping timeout: 252 seconds]
<Ox0dea> s/prec|te//g
<baweaver> took me half a second
rake_db_migrate has quit [Remote host closed the connection]
<Ox0dea> I'm glad you're not my computer.
jenrzzz has joined #ruby
<shevy> lol
karmatr0n has joined #ruby
agit0 has joined #ruby
whippythellama has quit [Quit: WeeChat 1.4]
greg has joined #ruby
rmulliga` has joined #ruby
abyx has quit [Quit: This computer has gone to sleep]
moeabdol1 has joined #ruby
rbennacer has quit [Ping timeout: 268 seconds]
abyx has joined #ruby
dmolina has joined #ruby
dmolina has quit [Client Quit]
rmulliga` has quit [Remote host closed the connection]
pawnbox has joined #ruby
baweaver has quit [Remote host closed the connection]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
klagid has joined #ruby
rmulliga` has joined #ruby
solocshaw has joined #ruby
karioleez has joined #ruby
zenlot has joined #ruby
moeabdol1 has quit [Ping timeout: 252 seconds]
darkf has joined #ruby
zenlot6 has quit [Ping timeout: 244 seconds]
rmulliga` has quit [Remote host closed the connection]
pawnbox has quit [Ping timeout: 244 seconds]
tlaxkit has joined #ruby
biberu has quit []
stardiviner has joined #ruby
karioleez has quit [Ping timeout: 244 seconds]
PedramT has joined #ruby
Tricon has quit [Quit: Linkinus - http://linkinus.com]
fmcgeough has joined #ruby
aegis3121 has quit [Ping timeout: 240 seconds]
wolffles has quit [Quit: wolffles]
shmuli has quit [Ping timeout: 248 seconds]
Ropeney has joined #ruby
PedramT has quit [Ping timeout: 260 seconds]
Inside has joined #ruby
baweaver has joined #ruby
<Steve_Jobs> baweaver: thanks. yes we knew that
nando293921 has joined #ruby
<baweaver> put simply the jump from 1.9.2 to 1.9.3 was more major than 1.9.3 to 2.0.0
<baweaver> though even 2.0.0 is reaching end of life soon if it hasn't already.
SenpaiSilver has joined #ruby
<baweaver> "maintenance of Ruby 2.0.0 will be ended at Feb. 24th, 2016" - yep
<baweaver> anyways, short story is someone needs to be kicked for not getting those upgraded because that's a critical security risk
<Steve_Jobs> I was saying that from the get go
<havenwood> baweaver: I mean in Steve_Jobs' app! :P
<baweaver> ah
<Steve_Jobs> havenwood: too much code to determine
<havenwood> a.k.a., which tests fail.
<Steve_Jobs> lol
<havenwood> ;P
<baweaver> there's a relevant stacktrace somewhere in there.
<baweaver> otherwise how would you know it's broken?
<Steve_Jobs> you think this has proper test coverage? what do you think this is, Disney Land? :)
<baweaver> Ask bricker, they don't have proper coverage there either
cjbischof_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> anyways, there's a stack trace that you saw. Put that in a gist.
Guest38 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karioleez has joined #ruby
Musashi007 has joined #ruby
fostertheweb has quit [Quit: Textual IRC Client: www.textualapp.com]
<baweaver> without code or something to work with, we can't help you.
spider-mario has quit [Read error: Connection reset by peer]
<baweaver> work on isolating at least one case where it's broken and let's go from there.
mistermo_ has joined #ruby
shmuli_ has joined #ruby
mistermo_ has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
Snowy has joined #ruby
karioleez has quit [Ping timeout: 252 seconds]
shmuli_ has quit [Remote host closed the connection]
Inside has quit [Disconnected by services]
Inside_ has joined #ruby
freerobby has quit [Quit: Leaving.]
mistermocha has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
dvinciguerra_ has quit [Ping timeout: 240 seconds]
freerobby has quit [Client Quit]
dc4 has joined #ruby
whathappens has joined #ruby
Musashi007 has quit [Quit: Musashi007]
fmcgeough has quit [Quit: fmcgeough]
jameslwren has joined #ruby
Xiti has joined #ruby
shmuli has joined #ruby
babblebre has joined #ruby
stannard has joined #ruby
Trynemjoel has quit [Ping timeout: 264 seconds]
agent_white has joined #ruby
Trynemjoel has joined #ruby
dopie_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 248 seconds]
karioleez has joined #ruby
jameslwren has quit [Quit: Page closed]
stannard has quit [Ping timeout: 268 seconds]
polysics has quit [Remote host closed the connection]
SCHAAP137 has quit [Quit: Leaving]
Musashi007 has joined #ruby
dstarh has joined #ruby
skweek has joined #ruby
GodFather has quit [Read error: No route to host]
andywojo has joined #ruby
Suntzu has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
karioleez has quit [Ping timeout: 240 seconds]
Snowy has quit [Remote host closed the connection]
DLSteve has joined #ruby
dgncn has quit [Excess Flood]
bry4n has quit [Read error: Connection reset by peer]
shmuli has quit [Remote host closed the connection]
doug_ has joined #ruby
dasher^0_o has joined #ruby
Inside_ has quit [Ping timeout: 244 seconds]
GodFather has quit [Quit: Leaving]
GodFather has joined #ruby
<Steve_Jobs> baweaver: well, i'm going to try to see if brightbox can instal 1.9.2-p180
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dasher00 has quit [Ping timeout: 276 seconds]
dgncn has joined #ruby
dc4 has quit [Ping timeout: 268 seconds]
barajasfab has joined #ruby
znz_jp has joined #ruby
noService has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
spintronic has joined #ruby
Musashi007 has quit [Quit: Musashi007]
karioleez has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
solocshaw has quit [Quit: solocshaw]
noService has quit [Ping timeout: 246 seconds]
fmcgeough has joined #ruby
fmcgeough has quit [Client Quit]
tmtwd has joined #ruby
smathy is now known as smathy_afk
klagid has quit [Ping timeout: 252 seconds]
doug_ has quit [Remote host closed the connection]
karioleez has quit [Ping timeout: 246 seconds]
cdg has quit [Ping timeout: 260 seconds]
moei has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
agent_white has quit [Quit: back later.]
cjbischof_ has joined #ruby
cjbischof_ has quit [Remote host closed the connection]
abyx has quit [Quit: This computer has gone to sleep]
ur5us has quit [Remote host closed the connection]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Suntzu has joined #ruby
dc4 has joined #ruby
<shevy> he is too ashamed to reveal the stack trace
shmuli has joined #ruby
PedramT has joined #ruby
dvinciguerra_ has joined #ruby
Azure has quit [Ping timeout: 276 seconds]
d10n-work has quit [Quit: Connection closed for inactivity]
karioleez has joined #ruby
<baweaver> can't help what we can't see
Zai00 has quit [Quit: Zai00]
Azure has joined #ruby
Steve_Jobs is now known as adymitruk
PedramT has quit [Ping timeout: 252 seconds]
spintronic has quit [Remote host closed the connection]
hahuang65 has joined #ruby
karioleez has quit [Ping timeout: 244 seconds]
htmldrum has quit [Ping timeout: 250 seconds]
stantona has quit [Ping timeout: 260 seconds]
mistermo_ has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby