havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.3; 2.2.6; 2.1.10: https://www.ruby-lang.org || Paste >3 lines of text on https://gist.github.com || Rails questions? Ask on #RubyOnRails || logs @ https://irclog.whitequark.org/ruby/
binaryplease has quit [Ping timeout: 258 seconds]
Derperperd has joined #ruby
blackbombay has joined #ruby
bayed has quit [Quit: Connection closed for inactivity]
tvw has quit [Read error: Connection reset by peer]
Azure has quit [Remote host closed the connection]
mugurel has joined #ruby
mugurel has left #ruby [#ruby]
montanonic has quit [Ping timeout: 244 seconds]
tvw has joined #ruby
Azure has joined #ruby
blackbombay has quit [Ping timeout: 240 seconds]
tvw has quit [Client Quit]
igniting has joined #ruby
hfp has left #ruby [#ruby]
binaryplease1 has quit [Ping timeout: 244 seconds]
eljimmy has quit [Remote host closed the connection]
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tenderlove has quit [Ping timeout: 265 seconds]
eljimmy has joined #ruby
tmtwd has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
_sfiguser has joined #ruby
ta_ has joined #ruby
Derperperd has quit [Quit: Derperperd]
Derperperd has joined #ruby
Derperperd has quit [Client Quit]
Derperperd has joined #ruby
govg has quit [Ping timeout: 250 seconds]
matp has quit [Remote host closed the connection]
nankyokusei has joined #ruby
matp has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cibs has quit [Ping timeout: 268 seconds]
TeddySmoker has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
cibs has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tmtwd has quit [Ping timeout: 248 seconds]
tlaxkit has quit [Quit: ¡Adiós!]
jaguarmagenta has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 250 seconds]
millerti has joined #ruby
nettoweb has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
CrashOverride has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
iNs has quit [Ping timeout: 256 seconds]
mati_urunda has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
tenderlove has joined #ruby
roflmyeggo has joined #ruby
smtudor has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.6]
roflmyeggo has quit [Ping timeout: 260 seconds]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has quit [Quit: WeeChat 1.5]
montanonic has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CrashOverride has quit [Ping timeout: 260 seconds]
millerti has joined #ruby
arescorpio has joined #ruby
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Remote host closed the connection]
ICantCook has joined #ruby
PresidentBiscuit has joined #ruby
bmurt has joined #ruby
enterprisey has quit [Quit: Leaving]
Channel6 has joined #ruby
tdy2 has joined #ruby
raul782 has joined #ruby
justinweiss has quit [Quit: Connection closed for inactivity]
tdy1 has quit [Ping timeout: 248 seconds]
matp has quit [Remote host closed the connection]
matp has joined #ruby
dviola has quit [Quit: WeeChat 1.6]
raul782 has quit [Ping timeout: 260 seconds]
marr has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
al2o3-cr has joined #ruby
ur5us_ has quit [Remote host closed the connection]
_sfiguser has quit [Ping timeout: 256 seconds]
charliesome has joined #ruby
mBailey_j has joined #ruby
harfangk has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
kspencer is now known as IotaSpencer
Ropeney has joined #ruby
Keep0wer has joined #ruby
preyalone has joined #ruby
tdy3 has joined #ruby
tdy2 has quit [Ping timeout: 258 seconds]
_sfiguser has joined #ruby
frozengeek____ has quit [Quit: frozengeek____]
Ademan has joined #ruby
riotjones has quit [Ping timeout: 268 seconds]
mBailey_j has left #ruby ["WeeChat 1.6"]
paramourne has joined #ruby
ta_ has joined #ruby
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
paramourne has quit [Changing host]
paramourne has joined #ruby
jcao219 has quit [Ping timeout: 260 seconds]
paramourne has quit [Quit: WeeChat 1.6]
hahuang65 has joined #ruby
JoshS has joined #ruby
enterprisey has joined #ruby
jaguarmagenta has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
paramourne has joined #ruby
tdy3 has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
A5101 has quit [Ping timeout: 240 seconds]
blackbombay has joined #ruby
jackjackdripper has joined #ruby
enterprisey has quit [Ping timeout: 256 seconds]
tdy3 has joined #ruby
benlieb has quit [Quit: benlieb]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper1 has joined #ruby
cdg has joined #ruby
r3vDev has joined #ruby
jaguarmagenta has joined #ruby
centrx has joined #ruby
jaguarmagenta has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
smtudor has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
blackbom1 has joined #ruby
d^sh_ has quit [Ping timeout: 260 seconds]
benlieb has joined #ruby
gandalf has joined #ruby
GodFather has quit [Ping timeout: 246 seconds]
d^sh has joined #ruby
blackbombay has quit [Ping timeout: 256 seconds]
jcao219 has joined #ruby
cdg has quit [Remote host closed the connection]
gandalf has quit []
ur5us has joined #ruby
blackbombay has joined #ruby
r3vDev has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
tdy4 has joined #ruby
blackbom1 has quit [Ping timeout: 260 seconds]
Madplatypus has joined #ruby
tdy3 has quit [Ping timeout: 245 seconds]
jackjackdripper has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 268 seconds]
roflmyeggo has joined #ruby
jackjackdripper1 has joined #ruby
blackbom1 has joined #ruby
zenspider has joined #ruby
riotjones has joined #ruby
jackjackdripper has quit [Ping timeout: 260 seconds]
blackbombay has quit [Ping timeout: 256 seconds]
houhoulis has joined #ruby
tdy has joined #ruby
greenbird has quit [Quit: Leaving]
riotjones has quit [Ping timeout: 248 seconds]
tdy4 has quit [Ping timeout: 258 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> is there a way to check the progress of IO.copy_stream?
<lupine> wrap one of the IO objects with a proxy that logs number of bytes passed
<lupine> job done
<al2o3-cr> lupine: how'd you mean?
howdoi has joined #ruby
Rodya__ has joined #ruby
<lupine> something like class CountingIOWrites ; def initialize(real) ; @real = real ; @written = 0; end ; def write(bytes) ; @real.write(bytes) ; @written += bytes.size ; end ; end
<lupine> except thread-safe and interface-conformant and the rest of it
Rodya_ has quit [Ping timeout: 258 seconds]
PresidentBiscuit is now known as ResidentBiscuit
hahuang65 has joined #ruby
<lupine> actually, that might not work
<lupine> copy_stream looks a bit magic
<al2o3-cr> hmm, this is tricky
sarbs has joined #ruby
<lupine> introducing a pipe would work
<lupine> but yuck
iMadper|AFK has quit [Remote host closed the connection]
<lupine> what's the destination you're writing to?
<lupine> if it's something you can stat() that might be easier
<al2o3-cr> basically i'm writing a crude implementation of dd
<al2o3-cr> lupine: destination is a block device
<al2o3-cr> so like IO.copy_stream('foo.iso', '/dev/sdX')
x0f has joined #ruby
<lupine> ok, I'd stop using copy_stream at this point
<al2o3-cr> why?
<lupine> because it just doesn't support what you want
hahuang65 has quit [Ping timeout: 245 seconds]
<lupine> you could add a pipe to the read or write end to get the statistics you're after, but then you need to manage the shuttling of data into that
<al2o3-cr> yes it does
<lupine> and at that point you might as well write to the block device as to the input to copy_stream
x0f_ has quit [Ping timeout: 258 seconds]
<lupine> do you want statistics on number of bytes transferred?
<al2o3-cr> yes, if possible
<lupine> it's only possible in a situation where the call to copy_stream is redundant
droids___ has quit [Ping timeout: 256 seconds]
c355e3b has quit [Quit: Connection closed for inactivity]
iooner has quit [Ping timeout: 260 seconds]
<al2o3-cr> would i need to sync atfer the copy?
<lupine> depends on a whole lot of stuff
alexandernst has quit [Ping timeout: 260 seconds]
alexandernst has joined #ruby
<al2o3-cr> like what?
Rodya__ has quit [Remote host closed the connection]
Jameser has joined #ruby
<lupine> filesystem, OS, the time of day, user-configurable flush delay settings, the hardware, level of charge of any BBU, etc
Rodya_ has joined #ruby
moei has quit [Read error: Connection reset by peer]
<lupine> you should call flush() before close(), the mess of different sync calls is insane
hahuang65 has joined #ruby
<lupine> (ISTR ruby flushes for you by default)
moei has joined #ruby
<al2o3-cr> i mean sync(2)
careta has joined #ruby
roflmyeggo has quit [Ping timeout: 244 seconds]
iooner has joined #ruby
optiz0r has quit [Ping timeout: 265 seconds]
domgetter has quit [Ping timeout: 252 seconds]
roflmyeggo has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
Jameser has quit [Read error: Connection reset by peer]
hahuang65 has quit [Ping timeout: 244 seconds]
ResidentBiscuit has quit [Remote host closed the connection]
<al2o3-cr> maybe i'll just output 'please be patient' :P
libastral has quit [Ping timeout: 240 seconds]
<al2o3-cr> lupine: thanks for you advise though
robb_ has joined #ruby
libastral has joined #ruby
robb_ has quit [Remote host closed the connection]
robb_ has joined #ruby
houhoulis has quit [Remote host closed the connection]
ta_ has joined #ruby
hahuang65 has joined #ruby
ResidentBiscuit has joined #ruby
xall has joined #ruby
raul782 has joined #ruby
tjbiddle has joined #ruby
tpendragon has joined #ruby
roflmyeggo has quit [Ping timeout: 265 seconds]
roflmyeggo has joined #ruby
<al2o3-cr> i'll come back to this when i'm not too tired
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
roflmyeggo has quit [Client Quit]
raul782 has quit [Ping timeout: 240 seconds]
xall has quit [Ping timeout: 244 seconds]
r3vDev has joined #ruby
raul782 has joined #ruby
optiz0r has joined #ruby
Rodya_ has joined #ruby
ta_ has quit [Ping timeout: 248 seconds]
coreyja[m] is now known as coreyja
coreyja is now known as coreyja[m]
vikaton has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
sdothum has joined #ruby
riotjones has joined #ruby
tdy has quit [Ping timeout: 246 seconds]
ResidentBiscuit has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 240 seconds]
<ezio> okay seriously ... how do you file a ruby bug/feature request
<ezio> it's kind of ridiculous that you guys are closed to community contributions
<adam12> There's a bug tracker
<ezio> yeah but it's closed to the public
<ezio> either that or their sign up system is screwy
<adam12> It is? Pretty sure all you need to do is sign up.
<ezio> try it
<adam12> Hmm that's possible
<ezio> try with a new signup as a new email address
<ezio> i emailed the site admin listed in the DNS three weeks ago
<ezio> i would've written the damn code by now but i'm not going to do it without approval
antoniobeyah has joined #ruby
<ezio> it could be a waste of my time
<adam12> ezio: Worked fine for me.
riotjones has quit [Ping timeout: 252 seconds]
<ezio> new sign up?
<adam12> bugs.ruby-lang.org right?
<adam12> yes.
<ezio> you could login after
<ezio> yeah
<adam12> Yes.
<ezio> i've created two accounts
ResidentBiscuit has quit [Ping timeout: 260 seconds]
<ezio> maybe ... maybe it doesn't like my password for some reason
<adam12> Maybe? I skipped the password generator for this one. Probably shouldn't have.
<adam12> So I used something with only a few letters/numbers.
A5101 has joined #ruby
whathappens has joined #ruby
enterprisey has joined #ruby
tdy has joined #ruby
<ezio> i'm going to try Abc123
<ezio> nope
<ezio> okay I'm in. I was getting an authenticty token issue
Rodya_ has joined #ruby
montanonic has quit [Ping timeout: 258 seconds]
jcao219 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
ICantCook has quit [Quit: bye]
cibs has quit [Ping timeout: 268 seconds]
pragmaticus has joined #ruby
cibs has joined #ruby
Rodya_ has quit [Ping timeout: 260 seconds]
arescorpio has quit [Quit: Leaving.]
montanonic has joined #ruby
tjbiddle has joined #ruby
igniting has quit [Ping timeout: 256 seconds]
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Read error: No route to host]
LoneHerm_ has joined #ruby
LoneHerm_ has quit [Ping timeout: 245 seconds]
gix has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
robb_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 258 seconds]
gix has joined #ruby
bmurt has joined #ruby
nankyokusei has joined #ruby
LoneHerm_ has joined #ruby
Rodya_ has joined #ruby
A5101 has quit [Quit: WeeChat 1.4]
solocshaw has joined #ruby
jeffaustin81 has joined #ruby
Cohedrin has joined #ruby
hahuang65 has joined #ruby
govg has joined #ruby
r3vDev has quit [Ping timeout: 246 seconds]
astrobunny has joined #ruby
nankyokusei has quit [Ping timeout: 256 seconds]
Rodya_ has quit [Read error: No route to host]
Rodya_ has joined #ruby
nofxxx has joined #ruby
riotjones has joined #ruby
whathappens has quit [Remote host closed the connection]
r3vDev has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
whathappens has joined #ruby
ResidentBiscuit has joined #ruby
dionysus69 has joined #ruby
XV8 has joined #ruby
nofxx has quit [Ping timeout: 268 seconds]
Rodya_ has quit [Ping timeout: 260 seconds]
riotjones has quit [Ping timeout: 248 seconds]
whathappens has quit [Ping timeout: 240 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
ta_ has quit [Ping timeout: 256 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Quit: Leaving.]
preyalone has quit [Quit: Connection closed for inactivity]
tjbiddle has joined #ruby
Derperperd has quit [Quit: Derperperd]
Derperperd has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
jgnagy has quit [Read error: No route to host]
jgnagy has joined #ruby
jcomito has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
<jcomito> hello! beginner here, go easy. have a nested loop problem and I can't seem to figure out why I am getting duplicate lines.
Rodya_ has joined #ruby
astrobunny has quit [Remote host closed the connection]
<ruby[bot]> jcomito: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/a8663e64d522a7af12e59e279e864100
<jcomito> oh thx robot!
hahuang65 has quit [Ping timeout: 248 seconds]
<ruby[bot]> jcomito: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
astrobunny has joined #ruby
jgnagy_ has joined #ruby
hahuang65 has joined #ruby
jgnagy has quit [Read error: Connection reset by peer]
Rodya_ has quit [Ping timeout: 258 seconds]
centrx has quit []
astrobunny has quit [Ping timeout: 260 seconds]
iMadper has joined #ruby
jgnagy has joined #ruby
jgnagy_ has quit [Read error: Connection reset by peer]
benlieb has quit [Quit: benlieb]
JoshS has quit [Ping timeout: 260 seconds]
Joufflu has quit [Quit: Leaving]
al2o3-cr has quit [Quit: WeeChat 1.6]
<Ropeney> jcomito, would make easier if you put a "actual output" and "expected output" at bottom
jgnagy_ has joined #ruby
jgnagy has quit [Ping timeout: 260 seconds]
SteenJobs has joined #ruby
SteenJobs has quit [Client Quit]
solocshaw has quit [Ping timeout: 256 seconds]
al2o3-cr has joined #ruby
enterprisey has quit [Quit: Leaving]
jcao219 has quit [Ping timeout: 268 seconds]
ICantCook has joined #ruby
dnicole has joined #ruby
eggshke has joined #ruby
<antoniobeyah> jcomito: i agree with Ropeney, but looking briefly at the code you never clear output but continue looping
<Ropeney> antoniobeyah, that and is the puts at the end of the wrong loop.
<antoniobeyah> hard to know, seems like a homework exercise or something
jeffaustin81 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jcomito> hey sorry, yes it was an assignment but for the assignment I had to use perl
<antoniobeyah> jcomito: in ruby, while is usually not necessary. neither are loops. if you can provide the expected vs actual more assistance can be provided
pawnbox has joined #ruby
<jcomito> when the B is appended to the output it is printing the line twice
<jcomito> I will add it to the gist
william3 has joined #ruby
jgnagy_ has quit [Ping timeout: 240 seconds]
igniting has joined #ruby
riotjones has joined #ruby
william3 has quit [Ping timeout: 250 seconds]
hahuang65 has quit [Ping timeout: 260 seconds]
ta_ has joined #ruby
Channel6 has quit [Quit: Leaving]
riotjones has quit [Ping timeout: 252 seconds]
jgnagy has joined #ruby
tau has quit [Remote host closed the connection]
jgnagy has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
adavia has joined #ruby
<antoniobeyah> jcomito: are you working with an input of 5 or 6?
<Skarlso> 6
<antoniobeyah> ok, so the expected output should be a little different, right?
<Skarlso> yeah it's quiet odd
JammyHammy has joined #ruby
<jcomito> ??\
<antoniobeyah> your expected output only has 5 lines
<Skarlso> your actual output seems to suggest that you are using input 6
<Skarlso> yeah, what he said. :)
<jcomito> it gets passed in from arguments, but happens no matter the input..
<jcomito> we can work with 5
<antoniobeyah> ok, i might see the problem. going on my assumption that your expected output is wrong
<jcomito> each time 3 A's are printed we want the next to be a B, and then back to A's..
<jcomito> I get that duplicate each time we print the B.. that didnt happen in my perl version
<jcomito> using almost the exact same logic..
<adavia> "[\"\", \"68\", \"69\"]".gsub!(/[\[\]\"]/, "") gives me -> ", 68, 69" What i am missing?
conta has joined #ruby
<baweaver> What are you doing to that JSON?
<baweaver> >> require 'json'; JSON.parse("[\"\", \"68\", \"69\"]")
<ruby[bot]> baweaver: # => ["", "68", "69"] (https://eval.in/686435)
Rodya_ has joined #ruby
<baweaver> adavia: Don't use regex on JSON
ta_ has quit [Ping timeout: 245 seconds]
astrobunny has joined #ruby
<jcomito> is there some difference in how ruby evalutates the while compared to how perl does it.
conta has quit [Ping timeout: 256 seconds]
<baweaver> Your indentation is messy.
<jcomito> I apologize, it really is
<baweaver> Also you need ends
<jcomito> copying from sublime to vim instead of just uploading the file.. its stupid, and I don't know why I am doing it
jcao219 has joined #ruby
<jcomito> what about the else though?
<jcomito> if elsif else end, isnt that how you do it ?
<baweaver> check the indent, you'll see it.
astrobunny has quit [Ping timeout: 244 seconds]
<baweaver> See comment on gist for cosmetic changes.
<baweaver> Now to look at the logic.
<baweaver> Prefer `lines.times do ... end` to `while i <= lines ... end`
<elomatreb> Pay close attention to your switch
<antoniobeyah> jcomito: you need to do something with ‘output’ when in the if a == 0 && b == 0 block
<baweaver> (Honestly I just threw out the switch in that change, easier to read)
<antoniobeyah> jcomito: looks like you need to add an output << “A”
<baweaver> So what's the exact problem statement?
Rodya_ has quit [Remote host closed the connection]
<antoniobeyah> jcomito: so you aren’t getting a duplicate, you are getting incorrect output right now
rwb has joined #ruby
<Skarlso> antoniobeyah: Nope. That will result in this if chosen 9 lines: AAABAAAAB
<jcomito> baweaver: it was to be done in perl. the instructions read
<jcomito> Use a loop structure and code a program that produces the following output (Take one parameter to let user specify how many lines need to be printed):
<Skarlso> Which means 4 As .:)
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<elomatreb> This is how your source would be formatted following the generally accepted Ruby style guide, just for reference https://gist.github.com/elomatreb/db570c7cfdb49c6e5fd599759839c66f
ur5us has quit [Read error: No route to host]
<Skarlso> jcomito: Your code is actually fine. On one of the loops its just doesn't do anything.
<antoniobeyah> Skarlso: you are right, split the a == 0 && b == 0 into its own if block, the main problem I see right now is that case
<Skarlso> so the puts is run again.
<antoniobeyah> its consuming a line but its not manipulating the output
<Skarlso> If your puts is outside the loop, your string is like this: AAABAAAB
<Skarlso> So it is corect.
<baweaver> &ri Enumerable#cycle
<baweaver> &ri Enumerable#take
<Skarlso> It just runs one cycle which doesn't do anything.
<jcomito> right..
astrobunny has joined #ruby
<jcomito> hmm..
<elomatreb> Unrelated: See that example I posted? I ran their code through rubocop, and it produced those misaligned ends e.g. in line 32? Why would it do thatß
<elomatreb> *?
monban has quit [Quit: leaving]
<Ropeney> the else needs to be indented more
<Ropeney> the end needs to be unindented sorry
<baweaver> 12 lines.
<baweaver> Here are a few things to consider
<Ropeney> both ends 32 and 34 are indented too much
<baweaver> you have a very easy to see pattern: 'AAAB' that cycles
<baweaver> >> 'AAAB'.chars.cycle.first(5)
<ruby[bot]> baweaver: # => ["A", "A", "A", "B", "A"] (https://eval.in/686444)
adavia has quit [Ping timeout: 252 seconds]
saneax-_-|AFK is now known as saneax
<baweaver> Now what happens if you use something like that
<elomatreb> Ropeney: I know, and rubocop even recognizes it as an error, yet it didn't fix it with --auto-correct
<baweaver> Your program starts looking quite a bit simpler.
<Ropeney> ah thought you said it was complaining about it sorry
<Skarlso> baweaver: that's not his task at hand. :)
<baweaver> the task is to output said data.
<Skarlso> No.
<Skarlso> The task is to use a loop control structure.
<baweaver> *sighs*
blackwind_123 has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
<elomatreb> Specifically some special Perl structure it seems though?
<baweaver> &ri Enumerable#cycle
<baweaver> &ri Enumerable#times
<_derpy> No results
pawnbox has quit [Remote host closed the connection]
<jcomito> this isnt getting turned in or anything.. but I am curious why I wrote the same logic and it worked in perl but get that extra iteration in ruby
<baweaver> &ri Fixnum#times
<baweaver> Times is a loop.
<baweaver> Technically so is cycle in terms of producing an Enumerator that's looping in the background
<baweaver> >> [1].cycle
<ruby[bot]> baweaver: # => #<Enumerator: [1]:cycle> (https://eval.in/686447)
<elomatreb> Ruby doesn't have while ... else, so the exercise has little sense in Ruby, no?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<baweaver> that's part of the case statement
<baweaver> without an end
<baweaver> start from here
<antoniobeyah> jcomito: here is a corrected version using the reformatted version https://gist.github.com/antoniobeyah/f759aad406eb82810a887cca850a9df5
<antoniobeyah> see lines 24 and 26
<antoniobeyah> and 21
<antoniobeyah> moved from a huge if-else-else to two ifs
<baweaver> *still thinks you all are making this too complicated*
<antoniobeyah> baweaver: there are certainly simpler ways to accomplish it in ruby, but it may not be easier for jcomito
<baweaver> >> lines = 5;cycle = 'AAAB'.chars.cycles; lines.times.map{ |i| cycle.first(i).join }
<ruby[bot]> baweaver: # => undefined method `cycles' for ["A", "A", "A", "B"]:Array ...check link for more (https://eval.in/686452)
dogweather has joined #ruby
<baweaver> >> lines = 5;cycle = 'AAAB'.chars.cycle; lines.times.map{ |i| cycle.first(i).join }
<ruby[bot]> baweaver: # => ["", "A", "AA", "AAA", "AAAB"] (https://eval.in/686453)
<baweaver> i + 1 then.
<baweaver> Anyways.
<baweaver> There are two hard problems in programming: Naming things, Datetime, and off by one errors
<jcomito> antoniobeyah: yes, nice.
<Skarlso> baweaver: that is all nice and fine, but to somebody, who never seen ruby or just starts programming that will make zero sense what so ever.
<baweaver> Hence linking to the docs.
<jcomito> baweaver: I agree, my way is stupid. I said go easy on me ;-)
Rodya_ has quit [Ping timeout: 260 seconds]
<baweaver> &ri Enumerable#cycle
<baweaver> &ri Enumerable#first
<baweaver> &ri Fixnum#times
<jcomito> I have a ruby assignment to do where I have to implement my own stack class.
<baweaver> you can replace the map with: lines.times { |i| puts i.cycle.first(i).join }
<elomatreb> baweaver: Cache busting tho
<jcomito> so for practice I was trying to port perl stuff
<jcomito> that I've already had to do
<baweaver> Have they said you can't use `include Enumerable`? :D
<jcomito> nope!
<elomatreb> Ruby's biggest strength is it's incredible standard libary. Learning to use Ruby is learning to use the standard library
<baweaver> but essentially just look up how to extend a class with Enumerable
<jcomito> yeah.. but lets take away the standard library and make you write you own stuff that will be included in every lang you put your fingers on.. :-)
<baweaver> then you get some nice methods on it
<baweaver> Ah, push and pop are Array aren't they
nankyokusei has joined #ruby
<baweaver> &ri Array#push
<baweaver> So Enumerable wouldn't _quite_ work there.
<baweaver> though essentially you just need to delegate push and pop to an internal array in the class.
pawnbox has joined #ruby
<baweaver> &ri SimpleDelegator
<baweaver> Though this strays way deep into some unventured territory.
jgnagy has joined #ruby
govg has quit [Ping timeout: 245 seconds]
<elomatreb> baweaver: Now who is making it too complicated? ;)
<antoniobeyah> start with rspec I would say. write the test that asserts your expectation then hack away at the code
<baweaver> Well to be fair....
yardenbar has joined #ruby
<baweaver> >> class A < SimpleDelegator; end; stack = A.new([]); stack.push(1); stack
<ruby[bot]> baweaver: # => [1] (https://eval.in/686466)
<baweaver> that is pretty straightforward if you know what SimpleDelegator is
<baweaver> though definitely more towards the dense and dusty tomes type of knowledge.
<jcomito> I will probably dust off CLRS from intro to algorithms and translate the psuedocode they give for stack.
nankyokusei has quit [Ping timeout: 250 seconds]
<jcomito> try to anyways
<baweaver> Well we all tend to be around
<jcomito> and I will churn out the ugliest, most procedural ruby code you've ever seen
<baweaver> so feel free to ask and we can confuse you more
<jcomito> awesome
* baweaver does not have an off switch
raul782 has quit []
benlieb has joined #ruby
<baweaver> wonder if I can do that with lambdas....
<elomatreb> Finding your off switch or solving jcomito's problem? ;)
<baweaver> Ox0dea isn't around anymore
<baweaver> someone has to do it.
<jcomito> antoniobeyah: thanks much, I still dont get exactly why mine wasn't working, but that is cleaner and works
Hobbyboy has quit [Ping timeout: 260 seconds]
<antoniobeyah> the code cleanup is thanks to Skarlso, but the reason it wasn’t working is because in your if a == 0 && b == 0 you were consuming a line and not changing the output
<antoniobeyah> so the fix was to break the if/else to allow the output code to run
<Skarlso> antoniobeyah++
ResidentBiscuit has joined #ruby
Devalo has joined #ruby
<baweaver> ruby[bot] never really got around to karma.
sdwrage has joined #ruby
<jcomito> antoniobeyah: can you expand on
<jcomito> consuming a line and not changing the output
ur5us has joined #ruby
<baweaver> What happens when the loop reaches that spot?
<antoniobeyah> when you use an if/else, only the code in 1 branch is executed, all others are skipped
Ropeney has quit [Ping timeout: 258 seconds]
<baweaver> ^
<jcomito> well if both a and b are 0 then they reset back to their control value
<jcomito> then we jump out of the loop
<antoniobeyah> yes, but what happens to output?
<jcomito> ahh..
ICantCook has quit [Quit: bye]
<jcomito> yeah that is just my reset check..
<jcomito> it shouldnt all be one big conditional block
<antoniobeyah> so you at least get why the bug was there now right?
<jcomito> yes!
<antoniobeyah> good :)
Devalo has quit [Read error: Connection reset by peer]
<jcomito> thanks
Devalo has joined #ruby
yardenbar has quit [Ping timeout: 248 seconds]
JoshS has joined #ruby
<Skarlso> baweaver++ as well, for showing the ruby way. :)
ResidentBiscuit has quit [Ping timeout: 258 seconds]
Jameser has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pragmaticus has quit [Ping timeout: 248 seconds]
dogweather has quit [Remote host closed the connection]
benlieb has quit [Quit: benlieb]
montanonic has quit [Quit: My laptop is sleeping.]
montanonic has joined #ruby
ResidentBiscuit has joined #ruby
_sfiguser has quit [Quit: Leaving]
modin has quit [Ping timeout: 246 seconds]
last_staff has joined #ruby
valkyr2e has joined #ruby
ta_ has joined #ruby
modin has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
finisherr has quit [Quit: finisherr]
Hobbyboy has joined #ruby
Devalo has quit [Remote host closed the connection]
Macaveli has joined #ruby
byte512 has joined #ruby
Devalo has joined #ruby
Devalo has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 260 seconds]
govg has joined #ruby
function has joined #ruby
ResidentBiscuit has joined #ruby
Lorn3r has joined #ruby
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 260 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
MeMoc has joined #ruby
bweston92 has quit [Quit: Connection closed for inactivity]
naprimer_2 has joined #ruby
govg has quit [Ping timeout: 246 seconds]
ResidentBiscuit has joined #ruby
alexherbo2 has joined #ruby
Lorn3r has quit [Quit: Leaving]
naprimer_3 has quit [Ping timeout: 256 seconds]
<jxf> How do I call `send` to pass keyword arguments to a method?
<jxf> For example, if a method's signature is foo(a, b, *params, c:, d:), how do I invoke `foo(1, 2, 3, 4, 5, c: 6, d: 7)` via `send`?
ResidentBiscuit has quit [Ping timeout: 258 seconds]
<herwin> send(:foo, 1, 2, 3, 4, 5, { c: 6, d: 7 })
haxrbyte has joined #ruby
haxrbyte has quit [Client Quit]
frozengeek____ has joined #ruby
agit0 has quit [Quit: zzzZZZ….]
hahuang65 has joined #ruby
function has quit [Quit: /dev/null is full]
ResidentBiscuit has joined #ruby
Jameser has quit [Ping timeout: 260 seconds]
hahuang65 has quit [Ping timeout: 250 seconds]
blaxter has joined #ruby
riotjones has joined #ruby
ferr1 has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
symm- has quit [Ping timeout: 260 seconds]
frozengeek____ has quit [Quit: frozengeek____]
moei has left #ruby ["Leaving..."]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
william3 has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
agit0 has joined #ruby
ResidentBiscuit has joined #ruby
nowhereman has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
william3 has quit [Ping timeout: 250 seconds]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
firstdayonthejob has joined #ruby
pagios has quit [Ping timeout: 256 seconds]
vondruch has quit [Ping timeout: 258 seconds]
benhoi has quit [Ping timeout: 256 seconds]
iMadper has quit [Remote host closed the connection]
pagios has joined #ruby
pagios has quit [Max SendQ exceeded]
j416 has joined #ruby
pagios has joined #ruby
<kke> bunch of hashes inside an array, say [{ a: 1}, { a: 2}, { a: 3}]. how to beautifully move one of them, for example { |_,v| v == 2} to be first in the array?
vikaton has quit [Quit: Connection closed for inactivity]
pagios has quit [Max SendQ exceeded]
<elomatreb> kke: some_array.unshift(some_array.delete_at(index))?
jcao219 has quit [Ping timeout: 260 seconds]
pagios has joined #ruby
yuki_is_bored has quit [Ping timeout: 245 seconds]
pagios has quit [Max SendQ exceeded]
jaguarmagenta has quit [Remote host closed the connection]
pagios has joined #ruby
agit0 has quit [Read error: Connection reset by peer]
<matthewd> partition {}.flatten(1) maybe
<kke> that would be some_array.unshift(some_array.delete_at(some_array.index {|hash| hash[:a] == 2}))
pagios has quit [Max SendQ exceeded]
aufi has joined #ruby
aufi is now known as maufart|sick
ResidentBiscuit has joined #ruby
<kke> maybe i could use sort
aganov has joined #ruby
maufart|sick is now known as aufi
<elomatreb> Maybe just build a new Array?
<matthewd> But more likely, you should try for a less primitive data model; wanting to do a non-trivial rearrangement suggests there's a real class hiding nearby
matp has quit [Remote host closed the connection]
r3vDev has quit [Ping timeout: 240 seconds]
pagios has joined #ruby
matp has joined #ruby
Keep0wer has quit [Max SendQ exceeded]
Keep0wer has joined #ruby
axisys has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
wugy has joined #ruby
wugy has quit [Excess Flood]
SesMan has joined #ruby
Keep0wer has left #ruby ["Leaving"]
gauz has joined #ruby
dogweather has joined #ruby
vondruch has joined #ruby
frozengeek____ has joined #ruby
claudiuinberlin has joined #ruby
nankyokusei has joined #ruby
ResidentBiscuit has joined #ruby
yardenbar has joined #ruby
CloCkWeRX has quit [Ping timeout: 260 seconds]
frozengeek____ has quit [Remote host closed the connection]
frozengeek____ has joined #ruby
nowhereman has joined #ruby
dogweather has quit [Ping timeout: 258 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
ResidentBiscuit has quit [Ping timeout: 258 seconds]
teclator has joined #ruby
binaryplease1 has joined #ruby
eggshke has quit [Remote host closed the connection]
cibs has quit [Ping timeout: 268 seconds]
lenwood has joined #ruby
cibs has joined #ruby
DoubleMalt has joined #ruby
andikr has joined #ruby
DoubleMalt has quit [Client Quit]
ResidentBiscuit has joined #ruby
CloCkWeRX has joined #ruby
binaryplease1 is now known as binaryplease
r3vDev has joined #ruby
frozengeek____ has quit [Quit: frozengeek____]
binaryplease has quit [Quit: binaryplease]
frozengeek____ has joined #ruby
wugy has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
fmcwlt has joined #ruby
charliesome has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
Humdai has joined #ruby
fmcwlt has quit [Remote host closed the connection]
maattdd has joined #ruby
iMadper has joined #ruby
iMadper has left #ruby [#ruby]
ur5us has joined #ruby
tpendragon has quit [Ping timeout: 240 seconds]
iMadper has joined #ruby
upjyij has joined #ruby
<manveru> kke: if it was an array of arrays you could use rassoc...
<manveru> >> a = [[:a,1],[:b,2]]; a.unshift(a.delete(a.rassoc(2)))
<ruby[bot]> manveru: # => [[:b, 2], [:a, 1]] (https://eval.in/686545)
mikecmpbll has joined #ruby
upjyij has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
jaruga___ has joined #ruby
aufi has quit [Ping timeout: 265 seconds]
foooobear has joined #ruby
jsrn_ has joined #ruby
lenwood has quit [Read error: Connection reset by peer]
lenwood has joined #ruby
atmosx has joined #ruby
ResidentBiscuit has quit [Ping timeout: 256 seconds]
claw has quit [Ping timeout: 268 seconds]
blaxter has quit [Quit: foo]
psmmr has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Puffball has quit [Remote host closed the connection]
Macaveli has joined #ruby
biberu has joined #ruby
gauz has left #ruby ["Leaving"]
ResidentBiscuit has joined #ruby
eggshke has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
johnmccabe has joined #ruby
ResidentBiscuit has quit [Ping timeout: 240 seconds]
johnmccabe has quit [Client Quit]
the_drow has joined #ruby
giraffe has quit [Quit: ZNC - http://znc.in]
Cohedrin has joined #ruby
d0nn1e has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Client Quit]
william3 has joined #ruby
d0nn1e has joined #ruby
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Beams has joined #ruby
ResidentBiscuit has joined #ruby
giraffe has joined #ruby
tpendragon has joined #ruby
the_drow has quit [Quit: Leaving]
gingray has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
lxsameer has joined #ruby
Chair has joined #ruby
the_drow has joined #ruby
Fernando-Basso has quit [Remote host closed the connection]
SAVAGE has joined #ruby
psmmr has quit [Ping timeout: 256 seconds]
Fernando-Basso has joined #ruby
tjbiddle_ has joined #ruby
Luna_Moonfang has quit [Quit: rebooting...]
tomphp has joined #ruby
flying has joined #ruby
ResidentBiscuit has joined #ruby
charliesome has joined #ruby
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle_ is now known as tjbiddle
Snowy has joined #ruby
Luna_Moonfang has joined #ruby
Snowy has quit [Remote host closed the connection]
andrzeju has joined #ruby
Snowy has joined #ruby
andrzeju is now known as andrzejku
ResidentBiscuit has quit [Ping timeout: 258 seconds]
LoneHerm_ has quit [Remote host closed the connection]
Snowy has quit [Ping timeout: 248 seconds]
LoneHerm_ has joined #ruby
Cohedrin has joined #ruby
gregf_ has quit [Quit: Page closed]
LoneHerm_ has quit [Ping timeout: 250 seconds]
Prira has joined #ruby
sepp2k has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
johnmccabe has joined #ruby
tvw has joined #ruby
ResidentBiscuit has joined #ruby
MeMoc has quit [Quit: Connection closed for inactivity]
iMadper is now known as iMadper|eat
AlexRussia has quit [Ping timeout: 246 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
xall has joined #ruby
vali has quit [Quit: Leaving]
jaguarmagenta has joined #ruby
zenspider has quit [Quit: bye]
dionysus69 has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
toretore has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
nowhere_man has joined #ruby
nowhereman has quit [Ping timeout: 260 seconds]
Puffball has joined #ruby
william3 has quit [Remote host closed the connection]
ResidentBiscuit has joined #ruby
frankiee_ has joined #ruby
william3 has joined #ruby
_ZerGabriel_ has joined #ruby
MrBusiness2 has quit [Ping timeout: 258 seconds]
psmmr has joined #ruby
shashin has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxxx has quit [Ping timeout: 244 seconds]
_ZerGabriel_ has quit []
matp has quit [Remote host closed the connection]
matp has joined #ruby
gingray has quit [Ping timeout: 260 seconds]
_ZerGabriel_ has joined #ruby
nankyokusei has joined #ruby
psmmr has quit [Remote host closed the connection]
dogweather has joined #ruby
marr has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dogweather has quit [Ping timeout: 258 seconds]
last_staff1 has joined #ruby
ldnunes has joined #ruby
last_staff1 has quit [Client Quit]
rodfersou has joined #ruby
ResidentBiscuit has joined #ruby
astrobunny has quit [Remote host closed the connection]
gingray has joined #ruby
astrobunny has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
last_staff has quit [Ping timeout: 244 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
marr has quit [Ping timeout: 250 seconds]
ResidentBiscuit has quit [Ping timeout: 260 seconds]
astrobunny has quit [Ping timeout: 258 seconds]
ur5us has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 248 seconds]
ur5us has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
montanonic has quit [Ping timeout: 245 seconds]
koooge has quit [Quit: Leaving...]
workmad3 has joined #ruby
iMadper|eat is now known as iMadper
ur5us has quit [Ping timeout: 256 seconds]
psychicist__ has joined #ruby
last_staff has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ResidentBiscuit has joined #ruby
platzhirsch has joined #ruby
aryaching has joined #ruby
ResidentBiscuit has quit [Ping timeout: 258 seconds]
LoneHerm_ has joined #ruby
hahuang65 has joined #ruby
Puffball has quit [Ping timeout: 248 seconds]
last_staff has quit [Ping timeout: 248 seconds]
harai has quit [Ping timeout: 256 seconds]
last_staff has joined #ruby
last_staff has quit [Client Quit]
LoneHerm_ has quit [Ping timeout: 252 seconds]
montanonic has joined #ruby
hahuang65 has quit [Ping timeout: 260 seconds]
Puffball has joined #ruby
nowhere_man has quit [Ping timeout: 250 seconds]
gingray has quit [Ping timeout: 268 seconds]
atmosx has quit [Quit: Textual IRC Client: www.textualapp.com]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Ping timeout: 245 seconds]
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vali has joined #ruby
gingray has joined #ruby
<vali> hi
<vali> I have a question ... I use logstash and want to generate a couple of events/messages from some hash. The issue is that I don't know how to create a new event (http://www.rubydoc.info/gems/logstash-event/1.1.5/LogStash/Event)
<vali> any ideas ?
<vali> this is my actual code ..
ResidentBiscuit has joined #ruby
<vali> .from_json(json) ⇒ Object
<vali> maybe I can use this...
william3 has quit [Remote host closed the connection]
Chair is now known as Couch
r3vDev has quit [Ping timeout: 256 seconds]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
blackbom1 has quit [Ping timeout: 256 seconds]
<vali> not working
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby
TomyLobo has joined #ruby
Puffball has quit [Remote host closed the connection]
AlexRussia has joined #ruby
dogweather has joined #ruby
Macaveli has joined #ruby
william3 has joined #ruby
xall has quit [Ping timeout: 258 seconds]
Puffball has joined #ruby
william3 has quit [Remote host closed the connection]
nowhere_man has joined #ruby
dogweather has quit [Ping timeout: 260 seconds]
AlexRussia has quit [Ping timeout: 260 seconds]
william3 has joined #ruby
Puffball has quit [Remote host closed the connection]
AlexRussia has joined #ruby
Puffball has joined #ruby
conta has joined #ruby
Snowy has joined #ruby
conta has quit [Client Quit]
conta has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
DLSteve has quit [Ping timeout: 264 seconds]
sparch has joined #ruby
sparch has joined #ruby
sparch has quit [Changing host]
Snowy has quit [Client Quit]
Puffball has quit [Remote host closed the connection]
shinnya has joined #ruby
Puffball has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
shashin has joined #ruby
blackbom1 has joined #ruby
LoneHerm_ has joined #ruby
Snowy has joined #ruby
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
LoneHerm_ has quit [Ping timeout: 260 seconds]
claudiuinberlin has quit [Ping timeout: 256 seconds]
claudiuinberlin has joined #ruby
A124 has joined #ruby
jaguarmagenta has joined #ruby
gregf_ has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
frmendes has joined #ruby
claudiuinberlin has joined #ruby
jaguarmagenta has quit [Ping timeout: 248 seconds]
claudiuinberlin has quit [Ping timeout: 240 seconds]
ResidentBiscuit has joined #ruby
domgetter has joined #ruby
ResidentBiscuit has quit [Ping timeout: 245 seconds]
GodFather has joined #ruby
lenwood has quit [Ping timeout: 256 seconds]
nankyokusei has joined #ruby
claw has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
aufi has joined #ruby
william3 has quit [Remote host closed the connection]
xall has joined #ruby
_ZerGabriel_ has quit []
frmendes has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 260 seconds]
theonefoo has joined #ruby
<vali> hi guys
<vali> anyone around
<vali> ?
blackbom1 has quit [Ping timeout: 268 seconds]
xall has quit [Ping timeout: 260 seconds]
<theonefoo> ruby ecosystem noob here, I am running my ruby versions via a Homebrew installed rbenv. Recently updated to version 1.1.0, where I previously had 1.0.0. Now running `gem install —list` gives me /usr/local/Cellar/rbenv/1.0.0/libexec/rbenv: no such file or directory found. Other CLIs which rely on ruby give the same error. 1.0.0 dir does not exist but 1.1.0 does. I thought to roll back to 1.0.0 via homebrew (still trying to figure how to do this) but is
<theonefoo> there are simpler way to fix this problem?
<eggshke> vali Big brother is watching on you !
<vali> :)
<vali> eggshke thats good to know
Sammichmaker has quit [Read error: Connection reset by peer]
blackbom1 has joined #ruby
theonefoo has quit [Quit: theonefoo]
blackbom1 has quit [Ping timeout: 256 seconds]
krsh has joined #ruby
Puffball has quit [Remote host closed the connection]
frmendes has joined #ruby
Puffball has joined #ruby
LoneHermit has joined #ruby
johnmilton has joined #ruby
Puffball has quit [Remote host closed the connection]
_sfiguser has joined #ruby
LoneHermit has quit [Ping timeout: 256 seconds]
theonefoo has joined #ruby
william3 has joined #ruby
Puffball has joined #ruby
xall has joined #ruby
AckZ has quit []
Snowy has quit [Quit: ragequit]
hightower3 has joined #ruby
hightower2 has quit [Ping timeout: 260 seconds]
pragmaticus has joined #ruby
lenwood has joined #ruby
<matthewd> vali: Sorry, that looks like a usage/API question about logstash itself... you're naturally going to find fewer people who can help. Perhaps logstash has a support channel/mailing list?
<vali> hi matthewd, I've already tried that but unfortunately no result yet.
ResidentBiscuit has joined #ruby
Psy-Q has joined #ruby
<matthewd> theonefoo: You probably need to work out who the 'gem' command you're running belongs to / where it is. Sounds like it, or something, has kept the old rbenv path somewhere.
<Psy-Q> elo. is there something in the spirit of Eloquent Ruby or Well-Grounded Rubyist, but updated for 2.3? it seems some of the better/more canonical books are on 1.8 or 1.9 :(
sparch has quit [Quit: Leaving]
tvw has quit []
ResidentBiscuit has quit [Ping timeout: 258 seconds]
gigetoo_ has joined #ruby
gigetoo has quit [Ping timeout: 246 seconds]
gigetoo_ is now known as gigetoo
tuxaddicted has joined #ruby
c355e3b has joined #ruby
DoubleMalt has joined #ruby
DoubleMalt has quit [Client Quit]
<matthewd> Psy-Q: Not a lot changed since 1.9, really. There are some new features, but I think it'd be reasonable to learn those additively; they're unlikely to invalidate much you'd learn on that base.
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aryaching has joined #ruby
<matthewd> Psy-Q: Looks like Well-Grounded's 2nd edition covers 2.1, anyway
nelsonsar has joined #ruby
nelsonsar has quit [Remote host closed the connection]
<theonefoo> matthewd: ended up uninstalling rbenv and using system ruby for now
nelsonsar has joined #ruby
<Psy-Q> matthewd: oh! i didn't know they even had that
<Psy-Q> thanks
<Psy-Q> mine's old, then
shashin has joined #ruby
dogweather has joined #ruby
conta has quit [Ping timeout: 250 seconds]
skalfyfan has joined #ruby
psychicist__ has quit [Ping timeout: 250 seconds]
conta has joined #ruby
<matthewd> The only things that immediately come to mind are refinements, which nobody uses, and keyword arguments, which seem fine to learn as an 'extra' -- for the near future, at least, you'll still need to know how they used to be manually approximated anyway, IMO
cloud has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
bayed has joined #ruby
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psychicist__ has joined #ruby
cloud has quit [Client Quit]
<Psy-Q> i used to do a lot of 1.8 but wanted to avoid writing "1.8 made barely runnable on top of 2.3" by reading a more modern book, i guess that's not so much of a danger then :)
<Psy-Q> hashrocket seems to have flown off though
pawnbox has quit [Ping timeout: 250 seconds]
Madplatypus has quit [Quit: Connection closed for inactivity]
<Psy-Q> ah no, it still works :D
shashin has joined #ruby
eb0t_ has quit [Quit: WeeChat 1.4]
eb0t has joined #ruby
pawnbox has joined #ruby
claudiuinberlin has joined #ruby
<matthewd> Yeah, there are more changes in 1.8 -> 1.9
<Cymew> If I want to make a list of services, and be able to look up the hostname, I do create a hash like {"servicename"=>"servicename.test.domain"}. But if I want to first look up the environment, and then look up the hostname from the servicename, how do I construct that data structure? If I set up hashes and bind that like 'test = {"servicename" ...' and so on, if I push that to @env = [test, prod] the @env will contain
<Cymew> just the hashes and I can no longer look up the environment.
<Cymew> What I'm totally missing?
gingray has quit [Ping timeout: 265 seconds]
<workmad3> Cymew: you'd want a nested hash, `{ "test" => { "servicename" => "domain> }, ...}`
<Cymew> I.e. I want an array of pointers to hashes
<Cymew> workmad3: Hmm. That might be the thing.
<dminuoso> matthewd: There was a major thing though. Module#prepend
<dminuoso> :o
<matthewd> Cymew: Or just use a flat array, and iterate it to find what you need / indexing by whatever seems convenient at the time.
<Cymew> matthewd: I fooled around with that, but since my servicenames sometimes map to nonsensical hostnames, and other nonsense it looked very ugly. Maybe I'll have to face ugliness.
<Psy-Q> i'm also writing a thing that takes some inventory of infrastructure and does stuff with it
<Psy-Q> wonder if there isn't something like that already (without including half of chef or puppet)
<Cymew> It feels like something that has been done before, yes.
tenderlove has quit [Ping timeout: 260 seconds]
tuxaddicted has quit [Ping timeout: 260 seconds]
<Cymew> Looks like a nested hash works fine, until I have more than one service per envionment, then it gets hairy again.
aufi has joined #ruby
<matthewd> Starting to sound like you're reinventing a database table..
<Cymew> It does, doesn't it.
aegis3121 has joined #ruby
Kendos-Kenlen has joined #ruby
<Cymew> Actually, ruby is a terrible choice for this task and I would never have choosen this myself. A databse would make more sense...
<gener1c> does ruby have a thread safe hash?
<Cymew> ...add to that I have limitations on what kind of stuff I can 'require'.
<matthewd> gener1c: concurrent-ruby gem
CloCkWeRX has quit [Quit: Leaving.]
eggshke has quit []
<gener1c> matthewd: if i use a reg hash and each thread has its own key?
theonefoo has quit [Quit: theonefoo]
<matthewd> gener1c: You'll be fine on MRI because of the GVL, but a different interpreter could crash
<gener1c> ah like the GIL
<gener1c> cool
<matthewd> gener1c: IMO, if you're using threads, you might as well go with c-r. You'll want one of the cleverer things it provides eventually, and in the meantime you can happily use its threadsafe hash etc at zero cost.
<matthewd> (because on MRI, because it knows the GVL is there to protect you, Concurrent::Hash is just a pass-through to ordinary Hash)
nelsonsar has quit [Remote host closed the connection]
sdothum has joined #ruby
nelsonsar has joined #ruby
Rodya_ has joined #ruby
eb0t has quit [Quit: WeeChat 1.4]
eb0t has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has quit [Ping timeout: 245 seconds]
aufi has quit [Ping timeout: 250 seconds]
centrx has joined #ruby
charliesome has joined #ruby
aryaching has joined #ruby
Petra has joined #ruby
r3vDev has joined #ruby
Petra is now known as Guest80319
Guest80319 has quit [Client Quit]
rodfersou is now known as rodfersou|lunch
dionysus69 has joined #ruby
nelsonsar has quit [Ping timeout: 245 seconds]
theonefoo has joined #ruby
palms has joined #ruby
_ZerGabriel_ has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
jaguarmagenta has joined #ruby
tomphp has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
tomphp has quit [Client Quit]
aryaching has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
rfoust has joined #ruby
krsh has quit [Quit: krsh]
nelsonsar has joined #ruby
psychicist__ has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
aryaching has quit [Ping timeout: 250 seconds]
jmignault has joined #ruby
millerti has joined #ruby
aryaching has joined #ruby
Rodya_ has quit [Remote host closed the connection]
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
yeticry has quit [Quit: leaving]
masterasia has quit [Quit: Leaving]
cdg has joined #ruby
macay has joined #ruby
nankyokusei has joined #ruby
jhack has joined #ruby
Salih has joined #ruby
saslam has joined #ruby
LoneHermit has joined #ruby
xjletm has joined #ruby
cdg has quit [Read error: Connection reset by peer]
JesseH has joined #ruby
cdg has joined #ruby
sdwrage has joined #ruby
adavia has joined #ruby
nankyokusei has quit [Ping timeout: 250 seconds]
blackbom1 has joined #ruby
aryaching has quit [Ping timeout: 250 seconds]
LoneHermit has quit [Ping timeout: 258 seconds]
saslam has quit [Ping timeout: 248 seconds]
ldnunes has quit [Read error: Connection reset by peer]
DLSteve has joined #ruby
aryaching has joined #ruby
rwb has quit [Ping timeout: 268 seconds]
r3vDev has quit [Ping timeout: 248 seconds]
igniting has quit [Ping timeout: 252 seconds]
ldnunes has joined #ruby
shinnya has quit [Ping timeout: 256 seconds]
Kendos-Kenlen_ has joined #ruby
r3vDev has joined #ruby
conta has quit [Ping timeout: 256 seconds]
blackbom1 has quit [Ping timeout: 268 seconds]
jmignault has quit [Ping timeout: 246 seconds]
Kendos-Kenlen has quit [Ping timeout: 260 seconds]
Rodya_ has quit [Remote host closed the connection]
tomphp has joined #ruby
aryaching has quit [Ping timeout: 265 seconds]
conta has joined #ruby
xjletm has quit [Remote host closed the connection]
conta has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 246 seconds]
psychicist__ has joined #ruby
Kendos-Kenlen_ has quit [Ping timeout: 250 seconds]
tomphp has quit [Ping timeout: 265 seconds]
frankiee1 has joined #ruby
rodfersou|lunch is now known as rodfersou
abc2 has joined #ruby
saslam has joined #ruby
frankiee_ has quit [Read error: Connection reset by peer]
foooobear has quit [Quit: (null)]
Guest10096 has joined #ruby
LBRapid has quit [Remote host closed the connection]
tau has joined #ruby
LBRapid has joined #ruby
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
Humdai_ has joined #ruby
brendan- has joined #ruby
xall has joined #ruby
Derperperd has quit [Quit: Derperperd]
Derperperd has joined #ruby
Humdai has quit [Ping timeout: 265 seconds]
cdg_ has joined #ruby
rippa has joined #ruby
conta has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
Derperperd has quit [Client Quit]
binaryplease has joined #ruby
jcao219 has joined #ruby
saslam has quit [Ping timeout: 268 seconds]
jrafanie has joined #ruby
lenwood has quit [Ping timeout: 246 seconds]
boombox_ has joined #ruby
jhack has quit [Quit: jhack]
saneax is now known as saneax-_-|AFK
emilkarl has joined #ruby
blackbombay has joined #ruby
theonefoo has quit [Quit: theonefoo]
dionysus69 has quit [Ping timeout: 250 seconds]
theonefoo has joined #ruby
ResidentBiscuit has joined #ruby
theonefoo has quit [Client Quit]
jhack has joined #ruby
boombox_ has quit [Remote host closed the connection]
ruby-lang684 has joined #ruby
aryaching has joined #ruby
<ruby-lang684> hey guys so i have learn ruby and i understand the concepts
jbeeze has joined #ruby
<ruby-lang684> should i move on to rails?
<ruby-lang684> my plan is to make websites
montanonic has quit [Ping timeout: 268 seconds]
<ruby-lang684> anyone can give me advice
Humdai_ has quit [Ping timeout: 256 seconds]
Snowy has joined #ruby
shashin has joined #ruby
<centrx> ruby-lang684: sure, why not?
theonefoo has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
<centrx> ruby-lang684: You can continue learning about Ruby too as part of your Rails learning/projects
<adaedra> You can move to rails to do websites (but you don't have to, it's just a very common thing)
ResidentBiscuit has quit [Ping timeout: 252 seconds]
teclator has quit [Ping timeout: 252 seconds]
<ruby-lang684> thx guys
<ruby-lang684> i still a student
<domgetter> ruby-lang684 really the only bad thing you can do is stop doing any programming
<centrx> Yeah that's when you get hacked
<ruby-lang684> lol?
<domgetter> that is, as long as you're working on *something*, you're almost certainly progression
<domgetter> progressing*
<adaedra> 🙄
<ruby-lang684> i hope to make a websites for start up
ferr1 has quit [Quit: WeeChat 1.5]
marr has joined #ruby
dionysus69 has joined #ruby
frozengeek____ is now known as frozengeek
imperator has joined #ruby
<domgetter> ruby-lang684 to be good at something, just do it a lot. So go make a few websites, even if it's not for a client
tomphp has joined #ruby
<ruby-lang684> oh i see
hutch34 has joined #ruby
<ruby-lang684> do they require experience for first time ror developers?
bmurt has joined #ruby
<ruby-lang684> ??
dviola has joined #ruby
<adaedra> who they
Rodya_ has joined #ruby
<ruby-lang684> i mean any start up if i mean
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby
<adaedra> knowing the technology usually helps :)
nelsonsar has quit [Remote host closed the connection]
<adaedra> have some personal projects and push them to github, it's a good start.
nelsonsar has joined #ruby
LoneHerm_ has joined #ruby
<domgetter> ruby-lang684 I was just offering general advice that also happens to apply to learning programming. whether or not a company explicitly requires experience depends on the company and the position
LoneHerm_ has quit [Remote host closed the connection]
LoneHerm_ has joined #ruby
dogweather has joined #ruby
Rodya_ has quit [Ping timeout: 245 seconds]
xall has quit [Ping timeout: 240 seconds]
JankyDoodle has joined #ruby
conta has quit [Ping timeout: 250 seconds]
<ruby-lang684> @domgetter ok thx
jcao219 has quit [Ping timeout: 256 seconds]
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby
dogweather has quit [Ping timeout: 258 seconds]
Humdai has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Kendos-Kenlen_ has joined #ruby
centrx has quit [Remote host closed the connection]
nelsonsar has quit [Ping timeout: 260 seconds]
vali has quit [Read error: Connection reset by peer]
palms_ has joined #ruby
iMadper has quit [Remote host closed the connection]
Kendos-Kenlen_ has quit [Client Quit]
riotjone1 has joined #ruby
RedFromage has joined #ruby
Azure|dc has joined #ruby
faces has joined #ruby
<ruby-lang684> what kind of websites should i build for my personal use?
iMadper has joined #ruby
tdy has quit [Ping timeout: 240 seconds]
yardenbar has quit [Ping timeout: 250 seconds]
palms has quit [Ping timeout: 244 seconds]
igniting has joined #ruby
Azure has quit [Ping timeout: 244 seconds]
riotjones has quit [Ping timeout: 244 seconds]
mim1k|work has quit [Quit: Reconnecting]
SesMan has quit [Ping timeout: 244 seconds]
face has quit [Ping timeout: 244 seconds]
mim1k|work has joined #ruby
aufi has joined #ruby
tdy has joined #ruby
<ruby-lang684> ??
<Papierkorb> something you need?
nelsonsar has joined #ruby
ruby-lang569 has joined #ruby
jmignault has joined #ruby
<domgetter> ruby-lang684 something simple. try to make sure you do something you're unfamiliar with so you learn something
<ruby-lang684> ya it's true that i have make more websites
<ruby-lang684> thx man
aufi has quit [Ping timeout: 244 seconds]
centrx has joined #ruby
yeticry has joined #ruby
<al2o3-cr> what do others use for parsing options bar OptionParser?
armyriad has quit [Quit: Leaving]
iMadper has quit [Read error: Connection timed out]
<rob_> al2o3-cr: trollop
<al2o3-cr> rob_: i'll take a look at trollop
iMadper has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
<al2o3-cr> looks nice
sparch has joined #ruby
xall has joined #ruby
tomphp has joined #ruby
psychicist__ has quit [Ping timeout: 260 seconds]
axl_ has joined #ruby
hahuang65 has joined #ruby
matp has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
matp has joined #ruby
jmignault has quit [Ping timeout: 245 seconds]
connor_goodwolf has quit [Ping timeout: 260 seconds]
MrBusiness2 has joined #ruby
aganov has quit [Remote host closed the connection]
hahuang65 has quit [*.net *.split]
tomphp has quit [*.net *.split]
dviola has quit [*.net *.split]
jhack has quit [*.net *.split]
LBRapid has quit [*.net *.split]
ldnunes has quit [*.net *.split]
Salih has quit [*.net *.split]
macay has quit [*.net *.split]
eb0t has quit [*.net *.split]
hightower3 has quit [*.net *.split]
AlexRussia has quit [*.net *.split]
andrzejku has quit [*.net *.split]
Luna_Moonfang has quit [*.net *.split]
Fernando-Basso has quit [*.net *.split]
SAVAGE has quit [*.net *.split]
tpendragon has quit [*.net *.split]
valkyr2e has quit [*.net *.split]
x0f has quit [*.net *.split]
howdoi has quit [*.net *.split]
Tempesta has quit [*.net *.split]
dasher00 has quit [*.net *.split]
gagrio has quit [*.net *.split]
infernix has quit [*.net *.split]
Kestrel-029 has quit [*.net *.split]
erlend has quit [*.net *.split]
Michael5[m] has quit [*.net *.split]
cpfeilschifter[m has quit [*.net *.split]
jomakasi[m] has quit [*.net *.split]
velu_aon[m] has quit [*.net *.split]
unreal has quit [*.net *.split]
JoL1hAHN has quit [*.net *.split]
danst has quit [*.net *.split]
jolamb has quit [*.net *.split]
majoh has quit [*.net *.split]
csaunders has quit [*.net *.split]
arooni has quit [*.net *.split]
jokester has quit [*.net *.split]
armin has quit [*.net *.split]
heinrich5991 has quit [*.net *.split]
kyle__ has quit [*.net *.split]
Cork has quit [*.net *.split]
tycoon177 has quit [*.net *.split]
olivierjanss has quit [*.net *.split]
nuclearsandwich has quit [*.net *.split]
gf3 has quit [*.net *.split]
bestie has quit [*.net *.split]
Didac has quit [*.net *.split]
[reed] has quit [*.net *.split]
Keltia has quit [*.net *.split]
ggherdov has quit [*.net *.split]
SebastianThorn has quit [*.net *.split]
sts has quit [*.net *.split]
DefV_ has quit [*.net *.split]
dagelf has quit [*.net *.split]
c-c has quit [*.net *.split]
jswe has quit [*.net *.split]
lmc has quit [*.net *.split]
larissa has quit [*.net *.split]
abort has quit [*.net *.split]
Karunamon has quit [*.net *.split]
humding3r has quit [*.net *.split]
raz has quit [*.net *.split]
DefV has joined #ruby
sts has joined #ruby
abort has joined #ruby
Keltia has joined #ruby
raz has joined #ruby
raz has joined #ruby
raz has quit [Changing host]
Nicmavr has joined #ruby
c-c has joined #ruby
dagelf has joined #ruby
gf3 has joined #ruby
jswe has joined #ruby
kyle__ has joined #ruby
x0f has joined #ruby
majoh has joined #ruby
jhack has joined #ruby
jokester has joined #ruby
andrzejku has joined #ruby
gagrio has joined #ruby
ldnunes has joined #ruby
jomakasi[m] has joined #ruby
velu_aon[m] has joined #ruby
Michael5[m] has joined #ruby
Salih has joined #ruby
armin has joined #ruby
Salih has joined #ruby
cpfeilschifter[m has joined #ruby
Salih has quit [Changing host]
nuclearsandwich has joined #ruby
dasher00 has joined #ruby
humd1ng3r has joined #ruby
LBRapid has joined #ruby
sts is now known as Guest7627
Fernando-Basso has joined #ruby
Luna_Moonfang has joined #ruby
csaunders has joined #ruby
c-c is now known as Guest54181
Nicmavr is now known as Guest79017
unreal has joined #ruby
jolamb has joined #ruby
larissa has joined #ruby
AlexRussia has joined #ruby
tpendragon has joined #ruby
erlend has joined #ruby
tomphp has joined #ruby
dviola has joined #ruby
hightower3 has joined #ruby
eb0t has joined #ruby
JoL1hAHN has joined #ruby
arooni has joined #ruby
Tempesta has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
pachinsv has joined #ruby
dviola has joined #ruby
dviola has quit [Changing host]
Karunamon has joined #ruby
macay has joined #ruby
vasilakisfil has joined #ruby
emilkarl has quit [Quit: Textual IRC Client: www.textualapp.com]
[reed] has joined #ruby
[reed] has quit [Changing host]
[reed] has joined #ruby
<vasilakisfil> does anyone know how to add a method in the def method? I know it's not good practice but I just want to have fun
heinrich5991 has joined #ruby
binaryplease has quit [Quit: binaryplease]
<vasilakisfil> so if you define a method def foo; puts 'hi!' end I would like to do def foo; puts 'hi!' end.benchmark!
theonefoo has quit [Quit: theonefoo]
ghostlight has quit [Ping timeout: 268 seconds]
pizzaops has quit [Ping timeout: 245 seconds]
JackMc has quit [Ping timeout: 260 seconds]
<adam12> vasilakisfil: Maybe you could use Module.prepend and super.
valkyr2e has joined #ruby
<adam12> I haven't seen a way to override `def`, but I don't do a ton of metaprogramming.
bestie has joined #ruby
machty has quit [Ping timeout: 260 seconds]
SAVAGE has joined #ruby
krsh has joined #ruby
ggherdov has joined #ruby
Cork has joined #ruby
pizzaops has joined #ruby
SebastianThorn has joined #ruby
howdoi has joined #ruby
danst has joined #ruby
Devalo has joined #ruby
Rodya_ has joined #ruby
<vasilakisfil> hmm not sure I follow, how should I use Module.prepend and super ?
<vasilakisfil> from what I see the def is not a method but a keyword so not much I can do.. http://stackoverflow.com/questions/3448069/ruby-overwrite-def-method
infernix has joined #ruby
JackMc has joined #ruby
machty has joined #ruby
<toretore> vasilakisfil: what exactly are you trying to do?
olivierjanss has joined #ruby
GodFather has joined #ruby
tycoon177 has joined #ruby
mwlang has joined #ruby
krsh has quit [Client Quit]
chouhoulis has joined #ruby
conta has joined #ruby
lmc has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<vasilakisfil> toretore a DSL for profling a specific class
<vasilakisfil> so I want to create a DSL that touches the code as less as possible
Didac has joined #ruby
<vasilakisfil> I think it's impossible to override def so now I am playing with instance_methods method
<toretore> be more specific? how exactly is it going to work?
Xentil has joined #ruby
nelsonsar has quit [Remote host closed the connection]
tomphp has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has quit [Ping timeout: 250 seconds]
ResidentBiscuit has joined #ruby
nelsonsar has joined #ruby
tomphp has joined #ruby
blackwind_123 has joined #ruby
NeverTired has joined #ruby
<vasilakisfil> the idea is that you specify which method you want to benchmark. the library will rename the method to ___method and call that with the benchmark block. Using this block it will hold some statistics for the performance of that method
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<vasilakisfil> the renaming is needed if the method has a return statement, the block never returns (the method itself returns) and the statistics will not be captured
<vasilakisfil> so I am trying to figure out how to make it easy for the user to mark which methods to benchmark
kimegede has joined #ruby
cbx_cubic has quit [Ping timeout: 248 seconds]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
<vasilakisfil> one idea is to use a custom method in the Object level like the memoist gem: https://github.com/matthewrudy/memoist
JankyDoodle has quit [Quit: Leaving]
<vasilakisfil> another idea was to override def but this won't work
jhack_ has joined #ruby
JankyDoodle has joined #ruby
lxsameer has quit [Quit: WeeChat 1.6]
<blackbombay> vasilakisfil: def foo() end returns :foo, so you could monkey patch Symbol.
nelsonsar has quit [Ping timeout: 258 seconds]
<vasilakisfil> now I am checking with instance_methods, private_instance_methods etc
jhack has quit [Ping timeout: 260 seconds]
jhack_ is now known as jhack
iMadper` has joined #ruby
<vasilakisfil> interesting I didn't know that
<blackbombay> ruby 2+
tomphp_ has joined #ruby
wugy has quit []
iMadper has quit [Read error: Connection reset by peer]
frmendes has quit [Ping timeout: 252 seconds]
rfoust has joined #ruby
nelsonsar has joined #ruby
tomphp has quit [Ping timeout: 245 seconds]
jhack_ has joined #ruby
ddddddd has joined #ruby
connor_goodwolf has joined #ruby
jhack has quit [Ping timeout: 246 seconds]
jhack_ is now known as jhack
sonOfRa has quit [Quit: Bye!]
sonOfRa has joined #ruby
ghostlight has joined #ruby
chouhoulis has quit [Remote host closed the connection]
teclator has joined #ruby
byte512 has quit [Ping timeout: 260 seconds]
tenderlove has joined #ruby
rfoust has quit [Quit: Textual IRC Client: www.textualapp.com]
nankyokusei has joined #ruby
krsh has joined #ruby
rfoust has joined #ruby
krsh has quit [Client Quit]
gingray has joined #ruby
dogweather has joined #ruby
cbx_cubic has joined #ruby
kirun has joined #ruby
hotpancakes has joined #ruby
mim1k|wo1k has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlo_ has joined #ruby
Guest10096 has quit [Remote host closed the connection]
pachinsv has left #ruby [#ruby]
nankyokusei has quit [Ping timeout: 260 seconds]
conta has joined #ruby
mim1k|work has quit [Ping timeout: 250 seconds]
dogweather has quit [Ping timeout: 258 seconds]
macay has quit [Quit: Going offline, see ya! (www.adiirc.com)]
Lucky_ABA has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
BTRE has quit [Ping timeout: 240 seconds]
<gtaylor1> I downloaded a gem without a .gemspec or Rakefile. Is this "normal" or expected that it should install? (it doesn't)
<hotpancakes> I'm doing some exercises right now and am trying to think of ways to improve this code. If anyone cares to help, it would be much appreciated! https://gist.github.com/anonymous/8a4c34206c730a06076d1990e662c786
jhack_ has joined #ruby
andikr has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 260 seconds]
jhack_ is now known as jhack
benlieb has joined #ruby
jhack_ has joined #ruby
pawnbox has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 240 seconds]
<mwlang> hotpancakes: a.split('').group_by{|gb| gb}.map{|k,v| "#{k}#{v.size}"}.join
r3vDev has quit [Ping timeout: 252 seconds]
<mwlang> hotpancakes: where a is your string…i.e. "aaabbccccc"
<baweaver> mwlang: chars
jhack_ is now known as jhack
<mwlang> baweaver: ah, forgot about that option.
<al2o3-cr> each_char
pawnbox has joined #ruby
<baweaver> well, if used with group_by...
<al2o3-cr> *each_object
<baweaver> almost
<baweaver> each_with_object
Rodya_ has quit [Remote host closed the connection]
<al2o3-cr> yep, that the one
<baweaver> &ri Enumerable#each_with_object
Rodya_ has joined #ruby
<baweaver> though in this case I think group_by / map is clearer
[Butch] has joined #ruby
<baweaver> also: group_by(&:itself)
gingray has quit [Ping timeout: 260 seconds]
<mwlang> baweaver: doesn’t that come along in Ruby 2.2 or 2.3?
<mwlang> it does work in 2.3 for me: a.chars.group_by(&:itself).map{|k,v| "#{k}#{v.size}"}.join
<baweaver> 2.3.x iirc
Eiam has joined #ruby
ruby-lang684 has quit [Ping timeout: 260 seconds]
<baweaver> 2.2.0>> 1.itself
<baweaver> 2.2>> 1.itself
<al2o3-cr> 22> 1.itself
<baweaver> Hrm. Can never remember that
<baweaver> aha
<al2o3-cr> :)
<baweaver> 22> 1.itself
jhack_ has joined #ruby
<baweaver> >> 1
<ruby[bot]> baweaver: # => 1 (https://eval.in/687079)
MrBusiness2 has quit [Ping timeout: 258 seconds]
jhack has quit [Ping timeout: 250 seconds]
jhack_ is now known as jhack
* baweaver scratches head in annoyance
<domgetter> >> "aaabbccccc".chars.chunk {|c| c}.reduce("") {|o,(c,coll)| o + c + coll.length.to_s}
<ruby[bot]> domgetter: # => "a3b2c5" (https://eval.in/687080)
Rodya_ has quit [Ping timeout: 260 seconds]
dogweather has joined #ruby
<matthewd> Yeah, chunk seems more likely to give the expected output for e.g. "aaabbcccccaa"
<domgetter> unfortunately, chunk can't be given a proc instead of a block :(
plantfood has joined #ruby
<domgetter> oh nevermind
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter> >> "aaabbccccc".chars.chunk(&:itself).reduce("") {|o,(c,coll)| o + c + coll.length.to_s}
<ruby[bot]> domgetter: # => "a3b2c5" (https://eval.in/687081)
BTRE has joined #ruby
kimegede has quit [Quit: Leaving...]
amclain has joined #ruby
kingja has joined #ruby
harai has joined #ruby
kingja has quit [Client Quit]
[Butch]_ has joined #ruby
<hotpancakes> thanks! TIL `chars` and `group_by`!
ivanskie has joined #ruby
[Butch]_ has quit [Client Quit]
nelsonsar has quit [Remote host closed the connection]
saslam has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
[Butch]_ has joined #ruby
[Butch]_ has quit [Client Quit]
nelsonsar has joined #ruby
<matthewd> "aaabbccccc".chars.chunk(&:itself).map { |k, v| [k, v.size] }.join
<hotpancakes> and `chunk`
nopolitica has joined #ruby
frozengeek has quit [Ping timeout: 240 seconds]
<eam> "aaabbccccc".gsub(/(.)\1*/) { |x| $1 + x.length.to_s }
jsrn_ has quit [Quit: Leaving]
<eam> is that what we're doing?
<domgetter> only if you're a dirty cheater
[Butch] has quit [Ping timeout: 250 seconds]
<eam> ah, that I am
nowhere_man has quit [Ping timeout: 250 seconds]
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SCHAAP137 has joined #ruby
<dminuoso> >> "aaabbccccc".gsub(/(.)\1*/) { |x| $1 + x.length.to_s }
<ruby[bot]> dminuoso: # => "a3b2c5" (https://eval.in/687082)
marxarelli|afk has quit [Quit: Textual IRC Client: www.textualapp.com]
marxarelli has joined #ruby
antoniobeyah has joined #ruby
nelsonsar has quit [Ping timeout: 260 seconds]
Devalo has quit [Remote host closed the connection]
mim1k|work has joined #ruby
william3 has quit [Remote host closed the connection]
jackjackdripper has quit [Quit: Leaving.]
shashin has joined #ruby
william3 has joined #ruby
mwlang has quit [Read error: Connection reset by peer]
mim1k|wo1k has quit [Ping timeout: 258 seconds]
mwlang has joined #ruby
RedFromage has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mwlang has quit [Client Quit]
hotpancakes has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
vma[m] has joined #ruby
railssmith has quit [Quit: Textual IRC Client: www.textualapp.com]
Couch has quit [Ping timeout: 252 seconds]
hanmac has joined #ruby
bmurt has joined #ruby
william3 has quit [Ping timeout: 260 seconds]
iMadper` is now known as iMadper
Rodya_ has joined #ruby
nelsonsar has joined #ruby
ResidentBiscuit has joined #ruby
yardenbar has joined #ruby
ruby-lang569 has quit [Ping timeout: 260 seconds]
ResidentBiscuit has quit [Ping timeout: 240 seconds]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
babblebre has joined #ruby
Devalo has joined #ruby
csk has joined #ruby
jcao219 has joined #ruby
_sfiguser has quit [Ping timeout: 260 seconds]
conta has quit [Ping timeout: 250 seconds]
Derperperd has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
claudiuinberlin has quit []
cibs has quit [Ping timeout: 268 seconds]
gusrub has joined #ruby
cibs has joined #ruby
<axisys> need help with this
<axisys> trying to loop through an array of hashes
chris2 has quit [Ping timeout: 240 seconds]
<dminuoso> axisys: Sure.
mikecmpbll has quit [Ping timeout: 256 seconds]
<dminuoso> axisys: The error you got: NoMethodError: undefined method `each' for nil:NilClass
<havenwood> axisys: $radius_servers != @radius_servers
<dminuoso> Means Ruby is trying to execute something that says "nil.each"
cbx_cubic has quit [Read error: No route to host]
jcao219 has quit [Ping timeout: 246 seconds]
_sfiguser has joined #ruby
<axisys> havenwood: thanks... looks better now
shashin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
saslam has quit [Ping timeout: 260 seconds]
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
Beams has quit [Quit: .]
xall has quit [Ping timeout: 260 seconds]
Snowy has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
whathappens has joined #ruby
chris2 has joined #ruby
HammyJammy has joined #ruby
gingray has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
SeepingN has joined #ruby
JammyHammy has quit [Ping timeout: 258 seconds]
gingray has quit [Ping timeout: 258 seconds]
x0f_ has joined #ruby
piGA has joined #ruby
x0f has quit [Ping timeout: 258 seconds]
gingray has joined #ruby
julian has quit [Ping timeout: 240 seconds]
finisherr has joined #ruby
jrafanie has quit [Quit: Textual IRC Client: www.textualapp.com]
jrafanie has joined #ruby
hotpancakes has quit []
flying has quit []
gusrub has quit [Remote host closed the connection]
Humdai has quit [Ping timeout: 246 seconds]
gusrub has joined #ruby
Derperperd has quit [Quit: Derperperd]
mweshi has joined #ruby
julian__ has joined #ruby
HammyJammy has quit [Ping timeout: 250 seconds]
mwlang has joined #ruby
vuoto has joined #ruby
mwlang has quit [Client Quit]
gusrub has quit [Ping timeout: 256 seconds]
frankiee1 has quit [Quit: Lost terminal]
platzhirsch has quit [Quit: WeeChat 1.4]
the_drow has quit [Quit: This computer has gone to sleep]
csk has quit [Ping timeout: 248 seconds]
plantfood has quit [Ping timeout: 240 seconds]
maattdd has quit [Ping timeout: 268 seconds]
Ishido has joined #ruby
vuoto has quit [Remote host closed the connection]
plantfood has joined #ruby
mweshi has quit [Quit: Textual IRC Client: www.textualapp.com]
Dimik has joined #ruby
csk has joined #ruby
plantfood has quit [Ping timeout: 260 seconds]
gusrub has joined #ruby
mwlang has joined #ruby
Fuzai has quit [Ping timeout: 256 seconds]
sylario has joined #ruby
tomphp has joined #ruby
gusrub has quit [Remote host closed the connection]
ramfjord has joined #ruby
gusrub has joined #ruby
ramfjord has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
ramfjord has joined #ruby
nankyokusei has joined #ruby
jaruga___ has quit [Quit: jaruga___]
jrafanie has quit [Remote host closed the connection]
Cohedrin has joined #ruby
_ZerGabriel_ has quit []
nelsonsar has quit [Remote host closed the connection]
SAVAGE is now known as suck
nankyokusei has quit [Ping timeout: 252 seconds]
nelsonsar has joined #ruby
claudiuinberlin has joined #ruby
<suck> whats the latest ruby version?
<suck> 2.3.3?
plantfood has joined #ruby
<havenwood> suck: yes, 2.3.3
<baweaver> See the topic, we tend to update it fairly quickly.
nelsonsar has quit [Ping timeout: 245 seconds]
vikaton has joined #ruby
Salih has quit [Quit: Leaving]
<suck> i got ruby with pacman -S ruby and updated my gems with gem update, i should be good to go right?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx> suck: That sounds more like a distro/package question, but sure
<centrx> suck: Ruby versions a pretty compatible these days. If you're not using something super old, you're okay
gusrub has quit [Remote host closed the connection]
dogweather has quit [Remote host closed the connection]
symm- has joined #ruby
gusrub has joined #ruby
Lord_of_Life has quit [Excess Flood]
tristanp has joined #ruby
nelsonsar has joined #ruby
antoniobeyah has joined #ruby
Lord_of_Life has joined #ruby
pawnbox has quit [Remote host closed the connection]
plantfood has quit [Quit: Leaving]
MrBusiness2 has joined #ruby
Devalo has quit [Remote host closed the connection]
jonmoshier has joined #ruby
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
ResidentBiscuit has joined #ruby
ResidentBiscuit has quit [Max SendQ exceeded]
aegis3121 has quit [K-Lined]
govg has joined #ruby
dogweather has joined #ruby
mikecmpbll has joined #ruby
tomphp has joined #ruby
sean` has joined #ruby
sean` is now known as seanhagen
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
seanhagen has quit [Client Quit]
skalfyfan has joined #ruby
seanhagen has joined #ruby
gusrub has quit [Remote host closed the connection]
howdoi has quit [Quit: Connection closed for inactivity]
UserOO7 has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
smlocal has joined #ruby
Disavowed has joined #ruby
william3 has joined #ruby
<Disavowed> Hi all. I understand that during a Ruby build the parser code is generated from the grammar rules file (parse.y). Since the rules presumably don't change on a per-build basis, why is parse.c generated each time it builds? I assume I'm missing something obvious, so any help appreciated!
cdg_ has quit [Remote host closed the connection]
whathappens has quit [Remote host closed the connection]
cdg has joined #ruby
whathappens has joined #ruby
ResidentBiscuit has joined #ruby
dogweather has quit [Remote host closed the connection]
Macaveli has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathapp_ has joined #ruby
JoshS has quit [Quit: Leaving]
william3 has quit [Ping timeout: 246 seconds]
dogweather has joined #ruby
tomphp has joined #ruby
<matthewd> Disavowed: The same reason the rest of the code is compiled from source, even though most of the source doesn't change on a per-build basis: that's what the build is for.
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 258 seconds]
ResidentBiscuit has quit [Ping timeout: 245 seconds]
shashin has joined #ruby
dogweather has quit [Ping timeout: 240 seconds]
bocaneri has quit [Read error: Connection reset by peer]
william3 has joined #ruby
<Disavowed> matthewd: Hmmmm I guess. But couldn't parse.c just be considered part of the build pipeline without the regeneration? Your answer is probably right, it's just unsatisfying!
dogweath_ has joined #ruby
dogweath_ has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
dogweath_ has joined #ruby
<matthewd> Couldn't parse.o? It feels like drawing an arbitrary line in the middle of the build process, of "this could plausibly have been written by a human", or something.
babblebre has quit [Quit: Connection closed for inactivity]
<jonmoshier> Disavowed, Could be cognitive overhead. Sure it might make for a slightly faster build but now you're adding complexity to the process.
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
<Disavowed> Yeah you're both right - I hadn't considered it that way. Thanks for helping me through that one!
guacamole has quit [Quit: Lost terminal]
<matthewd> (that said, I haven't actually looked at a source tar... have you confirmed it's actually not pre-built in there?)
gusrub has joined #ruby
gusrub has quit [Remote host closed the connection]
<Disavowed> matthewd: No actually - I was reading a book and it struck me as odd. I'm newish to Ruby so I wasn't quite sure where to look. Let me have a dive in and see.
<matthewd> It's not uncommon for projects to build the .c file at release time, to reduce the dependencies required to do the build
Silox| has joined #ruby
<matthewd> .. but leave it out of the source repo, so if you're following a developer workflow, then you need the full pipeline
<Disavowed> matthewd: That would go for things other than Ruby too? Interesting.
gusrub has joined #ruby
<matthewd> Yeah, that's a "C projects that use yacc"-in-general pattern
<matthewd> I'm just not sure whether Ruby follows it
<Disavowed> matthewd: Fascinating! Thank you!
<Disavowed> Seems too - Github search doesn't yield a parse.c file
<Disavowed> to, rather
symm- has quit [Ping timeout: 265 seconds]
hahuang65 has joined #ruby
Snowy has joined #ruby
<jonmoshier> Disavowed: What book?
imperator has left #ruby ["Leaving"]
<Disavowed> This was in Ruby under the microscope. It's been a pretty interesting read so far - I don't have much background in the internals of how languages run, so it's been pretty illuminating.
workmad3 has quit [Ping timeout: 246 seconds]
conta has joined #ruby
NeverTired has quit [Quit: Connection closed for inactivity]
aegis3121 has joined #ruby
<jonmoshier> Yes, I just saw that recently and it's on my to read list. figured that's what it was..
<Disavowed> jonmoshier: I'd certainly recommend it
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jonmoshier> i was looking at the ruby api's for like.. reduce/inject for example, the different between reading ruby/python/any highlevel language vs C, for me, is huge.
zukin has joined #ruby
<jonmoshier> C isn't easy for me to read. C the language isn't difficult, but C code in the realworld, hard to read.
tomphp has joined #ruby
mdw has joined #ruby
<Disavowed> I did a walkthrough of Python internals a while back - C comes after a while but I'd prefer looking at a Ruby/Python implementation any day
conta has quit [Ping timeout: 252 seconds]
suck has quit [Quit: Updating details, brb]
guacamole has joined #ruby
skalfyfan has joined #ruby
ResidentBiscuit has joined #ruby
suck has joined #ruby
nopolitica has quit [Quit: leaving]
arthurl has joined #ruby
zeroDi has joined #ruby
<arthurl> hi guys- i'm trying to initiate an ACTIVE ftp connection using net ftp ruby library on an ec2 instance- currently it's failing with a '500 illegal port command' error- and i know it's because i'm behind a NAT
nikivi has joined #ruby
<arthurl> i think it's because the net ftp library is using the internal ip address instead of the actual NAT address when building the connection- is there a way to specify the ip address myself?
<arthurl> i'm looking at https://docs.ruby-lang.org/en/2.0.0/Net/FTP.html#method-i-sendcmd but don't see how i could go about doing so
gagrio has quit [Quit: Leaving...]
SCHAAP137 has quit [Quit: Leaving]
Snowy has quit [Quit: ragequit]
hotpancakes has joined #ruby
jhack has quit [Quit: jhack]
UserOO7 has quit [Remote host closed the connection]
mati_urunda has joined #ruby
Jackneill has joined #ruby
jhack has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
nikivi has quit [Quit: zzz]
Devalo has joined #ruby
zukin has quit [Quit: leaving]
jmarrero has joined #ruby
Eiam has quit [Ping timeout: 245 seconds]
<jmarrero> Hi, Is there a way I can check how many arguments the initialize method takes for any given class? I am trying: class_name.method(:initialize).parameters.map(&:last).map(&:to_s).include? 'my_method'
<jmarrero> But I guess that since the class is not initialized it comes up empty.
somiaj has left #ruby [#ruby]
<blackbombay> tried class_name.instance_method(:initialize) ?
Devalo has quit [Ping timeout: 268 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeroenDL has joined #ruby
nofxx has joined #ruby
Devalo has joined #ruby
<JeroenDL> I have a script that uses an “all_isues” property of a certain object, but I can’t find the definition anywhere (“grep -ri ‘all_issues’”). Is there a different way that property/method can be generated dynamically? What should I search for ?
<JeroenDL> (*typo isues <-> issues)
johnmilton has quit [Remote host closed the connection]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
muelleme has joined #ruby
<jmarrero> blackbombay, no. Will try that thanks! I might have been searching with wrong keywords.
<blackbombay> JeroenDL: some_obj.method(:all_issues).owner some_obj.method(:all_issues).source_location
<JeroenDL> blackbombay: Alright, let me try that :)
Rodya_ has quit [Remote host closed the connection]
domgetter has quit [Ping timeout: 248 seconds]
polishdub has joined #ruby
Eiam has joined #ruby
<JeroenDL> blackbombay: Thx, I found it :). External plugin folder!
csk has quit [Read error: Connection reset by peer]
<blackbombay> kewl
antoniobeyah has quit [Quit: antoniobeyah]
sparch has quit [Ping timeout: 260 seconds]
dnicole has quit [Remote host closed the connection]
mdw has quit [Ping timeout: 258 seconds]
mdw has joined #ruby
<dminuoso> jmarrero: method(:foo).arity
ramfjord has quit [Read error: Connection reset by peer]
<dminuoso> >> String.method(:initialize).arity # jmarrero
<ruby[bot]> dminuoso: # => -1 (https://eval.in/687143)
ramfjord has joined #ruby
<dminuoso> jmarrero: Just to answer your initial question.
<jmarrero> blackbombay, thanks!! "class_name.instance_method(:initialize).parameters.map(&:last).map(&:to_s).include? 'my_method'" did the trick.
croberts has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
crankharder has joined #ruby
jaguarmagenta has joined #ruby
<jmarrero> dminuoso, thanks yeah I explored arity but I needed something where I could be specific about the arg I was looking for before initializing the class.
<jmarrero> 'my_method' should be 'my_arg' in my example sorry...
kobain has joined #ruby
jcao219 has joined #ruby
csk has joined #ruby
smlocal has quit [Remote host closed the connection]
tercenya has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 250 seconds]
smlocal has joined #ruby
GodFather has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
nikivi has joined #ruby
rodfersou has quit [Quit: leaving]
smlocal_ has joined #ruby
tercenya has joined #ruby
johnmccabe has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zeroDi has quit [Quit: WeeChat 1.6]
ldnunes has quit [Quit: Leaving]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDi has joined #ruby
postmodern has joined #ruby
smlocal_ has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
smlocal has quit [Ping timeout: 245 seconds]
tomphp has joined #ruby
jonmoshier has quit [Remote host closed the connection]
zeroDi has quit [Read error: Connection reset by peer]
zeroDi has joined #ruby
marxarelli is now known as marxarelli|afk
nelsonsar has quit [Remote host closed the connection]
nankyokusei has joined #ruby
aswen has joined #ruby
nelsonsar has joined #ruby
kirun has quit [Quit: Konversation terminated!]
nankyokusei has quit [Ping timeout: 245 seconds]
nelsonsar has quit [Ping timeout: 252 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
tomphp has quit [Client Quit]
skweek has quit [Ping timeout: 258 seconds]
gingray has quit [Ping timeout: 252 seconds]
llabrat has joined #ruby
tomphp has joined #ruby
whathapp_ has quit [Remote host closed the connection]
llabrat has quit [Remote host closed the connection]
whathappens has joined #ruby
XV8 has joined #ruby
Guest43_ has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
mattp_ has joined #ruby
biberu has quit [Ping timeout: 250 seconds]
mattp__ has quit [Ping timeout: 258 seconds]
Devalo has quit [Remote host closed the connection]
tomphp has quit [Client Quit]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
nelsonsar has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
A124 has quit [Ping timeout: 268 seconds]
gingray has joined #ruby
sepp2k has quit [Quit: Leaving.]
zeroDi has quit [Quit: WeeChat 1.6]
montanonic has joined #ruby
armin has quit [Ping timeout: 248 seconds]
russt has quit [Quit: That's all, folks!]
cbx_cubic has joined #ruby
piGA has quit [Quit: Verlassend]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lenwood has joined #ruby
eb0t has quit [Quit: WeeChat 1.4]
vuoto has joined #ruby
jimcroft has joined #ruby
tomphp has joined #ruby
axl_ has left #ruby [#ruby]
railssmith has joined #ruby
frozengeek has joined #ruby
eb0t has joined #ruby
smlocal has joined #ruby
Guest79017 has quit [Changing host]
Guest79017 has joined #ruby
BTRE has quit [Quit: Leaving]
Guest79017 is now known as Nicmavr
cbx_cubic has quit [Ping timeout: 256 seconds]
eb0t has quit [Client Quit]
GodFather has quit [Ping timeout: 260 seconds]
claudiuinberlin has quit [Remote host closed the connection]
BTRE has joined #ruby
eb0t has joined #ruby
axl_ has joined #ruby
skweek has joined #ruby
Rodya_ has joined #ruby
miqlas-H has joined #ruby
johnny56_ has quit [Ping timeout: 246 seconds]
sepp2k has joined #ruby
claudiuinberlin has joined #ruby
johnny56_ has joined #ruby
jcao219 has quit [Ping timeout: 258 seconds]
djbkd has quit [Remote host closed the connection]
Devalo has joined #ruby
tpendragon has quit [Ping timeout: 258 seconds]
djbkd has joined #ruby
JeroenDL has quit [Quit: JeroenDL]
JeroenDL has joined #ruby
PresidentBiscuit has joined #ruby
enterprisey has joined #ruby
marxarelli|afk is now known as marxarelli
Devalo has quit [Ping timeout: 260 seconds]
djbkd has quit [Ping timeout: 240 seconds]
Guest84 has joined #ruby
PresidentBiscuit has quit [Ping timeout: 258 seconds]
Guest84 has quit [Client Quit]
_sfiguser has quit [Ping timeout: 248 seconds]
Xentil has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
pandawhisperer has joined #ruby
<pandawhisperer> hey guys
<pandawhisperer> anyone have any advice about refactoring a Sinatra app?
Madplatypus has joined #ruby
<havenwood> pandawhisperer: I advise doing it! :-P
<pandawhisperer> havenwood: LOL
<havenwood> pandawhisperer: Is the code shareable?
<pandawhisperer> not really
<havenwood> That makes it tough.
nowhere_man has joined #ruby
<pandawhisperer> but let's say it's similar to what this post advises as "good practice": http://blog.carbonfive.com/2013/06/24/sinatra-best-practices-part-one/
JeroenDL has quit [Ping timeout: 268 seconds]
<pandawhisperer> in other words, routes are separate modules which are `register`ed in the main app
<havenwood> pandawhisperer: My favorite way to refactor a Sinatra app is to turn it into a Roda app.
<havenwood> It's nice to go through the plugins and compose the app you really need.
iogbe has joined #ruby
<pandawhisperer> havenwood: not really looking to learn yet another framework
<havenwood> Roger that.
<pandawhisperer> and roda doesn't look so different from Sinatra, how/why is it better?
axl_ has quit [Ping timeout: 260 seconds]
<havenwood> It uses a routing tree, which helps it maintain speed with tens of thousands of routes (for when that happens). It's nothing more than that by default, so that's simple. There's a single roda.rb file to read and understand beyond Rack. Then you can cherry pick plugins to compose the app you want.
axl_ has joined #ruby
vuoto has quit [Remote host closed the connection]
<havenwood> It's a great exercise to go through each plugin and decide.
<havenwood> And there is great care taken to avoid namespace pollution, which ends up saving me a bunch of time.
<havenwood> pandawhisperer: The routing tree might look a little more complex with hello world examples but ends up working really well for sharing common code between routes of various types.
symm- has joined #ruby
<havenwood> pandawhisperer: The plugins are worth perusing in any case: https://github.com/jeremyevans/roda/tree/master/lib/roda/plugins
<havenwood> pandawhisperer: You might try the #sinatra channel as well if you haven't already.
<pandawhisperer> yeah but can you write modular apps with it?
<havenwood> yerp
<pandawhisperer> I don't/can't have a single monolithic file
<pandawhisperer> funny enough, the Roda sample app on the "Why?" page is actually longer than the sinatra app
symm- has quit [Client Quit]
<pandawhisperer> but I will try the #sinatra channel, thx
skweek has quit [Ping timeout: 250 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Papierkorb> pandawhisperer: It's much easier to write modular applications with roda than with sinatra
_sfiguser has joined #ruby
<Papierkorb> one of the many good things that come out of the routing tree
<pandawhisperer> honestly I don't really see the point of Roda, except it's sinatra with scopes
<pandawhisperer> and the website looks like it's someone's side project from 2003
djbkd has joined #ruby
<Papierkorb> Do you use `sequel`?
<pandawhisperer> nope, ActiveRecord
rfoust has joined #ruby
gheegh has joined #ruby
<havenwood> pandawhisperer: Ruby is someone's side project from 1995.
SteenJobs has joined #ruby
aswen has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
<havenwood> pandawhisperer: :-P
Xeago has quit [Ping timeout: 260 seconds]
<pandawhisperer> havenwood sure, but the website doesn't scream that
dnicole has joined #ruby
<Papierkorb> Dunno what's wrong with the webpage, looks perfectly fine to me. easily readable and no clutter.
<Papierkorb> Roda is written by a developer for developers
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<havenwood> It really is lovely.
gandalf has joined #ruby
tomphp has joined #ruby
Xeago has joined #ruby
roflmyeggo has joined #ruby
jackjackdripper has joined #ruby
<pandawhisperer> - some guy on IRC
<Papierkorb> pandawhisperer: tbh you just wasted more time on this than it would've taken to build a modular test app in both sinatra and roda
jcao219 has joined #ruby
llabrat has joined #ruby
Derperperd has joined #ruby
workmad3 has joined #ruby
saslam has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
fbt has quit [Ping timeout: 245 seconds]
iogbe has quit [Ping timeout: 260 seconds]
rwb has joined #ruby
fbt has joined #ruby
jhack has quit [Quit: jhack]
mifadir has joined #ruby
fmcgeough has joined #ruby
Rodya_ has quit [Remote host closed the connection]
UserOO7 has joined #ruby
william3 has quit [Remote host closed the connection]
blackwind_123 has quit [Ping timeout: 245 seconds]
claudiuinberlin has quit []
william3 has joined #ruby
skweek has joined #ruby
polishdub has quit [Quit: Leaving]
m4rCsi has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Quit: Leaving.]
blackwind_123 has joined #ruby
gandalf has quit []
jackjackdripper has joined #ruby
dnicole has quit [Remote host closed the connection]
matp has quit [Read error: Connection reset by peer]
matp_ has joined #ruby
Rodya_ has joined #ruby
UserOO7 has quit [Ping timeout: 258 seconds]
moei has joined #ruby
william3 has quit [Ping timeout: 250 seconds]
SirCmpwn has quit [Ping timeout: 260 seconds]
j0bk has quit [Ping timeout: 260 seconds]
j0bk has joined #ruby
SirCmpwn has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
<adam12> pandawhisperer: Have you looked at Padrino? It's Sinatra on steroids.
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adam12> Roda is nice but I don't enjoy the routing tree style as much. Shame because Jeremy Evans is an awesome OSS maintainer.
hotpancakes has joined #ruby
<matthewd> There's also this neat little project called Rails... :trollface:
<adam12> :O
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
PresidentBiscuit has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
<dminuoso> matthewd: You mean this? https://www.youtube.com/watch?v=0_PK1eDQyVg
<dminuoso> Note, this was an aprils fools joke. :)
suck has quit [Quit: Connection closed for inactivity]
tomphp has joined #ruby
PresidentBiscuit has quit [Ping timeout: 260 seconds]
gusrub has quit [Read error: Connection reset by peer]
gusrub has joined #ruby
jcomito has quit [Quit: WeeChat 1.6]
Immune has joined #ruby
llabrat has quit [Remote host closed the connection]
palms_ has quit [Remote host closed the connection]
Sammichmaker has joined #ruby
symm- has joined #ruby
Silox| has quit [Quit: Connection closed for inactivity]
jmarrero has quit [Quit: Leaving]
nankyokusei has joined #ruby
erblite has joined #ruby
Jackneill has quit [Remote host closed the connection]
erblite has left #ruby ["WeeChat 1.5"]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 258 seconds]
johnmccabe has joined #ruby
harai has quit [Ping timeout: 258 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lenwood has quit [Ping timeout: 250 seconds]
rfoust has joined #ruby
skalfyfan has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
hotpanca_ has joined #ruby
charliesome has joined #ruby
Derperperd has quit [Quit: Derperperd]
jcao219 has quit [Ping timeout: 260 seconds]
erblite has joined #ruby
hotpancakes has quit [Ping timeout: 245 seconds]
marxarelli is now known as marxarelli|afk
lenwood has joined #ruby
centrx has quit []
last_staff has joined #ruby
Derperperd has joined #ruby
firstdayonthejob has quit [Quit: WeeChat 1.6]
Derperperd has quit [Client Quit]
johnmilton has joined #ruby
bodgix has joined #ruby
muelleme has quit [Ping timeout: 244 seconds]
hotpanca_ has quit []
armin has joined #ruby
jcao219 has joined #ruby
CloCkWeRX has joined #ruby
Derperperd has joined #ruby
adavia has quit [Ping timeout: 258 seconds]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
ruby-lang273 has joined #ruby
tercenya has quit [Remote host closed the connection]
railssmi_ has joined #ruby
tercenya has joined #ruby
ruby133 has joined #ruby
Derperperd has quit [Client Quit]
railssmith has quit [Ping timeout: 245 seconds]
Eiam has quit [Ping timeout: 258 seconds]
ruby133 has quit [Client Quit]
ruby-lang273 has quit [Client Quit]
PresidentBiscuit has joined #ruby
arescorpio has joined #ruby
saneax-_-|AFK is now known as saneax
Xiti has quit [Quit: Xiti]
nelsonsar has quit [Remote host closed the connection]
nelsonsar has joined #ruby
PresidentBiscuit has quit [Ping timeout: 240 seconds]
erblite has quit [Quit: WeeChat 1.5]
railssmith has joined #ruby
ResidentBiscuit has quit [Ping timeout: 260 seconds]
railssmi_ has quit [Ping timeout: 260 seconds]
nelsonsar has quit [Ping timeout: 268 seconds]
maloik has quit [Remote host closed the connection]
vikaton has quit [Quit: Connection closed for inactivity]
maloik has joined #ruby
axl_ has quit [Quit: axl_]
Xiti has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
adavia has joined #ruby
Immune has quit [Ping timeout: 260 seconds]
nowhere_man has quit [Remote host closed the connection]
skalfyfan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
axsuul has quit [Ping timeout: 250 seconds]
johnmilton has quit [Remote host closed the connection]
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
nowhere_man has joined #ruby
nelsonsar has joined #ruby
benlieb has quit [Quit: benlieb]
nowhere_man has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
nowhere_man has joined #ruby
saslam has quit [Ping timeout: 246 seconds]
marxarelli|afk is now known as marxarelli
railssmi_ has joined #ruby
railssmith has quit [Ping timeout: 258 seconds]
guacamole has quit [Quit: leaving]
arthurl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SteenJobs has quit [Quit: SteenJobs]
jhack has joined #ruby
jhack has quit [Client Quit]
saneax is now known as saneax-_-|AFK
benlieb has joined #ruby
bodgix has quit [Quit: Leaving.]
dnicole has joined #ruby
aryaching has quit [Ping timeout: 240 seconds]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
bastelfreak has quit [Ping timeout: 265 seconds]
benlieb has quit [Ping timeout: 256 seconds]
zenspider has joined #ruby
csk has quit [Quit: Bye]
bastelfreak has joined #ruby
minimalism has joined #ruby
GodFather has joined #ruby
koooge has joined #ruby
lenwood has quit [Ping timeout: 246 seconds]
sdwrage has quit [Read error: Connection reset by peer]
zenspider has quit [Client Quit]
bayed has quit [Quit: Connection closed for inactivity]
sdwrage has joined #ruby
Eiam has joined #ruby
aegis3121 has quit [Ping timeout: 244 seconds]
TomyLobo has quit [Ping timeout: 260 seconds]
TomyLobo has joined #ruby
dnicole has quit [Remote host closed the connection]
guacamole has joined #ruby
guacamole has quit [Client Quit]
rwb has quit [Ping timeout: 248 seconds]
guacamole has joined #ruby
guacamole has quit [Client Quit]