jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
<acovrig> jhass: yea, I would trust the code, but I updated my gist (https://gist.github.com/acovrig/57d58cdc924b8086733d) with output.txt and my current parse.rb
finisherr has quit [Quit: finisherr]
<jhass> acovrig: that be the no or 1 child td case
<jhass> whatever comes first
ta has joined #ruby
<jhass> well, nvm it must be the only 1 case
<jhass> mh
<jhass> though that would fail on the [1] too
<jhass> sure line 12 is still line 12 in your gist?
<shevy> jhass have you been coding anything interesting in crystal as of late?
devoldmx has quit [Ping timeout: 240 seconds]
Bellthoven has joined #ruby
<jhass> shevy: p.jhass.eu was still the last thing
<jhass> acovrig: doc.xpath('//table[@id="ctl00_ContentPlaceHolder1_GridView1"]/tr').each_with_object(Hash.new(0)) {|row, counts| counts[row.xpath(".//td").count] += 1 }
<jhass> => {24=>2, 0=>1, 11=>50}
<jhass> that HTML is crazy, random divs in the middle of the <tr>
idefine has joined #ruby
<acovrig> jhass: yea… I was looking at it in Chrome’s inspector, and was wondering why I was getting the pagination given it was clearly not in that table; then I looked at the SC and it was in the table :/
<jhass> yeah inspectors show the parsed DOM tree, often misleading as to the actual source
Uptime has quit [Killed (christel (Bring a plate, it will be sweet as ...))]
solocshaw has joined #ruby
skcin7 has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Ping timeout: 255 seconds]
Ropeney has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
B1n4r10 has joined #ruby
colleenmcguckin has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Uptime has joined #ruby
charliesome has joined #ruby
nateberkopec has joined #ruby
drys has joined #ruby
snguyen has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
colleenmcguckin has quit [Read error: Connection reset by peer]
colleenmcguckin has joined #ruby
f00bar-32 has joined #ruby
houhoulis has quit [Remote host closed the connection]
baweaver has joined #ruby
jjwright has quit [Quit: leaving]
houhoulis has joined #ruby
jbrhbr has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
f00bar-32 has quit [Ping timeout: 240 seconds]
Regulati_ has quit [Remote host closed the connection]
astrobunny has joined #ruby
bigmac has quit [Ping timeout: 250 seconds]
bithon has quit [Quit: WeeChat 1.3]
bithon has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
bithon has quit [Changing host]
bithon has joined #ruby
jun_ has joined #ruby
Drakevr has quit [Ping timeout: 245 seconds]
bigmac has joined #ruby
<hxegon> TFW you have no choice but to dive into somebody's gross repo
<hxegon> "why is the gemfile in the spec folder?" "Is this copy-pasted?"
SCHAAP137 has joined #ruby
ascarter has joined #ruby
<hxegon> "Why does every other line have a long comment?" The answers, I may never know.
<hxegon> "how did this get 86 stars"
jbrhbr has quit [Quit: Leaving.]
pika_pika has joined #ruby
jbrhbr has joined #ruby
rehat has quit [Ping timeout: 246 seconds]
<shevy> lol
<blub> hi shevy
jbrhbr has quit [Client Quit]
hizenger has quit [Ping timeout: 252 seconds]
Drakevr has joined #ruby
tulak has quit [Remote host closed the connection]
acovrig has quit [Quit: acovrig]
B1n4r10 has quit [Ping timeout: 255 seconds]
kies has quit [Ping timeout: 272 seconds]
<hxegon> "why wont this mofo merge any of the clearly necessary PRs?"
CloCkWeRX has joined #ruby
moeabdol1 has quit [Quit: WeeChat 1.3]
whippythellama has quit [Quit: WeeChat 1.3]
<hxegon> "is that why there are 71 forks?"
<shevy> hey blub
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramortegui has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stannard has joined #ruby
postmodern has joined #ruby
htmldrum has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
pawnbox has joined #ruby
jbrhbr has joined #ruby
howdoicomputer has joined #ruby
stannard has quit [Ping timeout: 265 seconds]
mary5030 has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
ascarter has joined #ruby
charliesome has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
dmolina has quit [Quit: Leaving.]
howdoicomputer has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
cwong_on_irc has quit [Quit: Leaving.]
mary5030 has quit [Ping timeout: 272 seconds]
ruid has joined #ruby
ruid has joined #ruby
Axy has quit [Ping timeout: 250 seconds]
bbert has joined #ruby
bbert has joined #ruby
DLSteve has joined #ruby
beast has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
howdoicomputer has joined #ruby
atomical has joined #ruby
toretore has quit [Ping timeout: 250 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvon has joined #ruby
Mia has quit [Ping timeout: 256 seconds]
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
NeverDie has quit [Quit: http://radiux.io/]
Bellthoven has quit []
baweaver has quit [Remote host closed the connection]
Yzguy has joined #ruby
sneakerhax has quit [Quit: Leaving]
hxegon has quit [Ping timeout: 256 seconds]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Quit: WeeChat 1.3]
AnoHito has quit [Ping timeout: 240 seconds]
jun_ has quit [Remote host closed the connection]
Azure has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
howdoicomputer has quit [Ping timeout: 255 seconds]
devbug has joined #ruby
tvw has quit [Remote host closed the connection]
tvon has quit []
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
marr has quit [Ping timeout: 272 seconds]
pawnbox has joined #ruby
Axy has quit [Ping timeout: 256 seconds]
snockerton has quit [Quit: Leaving.]
baweaver has joined #ruby
seitensei has joined #ruby
NeverDie has joined #ruby
RegulationD has joined #ruby
rgtk has joined #ruby
beast has quit [Quit: Leaving]
jun_ has joined #ruby
pawnbox has quit [Ping timeout: 255 seconds]
phantummm has quit [Ping timeout: 272 seconds]
lemur has joined #ruby
ixti has quit [Quit: WeeChat 1.3]
RegulationD has quit [Ping timeout: 272 seconds]
rgtk has quit [Ping timeout: 246 seconds]
B1n4r10 has joined #ruby
B1n4r10 has quit [Client Quit]
iwaffles has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
pika_pika has quit [Ping timeout: 240 seconds]
jackjackdripper1 has quit [Quit: Leaving.]
n0xff has left #ruby [#ruby]
ornerymoose has joined #ruby
david77 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
B1n4r10 has joined #ruby
Nanuq has quit [Quit: Lost terminal]
rsc___ has joined #ruby
Nanuq has joined #ruby
nettoweb has quit [Max SendQ exceeded]
nocd has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scripore has joined #ruby
jun_ has joined #ruby
scripore has quit [Max SendQ exceeded]
idefine has joined #ruby
scripore has joined #ruby
nettoweb has joined #ruby
atomical has joined #ruby
B1n4r10 has quit [Quit: leaving]
pawnbox has joined #ruby
idefine has quit [Ping timeout: 256 seconds]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
B1n4r10 has joined #ruby
Bloomer has joined #ruby
pawnbox has quit [Ping timeout: 265 seconds]
jun_ has quit [Read error: Connection reset by peer]
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
jun_ has joined #ruby
idefine has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
stevemackinnon has joined #ruby
Vitor has joined #ruby
pleiosaur has joined #ruby
kirun has quit [Quit: Client exiting]
arescorpio has joined #ruby
stevemackinnon is now known as smactive
jun_ has quit [Remote host closed the connection]
goodcodeguy has joined #ruby
jbrhbr has quit [Quit: Leaving.]
Respek has joined #ruby
goodcodeguy has quit [Client Quit]
goodcodeguy has joined #ruby
baweaver has quit [Remote host closed the connection]
nertzy has joined #ruby
B1n4r10_ has joined #ruby
Bloomer has quit [Remote host closed the connection]
hectortrope has quit [Read error: Connection reset by peer]
B1n4r10_ has quit [Client Quit]
hectortrope has joined #ruby
Feyn has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
Encapsulation has quit [Ping timeout: 246 seconds]
moredhel has quit [Remote host closed the connection]
BSaboia has joined #ruby
viktor_ has quit [Remote host closed the connection]
elavee has joined #ruby
<elavee> is anyone here using .rbenv? and does .rbenv have to be in ~/.rbenv ?
BrunoSaboia has quit [Ping timeout: 250 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jun_ has joined #ruby
blackgoat has quit [Ping timeout: 255 seconds]
saddad has joined #ruby
jun_ has quit [Remote host closed the connection]
jun_ has joined #ruby
cdnsteve has joined #ruby
Yzguy has quit [Quit: Zzz...]
Yzguy has joined #ruby
bronson has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
elavee has left #ruby [#ruby]
pawnbox has joined #ruby
bronson has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
saddad has quit [Ping timeout: 272 seconds]
bb010g has joined #ruby
wolffles has joined #ruby
Nanuq has quit [Quit: leaving]
idefine has quit [Remote host closed the connection]
stevenxl has quit [Quit: leaving]
Mark-6ma has joined #ruby
dlitvak has joined #ruby
Bloomer has joined #ruby
colleenmcguckin has quit []
malconis has joined #ruby
rubio has quit [Quit: This computer has gone to sleep]
nerium has quit [Quit: nerium]
malconis has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 240 seconds]
snguyen has joined #ruby
ur5us has joined #ruby
malconis has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
rubio has joined #ruby
TomPeed has joined #ruby
nerium has joined #ruby
woodruffw is now known as yossarian-bot
ruid has quit [Ping timeout: 272 seconds]
yossarian-bot is now known as woodruffw
TomPeed has quit [Client Quit]
phantummm has joined #ruby
rubio has quit [Quit: Leaving]
colleenmcguckin has joined #ruby
moeabdol has joined #ruby
colleenmcguckin has quit [Client Quit]
dlitvak has joined #ruby
cout has quit [Remote host closed the connection]
cdnsteve has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
pawnbox has joined #ruby
idefine has joined #ruby
Kamilion has quit [Ping timeout: 256 seconds]
KIKKES has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
idefine has quit [Remote host closed the connection]
KIKKES has left #ruby [#ruby]
rsc___ has quit [Quit: rsc___]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Ping timeout: 240 seconds]
ruby-lang706 has quit [Ping timeout: 252 seconds]
ohaibbq has joined #ruby
Respek has quit [Quit: Textual IRC Client: www.textualapp.com]
nocd has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
eytanfb has quit [Remote host closed the connection]
kyke has joined #ruby
dlitvak has quit [Remote host closed the connection]
<kyke> does ruby let you make your own http requests?
idefine has joined #ruby
<Radar> kyke: yes
ur5us has quit [Remote host closed the connection]
<kyke> sweet
<kyke> what is a good implementation or would that be considered plagiarism?
symm- has quit [Ping timeout: 240 seconds]
<Radar> kyke: !g ruby http
ramortegui has quit [Remote host closed the connection]
<Radar> Oh, right #ruby.
<Radar> "ruby http" would be some good googling terms
<Radar> httparty is one of my favourite libraries
<kyke> thanks
<kyke> why is the bot failing?
<Radar> Because helpa is muted in this channel.
<Radar> To stop it conflicting with the official bot, rubber
jackjackdripper has joined #ruby
<Radar> ... ruboto.
<jhass> heh, httparty is my least favorite
SCHAAP137 has quit [Remote host closed the connection]
phantummm has quit [Ping timeout: 255 seconds]
Arnvald has joined #ruby
iateadonut has joined #ruby
rgtk has joined #ruby
Anderson69s has joined #ruby
bigmac is now known as i8igmac
bronson has quit [Remote host closed the connection]
blackgoat has joined #ruby
kyke has quit [Ping timeout: 252 seconds]
Anderson69s has quit [Client Quit]
Nanuq has joined #ruby
danielpclark has joined #ruby
howdoicomputer has joined #ruby
baweaver has joined #ruby
spacemud has quit [Quit: ZNC - http://znc.in]
rgtk has quit [Ping timeout: 246 seconds]
snguyen has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak has joined #ruby
hahuang65 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
mary5030 has joined #ruby
jackjackdripper has joined #ruby
ur5us has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 255 seconds]
revengeofbigd has joined #ruby
dlitvak has quit [Ping timeout: 240 seconds]
hahuang65 has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Remote host closed the connection]
spt0 has quit [Ping timeout: 256 seconds]
postmodern has quit [Quit: Leaving]
douglass1 has left #ruby [#ruby]
nertzy has quit [Quit: This computer has gone to sleep]
baweaver has joined #ruby
Jardayn has quit [Quit: Leaving]
solocshaw has quit [Ping timeout: 240 seconds]
nerium has quit [Quit: nerium]
solocshaw has joined #ruby
amclain has quit [Quit: Leaving]
floatingpoint has joined #ruby
dlitvak has joined #ruby
spt0 has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
calderonroberto has quit [Ping timeout: 240 seconds]
jpank has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
spt0 has quit [Ping timeout: 272 seconds]
phantummm has joined #ruby
devoldmx has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
ornerymoose has joined #ruby
kies has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
stannard has joined #ruby
calderonroberto has joined #ruby
devoldmx has quit [Ping timeout: 272 seconds]
Bloomer has quit [Read error: Connection reset by peer]
braincrash has quit [Quit: bye bye]
jgpawletko has joined #ruby
celly has joined #ruby
jbrhbr has joined #ruby
wolffles has quit [Quit: wolffles]
RobertBirnie has joined #ruby
zast has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
atomical has quit [Ping timeout: 265 seconds]
pawnbox has joined #ruby
shiru has joined #ruby
braincrash has joined #ruby
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
nerium has joined #ruby
devbug has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
arescorpio has quit [Quit: Leaving.]
wolffles has joined #ruby
pawnbox has joined #ruby
lessless has joined #ruby
<lessless> is it possible to simplify this code: def self.perform(inviter:, organization:, invitee_email:)
<lessless> new(inviter: inviter, organization: organization, invitee_email: invitee_email)
<lessless> end
<lessless> something like arguments in JS, or clever use of the splat operator?
beast has joined #ruby
gix has quit [Ping timeout: 250 seconds]
Bloomer has joined #ruby
atomical has joined #ruby
shiru has quit [Ping timeout: 246 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bloomer has quit [Remote host closed the connection]
gix has joined #ruby
boshhead has quit [Quit: No Ping reply in 180 seconds.]
pawnbox_ has joined #ruby
Guest25637 is now known as saneax_AFK
bronson has joined #ruby
Mark-6ma has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TotenSieDieJuden has joined #ruby
boshhead has joined #ruby
<TotenSieDieJuden> hallo
yeticry has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
blackgoat has quit [Ping timeout: 240 seconds]
juddey has quit [Ping timeout: 240 seconds]
Mr_Psmith has joined #ruby
beast has quit [Quit: Leaving]
pawnbox has quit [Ping timeout: 265 seconds]
<Mr_Psmith> Hi friends; I am a python and Go programmer. A graduate student asked me to help with her ruby script. To do this I need to figure out how to drop back into the REPL (Irb) after running the script AND be able to inspect values. So far I can do irb -r ./script.rb or from the irb> load ‘./script.rb’ but in neither case can I inspect variables in scope fo the script. Help!
yqt has quit [Ping timeout: 240 seconds]
<jhass> ?pry Mr_Psmith
<ruboto> Mr_Psmith, Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<Mr_Psmith> Thank you!
<jhass> !ban TotenSieDieJuden !T 1w bad nick
TotenSieDieJuden was banned on #ruby by ChanServ [TotenSieDieJuden!*@*]
TotenSieDieJuden was kicked from #ruby by ChanServ [Banned: bad nick]
<mozzarella> what does it mean?
<Mr_Psmith> mozzarella: Something like Kill the Jews
Yzguy has quit [Quit: Cya]
EllisTAA has joined #ruby
astrobun_ has joined #ruby
<EllisTAA> what is the most efficient way to extract the 56% from this string ‘Up to 56% Off Fitness Classes at Yubalance’
<jhass> lessless: you could do **kwargs on both, that would add a level of stacktrace on invalid args
<jhass> ellistaa: extracted = "56%"
<EllisTAA> jhass: but i wont always know what the percent is
<jhass> ellistaa: I'm only working from the sample input you've given
<EllisTAA> i thought maybe i could somehow use regex but that didn’t seem to work
<mozzarella> >> 'Up to 56% Off Fitness Classes at Yubalance'[/\d+%/]
<ruboto> mozzarella # => "56%" (https://eval.in/485951)
B1n4r10 has quit [Ping timeout: 240 seconds]
<EllisTAA> mozzarella: what is that? looks like a regex but i haven’t seen that syntax
<jhass> &ri String#[]
<`derpy> method `String#[]`: Element Reference --- If passed a single +index+, returns a substring of one cha… • http://rubydoc.info/stdlib/core/String#%5B%5D-instance_method
<EllisTAA> cool thanks
chouhoulis has joined #ruby
kies has quit [Ping timeout: 265 seconds]
Contigi has joined #ruby
<lessless> jhass, thanks!
chouhoulis has quit [Ping timeout: 255 seconds]
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
Bloomer has joined #ruby
mallu has joined #ruby
astrobun_ has quit [Remote host closed the connection]
<mallu> what is that method for repeating whatever you pass n times?
astrobun_ has joined #ruby
dionysus69 has joined #ruby
<mallu> lets say I want to repeat 'hi' 4 times
<mallu> hi.times(4)?
<jhass> >> "hi" * 4 # ?
<ruboto> jhass # => "hihihihi" (https://eval.in/485953)
giftgas has joined #ruby
giftgas was kicked from #ruby by ChanServ [Banned: bad nick]
<mallu> jhass: thanks
mallu has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
<wolffles> is there a method that you can use on arrays to compare two values?
<jhass> >> ["a"] == ["a"] # ?
<ruboto> jhass # => true (https://eval.in/485954)
hahuang65 has joined #ruby
kies has joined #ruby
<jhass> wolffles: ^ if not please clarify
bbert has quit [Ping timeout: 255 seconds]
mallu has joined #ruby
berserk_ren has joined #ruby
dlitvak has joined #ruby
Bloomer has left #ruby [#ruby]
<wolffles> (two_sum([1, 3, 5, -3]) I need to make a method where a pairs sum is = 0 … i made a method but its 17 lines long just wondering if, there is a built in method for arrays
ur5us has joined #ruby
<wolffles> (two_sum([1, 3, 5, -3]) == [1,3] is the answer
<jhass> you mean [1, -3]?
<wolffles> [1,3] is array position so 3,-3
<jhass> right
astrobu__ has joined #ruby
<floatingpoint> yo
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hagabaka has joined #ruby
<jhass> >> numbers = [1, 3, 5, -3]; pair = numbers.combination(2).find {|a, b| a+b == 0 }; pair.map {|number| numbers.index(number) }
<ruboto> jhass # => [1, 3] (https://eval.in/485967)
msankhala has joined #ruby
<jhass> would be my quick first shot
<floatingpoint> what's the best way to be able to run a ruby file directly (e.g. ruby some_file.rb) but also be able to include its methods elsewhere
sucks has quit [Read error: Connection reset by peer]
astrob___ has joined #ruby
<jhass> floatingpoint: not generally done in the ruby community, but you can check whether $0 is the file
dlitvak has quit [Ping timeout: 265 seconds]
<floatingpoint> slick
astrobun_ has quit [Ping timeout: 255 seconds]
<floatingpoint> why isn't it done in the ruby community
mary5030 has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<jhass> most people just prefer to have bin/foo and lib/foo.rb
ur5us has quit [Ping timeout: 265 seconds]
<jhass> to keep library code library code and runtime code runtime code
djbkd has joined #ruby
<jhass> often bin/foo is even just setting up load path and something like require "foo/cli"; Foo::Cli.new(ARGV)
<jhass> which makes testing a piece of cake
<jhass> since your bin/ is just trivial code you don't need to test
<floatingpoint> reasonable
astrobu__ has quit [Ping timeout: 240 seconds]
mallu has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
astrobun_ has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
<EllisTAA> i have a string that looks like this “ hello world “ what’s the best way to get rid of this?
<EllisTAA> gsub?
<jhass> foo = ""
djbkd has quit [Ping timeout: 272 seconds]
<EllisTAA> ?
astrob___ has quit [Ping timeout: 246 seconds]
lxsameer has joined #ruby
<jhass> I got rid of your string
<EllisTAA> how
<jhass> well it might be foo = nil too
<jhass> you're rather vague on what you want
<EllisTAA> sorry i meant, how to get rid of superfluous white space
<jhass> &ri String#strip
<`derpy> method `String#strip`: Returns a copy of str with leading and trailing whitespace removed. " hello ".st… • http://rubydoc.info/stdlib/core/String#strip-instance_method
Mia has quit [Read error: Connection timed out]
dionysus69 has quit [Ping timeout: 240 seconds]
<EllisTAA> jhass: awesome
stannard has quit [Remote host closed the connection]
<EllisTAA> thanks
jdm has quit [Quit: Leaving]
yfeldblum has joined #ruby
<floatingpoint> yo, does the initialize method work with default value (e.g. def initialize(somevar=20) ... )
ur5us has joined #ruby
<jhass> ?try
<ruboto> Why don't you try it and see for yourself?
yfeldblum has quit [Remote host closed the connection]
dfinninger has joined #ruby
yfeldblum has joined #ruby
idefine has quit [Remote host closed the connection]
colegatron has quit [Ping timeout: 246 seconds]
dfinninger has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 240 seconds]
<hagabaka> yay I made the leaderboard
cassioscabral has quit [Quit: cassioscabral]
<wolffles> jhass: thanks for the help, had to tweak to include Nil but its much, much cleaner than my original.
celly has quit [Remote host closed the connection]
AnoHito has joined #ruby
cassioscabral has joined #ruby
cassioscabral has quit [Client Quit]
<floatingpoint> i love it when people say TIAS. IT IS LITERALLY MY FAVORITE THING IN THE WORLD BECAUSE I LOVE TO WASTE MY TIME ASKING A QUESTION ONLY TO BE TOLD TO TRY IT MYSELF. I CLEARLY WOULDN'T HAVE DECIDED TO ASK IN THIS CHANNEL BECAUSE IT WOULD BE SIGNIFICANTLY QUICKER THAN WRITING A BUNCH OF THROWAWAY CODE TO TEST A CONCEPT THAT COULD BE ADDRESSED IN MERE SECONDS BY ASKING SOMEONE. I ALSO LOVE HOW SOME PEOPLE GO OUT OF THEIR WAY TO TELL ME TO TRY
<floatingpoint> IT MYSELF BECAUSE THEY ARE SO CLEARLY IRKED THAT SOMEONE IS ASKING A QUESTION ABOUT A FACENT OF A LANGUAGE IN THAT LANGUAGE'S COMMUNITY CHANNEL. CLEARLY, THE POINT OF THE CHANNEL IS NOT TO DISCUSS RUBY AND ASSIST THOSE IN LEARNING ABOUT THE LANGUAGE IN THE MOST EFFICIENT MANNER POSSIBLE. RATHER, AS WE ALL KNOW, SOFTWARE ENGINEERS DO ENJOY BEING AS INEFFICIENT AS POSSIBLE, SO THE MOST LOGICAL ANSWER TO A QUERY ABOUT RUBY WOULD BE TO TAKE
<floatingpoint> ONE'S OWN TIME TO TELL SOMEONE TO WRITE A BUNCH OF THROWAWAY CODE INSTEAD OF TAKING TWO SECONDS TO ANSWER SAID QUESTION. OH WAIT, THAT'S A BUNCH OF BULLSHIT, AND SO IS IT WHEN SOMEONE SAYS TIAS BECAUSE THEY DO NOT HAVE THE MATURITY AND/OR SOCIAL MANNERISMS TO ANSWER A QUESTION PLAINLY OR IGNORE IT ENTIRELY.
<bithon> wow calm down there cowboy
<bithon> put that gun away, nobody has to get hurt
cassioscabral has joined #ruby
crdpink2 has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
crdpink has quit [Ping timeout: 250 seconds]
nkwsy has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
techsethi has joined #ruby
saneax_AFK is now known as saneax
saneax is now known as Guest46104
go|dfish has quit [Remote host closed the connection]
rgtk has joined #ruby
<jhass> ?answers
<ruboto> How to ask the right questions to get you the right answer: https://www.mikeash.com/getting_answers.html
devoldmx has joined #ruby
DavidDudson has joined #ruby
<Radar> wow, looks like I missed some #goodtimes
* Nilium looks up
hahuang65 has quit [Ping timeout: 260 seconds]
<Nilium> Dude.
floatingpoint has left #ruby ["Textual IRC Client: www.textualapp.com"]
<jhass> fun fact: typing that up took them longer than it would have to test it in irb/pry
<Radar> yup
rgtk has quit [Ping timeout: 246 seconds]
colegatron has joined #ruby
<wolffles> is (my_string = String.new) the same exact thing as (my_string = “”) ?
<jhass> literally nobody does the former, so it's rather irrelevant, but I would assume so
RobertBirnie has joined #ruby
<wolffles> true if they are the same quotes would be the obvious choice
lyoshajapan has joined #ruby
houhoulis has quit [Remote host closed the connection]
s00pcan has quit [Remote host closed the connection]
chouhoulis has joined #ruby
arooni has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 255 seconds]
haraoka has joined #ruby
arooni has joined #ruby
nkwsy has quit [Ping timeout: 260 seconds]
nkwsy has joined #ruby
aspire has quit [Quit: Leaving]
ur5us has joined #ruby
<pontiki> hi, folx
c355e3b has quit [Quit: Connection closed for inactivity]
cwong_on_irc has joined #ruby
berserk_ren has quit [Ping timeout: 255 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
brendan- has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
howdoicomputer has joined #ruby
seitensei has quit [Remote host closed the connection]
sgambino has joined #ruby
Feyn has quit [Quit: Leaving]
techsethi has quit [Quit: techsethi]
DavidDudson has joined #ruby
cajone is now known as cajone_afk
techsethi has joined #ruby
janelleb has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
howdoicomputer has quit [Ping timeout: 256 seconds]
darkf has joined #ruby
kam270 has quit [Read error: Connection reset by peer]
DavidDudson has quit [Max SendQ exceeded]
anekos has quit [Ping timeout: 244 seconds]
DavidDudson has joined #ruby
ledestin has joined #ruby
seitensei has joined #ruby
djbkd has joined #ruby
seitensei has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
pabs has quit [Ping timeout: 246 seconds]
nerium has joined #ruby
techsethi has quit [Quit: techsethi]
techsethi has joined #ruby
mary5030 has joined #ruby
idefine has joined #ruby
revengeofbigd has quit [Quit: Connection closed for inactivity]
anekos has joined #ruby
nerium has quit [Quit: nerium]
jun_ has quit [Remote host closed the connection]
blackgoat has joined #ruby
nerium has joined #ruby
B1n4r10 has joined #ruby
pabs has joined #ruby
idefine has quit [Ping timeout: 255 seconds]
cassioscabral has quit [Quit: cassioscabral]
rgtk has joined #ruby
elifoster has joined #ruby
chipotle has joined #ruby
jun_ has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
nbdy has joined #ruby
pawnbox_ has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
lkba_ has quit [Remote host closed the connection]
ornerymoose has quit [Quit: ornerymoose]
rgtk has quit [Ping timeout: 246 seconds]
AnoHito has quit [Read error: Connection reset by peer]
rsc___ has joined #ruby
rsc___ has quit [Client Quit]
AnoHito has joined #ruby
trwyth has joined #ruby
codecop has joined #ruby
nerium has quit [Quit: nerium]
aganov has joined #ruby
nerium has joined #ruby
colegatron has quit [Ping timeout: 246 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kies has quit [Ping timeout: 255 seconds]
SOLDIERz has joined #ruby
trautwein has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
ur5us has joined #ruby
CloCkWeRX has joined #ruby
nerium has quit [Quit: nerium]
chouhoulis has joined #ruby
nerium has joined #ruby
kies has joined #ruby
solars has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
colegatron has joined #ruby
yardenbar has joined #ruby
trwyth has quit [Read error: Connection reset by peer]
trautwein has quit [Quit: Textual IRC Client: www.textualapp.com]
chouhoulis has quit [Ping timeout: 265 seconds]
gizless has joined #ruby
zapata has quit [Quit: WeeChat 1.3]
tagrudev has joined #ruby
Pupp3tm4st3r has joined #ruby
zapata has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
gizmore has quit [Ping timeout: 255 seconds]
last_staff has joined #ruby
<agent_white> \o
darkxploit has quit [Ping timeout: 256 seconds]
howdoicomputer has joined #ruby
ur5us has quit [Remote host closed the connection]
<EllisTAA> what would be the best way to chop off “HOT CHIP (xxxxx)” the parentheses & what’s inside of them? xxx is meant to represent unknown text
<elifoster> ellistaa: So you only want "HOT CHIP"?
<elifoster> I'm kind of confused by your question.
<EllisTAA> elifoster: yep
Kamilion has joined #ruby
<EllisTAA> yeah sorry that was worded poorly
<EllisTAA> i want to chop off the parentheses & whatever is in them
TheMoonMaster has quit [Quit: Later!]
<elifoster> ellistaa: gsub!(/\(\.+\)/, '') is one way
<elifoster> That's how I'd do it, at least. I'm sure there are other ways.
<EllisTAA> elifoster: didn’t know u could throw in a regex like that
<EllisTAA> thanks for the help
<elifoster> ellistaa: You could also do it with string[/[^\(]+/], but that will get everything before the first parantheses
howdoicomputer has quit [Ping timeout: 260 seconds]
<elifoster> so if you have "HOT CHIP (xxx) HOT CHIP" it would only get the first HOT CHIP
<EllisTAA> ah ok yeah ill use the regex
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<elifoster> ellistaa: See the docs for gsub http://ruby-doc.org/core-2.2.0/String.html#method-i-gsub-21
<EllisTAA> :D
<EllisTAA> thanks
darkxploit has joined #ruby
hays has quit [Ping timeout: 244 seconds]
nkwsy has quit [Ping timeout: 272 seconds]
radgeRayden_ has quit [Ping timeout: 256 seconds]
radgeRayden has quit [Ping timeout: 265 seconds]
skweeke3 has joined #ruby
mahk has quit [Quit: ZNC - http://znc.in]
yfeldblum has quit [Ping timeout: 260 seconds]
seitensei has joined #ruby
seitensei has joined #ruby
smactive has quit [Remote host closed the connection]
seitensei has quit [Remote host closed the connection]
howdoicomputer has joined #ruby
sigurding has joined #ruby
wolffles has quit [Quit: wolffles]
ur5us has joined #ruby
mahk has joined #ruby
jun_ has quit [Read error: Connection reset by peer]
jun_ has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
mahk has quit [Client Quit]
claw has quit [Ping timeout: 256 seconds]
ur5us has joined #ruby
mahk has joined #ruby
ur5us has quit [Remote host closed the connection]
solars has quit [Ping timeout: 240 seconds]
arooni has quit [Ping timeout: 260 seconds]
devoldmx has quit [Remote host closed the connection]
anisha has joined #ruby
jbrhbr has quit [Quit: Leaving.]
go|dfish has joined #ruby
aufi has joined #ruby
claw has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ekem is now known as mekekem
Madhur_ has quit [Ping timeout: 240 seconds]
gizmore has joined #ruby
djbkd has quit [Remote host closed the connection]
skcin7 has joined #ruby
gizmore|2 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
skcin7 has quit [Client Quit]
msankhala has quit [Quit: This computer has gone to sleep]
gizless has quit [Ping timeout: 240 seconds]
steffkes has quit [Ping timeout: 265 seconds]
ss_much has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
techsethi has quit [Quit: techsethi]
firstdayonthejob has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
ohaibbq has quit [Quit: Leaving...]
techsethi has joined #ruby
blackgoat has quit [Quit: WeeChat 1.3]
lyoshajapan has quit [Remote host closed the connection]
chouhoulis has joined #ruby
lyoshajapan has joined #ruby
bMalum has joined #ruby
rakm has joined #ruby
troulouliou_div2 has joined #ruby
nerium has quit [Quit: nerium]
<rakm> hi, i've gotten a sqlite3 database of icons, and presumably images are stored in this db as a blob field. i'm trying to read this with the ruby client and the file is coming out as corrupted. on the insert side, i see some code that does `s/1/12/g` and `s/\0/11/g`. anyone know why that would be?
howdoicomputer has quit [Ping timeout: 256 seconds]
<rakm> also possible that i'm trying to read the data wrong, or that the blob doesn't have what i think it has. using this method to read: http://zetcode.com/db/sqliteruby/images/
cpup has quit [Ping timeout: 256 seconds]
ur5us has quit [Remote host closed the connection]
juddey has joined #ruby
cpup has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
bMalum has quit [Ping timeout: 256 seconds]
janelleb has joined #ruby
mary5030 has quit [Remote host closed the connection]
jas02 has joined #ruby
tomaz_b has joined #ruby
davedev2_ has joined #ruby
andikr has joined #ruby
jbrhbr has joined #ruby
davedev24 has quit [Ping timeout: 260 seconds]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackgoat has joined #ruby
phantummm has quit [Ping timeout: 240 seconds]
CloCkWeRX has quit [Ping timeout: 260 seconds]
rsc___ has joined #ruby
Andy01012016 has joined #ruby
gizmore has joined #ruby
gizmore has quit [Changing host]
gizmore has joined #ruby
certainty-web has joined #ruby
<certainty-web> moin
gizmore|2 has quit [Ping timeout: 255 seconds]
techsethi has quit [Quit: techsethi]
yfeldblum has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: leaving]
EllisTAA has quit [Quit: ellistaa]
B1n4r10 has joined #ruby
mahk has quit [Quit: quit]
mahk has joined #ruby
zeroDivisible has quit [Quit: WeeChat 1.3]
dimik has quit [Ping timeout: 240 seconds]
kmckelvi1 has quit [Quit: WeeChat 1.3]
djbkd has joined #ruby
TomyWork has joined #ruby
solars has joined #ruby
B1n4r10 has quit [Ping timeout: 255 seconds]
vondruch has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
devbug_ has joined #ruby
kies has quit [Ping timeout: 265 seconds]
agent_white has quit [Quit: Lost terminal]
<Veejay> Hello everyone, generally speaking, is Net::HTTP the most memory efficient way to make HTTP requests in Ruby?
Contigi has quit [Ping timeout: 272 seconds]
devbug_ has quit [Ping timeout: 260 seconds]
zast has quit [Remote host closed the connection]
<j416> Net::HTTP is in standard library and is a common thing to use; I would be surprised if that is implemented in a memory-clumsy way, but this is ruby and if performance is of great concern you may want to consider a different language
juddey has quit [Ping timeout: 255 seconds]
<Veejay> I'm using a queue and a bunch of threads for parallel file copy operations from a Rackspace container to another Rackspace container (currently using Fog to do so). I'm thinking of ditching Fog altogether and executing the HTTP Copy operations myself and I was looking for the barest solution
troulouliou_div2 has quit [Quit: Leaving]
agent_white has joined #ruby
<Veejay> j416: Thanks
baweaver has quit [Remote host closed the connection]
hagabaka has quit [Ping timeout: 255 seconds]
<j416> I have not used Fog, I don't know if it has performance issues
psy_ has quit [Remote host closed the connection]
<Veejay> j416: Not it does per se, but it has a tendency to be an all-encompassing solution for all things cloud ™
Balzrael has joined #ruby
<Veejay> +that
<Veejay> Handling all different cloud providers, etc.
msankhala has joined #ruby
blackms has quit [Quit: Leaving]
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
rgtk has joined #ruby
<Veejay> It doesn't exactly qualify as "lean"
devoldmx has joined #ruby
baweaver has joined #ruby
<j416> Veejay: I'm not sure what you're doing, but if performance is a problem and the only thing you're doing is copying stuff from one place to the other in a parallel manner, it sounds to me like Go could be a nice fit.
Hounddog has joined #ruby
kp666 has joined #ruby
juddey has joined #ruby
<Veejay> Alright, thanks a lot
<j416> Go handles concurrency nicely (and can do threads, which ruby can't), and it has good support for HTTP
<j416> just a thought.
<ljarvis> wat? ruby can't do threads?
<j416> surprise surprise! :D
rgtk has quit [Ping timeout: 246 seconds]
devoldmx has quit [Ping timeout: 265 seconds]
madcodes has joined #ruby
djbkd has quit [Remote host closed the connection]
polysics has joined #ruby
<j416> MRI runs on a single core, and even as though some implementations support real threading, gems that you may be using may not be built with concurrency in mind, since ruby is not a language generally seen as something you would do multi-threaded multi-core development in
solars has quit [Ping timeout: 256 seconds]
<j416> so I suppose if you're very careful, it might work™.
huyderman has joined #ruby
<Veejay> j416: Threads actually have an extremely positive impact on performance in our use case
edwinvdgraaf has joined #ruby
<j416> (and, I didn't come here to bash on ruby, ruby is a great language in many ways, and _shouldn't_ be good at everything, or it wouldn't be a great language anymore)
<Veejay> Because the Rackspace Cloud Files API handles concurrent requests nicely
<ljarvis> so "ruby can't do threads" is actually absolutely incorrect
<Veejay> But it's memory that is killing us
<j416> Veejay: if the CPU usage is your bottleneck, then MRI ruby threads won't help, but if disk IO is the problem, maybe it will
<j416> I'm speculating.
<Veejay> j416: It's memory
firstdayonthejob has quit [Ping timeout: 260 seconds]
<ljarvis> don't get me wrong, I'm all about the right tool for the job and Ruby doesn't always fit, but lets not throw around buzz statements
<j416> ljarvis: buzz?
<Veejay> ljarvis: I agree, Ruby does threads fine
<ljarvis> yes, it's like saying ruby doesn't scale
<j416> Veejay: in that case, maybe threads are not your solution to performance, but a tool to get a nicer implementation?
<j416> :)
davedev2_ has quit []
<j416> ljarvis: I didn't come here to start a flame war, so please don't interpret it that wya.
<j416> way*
<j416> if you think ruby threads are awesome, use them
<Veejay> j416: Threads give us a x15 speedup VS serial operations in this case
<ljarvis> I didnt' say they were awesome (I generally think they're not) so I probably agree, I just didn't like "can do threads, which ruby can't" is all
<j416> Veejay: nice! so CPU is not the issue, but rather HTTP request handling
<j416> Veejay: I suppose.
ascarter has joined #ruby
<j416> Veejay: back to the original question -- I don't know if bare Net::HTTP will give you a lot of performance boost, maybe it will, but a wild guess is that you won't see another 15x increase
certainty-web has quit [Ping timeout: 252 seconds]
<ljarvis> I concur with ^ and would say the library you use is very unlikely to be the bottleneck to http performance
<j416> Veejay: I would do any or all of: 1) look at the implementation of fog and see if it looks good for your use-case; 2) build your own maybe-faster version; 3) build the thing in a language built for what you are doing
<ljarvis> fog is a monster, but it uses excon underneath for http connections
vasilakisfil has joined #ruby
<vasilakisfil> hey.. would that make sense somewhere? h = {lambda { puts 'hey' } => lambda { puts "hello world"}}
<j416> Veejay: or 4) accept what you have :)
rsc___ has quit [Quit: rsc___]
<vasilakisfil> how can I access the key ?
<ljarvis> Veejay: no
<j416> vasilakisfil: what is your use-case for it?
<ljarvis> vasilakisfil: no
joonty has joined #ruby
<vasilakisfil> I have a use case in combination with https://github.com/fl00r/pickup
<vasilakisfil> to generate random keys
chouhoulis has joined #ruby
<vasilakisfil> but obviously that's not how it's meant to be used
dlitvak has joined #ruby
lightstalker has quit [Ping timeout: 246 seconds]
akahn has quit [Ping timeout: 250 seconds]
<j416> vasilakisfil: >> foo = -> { puts 'foo' }; h = { foo => -> { puts 'bar' } }; h[foo].call
<j416> hm how do I trigger the thing
<Veejay> ljarvis: Regarding Excon, not sure I understand... Do you mean it's a good thing it uses Excon, or like "it's a behemoth, but oh well what're you gonna do, it uses Excon..."
BSaboia has quit [Ping timeout: 265 seconds]
<j416> >> foo = -> { puts 'foo' }; h = { foo => -> { puts 'bar' } }; h[foo].call
<ruboto> j416 # => bar ...check link for more (https://eval.in/486043)
c0m0 has joined #ruby
<j416> vasilakisfil: ^
<j416> Veejay: but I'm not sure why you would want to use a lambda as a key
<Veejay> Cause it's there?
nbdy has quit [Quit: Textual IRC Client: www.textualapp.com]
<ljarvis> Veejay: good question. I don't really think excon is any better/worse than net/http. The API is a bit nicer probably, and for picking a http library that + features you require should be important things because performance shouldn't be
<Veejay> Hilarity ensues
nunchuck has quit [Ping timeout: 272 seconds]
akahn has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 240 seconds]
curses has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
vondruch has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
rattatmatt has quit [Quit: Leaving]
agent_white has joined #ruby
jackjackdripper1 has joined #ruby
Snowy has joined #ruby
wmdrossard has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Quit: Leaving.]
skade has joined #ruby
krz has joined #ruby
skade has quit [Client Quit]
madcodes has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
rsc___ has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Client Quit]
Guest46104 is now known as saneax_AFK
elaptics`away is now known as elaptics
coderhut has joined #ruby
skade has joined #ruby
mikecmpbll has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
psy_ has joined #ruby
djbkd has joined #ruby
monthy has joined #ruby
chthon has joined #ruby
seitensei has joined #ruby
seitensei has joined #ruby
KnownSyntax has quit [Read error: Connection reset by peer]
HowardwLo has joined #ruby
HowardwLo has left #ruby [#ruby]
madcodes has joined #ruby
rsc___ has joined #ruby
kies^ has quit [Ping timeout: 246 seconds]
cazzoduro has joined #ruby
coderhut has quit [Ping timeout: 252 seconds]
vondruch has joined #ruby
seitensei has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
_main_ has joined #ruby
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
lightstalker has joined #ruby
pawnbox has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
__main__ has quit [Ping timeout: 250 seconds]
pawnbox has joined #ruby
webus has joined #ruby
_main_ is now known as __main__
jun_ has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
trwyth has joined #ruby
webus has quit [Client Quit]
devoldmx has joined #ruby
webus has joined #ruby
tulak has joined #ruby
Anderson69s has joined #ruby
trwyth has quit [Read error: Connection reset by peer]
skade has joined #ruby
senayar has joined #ruby
senayar has joined #ruby
jun_ has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
polysics has quit []
jun_ has quit [Remote host closed the connection]
lyoshajapan has quit []
kies has joined #ruby
tomaz_b has quit [Quit: Leaving]
dmolina has joined #ruby
calderonroberto has quit [Ping timeout: 260 seconds]
juddey has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
yes`r has joined #ruby
marr has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
spacemud has joined #ruby
<elifoster> Veejay: If we're still talking about http libraries, I would heavily suggest HTTPClient. I haven't really read that conversation too much, but it's been perfect for all of my web api accessing/http needs.
<elifoster> I found performance boosts when using it, but I can't really say why as I haven't read the code for it or Net/HTTP.
howdoicomputer has quit [Ping timeout: 272 seconds]
haraoka has quit [Ping timeout: 256 seconds]
Mon_Ouie has quit [Ping timeout: 256 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
chouhoulis has quit [Ping timeout: 246 seconds]
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
baweaver has joined #ruby
mloy has quit [Quit: Leaving]
blaxter has joined #ruby
_main_ has joined #ruby
roshanavand has joined #ruby
rodfersou has joined #ruby
__main__ has quit [Ping timeout: 240 seconds]
baweaver has quit [Ping timeout: 240 seconds]
_main_ is now known as __main__
SCHAAP137 has joined #ruby
B1n4r10 has joined #ruby
mark3 has joined #ruby
djbkd has joined #ruby
Juanchito has joined #ruby
<Veejay> elifoster: I'm currently using RestClient
<Veejay> I tried reducing the number of threads and ditching Fog, the impact on memory use is huge (at the expense of some speed, but that's OK)
<elifoster> I have no experience with RestClient.
<elifoster> There are a number of gems I use that use it, but I've never personally used it.
benhuda has joined #ruby
B1n4r10 has quit [Ping timeout: 265 seconds]
siddharth has joined #ruby
roshanavand has quit [Remote host closed the connection]
djbkd has quit [Ping timeout: 265 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phantummm has joined #ruby
Hounddog has quit [Remote host closed the connection]
azgil has joined #ruby
kp666 has quit [Ping timeout: 246 seconds]
howdoi has joined #ruby
tulak has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
phantummm has quit [Ping timeout: 260 seconds]
nettoweb has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
nettoweb has quit [Client Quit]
FooMunki has joined #ruby
rsc___ has quit [Quit: rsc___]
rsc___ has joined #ruby
Hounddog has joined #ruby
djbkd has joined #ruby
sgambino has joined #ruby
Peg-leg has joined #ruby
Hounddog has quit [Client Quit]
Anderson69s has quit [Quit: Time to EAT, SLEEP OR WHATEVER BYE!!!!!]
frem has quit [Quit: Connection closed for inactivity]
Hounddog has joined #ruby
SHyx0rmZ has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
rgtk has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
jschmid has quit [Quit: Leaving]
symm- has joined #ruby
jschmid has joined #ruby
roshanavand has joined #ruby
tvw has joined #ruby
platzhirsch has joined #ruby
Arnvald has quit [Remote host closed the connection]
rdark has joined #ruby
rgtk has quit [Ping timeout: 246 seconds]
agent_white has joined #ruby
nfk|laptop has joined #ruby
lessless has quit [Ping timeout: 240 seconds]
SHyx0rmZ has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
astrobu__ has joined #ruby
psy_ has quit [Remote host closed the connection]
blaxter has joined #ruby
astrobun_ has quit [Ping timeout: 265 seconds]
yos7ph has joined #ruby
solars has joined #ruby
Paradox has quit [Remote host closed the connection]
brixen has quit [Ping timeout: 250 seconds]
jackjackdripper1 has quit [Quit: Leaving.]
cdnsteve has joined #ruby
DaniG2k has joined #ruby
chouhoulis has joined #ruby
f4cl3y has quit [Ping timeout: 272 seconds]
yos7ph has quit [Quit: Leaving]
ruby-lang510 has joined #ruby
krz has quit [Ping timeout: 256 seconds]
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang510> Hi all. Learning some ruby. I'm loading a file irb -r ./filename.rb so I can poke around ruby methods on my class instance. But it keeps throwing back NameError: undefined local variable or method `sample_instance' for main:Object
chouhoulis has quit [Ping timeout: 246 seconds]
<DaniG2k> ruby-lang510: you have a variable sample_instance somewhere in filename.rb that is undefined
<DaniG2k> check that file for "sample_instance"
<ruby-lang510> It needs me to create an instance again new_instance = Class.new
smactive has joined #ruby
<shevy> ruby-lang510 you need to use other ways to make it persistent
<ruby-lang510> DaniG2k: Its defined. sample_instance = Class.new works
<ruby-lang510> just doesn't persist in irb
sameerynho has joined #ruby
duncannz has quit [Remote host closed the connection]
<jhass> ruby-lang510: that's expected, top level local variables are private to the file
<ruby-lang510> So just create an instance again in rib?
<ruby-lang510> irb*
startupality has joined #ruby
<jhass> better yet just assign the variable inside irb, not your file
f4cl3y has joined #ruby
lxsameer has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 265 seconds]
smactive has quit [Ping timeout: 260 seconds]
roshanavand has joined #ruby
cassioscabral has joined #ruby
cassioscabral has quit [Client Quit]
blaxter has quit [Ping timeout: 256 seconds]
Averna has joined #ruby
phantummm has joined #ruby
__main__ has quit [Read error: Connection reset by peer]
__main__ has joined #ruby
<ruby-lang510> jhass: Thanks. Another thing. Within irb, why does Custom_Class.methods(false) with one custom method, return an empty array?
ta has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
ta has joined #ruby
<jhass> you want MyClass.instance_methods(false) or MyClass.new.methods(false)
devbug has joined #ruby
coderhut has joined #ruby
mblagden has quit [Ping timeout: 250 seconds]
<ruby-lang510> Interesting. Student.instance_methods(false) returns the right array. Student.new.methods(false) returns empty array
phantummm has quit [Ping timeout: 255 seconds]
CloCkWeRX has quit [Ping timeout: 260 seconds]
oddmunds has joined #ruby
brixen has joined #ruby
<jhass> uh right, my bad
<jhass> .methods(false) only returns an objects singleton methods
jas02 has quit [Remote host closed the connection]
<ruby-lang510> Thank you!
<ruby-lang510> why can't i can instance_methods on the instance variable though?
devbug has quit [Ping timeout: 260 seconds]
<ruby-lang510> call*
Anderson69s has joined #ruby
Paradox has joined #ruby
<jhass> because your instance variable does not point to a class or module object but most likely an instance of it
<jhass> ?pry
<ruboto> Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
Anderson69s has quit [Client Quit]
Averna has quit [Ping timeout: 272 seconds]
blaxter has joined #ruby
dionysus69 has joined #ruby
<DaniG2k> i wonder why the Rails guys decided to use byebug by default instead of pry
livcd has quit [Changing host]
livcd has joined #ruby
idefine has joined #ruby
<ruby-lang510> Nice!
<ruby-lang510> Thanks
<ruby-lang510> Taking a look
brixen has quit [Ping timeout: 255 seconds]
Averna has joined #ruby
roshanavand has quit [Remote host closed the connection]
plsk has joined #ruby
Averna has quit [Max SendQ exceeded]
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
<platzhirsch> DaniG2k: byebug is different to pry I believe
CloCkWeRX has joined #ruby
<platzhirsch> While byebug is a debugger, pry is more a runtime/evaluation console
<jhass> they do different things, yeah
<jhass> hence there's a pry-byebug
<platzhirsch> can be combined though
trwyth has joined #ruby
<DaniG2k> didn't know that
trwyth has quit [Client Quit]
<DaniG2k> i always used pry as a debugger
Averna has joined #ruby
brixen has joined #ruby
seitensei has quit [Ping timeout: 256 seconds]
Mark-6ma has joined #ruby
ruby-lang510 has quit [Quit: Page closed]
xlogic has joined #ruby
Rickmasta has joined #ruby
jud has quit [Quit: Leaving]
idefine has quit [Ping timeout: 256 seconds]
The_Phoenix has joined #ruby
quazimodo has quit [Ping timeout: 240 seconds]
<jhass> DaniG2k: so just install pry-byebug and you get break point and stuff
<jhass> pry-stack_explorer is worth a look too
toretore has joined #ruby
Mark-6ma has quit [Client Quit]
startupality has quit [Quit: startupality]
vasilakisfil_ has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
devoldmx has joined #ruby
<yorickpeterse> Does the MRI C API provide a way to get the class name of an object without allocating any new objects?
prestorium has joined #ruby
kobain has joined #ruby
zotherstupidguy has joined #ruby
<yorickpeterse> rb_class2name and the likes allocate new VALUEs, which fucks up things during a GC run
diegoviola has quit [Read error: Connection reset by peer]
<zotherstupidguy> is there a simpler api gem than grape?
sameerynho has quit [Quit: Leaving]
heftig has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 265 seconds]
heftig has joined #ruby
nfk|laptop has quit [Ping timeout: 240 seconds]
sigurding has quit [Quit: sigurding]
bigkevmcd has quit [Quit: bbiab]
lxsameer has joined #ruby
roshanavand has joined #ruby
elifoster has quit [Quit: sleep]
FastJack has quit [Ping timeout: 250 seconds]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
nfk|laptop has joined #ruby
Mon_Ouie has joined #ruby
roshanavand has quit [Remote host closed the connection]
NET||abu- is now known as NET||abuse
astrobun_ has joined #ruby
skade has joined #ruby
dlitvak has joined #ruby
Averna has quit [Ping timeout: 265 seconds]
astrobu__ has quit [Ping timeout: 240 seconds]
howdoicomputer has joined #ruby
diegoviola has joined #ruby
astrobu__ has joined #ruby
FooMunki has quit [Quit: FooMunki]
chouhoulis has joined #ruby
FooMunki has joined #ruby
jas02 has joined #ruby
B1n4r10 has joined #ruby
astrobun_ has quit [Ping timeout: 256 seconds]
howdoicomputer has quit [Ping timeout: 272 seconds]
Vitor has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 260 seconds]
wmdrossard has quit [Ping timeout: 240 seconds]
B1n4r10 has quit [Ping timeout: 272 seconds]
nettoweb has joined #ruby
curses has quit []
toomus has joined #ruby
<toomus> Hi all
DaniG2k has quit [Quit: leaving]
tulak has joined #ruby
dlitvak_ has joined #ruby
<shevy> 8 days to go until the new ruby
coderhut has quit [Quit: Page closed]
msankhala has quit [Quit: This computer has gone to sleep]
dlitvak has quit [Ping timeout: 240 seconds]
roshanavand has joined #ruby
msankhala has joined #ruby
Snowy has quit []
solars has quit [Ping timeout: 265 seconds]
roshanavand has quit [Remote host closed the connection]
roshanav_ has joined #ruby
arup_r has joined #ruby
toomus has quit [Quit: Page closed]
skade has quit [Quit: Computer has gone to sleep.]
roshanav_ has quit [Remote host closed the connection]
ruby-lang557 has joined #ruby
jdm has joined #ruby
govg has quit [Ping timeout: 240 seconds]
blaxter has quit [Quit: foo]
wmdrossard has joined #ruby
ruby-lang557 has quit [Client Quit]
ruby-lang655 has joined #ruby
skade has joined #ruby
blaxter has joined #ruby
<ruby-lang655> am using "data=system 'mycommand'" to run a system command and store the result in the 'data' variable. Problem is "puts data" is returning false and not the output of mycommand - any help / pointers?
skade has quit [Client Quit]
<jhass> ruby-lang655: that's what system does. Use backticks to capture the output or yet better tell us what the command is and there's a chance you won't have to run it like that at all
<ruby-lang655> hey jhass command is openssl ciphers \'LOW:aNull:eNULL\' | sed -e \'s/,/ /g\', getting a list of weak ciphers etc that I want to loop through in an array
<ruby-lang655> (cheers for response)
skade has joined #ruby
<jhass> mh, let's dig a bit
<jhass> OpenSSL::Cipher.ciphers gives the full list for starters
kobain has quit [Read error: No route to host]
<ruby-lang655> cool didn't know that, now looking to see if it can identify null / weak ciphers
chipotle has quit [Ping timeout: 255 seconds]
cazzoduro has quit [Ping timeout: 252 seconds]
llakjy has joined #ruby
monthy has quit [Ping timeout: 260 seconds]
spt0 has joined #ruby
krz has joined #ruby
c355e3b has joined #ruby
bigkevmcd has joined #ruby
moeabdol has joined #ruby
quazimodo has joined #ruby
xlogic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cassioscabral has joined #ruby
Peg-leg has left #ruby [#ruby]
<jhass> I can't even find the C API for this :/
cornerma1 has joined #ruby
tulak has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
rgtk has joined #ruby
cornerman has quit [Ping timeout: 272 seconds]
cornerma1 is now known as cornerman
chipotle has joined #ruby
roshanavand has joined #ruby
vasilakisfil_ has quit [Remote host closed the connection]
kobain has joined #ruby
sigurding has joined #ruby
techsethi has joined #ruby
<jhass> >> require "openssl"; ctx = OpenSSL::SSL::SSLContext.new; ctx.ciphers = "LOW:aNull:eNULL"; ctx.ciphers.map(&:first).join(", ")
quazimodo has quit [Read error: No route to host]
<ruboto> jhass # => "ADH-DES-CBC-SHA, EDH-RSA-DES-CBC-SHA, EDH-DSS-DES-CBC-SHA, DES-CBC-SHA, DES-CBC-MD5, NULL-SHA, NULL ...check link for more (https://eval.in/486121)
techsethi has quit [Client Quit]
<jhass> ^ ruby-lang655
<astrobu__> hmm
radgeRayden_ has joined #ruby
radgeRayden has joined #ruby
<astrobu__> is there a way i can install ruby using a script on a server
<jhass> yes
<astrobu__> like just one particular version
<jhass> sure
<astrobu__> because rvm isnt doing it for me
<astrobu__> i still keep getting ruby command not found
roshanavand has quit [Ping timeout: 260 seconds]
<astrobu__> in the same script
<astrobu__> its driving me insaaaane
<jhass> ?code
<ruboto> We can't help you without your code, please post it to https://gist.github.com
<astrobu__> even doing a multi user install sucks
<astrobu__> bleh
<astrobu__> its basically
<astrobu__> rvm use 2.0 --default
<astrobu__> bash somescript_that_uses_ruby.sh
<astrobu__> and then bam ruby: command not found
<jhass> rvm use 2.0 has no output?
<jhass> ruby works in the same shell afterwards?
dlitvak has joined #ruby
radgeRayden_ has quit [Ping timeout: 265 seconds]
radgeRayden has quit [Ping timeout: 265 seconds]
<astrobu__> yes
<astrobu__> that is exactly correct
<astrobu__> i am very stumped
krz has quit [Ping timeout: 265 seconds]
<astrobu__> i tried putting shit in the /etc/profile and sourced it
<astrobu__> but it does not work
<jhass> astrobu__: dunno, try using rvm do 2.0 ruby whatever in your script
<jhass> better anyhow
<astrobu__> mmm
<astrobu__> tahts too half-assed. im trying the ruby-install script now
<astrobu__> maybe that will work
dlitvak_ has quit [Ping timeout: 255 seconds]
<astrobu__> i just need a systemwide install of ruby 2.0
<jhass> well it's RVMs recommend way to script
<astrobu__> i see
<astrobu__> ok then ill forget about rvm
<astrobu__> i dont REALLY need to use rvm
<astrobu__> i just need to use ruby 2.0
<jhass> cool
<astrobu__> ilets see if ruby-install works
<astrobu__> if it does im just gonna use that
<astrobu__> im afraid rbenv might just lead me down the same path of grief
cassioscabral has quit [Quit: cassioscabral]
dlitvak_ has joined #ruby
<jhass> indeed
rgtk has quit [Remote host closed the connection]
<jhass> looked at chruby yet?
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
wmdrossard has quit [Ping timeout: 255 seconds]
techsethi has joined #ruby
rgtk has joined #ruby
<jhass> but yeah, ruby-install or ruby-build into /usr/local or /opt/ruby + some $PATH munging should be good enough
NeverDie has quit [Quit: http://radiux.io/]
ruby-lang547 has joined #ruby
cassioscabral has joined #ruby
<astrobu__> yeh you're right
<astrobu__> i can see why some people dont like ruby
<astrobu__> its not for any good reason. i use ruby a lot
<jhass> you didn't try to deploy Go or python or complex perl yet :P
<astrobu__> but this time i actually have to guarantee that it will deploy into a few distros
<astrobu__> heh
<astrobu__> well, i will be dockering those
<ruby-lang547> hey everyone I have a strange problem. I have three rails api app running in passenger behind an LB... They all should have the same settings.
<jhass> ?passenger
<ruboto> I don't know anything about passenger
<astrobu__> i just need to ruby here because my base scripts require
<jhass> mh
dlitvak has quit [Ping timeout: 265 seconds]
<ruby-lang547> on one node each rails instance uses 2gb of memory
<jhass> !fact mk passenger Please join #passenger for help with it.
<ruboto> jhass, I will remember that passenger is Please join #passenger for help with it.
<ruby-lang547> its like garbage collection does not kick in until the app runs out of memory
<ruby-lang547> I did what I could but I don't have any experience with ruby garbage collection
sdothum has joined #ruby
cassioscabral has quit [Client Quit]
Mon_Ouie has quit [Ping timeout: 272 seconds]
colegatron has quit [Ping timeout: 255 seconds]
<jhass> see above
<jhass> iirc they're europe based so might be lunch time for them, stick around in #passenger for an hour or two
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
roshanavand has joined #ruby
krz has joined #ruby
<Bish> hi, kinda stupid question: what would be an easy way to "sign" small amounts of data, which is not cracked as easily?
<jhass> Bish: JWS perhaps?
<Bish> please specify
cassioscabral has joined #ruby
<ruby-lang547> thats my gist
<jhass> Signed JSON Web Tokens
chouhoulis has joined #ruby
<jhass> ruby-lang547: are you willfully ignoring me or something?
<Bish> funny, tha's like 100% i was thinking about
<ruby-lang547> no sorry
joonty has quit [Quit: joonty]
<ruby-lang547> But passenger is not using the memory rack/rails is
<ruby-lang547> But I will be working with the passenger team also
skade has quit [Quit: Computer has gone to sleep.]
shredding has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<jhass> ?rails
<ruboto> Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jhass> either way, this is the least best channel ;)
roshanavand has joined #ruby
<ruby-lang547> lol
<ruby-lang547> where do I get help with ruby garbage collection?
wmdrossard has joined #ruby
msankhala has quit [Quit: This computer has gone to sleep]
Ishido has joined #ruby
techsethi has quit [Quit: techsethi]
<jhass> http://samsaffron.com/archive/2014/04/08/ruby-2-1-garbage-collection-ready-for-production goes somewhat into it though it changed with 2.2 a bit too again
Andy01012016 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chouhoulis has quit [Ping timeout: 256 seconds]
<ruby-lang547> thanks
ornerymoose has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
ornerymoose has quit [Client Quit]
techsethi has joined #ruby
<Bish> still i would love to know, how would i actually sign just a string, so it's not as easily cracked?
<ruby-lang547> the difference I saw was that on the working node the garbage collection kicked in newobj
<ruby-lang547> on the problem node gc_by malloc
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
skade has joined #ruby
<ruby-lang547> I will work through this post and report back (2015-02-04-incremental-gc)
monthy has joined #ruby
<jhass> Bish: are you sure you understand what signing is? What are you trying to achieve?
<jhass> signed cookies or what?
<jhass> what's your threat model?
colegatron has joined #ruby
llakjy has quit [Ping timeout: 265 seconds]
The_Phoenix has quit [Quit: Leaving.]
ss_much has quit [Quit: Connection closed for inactivity]
scripore has joined #ruby
PedramT has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
<Bish> jhass: i want bas64encoded data in a link, i don't want others to be able to create those links
symm- has joined #ruby
troulouliou_div2 has joined #ruby
triangles has joined #ruby
<jhass> mmh
<jhass> fair enough
roshanavand has quit [Read error: Connection reset by peer]
<Bish> and it's an interesting topic, i think
plsk is now known as attyz
<jhass> Bish: step one: get a private key: OpenSSL::PKey::RSA.new(2048)
SenpaiSilver has quit [Quit: Leaving]
roshanavand has joined #ruby
<jhass> store it somewhere, to read it again simply pass it to .new instead of a number
pika_pika has joined #ruby
SenpaiSilver has joined #ruby
<Bish> yeah i am aware of rsa, but i don't know how i would use it to sign data
<jhass> Bish: next up sign something with it, signature = pkey.sign(OpenSSL::Digest::SHA256.new, url)
<Bish> wow, it's that easy?
<jhass> generate your token, eg token = Base64.urlsafe_encode64("#{url}\0#{signature}")
<jhass> now to verify it
moeabdol has quit [Ping timeout: 256 seconds]
<Bish> i got it, thanks ;)
<Bish> if i knew i'd be that easy, i would've found out myself
<jhass> url, signature = token.split("\0", 1)
techsethi has quit [Quit: techsethi]
startupality has joined #ruby
<Bish> but if i do
<jhass> pkey.public_key.verify(OpenSSL::Digest::SHA256.new, signature, url)
<Bish> pkey.sign i get "ArgumentError: Private key is needed."
joonty has joined #ruby
<jhass> er plus Base64.urlsafe_decode64 I missed
<Bish> while pkey is a private key
Ropeney has joined #ruby
<jhass> it's not then, sorry but you messed up somewhere already :P
Ropeney has quit [Client Quit]
synthroid has joined #ruby
jespada has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
phantummm has joined #ruby
pawnbox has quit [Remote host closed the connection]
benhuda has joined #ruby
<jhass> also note that the signature is quite big, in theory URLs are limited to 255 chars
<jhass> most applications allow more these days, but you have no guarantees above that
kimegede has joined #ruby
roshanavand has quit [Remote host closed the connection]
roshanav_ has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
<Bish> urls are limited to 255 chars? last time i checked the rfc says 4k
solars has joined #ruby
spiman has joined #ruby
phantummm has quit [Ping timeout: 240 seconds]
<Bish> ofc that's crazy but never seen it fail
cassioscabral has joined #ruby
sameerynho has joined #ruby
seitensei has joined #ruby
lxsameer has quit [Ping timeout: 240 seconds]
cajone_afk is now known as cajone
<Bish> how do i get all the stuff inside a module?
FilipeChagas has joined #ruby
seitensei has quit [Ping timeout: 240 seconds]
jas02 has quit [Quit: jas02]
<jhass> easiest and most readable? devdocs.io or pry's ls
dlitvak_ has quit [Quit: ta luego]
jas02 has joined #ruby
<Bish> just want to know which methods to call
akem has quit [Remote host closed the connection]
<jhass> use the ones that do what you want
<Bish> ;;
dlitvak has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
ornerymoose has joined #ruby
cassioscabral has joined #ruby
<Bish> constants it is
<Bish> there is nothing smaller than sha256?
atumzin has quit [Read error: Connection reset by peer]
jokester has quit [Quit: init 6]
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
FastJack has joined #ruby
jokester has joined #ruby
jmonreal has joined #ruby
<jmonreal> good day everyone
<Bish> i can use md5 to sign data? man i really need to recheck my hash knowledge :D
<Bish> jmonreal: hi
devoldmx has joined #ruby
d0nn1e has quit [Ping timeout: 256 seconds]
techsethi has joined #ruby
<jmonreal> If I develop a script which uses certain ruby gems, that need to be installed before running the script, what's the best way to do it?
atumzin has quit [Read error: Connection reset by peer]
<Bish> jmonreal: create a gemfile and install them with bundler?
Yiota has joined #ruby
atumzin has joined #ruby
atumzin has quit [Changing host]
atumzin has joined #ruby
<jmonreal> gemfile? and that file has the gems needed?
<Bish> yeah in that file you list the gems your package needs
<jmonreal> nice
<jhass> Bish: if you want it secure you shouldn't use anything less than SHA256
<jmonreal> like that example
<jmonreal> thanks Bish
<jhass> MD5 and SHA1 are both considered broken these days
<Bish> jhass: well it's not a nuclear winter happening if someone cracks it, but still, that's stupid either way
<Bish> will result in pretty long urls
pawnbox has joined #ruby
<jhass> but their digests won't be shorter
<Bish> yeah i see
<jmonreal> Bish: and what should be the name of the gemfile and extension
<jhass> Bish: base64 inflates by a third, you could try urlencoding the url and using a hexdigest for example
<jmonreal> ?
d0nn1e has joined #ruby
<Bish> no problem jmonreal, in case you have a rails application: rails creates a gemfile which you can read for example
<jhass> Bish: eh, nvm on the last one, had a brainfart there I guess
devoldmx has quit [Ping timeout: 240 seconds]
ornerymoose_ has joined #ruby
<Bish> jmonreal: well it's Gemfile i think, not sure though, never used them
cassioscabral has quit [Quit: cassioscabral]
ornerymoose has quit [Ping timeout: 260 seconds]
znz_jp has quit [Ping timeout: 260 seconds]
ornerymoose_ is now known as ornerymoose
<jhass> jmonreal: just run bundle init
skweeke3 has quit [Read error: Connection reset by peer]
<shevy> damn
cassioscabral has joined #ruby
<shevy> I just looked at the tab here and for a second I thought that jhass wrote "run bundle shit"
dfinninger has joined #ruby
<Bish> we are harsh here in #ruby
mblagden has joined #ruby
pawnbox has quit [Ping timeout: 246 seconds]
sgambino has joined #ruby
<Bish> wat... yesterday i was hating sequel for not having .where!, why does it!?
solocshaw has quit [Ping timeout: 240 seconds]
<Bish> i never seen that in the docs, but autocompletion of pry just told me
znz_jp has joined #ruby
<Bish> am i crazy?
B1n4r10 has joined #ruby
<shevy> does it?
<Bish> well yes
<shevy> cool
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Bish> i even read the code, i never seen it
<agent_white> Why would it?
startupality has quit [Quit: startupality]
pawnbox has joined #ruby
<Bish> agent_white: because table = table.xyz looks ugly
roshanavand has joined #ruby
roshanav_ has quit [Read error: Connection reset by peer]
<Bish> but i don't understand why it has
<agent_white> But... I dun get why do that either... I'd think you'd be collecting a set?
<Bish> agent_white: yeah and you might want to add filters to that set
<Bish> and add another filter.. and another
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
<jhass> Bish: $ foo.where!
<shevy> Bish hmm I did not see a where! method
scepticulous has joined #ruby
<agent_white> But... admins = Users.where(admin: true), not users = Users.where(admins:true_
<Bish> yeah, i don't see it either anywhere, but that jeremy is sneaky
dlitvak_ has joined #ruby
<Bish> agent_white: and what about the users of age 20 ?
<jhass> Bish: $ being the pry alias for show-source
<agent_white> Users.where(age > 20) ?
<Bish> jhass: thank you, you're my hero of the day
startupality has joined #ruby
<agent_white> Ahhh.
goodcodeguy has joined #ruby
vasilakisfil has joined #ruby
quazimodo has joined #ruby
<Bish> mod.class_eval("def #{meth}!(*args, &block); mutation_method(:#{meth}, *args, &block) end", __FILE__, __LINE__)
Rodya_ has joined #ruby
<Bish> sneaky jeremy.. crazy dude.
<jmonreal> jhass: bundle init? that would create the template file?
<Bish> jmonreal: exactly
<jhass> ruby-lang655: ever saw my follow up?
B1n4r10 has quit [Ping timeout: 246 seconds]
<jhass> jmonreal: indeed
<agent_white> Bish: Funny you mention that, I've been learning Sequel the past few days :)
<jmonreal> jhass Bish how do I install bundle?
<jhass> gem install bundler
<Bish> agent_white: the guy who wrote it is a genius imho, it's great, keep using it
<vasilakisfil> do lamdas return objects or something else ?
<jmonreal> jhass: thanks
Dreamer3 has quit [Quit: Leaving...]
<yorickpeterse> hm, TIL ObjectSpace.each_object can sorta run in the background on MRI
<jhass> vasilakisfil: they return instances of the class Proc
<Bish> agent_white: at first i was like "no this is crazy, why would you do that", but its great
dlitvak has quit [Ping timeout: 272 seconds]
<yorickpeterse> I figured it would simply pause all threads, doesn't appear to be the case
techsethi has quit [Quit: techsethi]
FilipeChagas has quit [Quit: WeeChat 1.3]
anisha has quit [Quit: Leaving]
<agent_white> Bish: Only issue I've had with it was setting up an "inherited" callback in the model class. I'm not experience enough to fix the issue, but it was getting called twice (I think Sequel::Model was being called along-side my main-child model)
cdnsteve has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<Bish> jhass: super interesting that the $ prefix outputs the line where theses methods get added dynamcially, isn't it?
steffkes has quit [Ping timeout: 240 seconds]
solars has quit [Ping timeout: 265 seconds]
<jhass> Bish: the magic is in Method#source_location
howdoicomputer has joined #ruby
blackgoat has quit [Quit: ..]
techsethi has joined #ruby
<Bish> agent_white: well i never did such special stuff to it, never used models, even though i should've
<Bish> but using strings as ruby code feels dirty
<agent_white> Bish: Well worth it, even just empty ones like class Foo << Sequel::Model; end; ... just for having the accessors already setup.
<Bish> at some point, i will have to use them, yes
<agent_white> Though, the thing that bugs me is that you can set validators in the model... as well as primary keys, etc... so... do I set them up when I create the table? Or just in the model? etc.
<Bish> when started the probject i naviely tried to do it generic, but it f* me in the *, and now im writing classes for each special case
<agent_white> Not too much a fan of that (or rather the documentation not addressing it)
<Bish> yeah that really feels weird, i think those get only evaluated when u insert/update data
Jackneill has joined #ruby
chouhoulis has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<jmonreal> jhass Bish, after intalling the gem I still can't run bundle, is there a path that I need to add to PATH env?
kp666 has joined #ruby
<jhass> jmonreal: if so gem install should have you informed so
<jhass> jmonreal: post your gem env output to gist, the gem install bundler output too if you still have it
<jmonreal> jhass: I had to export my .gem/ruby/......./bin
shredding has quit [Ping timeout: 240 seconds]
techsethi has quit [Client Quit]
howdoicomputer has quit [Ping timeout: 256 seconds]
aspire has joined #ruby
agent_wh1te has joined #ruby
<agent_wh1te> Bish: So far though, I've really just used the model for helpers... like "last_name = f_name + l_name", etc. :P
<jmonreal> and then to install the gems listed on the Gemfile? bundle install ?
agent_white has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
faisal_ has quit [Quit: Connection closed for inactivity]
chouhoulis has quit [Ping timeout: 265 seconds]
agent_wh1te is now known as agent_white
<jmonreal> great
<jmonreal> that worked
agent_white has quit [Changing host]
agent_white has joined #ruby
roshanav_ has joined #ruby
_stu_ has joined #ruby
kalopsian has joined #ruby
baweaver has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
TomPeed has joined #ruby
ramortegui has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
AugustoC has joined #ruby
startupality has quit [Quit: startupality]
platzhirsch has left #ruby [#ruby]
<Bish> agent_white: have you ever tried using .where with a block? that shit is magic
baweaver has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<agent_white> Bish: Not yet! I've been using Sequel for... a little over a couple days ;)
xlogic has joined #ruby
<agent_white> I'll need to try it though!
skade has joined #ruby
<Bish> agent_white: you can "call" mysql "functions" in ruby, like they were ruby, i was like wuuaaat is happening
Bloomer has joined #ruby
<Bish> but only to find out, there are better ways to do it
CloCkWeRX has quit [Ping timeout: 256 seconds]
<Bish> still pretty impressive use of blocks / missing_method
Encapsulation has joined #ruby
benhuda has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brendan- has joined #ruby
scripore has quit [Quit: Leaving]
kalopsian has quit [Ping timeout: 265 seconds]
arup_r has quit [Remote host closed the connection]
lightstalker has quit [Ping timeout: 272 seconds]
stannard has joined #ruby
nettoweb has joined #ruby
rsc___ has quit [Quit: rsc___]
roshanavand has joined #ruby
rsc___ has joined #ruby
roshanav_ has quit [Read error: Connection reset by peer]
cassioscabral has quit [Quit: cassioscabral]
cassioscabral has joined #ruby
krz has quit [Read error: Connection reset by peer]
cout has joined #ruby
<ruby-lang655> thanks jhass, soz was afk for ages
<jhass> >> require "openssl"; ctx = OpenSSL::SSL::SSLContext.new; ctx.ciphers = "LOW:aNull:eNULL"; ctx.ciphers.map(&:first).join(", ") # ruby-lang655
<ruboto> jhass # => "ADH-DES-CBC-SHA, EDH-RSA-DES-CBC-SHA, EDH-DSS-DES-CBC-SHA, DES-CBC-SHA, DES-CBC-MD5, NULL-SHA, NULL ...check link for more (https://eval.in/486191)
rsc___ has quit [Ping timeout: 246 seconds]
lightstalker has joined #ruby
steffkes has quit [Ping timeout: 256 seconds]
steffkes has joined #ruby
uri_ has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
jmonreal has quit [Ping timeout: 260 seconds]
jmonreal has joined #ruby
cdg has joined #ruby
B1n4r10 has joined #ruby
cassioscabral has joined #ruby
aryaching has joined #ruby
cdnsteve has joined #ruby
CloCkWeRX has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
neonalpine has joined #ruby
idefine has joined #ruby
techsethi has joined #ruby
dsdeiz has joined #ruby
sepp2k has joined #ruby
devgiant has joined #ruby
<Bish> can i actually move into modules like pry does with cd?
smactive has joined #ruby
yardenbar has joined #ruby
djbkd has joined #ruby
nofxx has quit [Read error: Connection timed out]
<jhass> Foo.instance_eval { you_made_it_inside! }
idefine has quit [Ping timeout: 260 seconds]
<apeiros> module Foo; …you're moved into Foo here…; end
<Bish> yeah well, i knew about that one :D
<apeiros> jhass: wouldn't module_eval make more sense?
<apeiros> also see module_exec (and instance_exec)
<jhass> apeiros: I was generalizing to something like cd does so it works for instances too
<apeiros> yeah, but with instance_eval, it'll work differently than cd
<apeiros> prime example being `def` adding to the singleton_class instead of the module
nateberkopec has quit [Read error: Connection reset by peer]
roshanavand has quit [Remote host closed the connection]
jas02 has quit [Quit: jas02]
smactive has quit [Ping timeout: 255 seconds]
dfinninger has quit [Remote host closed the connection]
Couch has joined #ruby
arup_r has joined #ruby
Norm has joined #ruby
dfinninger has joined #ruby
<Norm> is there a way for Gemfile to specify a gem via :path (:path => ‘../gem-name’) in development, but pull from rubygems in production?
<Norm> i tried using groups, but bundler complains that i’m specifying two different sources for the same gem, even if i exclude one of the groups
AlphaAtom has joined #ruby
<jhass> Norm: I wish but I don't think so
cdnsteve has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
<jhass> you have to keep it around as a stash or so
<jhass> git stash -p might help
dsdeiz has quit [Ping timeout: 240 seconds]
freerobby has joined #ruby
<Norm> jhass: gotcha thanks
kgirthofer has joined #ruby
<havenwood> Norm: You could try running a local Gemstash in dev: https://github.com/bundler/gemstash#readme
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_wh1te is now known as agent_white
malconis has joined #ruby
agent_white has quit [Changing host]
agent_white has joined #ruby
malconis has quit [Remote host closed the connection]
techsethi has quit [Quit: techsethi]
malconis has joined #ruby
<jhass> mmh, can that build gems on the fly?
<jhass> that'd be cool
idefine has joined #ruby
dsdeiz has joined #ruby
nertzy has joined #ruby
krz has joined #ruby
cdnsteve has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has left #ruby [#ruby]
RegulationD has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
<Papierkorb> Is there a gem or code which elevates permissions of my process using PolicyKit/PolKit?
yes`r has quit [Ping timeout: 272 seconds]
goodcodeguy has joined #ruby
beast has joined #ruby
chouhoulis has joined #ruby
SolarSailor has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
dlitvak_ has quit [Ping timeout: 255 seconds]
babblebre has joined #ruby
uri_ has quit [Quit: --]
aspire has quit [Quit: Leaving]
<shevy> man
rsc___ has joined #ruby
<shevy> I should create a gem called TrojanHorse!
cassioscabral has quit [Quit: cassioscabral]
<Papierkorb> shevy: what I wrote yesterday could be used as keylogger. so there's that.
cassioscabral has joined #ruby
SolarSailor has quit [Client Quit]
quazimodo has quit [Read error: Connection reset by peer]
chouhoulis has quit [Ping timeout: 272 seconds]
roshanavand has joined #ruby
PedramT has quit [Remote host closed the connection]
cassioscabral has quit [Client Quit]
Bloomer has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
cassioscabral has joined #ruby
dfinninger has quit [Remote host closed the connection]
sameerynho has quit [Quit: Leaving]
roshanavand has quit [Ping timeout: 240 seconds]
greister has quit [Quit: WeeChat 1.3]
greister has joined #ruby
kp666 has quit [Quit: Leaving]
mary5030 has joined #ruby
i8igmac has quit [Ping timeout: 256 seconds]
atomical_ has joined #ruby
huyderman has quit [Remote host closed the connection]
rodfersou is now known as rodfersou|lunch
rsc___ has quit [Quit: rsc___]
pandaant has joined #ruby
tagrudev has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
symm- has quit [Ping timeout: 240 seconds]
chouhoulis has joined #ruby
radgeRayden has joined #ruby
radgeRayden_ has joined #ruby
yardenbar has quit [Ping timeout: 240 seconds]
cassioscabral has quit [Quit: cassioscabral]
<vasilakisfil> another issue having lambdas/procs as hash key is that hash.max fails
cwong_on_irc has quit [Quit: Leaving.]
<Bish> why would someone do that :o
davedev24 has joined #ruby
devbug has joined #ruby
spiman has quit []
sucks has joined #ruby
Bloomer has joined #ruby
devgiant has quit [Ping timeout: 256 seconds]
atomical has joined #ruby
rippa has joined #ruby
senayar_ has joined #ruby
agent_wh1te has joined #ruby
senayar has quit [Read error: Connection reset by peer]
<jhass> vasilakisfil: Hash is not a 2 pair tuple store, if you don't need the logic [[a0, b0], [a1, b1], ...] is often the saner structure
devgiant has joined #ruby
_stu_ has quit [Quit: _stu_]
<jhass> "the logic" = lookup by key
agent_white has quit [Read error: Connection reset by peer]
triangles2 has joined #ruby
agent_wh1te is now known as agent_white
<vasilakisfil> I agree but I use it in combination with https://github.com/fl00r/pickup
djbkd has quit [Remote host closed the connection]
ruby-lang655 has quit [Quit: Page closed]
atomical_ has quit [Ping timeout: 255 seconds]
devbug has quit [Ping timeout: 260 seconds]
momomomomo has joined #ruby
triangles has quit [Ping timeout: 272 seconds]
bigmac has joined #ruby
bigmac has quit [Client Quit]
Jardayn has joined #ruby
roshanavand has joined #ruby
dlitvak_ has joined #ruby
astrobu__ has quit [Remote host closed the connection]
seitensei has joined #ruby
AustinMatherne has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
AustinMatherne has joined #ruby
grill has joined #ruby
<shevy> finally we can have fish ponds
<gregf_> >> h = { "1" => ->(){ "foo" }, "-1" => ->(){ "bar"}, "2" => proc { "baz" } }; [ h.max_by{ |k,_| k }.to_a.last.() ]
<ruboto> gregf_ # => ["baz"] (https://eval.in/486227)
iateadonut has quit [Quit: Leaving.]
dlitvak has quit [Ping timeout: 240 seconds]
<jhass> gregf_: as *keys*
whippythellama has joined #ruby
iateadonut has joined #ruby
axl_ has joined #ruby
<gregf_> jhass: i know. but i wonder why one would use a lambda/proc as a key :|
kimegede has quit [Quit: Linkinus - http://linkinus.com]
<jhass> I don't want to imagine
<gregf_> and to add insult to injury... try and sort it
dfinninger has joined #ruby
terlar has quit [Ping timeout: 272 seconds]
seitensei has quit [Ping timeout: 240 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
Renich has joined #ruby
arup_r has joined #ruby
kies^ has joined #ruby
<Bish> :D
<shevy> what happened!
<shevy> jhass is getting old
<shevy> in the old days he would have curiously asked WHY
<jhass> you only let yourself get hurt ever so often
techsethi has joined #ruby
_stu_ has joined #ruby
<jhass> (especially by the same person ... :P)
kirun has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
dhollinger has joined #ruby
scepticulous has quit [Quit: Konversation terminated!]
znz_jp has quit [Ping timeout: 240 seconds]
yes`r has joined #ruby
PedramT has joined #ruby
<Bish> dynamcially created procs and their results?
<Bish> *imagines*
techsethi has quit [Client Quit]
dionysus69 has quit [Ping timeout: 260 seconds]
<shevy> code running solely on procs
<shevy> and steroids
momomomomo has quit [Quit: momomomomo]
PedramT has left #ruby [#ruby]
devoldmx has joined #ruby
TheMoonMaster has joined #ruby
nkwsy has joined #ruby
<Bish> offtopic: is there a tool that creates ERM from existing mysql tables?
znz_jp has joined #ruby
<Bish> hope it is not as offtopic, since there might be a gem
techsethi has joined #ruby
momomomomo has joined #ruby
<shevy> havenwood that reminds me how much I dislike ->
devoldmx has quit [Ping timeout: 255 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
<shevy> that is really a long line of code too
<Bish> what is ->?
<shevy> the hell operator
<zotherstupidguy> whats the encoding of .rb file?
momomomomo has quit [Client Quit]
<Bish> shevy: what does it do?
phantummm has joined #ruby
<shevy> Bish we must guard this knowledge so that not a new generation of ruby users will start to use it
benhuda has joined #ruby
SOLDIERz has quit [Ping timeout: 272 seconds]
<Bish> the guardians of the operators, makes a horrible movie title
techsethi has quit [Quit: techsethi]
<eam> -> is gross
arup_r has quit [Remote host closed the connection]
<eam> everyone knows that -> should be the method dispatch operator
<shevy> zotherstupidguy default should be some UTF ... UTF-8 I think, you can use a # comment to indicate another default though
<shevy> zotherstupidguy for binary you could use # Encoding: ASCII-8BIT
rrichardsr3 has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
roshanav_ has joined #ruby
akem has joined #ruby
phantummm has quit [Ping timeout: 240 seconds]
spt0 has quit [Ping timeout: 256 seconds]
p0wn3d_ has joined #ruby
Balzrael has quit [Read error: No route to host]
akem has quit [Read error: No route to host]
akem has joined #ruby
govg has joined #ruby
Elysia has quit [Remote host closed the connection]
cdnsteve has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
skade has quit [Quit: Computer has gone to sleep.]
antgel has quit [Ping timeout: 246 seconds]
dfinninger has quit [Remote host closed the connection]
icarus_ has joined #ruby
Elysia has joined #ruby
jun_ has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
antgel has joined #ruby
emrox has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aramiscd has joined #ruby
SenpaiSilver has joined #ruby
cdnsteve has joined #ruby
howdoicomputer has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdnsteve has quit [Client Quit]
<KrzaQ> Can I pass something akin to C's function pointer in a nicer way than :symbol and send(:symbol, args...)?
<jhass> KrzaQ: you could pass a Method instance around, not sure if that's any "nicer"
<jhass> KrzaQ: also consider public_send
akem has quit [Ping timeout: 260 seconds]
sankaber has joined #ruby
skade has joined #ruby
sankaber has quit [Remote host closed the connection]
agent_wh1te has joined #ruby
<KrzaQ> Mhm
skade has quit [Client Quit]
sankaber has joined #ruby
<KrzaQ> It still doesn't feel like passing a function around. I guess that's the ruby way and I'll have to get used to it
agent_white has quit [Read error: Connection reset by peer]
<jhass> KrzaQ: it might just be because "passing a function around" isn't all that a common thing to do
howdoicomputer has quit [Ping timeout: 265 seconds]
<jhass> first of all because Ruby has no functions, only methods, blocks & Procs
<KrzaQ> I agree that blocks solve most of the use cases
beast has quit [Quit: Leaving]
<jhass> yes, those solve 80%
<KrzaQ> But I didn't want to put it all in a block here: https://github.com/KrzaQ/AdventOfCode/blob/master/day16/main.rb
<jhass> another 15% is solved by -> {}, lamdba {}, proc {}
rrichardsr3 has quit [Quit: He who dares .... wins.]
<Bish> what does -> dooo
<icey> any ideas why the public archive for downloading ruby is coming back with a 503?
dorei has joined #ruby
agent_wh1te is now known as agent_white
<jhass> Bish: stabby lambda literal, it's essentially the same as lambda
<jhass> >> -> {}
<ruboto> jhass # => #<Proc:0x40b18074@/tmp/execpad-f8e98d5f9a10/source-f8e98d5f9a10:2 (lambda)> (https://eval.in/486231)
<jhass> Icey: looks like it's down
akem has joined #ruby
<icey> intermittently jhass, about half of the time it works
roshanavand has joined #ruby
roshanav_ has quit [Read error: Connection reset by peer]
<icey> I'm writing some code that users will be able to deploy Ruby onto a machine with and it keeps hitting a 503 when doing a HEAD
<icey> -_-
RegulationD has joined #ruby
<jhass> uh, 2.2.4 came out?
<icey> sometimes for the last few days
codecop has joined #ruby
<icey> so backends are failing to deliver on 2.2.0 -_- ?
jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.4; 2.1.8; 2.0.0-p648: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
baweaver has joined #ruby
<jhass> update time!
SolarSailor has joined #ruby
roshanavand has quit [Remote host closed the connection]
<jhass> zotherstupidguy: not all that surprising given base64 reason d'etre
B1n4r10 has quit [Ping timeout: 265 seconds]
cassioscabral has joined #ruby
spt0 has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
RobertBirnie has joined #ruby
jun_ has quit [Remote host closed the connection]
rodfersou|lunch is now known as rodfersou
jpank has joined #ruby
arup_r has joined #ruby
steffkes has quit [Ping timeout: 260 seconds]
[Butch] has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
nerium has joined #ruby
Rickmasta has joined #ruby
roshanavand has joined #ruby
rdavila has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
roshanavand has joined #ruby
sigurding has quit [Quit: sigurding]
scripore has joined #ruby
benhuda has quit [Ping timeout: 272 seconds]
scripore has quit [Max SendQ exceeded]
scripore has joined #ruby
idefine has joined #ruby
spt0 has quit [Remote host closed the connection]
scripore has quit [Client Quit]
treehug88 has joined #ruby
dfinninger has joined #ruby
<shevy> zotherstupidguy not affecting me!
pawnbox has quit [Ping timeout: 260 seconds]
<shevy> encodings for regexes still confuse me
pwnd_nsfw has quit [Remote host closed the connection]
BTRE has quit [Remote host closed the connection]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackjid has quit [Max SendQ exceeded]
nateberkopec has joined #ruby
iwaffles has quit [Quit: iwaffles]
techsethi has joined #ruby
blackjid has joined #ruby
pwnd_nsfw has joined #ruby
idefine has quit [Ping timeout: 260 seconds]
nfk|laptop has quit [Quit: yawn]
synthroid has quit [Remote host closed the connection]
nkwsy has quit [Quit: Lost terminal]
<agent_white> sexeger
BTRE has joined #ruby
roshanav_ has joined #ruby
roshanavand has quit [Read error: Connection reset by peer]
<agent_white> Regexes confuse me in general. :(
<shevy> they can become quite complicated
<shevy> It always takes my brain more brain-power to figure out what is going on in a regex
emrox has joined #ruby
mark3 has left #ruby ["PART #RubyOnRails :PART #jquery :PART #reactjs :PART ##javascript :PART #elixir-lang :PART #debian :PART #zsh :PONG :hitchcock.freenode.net"]
cdnsteve has joined #ruby
emrox has quit [Client Quit]
hobodave has joined #ruby
tulak has joined #ruby
sphex has quit [Ping timeout: 272 seconds]
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
nofxx has joined #ruby
techsethi has quit [Quit: techsethi]
dfinninger has quit [Remote host closed the connection]
dstarh has joined #ruby
aufi has quit [Quit: Konversation terminated!]
dfinninger has joined #ruby
techsethi has joined #ruby
arup_r has quit []
aganov has quit [Remote host closed the connection]
agent_wh1te has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
agent_wh1te is now known as agent_white
agent_white has quit [Changing host]
agent_white has joined #ruby
techsethi has quit [Client Quit]
phantummm has joined #ruby
SolarSailor has joined #ruby
tulak has quit [Remote host closed the connection]
ruby-lang547 has quit [Ping timeout: 252 seconds]
sphex has joined #ruby
akem has quit [Read error: No route to host]
akem2 has joined #ruby
momomomomo has joined #ruby
krz has quit [Quit: WeeChat 1.2]
spt0 has joined #ruby
baweaver has joined #ruby
sigurding has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
agent_white has quit [Read error: Connection reset by peer]
akem2 has quit [Read error: No route to host]
agent_white has joined #ruby
akem has joined #ruby
andikr has quit [Remote host closed the connection]
cpup has quit [Ping timeout: 272 seconds]
hanmac has quit [Ping timeout: 240 seconds]
cwong_on_irc has joined #ruby
cpup has joined #ruby
peteykun has joined #ruby
jbrhbr has joined #ruby
cdnsteve has left #ruby [#ruby]
agent_white has quit [Read error: Connection reset by peer]
idefine has joined #ruby
kgirthofer has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
TomyWork has quit [Ping timeout: 246 seconds]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has quit [Remote host closed the connection]
msankhala has joined #ruby
synthroid has joined #ruby
weemsledeux has joined #ruby
agent_white has joined #ruby
akem has quit [Read error: No route to host]
akem has joined #ruby
St1gma has joined #ruby
hxegon has joined #ruby
idefine has quit [Ping timeout: 240 seconds]
wmdrossard has quit [Ping timeout: 246 seconds]
nisstyre has quit [Quit: WeeChat 1.3]
FernandoBasso has joined #ruby
devgiant has quit [Quit: Leaving]
devbug has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pabs is now known as MrPablo
MrPablo is now known as pabs
Rickmasta has joined #ruby
pawnbox has joined #ruby
wolffles has joined #ruby
startupality has joined #ruby
akem has quit [Read error: No route to host]
akem has joined #ruby
Hounddog has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
<platzhirsch> > 'test'
dfinninger has quit [Remote host closed the connection]
hanmac has joined #ruby
FernandoBasso has quit [Read error: Connection reset by peer]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<platzhirsch> >> Time.parse('2015-06-09 17:10:16.039')
<jhass> < failed
<ruboto> platzhirsch # => undefined method `parse' for Time:Class (NoMethodError) ...check link for more (https://eval.in/486283)
<platzhirsch> huh
jackjackdripper has joined #ruby
<ljarvis> require 'time'
FernandoBasso has joined #ruby
<ljarvis> then open irb and use that for testing ;)
s00pcan has joined #ruby
<platzhirsch> >> require 'time'; Time.parse('2015-06-09 17:10:16.039')
<ruboto> platzhirsch # => 2015-06-09 17:10:16 +0000 (https://eval.in/486284)
<ljarvis> well one out of two isn't bad
vdamewood has joined #ruby
vasilakisfil has quit [Quit: Konversation terminated!]
AntKnee has joined #ruby
<platzhirsch> Interesting.. for me it returns +0100 well
<platzhirsch> how can I make it interpret it as UTC?
<platzhirsch> Except concatenating " UTC" to it
mary5030 has quit [Ping timeout: 255 seconds]
akem has quit [Read error: No route to host]
akem has joined #ruby
<mg^> I like Date better
mary5030 has joined #ruby
<mg^> >> require 'date'; Date.parse('next friday')
<ruboto> mg^ # => #<Date: 2015-12-18 ((2457375j,0s,0n),+0s,2299161j)> (https://eval.in/486285)
mary5030 has quit [Remote host closed the connection]
dfinninger has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.3]
<platzhirsch> mg^: why are you pointing to my messages with ^ ?
<ljarvis> platzhirsch: just add the UTC if you want Time.parse
aryaching has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<platzhirsch> ljarvis: any other method? I guess it's the only way
<mg^> no matter how many people say that, I am not taking my hat off :-)
<ljarvis> platzhirsch: or use activesupport
<platzhirsch> ActiveSupport's available
<ljarvis> go for that, then
akem has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
akem2 has joined #ruby
<platzhirsch> Time.zone = 'UTC'; Time.zone.parse you mean?
<ljarvis> yeah
Rickmasta has joined #ruby
neonalpine has quit []
amclain has joined #ruby
devbug has quit [Read error: Connection reset by peer]
senayar_ has quit []
seitensei has joined #ruby
Rickmasta has quit [Read error: Connection reset by peer]
TomyLobo has joined #ruby
devbug has joined #ruby
Rickmasta has joined #ruby
akem2 has quit [Read error: No route to host]
bb010g has quit [Quit: Connection closed for inactivity]
akem has joined #ruby
<platzhirsch> thanks ljarvis :)
pdoherty has quit [Ping timeout: 246 seconds]
wmdrossard has joined #ruby
yardenbar has joined #ruby
seitensei has quit [Ping timeout: 260 seconds]
Rickmasta has quit [Ping timeout: 260 seconds]
CrazyEddy has quit [Remote host closed the connection]
monthy has quit [Remote host closed the connection]
pandaant has quit [Quit: Lost terminal]
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
roshanav_ has quit [Remote host closed the connection]
afisher has joined #ruby
momomomomo has quit [Quit: momomomomo]
ChameleonSix has joined #ruby
<ChameleonSix> Hello
<ChameleonSix> I need help on ruby
<ChameleonSix> How do i add a hash inside the array that is in the hash
<ChameleonSix> grocery_list = { 'title' => 'Grocery List', 'items' => [] }
<ChameleonSix> example
<ChameleonSix> how do i add a hash into that array
dsdeiz has quit [Ping timeout: 265 seconds]
akem has quit [Read error: No route to host]
akem has joined #ruby
<jhass> what did you try and what error did you get?
<ChameleonSix> I dont know what to try
<ChameleonSix> It can be used "" because it is a string
<gizmore> grocery_list["items"].push({})
<ChameleonSix> thanks
<gizmore> this will add a hash as first item in "items"
<ChameleonSix> i realize
icarus_ has quit [Quit: leaving]
<ChameleonSix> Im doing ruby tutorials right now
<ChameleonSix> I will stay here if i need some help
<ChameleonSix> I wont do single line lols
Rodya_ has quit [Quit: Leaving...]
idefine has joined #ruby
dfinninger has quit [Remote host closed the connection]
CrazyEddy has joined #ruby
devoldmx has joined #ruby
joonty has quit [Quit: joonty]
yardenbar has quit [Quit: Leaving]
galeido has joined #ruby
galeido has quit [Changing host]
galeido has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<ChameleonSix> Anyway what are ruby blocks used for
<ljarvis> what tutorial are you using?
<jhass> I'm sure your tutorial explains that much better than what we can reasonably type up here
<ChameleonSix> Tree house
<ljarvis> ^ that's where I was going too
<ChameleonSix> Is it any good?
<ljarvis> I don't know what you're talking about
<hxegon> >> [1, 2, 3].map do |i| i + 1 end
<ruboto> hxegon # => [2, 3, 4] (https://eval.in/486293)
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ChameleonSix> Hmm?
<ljarvis> ChameleonSix: what is Tree house? maybe you could share a link...
dfinninger has joined #ruby
jbrhbr has quit [Quit: Leaving.]
<ChameleonSix> lol
akem has quit [Read error: No route to host]
<wolffles> i cant seem to push a formula ( 2 ** i ) << array [ i ] … also using i =+ 1
<ChameleonSix> oh sorry
akem2 has joined #ruby
<ChameleonSix> I have a habit of saying lol
<ChameleonSix> oh do i += 1
<ChameleonSix> not i =+ 1
<jhass> wolffles: wrong way around?
goodcodeguy has joined #ruby
<hxegon> ChameleonSix, +=
<ChameleonSix> yes
<jhass> wolffles: array[i] << 2**i
B1n4r10 has joined #ruby
<ChameleonSix> I got another question
devoldmx has quit [Ping timeout: 246 seconds]
<ChameleonSix> How do i count items in the array
<jhass> ChameleonSix: no need to announce it, just ask
<ChameleonSix> length?
<ChameleonSix> ah ok
<ljarvis> ChameleonSix: try it?
<jhass> &ri Array#size
<`derpy> method `Array#size`: Returns the number of elements in +self+. May be zero. [ 1, 2, 3, 4, 5 ].length … • http://rubydoc.info/stdlib/core/Array#size-instance_method
<ljarvis> irb is your friend whilst learning Ruby
<ChameleonSix> hmm i will try
<ChameleonSix> I know
<hxegon> ChameleonSix, I suggest trying irb and google before asking questions here
akem2 has quit [Read error: No route to host]
<ChameleonSix> google is shit
BSaboia has joined #ruby
akem has joined #ruby
<hxegon> ChameleonSix, no. It's how I learned programming, so for sure you're doing something wrong
<ljarvis> google is better than any other web search engine for finding stuff, so I don't think that's accurate
c0m0 has quit [Ping timeout: 260 seconds]
<wolffles> so this is my code (i = 0
<wolffles> array = []
<wolffles> while i < 100; array[i] << 2**i; i += 1 end) im getting undefined method << for nil:NIlClass
<apeiros> if google is shit, then use whichever search engine you consider not shit
<ChameleonSix> .push and unshift are used to add
<hxegon> wolffles, try eval.in or gist for multiline code
<eam> "they're all shit" is a reasonable and consistent opinion
<apeiros> wolffles: because array[i] is nil
<ChameleonSix> I didnt say all
<apeiros> wolffles: think about it - why should array[i] be anything but nil? you initialize array as an empty array…
<wolffles> just to define a variable i thought you could do that
<hxegon> ChameleonSix, there is a reason the word 'google' means 'use a search engine', but if you have a problem with it just use bing.
<apeiros> wolffles: sure. but all it does is create an empty array.
mrbignum has joined #ruby
<apeiros> so again, what value did you expect to be at array[i]?
<ChameleonSix> I cant complete a tutorial
<ChameleonSix> can someone help me?
<wolffles> i just needed a place holder so that array[i] << 2**i can push into
idefine has quit [Ping timeout: 246 seconds]
<hxegon> ChameleonSix, don't ask to be helped, ask the questions directly.
<ChameleonSix> Using the loop construct, add the current value of number to the numbers array. Inside of the loop, add 1 to the number variable. Use the break keyword to exit the loop once the numbers array has 3 items.
<ChameleonSix> i should use the while loop
<ChameleonSix> ?
<eam> wolffles: do you mean array << 2**i ?
<ChameleonSix> I mean it is the best for this
<ChameleonSix> while array.lenght <= 3
<eam> wolffles: why are you trying to shovel it into array[i] ?
crankharder has quit [Ping timeout: 250 seconds]
<toretore> ChameleonSix, that won't make use of the break keyword
<toretore> you need an infinite loop
<ChameleonSix> hmmm
<ChameleonSix> if ?
<ChameleonSix> or for
<hxegon> ChameleonSix, while true I think
<toretore> there are two main ways to do that: loop{} and while(true){}
<ljarvis> loop { }
<wolffles> its so i can just have an array for the powers of 2
dotix has joined #ruby
<eam> wolffles: you want to shovel onto just "array"
<hxegon> ChameleonSix, ljarvis has it
akem has quit [Read error: No route to host]
<ChameleonSix> alright
<ChameleonSix> sec
idefine has joined #ruby
akem has joined #ruby
<ljarvis> wolffles: "apeiros> so again, what value did you expect to be at array[i]?" -- it is important that you answer this imo
<wolffles> ohh
<eam> wolffles: what you're doing is dereferencing the array index at array[i], which is nil, and shoveling onto nil -- which is why you get that error
<toretore> wolffles, you have to understand what `array[i] <<` means
<ChameleonSix> can i paste my code somewhere
<toretore> and why it's not `array[i] =`
<hxegon> ChameleonSix, gist
<wolffles> i see push changes the spot it pushes into an array cuz it just adds on to it
<ChameleonSix> it isnt working
<ChameleonSix> sec
<eam> wolffles: array[i] << val would be used in a two-dimensional array situation
<wolffles> i was confused thanks all
<hxegon> ChameleonSix, or eval.in
<ljarvis> ChameleonSix: you dont have to write sec all the time, people will wait
<toretore> ?spacenotenter
<ruboto> I don't know anything about spacenotenter
<wolffles> ive never used eval.in no idea what it does
<toretore> you're useless ruboto
yes`r has quit [Ping timeout: 246 seconds]
<ljarvis> ?pizza
<ruboto> here's your pizza:
<ChameleonSix> <script src="https://gist.github.com/anonymous/1db4ac4f3edab3b15706.js"></script>
<ChameleonSix> here
<toretore> thanks for the 01F355
<ljarvis> lol
<ChameleonSix> sorry
<ljarvis> ChameleonSix: you have a loop inside a loop. I don't think you need that do you?
<ChameleonSix> I dont
dionysus69 has joined #ruby
<ljarvis> ok so you can remove the inside while loop
<toretore> ChameleonSix, in general, programming is a lot about thinking. thinking first, then writing
<toretore> you write first and then think
<ChameleonSix> hmm
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kristianpaul has left #ruby [#ruby]
<ChameleonSix> sec
rakm has joined #ruby
<ChameleonSix> i get the error
<ChameleonSix> The length of the `numbers` array was not 3.
akem2 has joined #ruby
SolarSailor has joined #ruby
<soahccc> toretore: Hehe true. My family doesn't understand when I'm sitting somewhere looking holes into the air and they ask me what I'm doing and my response is just: "working" :)
akem has quit [Read error: Connection reset by peer]
mrbignum has quit [Remote host closed the connection]
chthon has quit [Ping timeout: 255 seconds]
<toretore> lol
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has quit [Ping timeout: 272 seconds]
akem2 has quit [Read error: Connection reset by peer]
akem has joined #ruby
howdoicomputer has joined #ruby
<hxegon> wolffles, you write your code in the box, hit submit and you are at a page which evaluates that code. so it's like a gist, but you can see what stack traces or output it has
elaptics is now known as elaptics`away
<wolffles> hxegon
<hxegon> wolffles, yes?
ruby-lang776 has joined #ruby
<wolffles> gist?
<wolffles> i cant google fast enough :[
pdoherty has joined #ruby
<hxegon> GOOGLE FASTER NURD /jk
<ChameleonSix> why isnt this working
<wolffles> lol
jespada has quit [Quit: WeeChat 1.3]
<wolffles> ahh this is cool
<ChameleonSix> anyone?
<ljarvis> ChameleonSix: "isn't working" isn't a very conclusive error
<ChameleonSix> i mean it prints the error
<ChameleonSix> in the tutorial
<ChameleonSix> idk why
<ljarvis> ChameleonSix: please wait more than 3 seconds for someone to answer before starting with "anyone?"
<ChameleonSix> hmm ok
akem has quit [Ping timeout: 260 seconds]
<ljarvis> I don't know what the question is, so can't really help
akem has joined #ruby
<hxegon> ChameleonSix, your expecting an error? what error are you expecting?
ruby-lang968 has joined #ruby
eytanfb has joined #ruby
msankhala has quit [Ping timeout: 265 seconds]
howdoicomputer has quit [Ping timeout: 240 seconds]
joonty has joined #ruby
nertzy has joined #ruby
<wolffles> yay i solved my problem
<ruby-lang776> http://pastebin.com/0sBCrcXR is listing low and null ciphers via openssh however I can't figure out how to iterate through the ciphers (in check_for?) as an array, can anyone help?
<ruboto> ruby-lang776, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<hxegon> wolffles, :D
mrtomme has quit [Ping timeout: 246 seconds]
<jhass> ruby-lang776: don't join them when you want them separate
<jhass> that was just for the demo
<wolffles> just testing <script src="https://gist.github.com/anonymous/edeb1ca3d7cce7b6cb6c.js"></script>
<ruby-lang776> soz ruboto ;)
<wolffles> uhh
<wolffles> my link doesn’t seem to work
<wolffles> oh it works for you?
<jhass> ruby-lang776: also the begin rescue is just added by the bot to be able to show any error message, don't port it into your real code
<hxegon> wolffles, if you take the .js off the end and ignore the script tag
mrtomme has joined #ruby
yardenbar has joined #ruby
<ljarvis> also pretty sure power of 2 check could be x & (x–1) == 0
<wolffles> ahh i see
berserk_ren has joined #ruby
<ruby-lang776> cheers jhass
berserk_ren has quit [Remote host closed the connection]
akem has quit [Read error: Connection reset by peer]
<ChameleonSix> i solved it
<ChameleonSix> Im a genius
akem has joined #ruby
<hxegon> ChameleonSix, the more you know about programming, the more you know you don't know anything about programming :)
jackjackdripper has quit [Quit: Leaving.]
<wolffles> ljarvis: im trying to make sense of what you said
<ChameleonSix> yes
<ChameleonSix> Well said
<apeiros> hah! I check topic and somebody already updated for the new ruby version. nice work! :D
<apeiros> thanks @ jhass
<jhass> yw :D
<ljarvis> wolffles: n = 16; n & (n-1) == 0
<ljarvis> >> n = 16; n & (n-1) == 0
* apeiros 2h late :-S
<ruboto> ljarvis # => true (https://eval.in/486333)
cdg has quit [Remote host closed the connection]
dsdeiz has joined #ruby
<wolffles> oh derp thats cool
<wolffles> much easier than mine
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wolffles> and eval.in is cool!
howdoi has quit [Quit: Connection closed for inactivity]
<hxegon> wolffles, yeah it is
arup_r has joined #ruby
colleenmcguckin has joined #ruby
howdoicomputer has joined #ruby
<ChameleonSix> how do i assign a value to a method
jbrhbr has joined #ruby
joonty has quit [Quit: joonty]
hakunin_ has joined #ruby
<hxegon> >> def val; 1; end # ChameleonSix
<ruboto> hxegon # => :val (https://eval.in/486349)
RegulationD has quit [Remote host closed the connection]
<hxegon> >> def val; 1; end; val # ChameleonSix oops
<ruboto> hxegon # => 1 (https://eval.in/486354)
<ChameleonSix> hmm
zast has joined #ruby
<ChameleonSix> def width
dimik has joined #ruby
<ChameleonSix> width(50)
<ChameleonSix> ?
peteykun has quit [Quit: Leaving]
<ChameleonSix> i mean def width(x)
<ChameleonSix> that is calling
<ChameleonSix> Im confused
BSaboia has quit [Ping timeout: 256 seconds]
<hxegon> not sure what you're trying to do here ChameleonSix
steffkes has joined #ruby
steffkes has joined #ruby
dfinninger has quit [Remote host closed the connection]
<hfp> Hi all, I have a module whose private methods I'd like to test. I saw that you can use :send for objects to reach private methods but will it also work for a module? A module has no instance so on what do I call the send method?
<ChameleonSix> can i paste the tutorial text
<ChameleonSix> im confused with it
<hxegon> ChameleonSix, no, gist it.
<hfp> >> def width(size); size; end; width(50) # ChameleonSix
<ruboto> hfp # => 50 (https://eval.in/486361)
iateadonut has quit [Quit: Leaving.]
ruby-lang776 has quit [Quit: Page closed]
eytanfb has quit [Remote host closed the connection]
<ruby-lang968> ChameleonSix YOU can assign default values to a method
<ChameleonSix> there is no default
<ChameleonSix> in this case
dfinninger has joined #ruby
<hfp> ChameleonSix: I think they mean to put the result of `get_answer()` into a variable
<ruby-lang968> are you not writing the code?
<hfp> so something like `answer = get_answer()`. Then your `answer` variable will hold whatever get_answer() returned and you can then parse it further
<ChameleonSix> i wrote this
<ChameleonSix> it doesnt pass
treehug88 has quit [Ping timeout: 256 seconds]
mikecmpbll has joined #ruby
<KrzaQ> Let's say I want to override method_missing for Hash, so that if the has has_key? method_name it returns its value, but otherwise retains the standard behaviour. I know how to do the former, but not the latter
<ChameleonSix> I solved it
<ChameleonSix> nvm
<ChameleonSix> tnx
<ChameleonSix> it should say answer = get_answer()
nateberkopec has joined #ruby
yqt has joined #ruby
<soahccc> KrzaQ: super?
<KrzaQ> Ah
<jhass> KrzaQ: also OpenStruct
<KrzaQ> soahccc: I'm a ruby noob with some spotty knowledge, so my questions may seem stupid, but I usually get by
<soahccc> KrzaQ: but yeah tampering with Hash is generally not a good idea :9
axl_ has quit [Quit: axl_]
<jhass> hfp: the module doesn't call these private methods from public methods?
sucks has quit [Read error: Connection reset by peer]
<jhass> hfp: if you use .send in a test you're most likely doing it wrong
dfinninger has quit [Ping timeout: 246 seconds]
hxegon has quit [Remote host closed the connection]
<KrzaQ> soahccc: this is for 1-line scripts for advent of code :P
<KrzaQ> jhass: thanks, looks nice
startupality has quit [Quit: startupality]
hxegon has joined #ruby
<ChameleonSix> why does this show an error
<ChameleonSix> it print the number 6 right?
<adaedra> what error?
atomical_ has joined #ruby
<ChameleonSix> i should be greater than 5
<ChameleonSix> it is 6
<ChameleonSix> when i use the until loop
<adaedra> It prints nothing, as you don't print anything.
<KrzaQ> jhass: I don't suppose require 'ostruct' would add to_ostruct method to Hash?
<adaedra> Also, if you put an extension in gist, you'll have syntax coloring.
<ChameleonSix> yes
<ChameleonSix> but it does something inside
<ChameleonSix> I mean
<ChameleonSix> nvm
<jhass> KrzaQ: given there's no "class Hash" in https://github.com/ruby/ruby/blob/trunk/lib/ostruct.rb, no
<ChameleonSix> Im a ruby genius
hobodave has quit [Quit: Computer has gone to sleep.]
<ChameleonSix> lol
<hxegon> slow down kanye :)
<adaedra> Again with the lols? Stop it.
<KrzaQ> jhass: ok, thank you
<ChameleonSix> ok sorry
<ChameleonSix> anyway
<ChameleonSix> do...while is a js loop?
startupality has joined #ruby
atomical has quit [Ping timeout: 256 seconds]
<adaedra> What does js has to do with any of this
ruby-lang968 has quit [Ping timeout: 252 seconds]
<ChameleonSix> nothing
<ChameleonSix> I just wondered
<ChameleonSix> they are connected
<ChameleonSix> Everything is connected
Emmanuel_Chanel has quit [Ping timeout: 250 seconds]
kalopsian has joined #ruby
mary5030 has quit [Ping timeout: 255 seconds]
xlogic has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmolina has quit [Quit: Leaving.]
<hxegon> ChameleonSix, while that is true, please keep #ruby to ruby topics and not metaphysical observations.
<ChameleonSix> ok
<hxegon> that would be ##metaphysical-rebooted-v2
<ChameleonSix> I cant get the hang of array iteration
<KrzaQ> thanks soahccc
<hxegon> ChameleonSix, what are you trying to do to the elements?
<ChameleonSix> array.each do |item|
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ChameleonSix> what does | | mean
<adaedra> block parameters.
<ChameleonSix> when something is in it
<ChameleonSix> hmm ok
pdoherty has quit [Ping timeout: 256 seconds]
<ChameleonSix> array.each do |item| puts "The current array item is: #{item}" end
<ChameleonSix> this will list through all items?
poguez_ has joined #ruby
<ChameleonSix> and print them
<adaedra> well, did you try?
tvw has quit [Remote host closed the connection]
<ChameleonSix> not yet
sepp2k has quit [Read error: Connection reset by peer]
<adaedra> trying is the best way to see what it does.
<ChameleonSix> thanks
troulouliou_div2 has quit [Ping timeout: 260 seconds]
sigurding has quit [Quit: sigurding]
howdoicomputer has quit [Ping timeout: 265 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
howdoicomputer has joined #ruby
kerframil has joined #ruby
eytanfb has joined #ruby
<ChameleonSix> i understand this
<ChameleonSix> blocks work with everything
<ChameleonSix> ?
<ChameleonSix> I mean iteration is used for hashes also
<shevy> every method in ruby can accept a block
<ChameleonSix> nice to know
juddey has joined #ruby
<adaedra> not all of them use the block tho.
<ChameleonSix> i know
<ChameleonSix> Im not that noobish
<shevy> you know a lot already
<ChameleonSix> -_-
<ChameleonSix> :0
<ChameleonSix> :)
<ChameleonSix> brb
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<ChameleonSix> i feel smarter
<ChameleonSix> Can you help me about something little more complex?
NeverDie has joined #ruby
<ChameleonSix> I dont have an idea how to define it
Renich has quit [Quit: leaving]
<jhass> ChameleonSix: next meta question will get you kicked, the one after muted for an hour
<ChameleonSix> ok sorry
<ChameleonSix> I dont want that
<ChameleonSix> How do i make a ruby script that opens my browser(firefox)
<havenwood> ChameleonSix: What OS/distro?
<ChameleonSix> it might be a stupid question
<ChameleonSix> windows
<jhass> system("firefox")
<ljarvis> it's not a stupid question, which is why it's a very popular google search
<shevy> ChameleonSix come to linux man
devbug_ has joined #ruby
<adaedra> jhass: too bad it's system-dependant.
<ChameleonSix> I got it on laptop
<ChameleonSix> cant game on linux
<shevy> ChameleonSix you can set the xorgbuffer and open into a firefox tab
kadoppe has quit [Ping timeout: 240 seconds]
<adaedra> wat
<jhass> ^
<ChameleonSix> anyway
<ChameleonSix> how do i know how to call the web browser
<ChameleonSix> webbrowser for example
<adaedra> ...
pawnbox has quit [Ping timeout: 246 seconds]
<ChameleonSix> how do i do the same with notepad?
<shevy> jhass showed you how it works
medvedushka has joined #ruby
<shevy> quit being such a noob
mary5030 has joined #ruby
<ChameleonSix> hmm
<jhass> ChameleonSix: you next question must show that you did you research prior asking it
axl_ has joined #ruby
devbug has quit [Ping timeout: 255 seconds]
<ChameleonSix> i duckducked it
<shevy> you can use cygwin/msys on windows too so commandline should work. no idea if you can manipulate the buffer on windows from the commandline though
wolffles has quit [Ping timeout: 240 seconds]
kalopsian has quit [Ping timeout: 246 seconds]
Bloomer has quit []
momomomomo has joined #ruby
<adaedra> shevy: you don't have an even more complicated answer...?
<ljarvis> :D
<ljarvis> lol'd
kadoppe has joined #ruby
<ljarvis> pass the buffer to the gibson via telnet
aibot has quit [Ping timeout: 256 seconds]
BSaboia has joined #ruby
djbkd has joined #ruby
<shevy> adaedra it's very trivial, I am sorry that you don't understand it but with hard work you may be able to
<adaedra> lel.
<shevy> lol.
<ljarvis> shots fired
akem has quit [Read error: No route to host]
hahuang65 has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
jmonreal has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has joined #ruby
Emmanuel_Chanel has quit [Max SendQ exceeded]
akem has joined #ruby
wildlander has joined #ruby
BSaboia has joined #ruby
<ChameleonSix> hmm i cant understand this isnt working
Emmanuel_Chanel has joined #ruby
<hxegon> ChameleonSix, well,
<ChameleonSix> I need to link the cmd and ruby?
<ChameleonSix> somehow
baweaver has joined #ruby
djbkd has quit [Remote host closed the connection]
yqt has quit [Ping timeout: 246 seconds]
<hxegon> ChameleonSix, obviously the solution is to delete System32
<adaedra> ChameleonSix: did you at least open ljarvis's link?
<shevy> ChameleonSix what is not working with jhass' example
djbkd has joined #ruby
<ChameleonSix> i read it
knowtheory has quit [Read error: Connection reset by peer]
ckrailo has quit [Read error: Connection reset by peer]
<medvedushka> /msg nickserv help
<medvedushka> ops
<adaedra> here
<ChameleonSix> hxegon lol
<havenwood> present!
ckrailo has joined #ruby
knowtheory has joined #ruby
akem2 has joined #ruby
<adaedra> ChameleonSix: then you've got multiple solutions to work with.
pdoherty has joined #ruby
akem has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
kalopsian has joined #ruby
<ChameleonSix> some ruby programs dont need an end?
<ljarvis> ChameleonSix: jhass warned you
<shevy> :)
<ChameleonSix> ok
<ChameleonSix> sorry
<atmosx> Say I want to create a list with all possible permutations of a word. What is the logic behind it? I'm thinkin about it: 1) turn word into array, 2) move 1st char one position to the left, 3) save new array to an array of arrays (matrix), 4) repeat for new array (recursively). Is that it?!
akem2 has quit [Read error: No route to host]
<adaedra> atmosx: there's Array#permutations otherwise.
akem has joined #ruby
<atmosx> adaedra: I need to understand the process, not just create a permutation
<atmosx> adaedra: I feel like I'm missing something.
<shevy> what the
<shevy> there is a new ruby?
framling has joined #ruby
<atmosx> shevy: crystal?
Macaveli has joined #ruby
ta has quit [Ping timeout: 255 seconds]
<hxegon> shevy, it just fixes a security issue with fiddle
jbrhbr has quit [Quit: Leaving.]
aibot has joined #ruby
<shevy> aaaah ok... thought it was early xmas ... ftp://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.4.tar.xz
akem has quit [Read error: No route to host]
startupality has quit [Quit: startupality]
<hxegon> atmosx, does crystal have type inference?
akem has joined #ruby
<atmosx> hxegon: I have no idea, I just know it exists and that it's pretty similar to ruby, ping jhass he'll know.
<ljarvis> atmosx: the best way to put it is "from left to right, generate all permutations of the rest of the elements until you get to the end"
<ljarvis> hxegon: yes it does
<hxegon> ljarvis, :D
<atmosx> ljarvis: okay, thanks. I'll try to implement a dummy vesion see how it goes.
<ljarvis> atmosx: maybe take a look to see what the ruby C code does too, there are different algorithms I guess
<jhass> hxegon: it does
<ChameleonSix> jhass you are a genius
ht__ has joined #ruby
<hxegon> I'll check it out, check check check it out
<ChameleonSix> i mean it
ht__ has quit [Client Quit]
<hxegon> ChameleonSix, we actually took a vote and decided to refer to jhass as 'senpai', please respect the room rules :\
jbrhbr has joined #ruby
<jhass> ?jhass
<ruboto> jhass is anybody. They're a member of the op staff in #ruby, contributor to ruboto and ruby-community.com
<ljarvis> ?ljarvis
<ruboto> I don't know anything about ljarvis
<ljarvis> DAMN RIGHT
InvGhost has joined #ruby
colegatron has quit [Ping timeout: 272 seconds]
<adaedra> !fact add ljarvis I know everything about ljarvis
<ruboto> adaedra, I will remember that ljarvis is I know everything about ljarvis
Bugboy1028 is now known as DeafieGamer
roshanavand has joined #ruby
jherm has joined #ruby
<ChameleonSix> ruboto is that thing on android
<ChameleonSix> why do half commands dont work there?
platzhirsch has left #ruby [#ruby]
<hxegon> #ot ChameleonSix
<ChameleonSix> no root permission?
<hxegon> ?ot ChameleonSix
<ruboto> ChameleonSix, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related topics. Thanks!
<ChameleonSix> hmm ok
<baweaver> ?baweaver
<ruboto> I don't know anything about baweaver
psy_ has joined #ruby
nvp has joined #ruby
<ChameleonSix> mr ruboto
robbyoconnor has joined #ruby
<ChameleonSix> ?ruboto
<ruboto> I'm the channel bot, linker of the rules, adept of the facts, wielder of the banhammer.
Emmanuel_Chanel has quit [Quit: Leaving]
<hxegon> ruboto is the king of the north
<nvp> hey, there has been a lot of talk of Crystal lately, and how it's 25 times faster than ruby, and has 90% ruby syntax compatibility. What does this mean for the future of ruby? Will the ruby eventually adopt crystal and optionally become compilable?
<ChameleonSix> yes
<ljarvis> nvp: no to the second question
<adaedra> nvp: they're still two different things
<ljarvis> nvp: and probably nothing to the first question
<shevy> nvp just as any other language, it's a different one
<medvedushka> ruboto a bot, but talking like a human. Turing should be happy,lol
jcoe has joined #ruby
<ljarvis> crystal just borrows lots of Ruby's syntax, that's really it
ht__ has joined #ruby
<ljarvis> it's actually too similar to Ruby for me, but it is very nice
<jherm> I'm having a strange problem. I'm looking at erb usage examples online and for some reason, even when I "require 'erb'", I get a NameError when I reference Erb. Anyone have any ideas?
<SirFunk> Anyone use any good self-hosted solutions for collecting metrics in ruby? (Things like requests/sec and request durations?)
<eam> many, many languages are 25 times faster than ruby
<shevy> exactly 25 times!
<ljarvis> jherm: it's ERB
<medvedushka> where all these sites on assembler
<jherm> wow, derp
roshanavand has quit [Ping timeout: 255 seconds]
<jherm> ijarvis: thank you very much!
<ljarvis> it's an L, but you're welcome :)
<shevy> kjarvis!
<adaedra> ivarjis
nvp has quit [Quit: Page closed]
<jherm> Erb, ERB, ijarvis, ljarvis, same thing
<baweaver> iJarvis - Apple AI
<ljarvis> hah
shiver has joined #ruby
<ljarvis> where is inkjet when you need him
<eam> shevy: but on the 26th time they're slower :(
<hxegon> gnu plus marvel
howdoicomputer has quit [Ping timeout: 246 seconds]
kgirthofer has joined #ruby
<ChameleonSix> I feel so smart when i know ruby
Mr_Psmith has quit [Quit: Mr_Psmith]
<yorickpeterse> ljarvis: /nick iJarvis
<hxegon> >> (1..10).inject([]) { |mem, i| mem += i } # ChameleonSix how does this work
idefine has joined #ruby
<ruboto> hxegon # => no implicit conversion of Fixnum into Array (TypeError) ...check link for more (https://eval.in/486377)
<baweaver> not well apparently
<hxegon> Ahhhh, I am the one who is stuuuuuuuup
<ChameleonSix> hmm
crankharder has joined #ruby
<adaedra> I think you're looking for <<.
<hxegon> >> (1..10).to_a.inject([]) { |mem, i| mem += i } # ChameleonSix how does this work
<ruboto> hxegon # => no implicit conversion of Fixnum into Array (TypeError) ...check link for more (https://eval.in/486378)
<jhass> hxegon: looks like you wanted each_with_object
<ChameleonSix> in range from 1 to 10
<ChameleonSix> in something
<ChameleonSix> hmm mem ,i defines a key and value of the hash
SolarSailor has quit [Quit: My Turing machine has gone to sleep. ZZZzzz…]
jmonreal has joined #ruby
<baweaver> ChameleonSix: nope
<ChameleonSix> impossible
<baweaver> memo and iterator
* ChameleonSix hmm
<ChameleonSix> ok
colleenmcguckin has quit [Read error: Connection reset by peer]
[Butch] has quit [Quit: I'm out . . .]
<baweaver> inject is also known as reduce, which is known as foldLeft in functional languages
<baweaver> you're passing a piece of state through a function that's getting folded onto
shredding has joined #ruby
<baweaver> >> (1..5).reduce(0) { |m, i| m + i }
colleenmcguckin has joined #ruby
<hxegon> >> (1..10).inject { |mem, i| mem += i }
<ruboto> baweaver # => 15 (https://eval.in/486379)
<ruboto> hxegon # => 55 (https://eval.in/486380)
<jhass> hxegon: no need for the =
momomomomo has quit [Quit: momomomomo]
<baweaver> the return of each function is the new value of the memo
<baweaver> until the last, when the memo is returned.
dlitvak_ has quit [Remote host closed the connection]
<baweaver> memo, accumulator, state, take your pick of name.
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
idefine has quit [Ping timeout: 255 seconds]
<hxegon> and 0 in baweaver's example is the initial value of m
timmow_ is now known as timmow
<baweaver> otherwise it's the first value of the collection
colegatron has joined #ruby
jherm has quit [Quit: Leaving.]
firstdayonthejob has joined #ruby
lemur has joined #ruby
<hxegon> >> (1..5).reduce { |m, i| m + i }
<ruboto> hxegon # => 15 (https://eval.in/486381)
akem has quit [Read error: Connection reset by peer]
<baweaver> it's in Scala / Python but gives a general overview of FP like that
akem has joined #ruby
<hxegon> didn't know that baweaver
<baweaver> most of the same can be done in ruby
<baweaver> (of _that_ part of Scala)
kalopsian has quit [Ping timeout: 256 seconds]
fmcgeough has joined #ruby
<baweaver> and now meeting time!
<baweaver> cheers
hectortrope has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
<ChameleonSix> brb
SolarSailor has joined #ruby
RegulationD has joined #ruby
tomphp has joined #ruby
akem has quit [Read error: No route to host]
akem has joined #ruby
lemur has quit [Ping timeout: 255 seconds]
hobodave has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
* hxegon thinks we had a collective brainfart because noone suggested...
<hxegon> >> (1..10).reduce(&:+)
<ruboto> hxegon # => 55 (https://eval.in/486382)
baweaver has joined #ruby
dfinninger has joined #ruby
<adaedra> There's even shorter.
<adaedra> >> 55
<ruboto> adaedra # => 55 (https://eval.in/486383)
zast has quit [Remote host closed the connection]
<hxegon> even shorter than that
<hxegon> 55
<jhass> >> 11.times.inject(:+)
<ruboto> jhass # => 55 (https://eval.in/486384)
<hxegon> you don't have to use the &?
<jhass> not for inject/reduce
dlitvak has joined #ruby
<adaedra> &ri Array#inject
<`derpy> method `Enumerable#inject`: Combines all elements of enum by applying a binary operation, specified by a blo… • http://rubydoc.info/stdlib/core/Enumerable#inject-instance_method
<adaedra> See, block or symbol.
RegulationD has quit [Ping timeout: 240 seconds]
<agent_white> HOw
dsdeiz has quit [Ping timeout: 272 seconds]
<adaedra> How what
<agent_white> I understand (5..10).inject(:+)
ht__ has quit [Quit: Konversation terminated!]
<agent_white> But 5.times.inject(:+), or 11 as said above.
dfinninger has quit [Remote host closed the connection]
<adaedra> &ri Fixnum#times
<`derpy> method `Integer#times`: Iterates the given block +int+ times, passing in values from zero to int - 1. If… • http://rubydoc.info/stdlib/core/Integer#times-instance_method
vdamewood has quit [Quit: Life beckons.]
<agent_white> hm
<adaedra> since it gives you an Enumerator, you can chain with inject.
SolarSailor has quit [Remote host closed the connection]
<agent_white> adaedra: Ah I see :) Same premise.
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ht__ has joined #ruby
<agent_white> >> 5.times.inject(:+) == (1..4).inject(:+)
<ruboto> agent_white # => true (https://eval.in/486385)
SolarSailor has joined #ruby
wmdrossard has quit [Quit: Lost terminal]
<agent_white> >> 5.times.inject(:+) == (1...4).inject(:+)
<ruboto> agent_white # => false (https://eval.in/486386)
<jhass> ?experiment
<ruboto> Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
baweaver has quit [Ping timeout: 256 seconds]
<agent_white> jhass: I know :) Wasn't going to get carried away, just those two.
Suntzu has quit [Read error: Connection reset by peer]
Madhur_ has joined #ruby
<agent_white> Anyways, that is what confused me. I see now.
<adaedra> It's not exactly the same tho. See with *.
colleenmcguckin has quit [Read error: Connection reset by peer]
calderonroberto has joined #ruby
madcodes has quit [Ping timeout: 272 seconds]
<agent_white> I will check it out.
colleenmcguckin has joined #ruby
SolarSailor has quit [Client Quit]
fantazo has joined #ruby
pawnbox has joined #ruby
RobertBirnie has joined #ruby
rdavila has joined #ruby
rismoney1 has joined #ruby
FernandoBasso has quit [Quit: Leaving]
ht__ has quit [Quit: Konversation terminated!]
djbkd has quit [Remote host closed the connection]
ht__ has joined #ruby
codeurge has joined #ruby
djbkd has joined #ruby
elifoster has joined #ruby
dlitvak has quit [Remote host closed the connection]
<diegoviola> I'm using CSV to parse some code like this: 200~https://gist.github.com/a0e7e54969f1764d5679
<diegoviola> I need to be able to group different rows into different array of hashes
TomyLobo has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 246 seconds]
<jhass> &ri Enumerable#group_by
<`derpy> method `Enumerable#group_by`: Groups the collection by result of the block. Returns a hash where the keys are … • http://rubydoc.info/stdlib/core/Enumerable#group_by-instance_method
eytanfb has quit [Remote host closed the connection]
<diegoviola> how can I get all rows that match /foo/ from row['bar']?
<diegoviola> jhass: is that for me?
_djbkd has joined #ruby
momomomomo has joined #ruby
<adaedra> I think so.
<diegoviola> thanks
<agent_white> New bot?
<agent_white> That's pretty neat.
jherm has joined #ruby
skade has joined #ruby
jherm has quit [Client Quit]
djbkd has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
<`derpy> New, new...
RegulationD has joined #ruby
decoponio has quit [Quit: Leaving...]
CrazyEddy has quit [Remote host closed the connection]
framlinqp has joined #ruby
spider-mario has joined #ruby
<shevy> hmm a gem fails, native build
<shevy> line that errors is: have_header( "st.h" )
trav408 has joined #ruby
framling has quit [Ping timeout: 240 seconds]
ht__ has quit [Quit: Konversation terminated!]
dfinninger has joined #ruby
arup_r has quit [Remote host closed the connection]
framlinqp has quit [Remote host closed the connection]
<shevy> aha
<shevy> include/ruby-2.2.0/ruby/st.h
ht__ has joined #ruby
last_staff1 has joined #ruby
howdoicomputer has joined #ruby
lxsameer has quit [Quit: Leaving]
eytanfb has joined #ruby
DotKite has joined #ruby
chouhoul_ has joined #ruby
devoldmx has joined #ruby
CrazyEddy has joined #ruby
dfinninger has quit [Ping timeout: 240 seconds]
chouhoul_ has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 256 seconds]
<DotKite> what is the most idiomatic way to search a 2-d array for a specific value and return the coords?
roshanavand has joined #ruby
last_staff has quit [Ping timeout: 265 seconds]
last_staff1 is now known as last_staff
<DotKite> efficiency is not super important
ht__ has quit [Quit: Konversation terminated!]
<eam> >> [*"a".."z"].find_index "n" # and it's perfectly efficient
<shevy> .select
<ruboto> eam # => 13 (https://eval.in/486388)
<eam> oh wait, you said 2d
devoldmx has quit [Ping timeout: 255 seconds]
<eam> I'd wrap that in each_with_index
cornerma1 has joined #ruby
arup_r has joined #ruby
grilled-cheese has quit [Read error: Connection reset by peer]
ht__ has joined #ruby
<DotKite> eam, thanks i'll try it out
dlitvak has joined #ruby
dimik has quit [Ping timeout: 255 seconds]
dfinninger has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
<eam> DotKite: you can always break from an each()
Suntzu has joined #ruby
cornerman has quit [Ping timeout: 240 seconds]
cornerma1 is now known as cornerman
akem has quit [Read error: No route to host]
dfinninger has quit [Remote host closed the connection]
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-487-cbf5c38 - http://znc.in]
akem has joined #ruby
dfinninger has joined #ruby
tulak has joined #ruby
<eam> >> [[1,2,3],[*"a".."z"]].each_with_index { |o,i| j = o.find_index "n"; break [i,j] if j }
<ruboto> eam # => [1, 13] (https://eval.in/486389)
cassioscabral has quit [Quit: cassioscabral]
ht__ has quit [Quit: Konversation terminated!]
kristianpaul has joined #ruby
<kristianpaul> Hi room
ht__ has joined #ruby
calderonroberto has quit [Ping timeout: 240 seconds]
<kristianpaul> is okay to add an authentication token with the add_field methon for a http post request?
akem has quit [Read error: No route to host]
<Radar> kristianpaul: is that a Rails question?
akem has joined #ruby
<shevy> yay finally it worked \o/ ... ruby 2.2.4p230 (2015-12-16 revision 53155)
<kristianpaul> Radar: isa ruby question
<adaedra> not answering.
<nofxx> shevy, just arrived in arch too!
<eam> it's ok with me, but I know nothing about rails
marsjaninzmarsa has joined #ruby
dlitvak has quit [Remote host closed the connection]
<adaedra> kristianpaul: you may want to add a little bit of context. Libraries, maybe a bit of code
dlitvak has joined #ruby
n008f4g_ has joined #ruby
<shevy> nofxx nice
<shevy> nofxx right now I am trying to find out if the only thing that changed was fiddle, or if anything else changed in addition to that
hansolodiesinthe has joined #ruby
<hansolodiesinthe> :^)
DroidBurgundy has joined #ruby
<kristianpaul> adaedra: just http
<shevy> nagachika said there are some other bugfixes too https://www.ruby-lang.org/en/news/2015/12/16/ruby-2-2-4-released/
<kristianpaul> well the context is easy, i have this tool call grafana
colleenmcguckin has quit [Read error: Connection reset by peer]
<kristianpaul> and i'm just trying to push that json
hansolodiesinthe has left #ruby [#ruby]
colleenmcguckin has joined #ruby
BSaboia has quit [Ping timeout: 265 seconds]
<kristianpaul> with curl i easy but i'm still getting the details together with ruby
wldcordeiro has quit [Quit: WeeChat 1.3]
_stu_ has quit [Quit: _stu_]
<kgirthofer> hey all - I have some issue. When I run a command that I wrote in ruby, it works fine locallay as bundle exec, but when I run it as a gem I get a check_version_conflict for json. It says it can't activate version 1.8.3 because version 1.7.7 is arleady activated. When i check the gemspec of the application I can see it's looking for 1.7.7, and when
<kgirthofer> I do a gem list I can see I only have 1.8.1 and 1.7.7 installed
treehug88 has joined #ruby
<kristianpaul> http://pastebin.com/raw/hvWRTqEd adaedra
<ruboto> kristianpaul, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<adaedra> You can address the whole channel, not just me
<kristianpaul> i think thats a fact
<jhass> kristianpaul: json is in stdlib these days, are you sure you need to depend on a specific version? (or at all, since as said stdlib)
<jhass> meh
<jhass> kgirthofer: ^ sorry
cassioscabral has joined #ruby
AnoHito has quit [Ping timeout: 256 seconds]
<kgirthofer> yea there are other parts of the application that require it
danielpclark has quit [Quit: Leaving]
<jhass> kgirthofer: I'm not asking whether you need it. I'm asking why you need that specific version
jbrhbr has quit [Quit: Leaving.]
<jhass> kgirthofer: and if the answer is "I don't" I'm asking why you list it as dependency still since it's a stdlib for a long time
FooMunki has quit [Quit: FooMunki]
akem has quit [Ping timeout: 272 seconds]
Emmanuel_Chanel has joined #ruby
Mon_Ouie has joined #ruby
jessemcgilallen has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
nettoweb has joined #ruby
wldcordeiro has joined #ruby
dfinninger has quit [Remote host closed the connection]
dlitvak has quit [Remote host closed the connection]
CrazyEddy has quit [Remote host closed the connection]
radgeRayden_ has quit [Ping timeout: 265 seconds]
gregf has quit [Quit: WeeChat 1.3]
radgeRayden has quit [Ping timeout: 265 seconds]
anisha has joined #ruby
jbrhbr has joined #ruby
dfdfdf has joined #ruby
CrazyEddy has joined #ruby
kgirthofer has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
freerobby has quit [Quit: Leaving.]
devbug_ has quit [Ping timeout: 240 seconds]
malconis has quit [Remote host closed the connection]
dfdfdf is now known as azgil2
malconis has joined #ruby
gregf has joined #ruby
agent_white is now known as agent_zzz
radgeRayden_ has joined #ruby
radgeRayden__ has joined #ruby
AnoHito has joined #ruby
ledestin has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stevenxl has joined #ruby
stevenxl has quit [Changing host]
stevenxl has joined #ruby
vcoinminer_ has quit [Ping timeout: 240 seconds]
vcoinminer_ has joined #ruby
darkf has quit [Quit: Leaving]
skade has joined #ruby
sgambino has joined #ruby
stevenxl has quit [Ping timeout: 256 seconds]
leat has joined #ruby
bb010g has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
leat has quit [Client Quit]
Lewix has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
<Lewix> / [[{name: "Test"},{name: "test2"}],[{name: "fr"}], [{name: "A"}, {name: 'b'}, {name: 'c'}] =====> into ["Test", "test2", "fr", "A", "b" ,"c"]
baweaver has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has quit [Quit: Leaving]
hobodave has joined #ruby
<jhass> Lewix: .flatten.map {|h| h[:name] }
<Lewix> jhass: I could have bet you were gonna suggest to do it with reduce
Wompy has joined #ruby
<jhass> I don't see how that would make any sense
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<diegoviola> not sure how to use group_by to filter stuff in a hash
Emmanuel_Chanel has quit [Quit: Leaving]
<Lewix> jhass: if you didnt use flatten..it could have make sense
<jhass> Lewix: not really
<jhass> Lewix: .flat_map {|people| people.map {|person| person[:name] } }
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cjbottaro has joined #ruby
bronson has quit [Remote host closed the connection]
<Lewix> jhass: ok you won, I can't prove my point. sheesh too many days with javascript and I forgot how sweet ruby is, I needed the inspiration for js
<baweaver> shenanigans?
<Lewix> what's a shenanigans?
chipotle has quit [Ping timeout: 240 seconds]
<jhass> Lewix: for what it's worth, each_with_object([]) {|people, names| names.concat people.map {|person| person[:name] } } would be the proper solution to what you probably were thinking of with reduce, though that's just reimplementing flat_ma
<jhass> *flat_map
medvedushka has quit [Remote host closed the connection]
<baweaver> I've used compact_map before (implemented with reduce) quite a bit.
PedramT has joined #ruby
devbug has joined #ruby
cajone is now known as cajone_afk
<Lewix> jhass: your each_with_object seems to return something different ,
<Lewix> names.concat people.map {} ?
imperator has joined #ruby
dustinr has joined #ruby
<Lewix> oh I see
<dustinr> >> "I HATE NIGGERS".times(999999)
<ruboto> dustinr # => undefined method `times' for "I HATE NIGGERS":String (NoMethodError) ...check link for more (https://eval.in/486411)
atomical has joined #ruby
<dustinr> >> "I HATE NIGGERS" * 9999999
freerobby has joined #ruby
<ruboto> dustinr # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/486412)
<dustinr> >> "I HATE NIGGERS" * 999
<ruboto> dustinr # => "I HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI HATE NIGGERSI ...check link for more (https://eval.in/486413)
<dustinr> >> "I HATE NIGGERS " * 999
<ruboto> dustinr # => "I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NIGGERS I HATE NI ...check link for more (https://eval.in/486415)
<dustinr> =D
<dustinr> >> "8=======D " * 999
<ruboto> dustinr # => "8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D ...check link for more (https://eval.in/486417)
blackgoat has joined #ruby
_stu_ has joined #ruby
<dustinr> >> "8=======D " * 123412351235412341234135
<ruboto> dustinr # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/486418)
<dustinr> >> "8=======D " * 9999999
<ruboto> dustinr # => failed to allocate memory (NoMemoryError) ...check link for more (https://eval.in/486419)
<GinoManWorks> well....... ummmmmmm
<dustinr> >> "8=======D " * 9999
<ruboto> dustinr # => "8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D 8=======D ...check link for more (https://eval.in/486421)
<baweaver> !mute dustinr
<dustinr> >> "JOIN THE KLAN " * 9999
<ruboto> dustinr, I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
<Lewix> well well I'm never going to Sweden
<ChameleonSix> Hello again
<havenwood> !kick dustinr
dustinr was kicked from #ruby by ruboto [dustinr]
dustinr has joined #ruby
<dustinr> fuck u
devbug has quit [Ping timeout: 240 seconds]
<havenwood> !mute dustinr
<dustinr> nigger bitch cunt
<PedramT> /msg NickServ VERIFY REGISTER PedramT eqswyfrliqag
pglombardo has joined #ruby
<fcser> zinger
<ChameleonSix> what is wrong with this code
* Lewix is laughing that racism is going strong..even on irc
<dustinr> your mom
<dustinr> fuckingnigger
<Radar> gtfo plz.
<dustinr> fuck off nigger lover
<dustinr> plz
<dustinr> fuck off and get aids faggot
<GinoManWorks> havenwood +b dustinr?
dustinr was banned on #ruby by ChanServ [dustinr!*@*]
dustinr was kicked from #ruby by ChanServ [User is banned from this channel]
<havenwood> GinoManWorks: Already done.
<GinoManWorks> thanks
<Radar> Ban list is already full.
<havenwood> np
<Radar> Added to akick instead.
<ChameleonSix> Can anyone help me please
<Radar> ChameleonSix: no, nobody can hep you.
<ChameleonSix> why not
<Radar> ChameleonSix: Because you haven't provided enough information.
postmodern has joined #ruby
ur5us has joined #ruby
<GinoManWorks> ChameleonSix: Because you have asked the wrong questions young padawan
<ChameleonSix> i have the link
<ChameleonSix> gave
<Radar> ChameleonSix: What is "gest"?
<ChameleonSix> Fill out the parse_answer method to return the answer passed in. If the kind is "number", convert answer to an integer using the to_i method before returning it.
fullofcaffeine has joined #ruby
jackjackdripper has joined #ruby
<ChameleonSix> it should do this
<ChameleonSix> ?
<Radar> ChameleonSix: Stop. Answer the question.
<Lewix> by the way jhass thanks
<GinoManWorks> I was going to ask about where the settings were that gem uses to compile native extensions....
_djbkd has quit [Remote host closed the connection]
PedramT has quit []
<ChameleonSix> hmm
<ChameleonSix> idk
<ChameleonSix> What do you mean?
<ChameleonSix> Mr Radar?
<ChameleonSix> Please?
<Lewix> lol
<Lewix> so aggressive
<Radar> ChameleonSix: Don't spam the channel, thanks.
<Lewix> ChameleonSix: check your spelling
<Radar> ChameleonSix: I literally mean "what is gest"? gest isn't defined within that context
ht__ has quit [Quit: Konversation terminated!]
<ChameleonSix> gets*
ht__ has joined #ruby
<ChameleonSix> Omg
<ChameleonSix> I didnt realize
<ChameleonSix> sorry im tired
jackjackdripper has quit [Client Quit]
<ChameleonSix> thanks
* Lewix likes the sound of Mr Radar
jackjackdripper has joined #ruby
arup_r has quit []
dlitvak has joined #ruby
<baweaver> also, easy on the enter key
<ChameleonSix> but the code says error in the tutorial
<ChameleonSix> idk why
<Radar> ChameleonSix: Second warning: please don't spam the channel.
<Radar> ChameleonSix: On the 3rd warning, you will be muted for a day.
<ChameleonSix> Ok
roshanavand has joined #ruby
wildlander has quit [Quit: Saliendo]
howdoicomputer has quit [Ping timeout: 272 seconds]
AKASkip has joined #ruby
ruby-lang529 has joined #ruby
<ruby-lang529> hi guys
<havenwood> ruby-lang529: hi
<blub> hi ruby lang 5 29
Emmanuel_Chanel has joined #ruby
<ruby-lang529> can someone help me :( I can't extract my data using ruby
devbug has joined #ruby
<blub> sounds like you're in the wrong channel then
lemur has joined #ruby
tinyhippo has joined #ruby
dlitvak has quit [Ping timeout: 256 seconds]
<ChameleonSix> radar
<ChameleonSix> How do i execute ruby code on my webpage
<Radar> ChameleonSix: Oh my fucking god.
<shevy> haha
<ChameleonSix> This isnt spamming
<Radar> ChameleonSix: Quie.t
ChameleonSix was kicked from #ruby by ruboto [http://ruby-community.com/pages/user_rules#rule_2_7]
ChameleonSix has joined #ruby
<ChameleonSix> :(
FernandoBasso has joined #ruby
platzhirsch has joined #ruby
* tinyhippo raises his eyebrow
jbrhbr has quit [Quit: Leaving.]
<Radar> ChameleonSix: Please don't put people's names on a single line without any other messages. It's really annoying.
<Radar> ChameleonSix: Look at Sinatra or Ruby on Rails.
blackgoat has quit [Quit: WeeChat 1.3]
prestorium has quit [Quit: Leaving]
ruby-lang529 has quit [Ping timeout: 252 seconds]
Musashi007 has joined #ruby
<ChameleonSix> Thank you
psy_ has quit [Ping timeout: 255 seconds]
blackgoat has joined #ruby
lemur has quit [Ping timeout: 255 seconds]
<tubbo> haha
<tubbo> Radar: 99% sure those are the ?guys guys
<Radar> tubbo: Trying to free up some space in the banlist.
hxegon has quit [Ping timeout: 265 seconds]
<tubbo> there's a limit?
<tubbo> wow
<Radar> Yup.
hobodave has quit [Quit: Computer has gone to sleep.]
ht__ has quit [Quit: Konversation terminated!]
<Radar> And we've crossed it because of chanserv's akick stuff.
ht__ has joined #ruby
<tubbo> that's pretty lame
skade has quit [Quit: Computer has gone to sleep.]
pawnbox has joined #ruby
<jhass> note quiet and ban list count together into one limit
<Radar> ?fake
<ruboto> Please show your real code to illustrate your problem. Using fake code often hides it or won't bring up the best possible solution.
<tubbo> imperator: agreed
yalue has joined #ruby
<ChameleonSix> Does anyone know something about ERB
<tubbo> imperator: look at ln3 and ln12 again
<Radar> imperator: constant is STUFF, but ref to the constant is Stuff.
<tubbo> ChameleonSix: no
<tubbo> ChameleonSix: it is a mystery
<tubbo> ERB stands for Ehhhh Really Bruh?
<ChameleonSix> no
<GinoManWorks> So anyways, can anyone help me; I'm not even sure I'm asking the question right: how does gem know what compiler to use and the build environment settings and such for native extensions?
<Radar> ChameleonSix: Rule warning #1. 3 rule warnings and it's a ban.
hxegon has joined #ruby
<Radar> GinoManWorks: I believe it's configured in the gem, but don't ask me where because I don't know.
<jhass> Radar: feel free, we're way beyond that
<Radar> jhass: :)
<imperator> tubbo, oops fixed, same result
<tubbo> ahh
<Radar> imperator: steps to reproduce kthx
<tubbo> strange
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> GinoManWorks: the gem may overwrite it but most are sane enough to respect the CC/CXX environment variables
<GinoManWorks> hmm
<jhass> GinoManWorks: after all, all the build process does is to "just" generate and run a Makefile
<GinoManWorks> so if you're on windows and have the DevKit installed and configured properly?
pika_pika has quit [Ping timeout: 240 seconds]
devbug has quit [Ping timeout: 246 seconds]
cassioscabral has quit [Quit: cassioscabral]
<jhass> I'm avoiding getting familiar with the windows build environment as long as I can
pawnbox has quit [Ping timeout: 246 seconds]
DifferentLambda has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
ht__ has joined #ruby
<tubbo> GinoManWorks: have you checked out any examples of projects with native extensions?
<havenwood> imperator: works on my machine (with STUFF/Stuff fixed)
<tubbo> reading through a few extconf.rb's really helped me understand it
<tubbo> imperator: issue might be the order in which you're loading
JStoker has quit [Remote host closed the connection]
EvilJStoker has quit [Remote host closed the connection]
Hien has quit [Remote host closed the connection]
eytanfb has quit [Remote host closed the connection]
<tubbo> oh wait n/m
goodcodeguy has joined #ruby
dlitvak has joined #ruby
hobodave has joined #ruby
<imperator> i may be going insane
<imperator> i do not know what is happening
<GinoManWorks> tubbo: I haven't yet, i was asking more in the context of public gems that have a native extension component
<GinoManWorks> not my own native extension buildling
<GinoManWorks> building*
ChameleonSix has quit [Quit: Page closed]
dfinninger has joined #ruby
skade has joined #ruby
<havenwood> imperator: ruby -Ilib -rbar.rb lib/bar/baz.rb #=> 7
<havenwood> imperator: (with dir structure as you have it and Ruby 2.2.4)
<havenwood> Though same on 1.9, 2.0 and 2.1
<havenwood> It works1
Drakevr has quit [Ping timeout: 260 seconds]
djbkd has joined #ruby
psy_ has joined #ruby
chipotle has joined #ruby
eytanfb has joined #ruby
ht__ has quit [Quit: Konversation terminated!]
rgtk has quit [Remote host closed the connection]
ht__ has joined #ruby
cassioscabral has joined #ruby
<imperator> wtf is happening here then
freerobby has quit [Quit: Leaving.]
djbkd has quit [Remote host closed the connection]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gimmi45 has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator> ok, got it worked out
devbug has joined #ruby
cdg has joined #ruby
rojo has joined #ruby
howdoicomputer has joined #ruby
cdg has quit [Read error: Connection reset by peer]
radgeRayden_ has quit [Quit: Leaving]
shredding has quit [Ping timeout: 260 seconds]
radgeRayden__ has quit [Quit: Leaving]
gimmi45 has quit [Client Quit]
cdg has joined #ruby
synthroid has quit []
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DroidBurgundy has quit []
momomomomo has quit [Quit: momomomomo]
JStoker has joined #ruby
EvilJStoker has joined #ruby
dlitvak has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 272 seconds]
nerium has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
[Butch] has joined #ruby
moeabdol has joined #ruby
bogn has joined #ruby
pika_pika has joined #ruby
scripore has joined #ruby
bogn has quit [Client Quit]
bogn has joined #ruby
bithon has quit [Quit: WeeChat 1.3]
ht__ has quit [Quit: Konversation terminated!]
pawnbox has joined #ruby
baweaver has quit [Remote host closed the connection]
treehug88 has quit [Ping timeout: 246 seconds]
bronson has joined #ruby
firstdayonthejob has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
bogn has quit [Read error: Connection reset by peer]
bogn has joined #ruby
fantazo has quit [Ping timeout: 240 seconds]
pawnbox has quit [Ping timeout: 255 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
aspire has joined #ruby
yalue has quit [Quit: return 0;]
wolffles has joined #ruby
devoldmx has joined #ruby
bronson has quit [Ping timeout: 265 seconds]
momomomomo has joined #ruby
momomomomo has quit [Client Quit]
Wompy has quit [Remote host closed the connection]
baweaver has joined #ruby
rojo has quit [Quit: Leaving]
rojo has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Wompy has joined #ruby
Wompy has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
Wompy has joined #ruby
sdwrage has joined #ruby
frem has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
rdavila has joined #ruby
rojo has quit [Client Quit]
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
kalopsian has joined #ruby
slawrence00 has joined #ruby
akaiiro has joined #ruby
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
dopie has quit [Ping timeout: 272 seconds]
dfinninger has quit [Remote host closed the connection]
d5sx43 has joined #ruby
bronson has joined #ruby
moeabdol1 has joined #ruby
nettoweb has joined #ruby
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
moeabdol has quit [Ping timeout: 246 seconds]
nettoweb has quit [Max SendQ exceeded]
codecop has quit [Remote host closed the connection]
nettoweb has joined #ruby
dfinninger has joined #ruby
idefine has joined #ruby
platzhirsch has quit [Ping timeout: 240 seconds]
smactive has joined #ruby
tds5016 has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
tulak has quit [Remote host closed the connection]
<tds5016> Hey. Question... can someone help me figure out how I'd use split to get "a:b:c\:d" to be ['a', 'b', 'c:d']
<tds5016> I'm pretty sure I need to use a regex negative look behind, but I've not had any luck yet.
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver> cheap: substitute the escaped, split, resub
<baweaver> either that or a not
<tds5016> baweaver: I might be dumb, but can you give an example?
blackmesa has joined #ruby
idefine has quit [Ping timeout: 255 seconds]
<tds5016> a:b:c\\:d".split /(?<!\\):/
<tds5016> ["a", "b", "c\\:d"]
<tds5016> that's as close as I've been able to get.
<adaedra> >> "a:b:c\:d".replace('\:', '$').split(':').map { |e| e.replace('$', ':') }
<ruboto> adaedra # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/486536)
<adaedra> mh.
smactive has quit [Ping timeout: 265 seconds]
<tds5016> the thing is I can't guarantee the string won't have $
<adaedra> Ah ok, String#replace is totally not what I was thinking about.
<adaedra> Is there something it can't has?
<tds5016> so I don't think that solution would work :-/.
<tds5016> nope. It could have anything.
colleenmcguckin has quit [Read error: Connection reset by peer]
<tds5016> basically I need it to work the same way as escape characters normally do :-/.
otherj has joined #ruby
<baweaver> yeah, looks like negative lookaround
d5sx43 has quit [Quit: Leaving...]
<baweaver> I just don't remember that syntax for the life of me.
<tds5016> yeah; baweaver above is as close as I could get... I'm not sure how else to fix it :-/.
colleenmcguckin has joined #ruby
<Zarthus> try #regex, some pretty smart guys in there
rgtk has joined #ruby
<tds5016> thanks!
<adaedra> Zarthus: you say that because we aren't smart?
triangles2 has quit [Read error: Connection reset by peer]
BubonicPestilenc has joined #ruby
<BubonicPestilenc> hey all
<Zarthus> as far as regexes go I haven't been astounded here yet - ruby itself? sure ;)
<adaedra> :p
triangles2 has joined #ruby
<BubonicPestilenc> there is short: .map(&:tmp) => .map { |o| o.id }
bronson has quit [Remote host closed the connection]
<shevy> o.tmp
<BubonicPestilenc> .map(&:tmp) => .map { |o| o.tmp }
<adaedra> yes.
<shevy> there you go!
<adaedra> Do you have a question?
<BubonicPestilenc> but are there something like: .map(?) => .map { |o| o["tmp"] }
sigurding has quit [Quit: sigurding]
<ljarvis> BubonicPestilenc: no
<adaedra> no
<baweaver> nope
<BubonicPestilenc> ty
Lucky__ has joined #ruby
<baweaver> could make one
<BubonicPestilenc> just to confirm that :D
<ljarvis> but shouldn't
<ljarvis> (:D)
<jhass> >> "a:b:c\\:d".split(/:(?<!\\)/) # tds5016
<ruboto> jhass # => ["a", "b", "c\\", "d"] (https://eval.in/486537)
<BubonicPestilenc> i know, justto check stdlib functions :D
<jhass> damn
<jhass> >> "a:b:c\\:d".split(/(?<!\\):/) # tds5016
<ruboto> jhass # => ["a", "b", "c\\:d"] (https://eval.in/486538)
<BubonicPestilenc> tyvm, <3 ruby-lang :D
BubonicPestilenc has quit [Client Quit]
<shevy> hey
<shevy> we are the #ruby !
<adaedra> >> def key(n); proc do |e| e[n] end; end; [{ "hello" => "world" }].map(&key("hello"))
<ruboto> adaedra # => ["world"] (https://eval.in/486539)
<shevy> jhass has chopped away #ruby-lang
<jhass> tds5016: I suppose this is actually confusing about the difference between "\:" and "\\:"
<adaedra> mh, late already.
<jhass> (vs '\:')
<jhass> *confusion
<tds5016> jhass: what should it look like?
AugustoC has quit [Quit: Connection closed for inactivity]
<jhass> >> [":", "\:", "\\:", '\:', "\:" == ":", "\\:" == '\:'] # tds5016
<ruboto> jhass # => [":", ":", "\\:", "\\:", true, true] (https://eval.in/486542)
<tds5016> what I did was as close as I could get :-/.
Ox0dea has joined #ruby
nunchuck has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
<tds5016> jhass: yeah, I'm screwing something up.
colleenmcguckin has joined #ruby
sdwrage_ has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
yqt has joined #ruby
smactive has joined #ruby
bronson has joined #ruby
ornerymoose has quit [Quit: ornerymoose]
kalopsian has quit [Ping timeout: 240 seconds]
sdwrage has quit [Ping timeout: 240 seconds]
tjohnson has joined #ruby
moeabdol1 has quit [Quit: WeeChat 1.3]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
cajone_afk is now known as cajone
baweaver has quit [Remote host closed the connection]
cassioscabral has quit [Quit: cassioscabral]
dotix has quit [Ping timeout: 255 seconds]
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
minimalism has joined #ruby
tomphp has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zeroDivisible has joined #ruby
rismoney1 has quit [Ping timeout: 256 seconds]
pdoherty has quit [Ping timeout: 240 seconds]
Ox0dea has quit [Read error: No route to host]
dlitvak has joined #ruby
jbrhbr has joined #ruby
Ox0dea has joined #ruby
ruu_ has joined #ruby
platzhirsch has joined #ruby
firstdayonthejob has joined #ruby
xlogic has joined #ruby
bronson has quit [Remote host closed the connection]
I has joined #ruby
I is now known as Guest97394
dlitvak has quit [Remote host closed the connection]
pglombardo has quit []
dfinninger has quit [Remote host closed the connection]
xlogic has quit [Read error: Connection reset by peer]
jbrhbr has quit [Quit: Leaving.]
dfinninger has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
codeurge has joined #ruby
DavidJone has joined #ruby
Wompy has quit [Remote host closed the connection]
tulak has joined #ruby
colleenmcguckin has quit [Read error: Connection reset by peer]
Wompy has joined #ruby
colleenmcguckin has joined #ruby
moeabdol has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DifferentLambda is now known as rhg135
platzhirsch has quit [Remote host closed the connection]
replay has joined #ruby
dfinninger has quit [Ping timeout: 272 seconds]
akaiiro has quit [Ping timeout: 240 seconds]
last_staff has quit [Read error: Connection reset by peer]
<dorei> rex/racc is the ruby way for lexers/parsers ?
last_staff has joined #ruby
davedev2_ has joined #ruby
SCHAAP137 has quit [Ping timeout: 255 seconds]
davedev24 has quit [Ping timeout: 260 seconds]
<Ox0dea> dorei: https://github.com/mjackson/citrus is pretty nice.
ramfjord has quit [Ping timeout: 265 seconds]
otherj has quit [Quit: .]
roshanavand has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
dlitvak has joined #ruby
<dorei> thanx Ox0dea
<Ox0dea> dorei: Sure thing.
arooni has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dfinninger has joined #ruby
dfinning_ has joined #ruby
Guest97394 has quit [Quit: This computer has gone to sleep]
Wompy has quit [Remote host closed the connection]
ramfjord has joined #ruby
dfinnin__ has joined #ruby
dfinninger has quit [Read error: Connection reset by peer]
dfinning_ has quit [Read error: Connection reset by peer]
znz_jp has quit [Ping timeout: 260 seconds]
RobertBirnie has quit [Quit: Textual IRC Client: www.textualapp.com]
Jackneill has quit [Ping timeout: 272 seconds]
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
zenlot1 has quit [Ping timeout: 260 seconds]
dhollinger has quit [Quit: WeeChat 1.3]
bb010g has quit [Quit: Connection closed for inactivity]
pwnd_nsfw has quit [Ping timeout: 240 seconds]
znz_jp has joined #ruby
jcoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zenlot1 has joined #ruby
seitensei has quit [Ping timeout: 240 seconds]
berserk_ren has joined #ruby
_stu_ has quit [Quit: _stu_]
Wompy has joined #ruby
<nofxx> what a boring thing to 'model' ... work hours. I thinking a 7 day array, containing an array with arbitrary ranges... [ [7..10, 13..17 ... kind boring for half hour stuff. Maybe use float... there's Date but there's no Hour. Any better ideas?
edwinvdgraaf has joined #ruby
pawnbox has joined #ruby
<dorei> nofxx: maybe u should avoid floats and count minutes
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
<nofxx> dorei, that's a better idea. ty
<Ox0dea> Why not seconds?
<nofxx> ah, no need.... at most it's a we close at 11:30 thing
kalopsian has joined #ruby
<Ox0dea> There's no such thing as "too granular". :P
yardenbar has quit [Ping timeout: 256 seconds]
<nofxx> =D
rdark has quit [Ping timeout: 240 seconds]
CloCkWeRX has joined #ruby
edwinvdgraaf has quit [Read error: Connection reset by peer]
berserk_ren has quit [Ping timeout: 260 seconds]
edwinvdgraaf has joined #ruby
n008f4g_ has quit [Ping timeout: 256 seconds]
drptbl has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
znz_jp has quit [Ping timeout: 260 seconds]
baweaver has joined #ruby
arooni has quit [Ping timeout: 240 seconds]
drptbl has quit [Max SendQ exceeded]
AKASkip has quit [Ping timeout: 265 seconds]
ruid has joined #ruby
Wompy has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 246 seconds]
cassioscabral has joined #ruby
pwnd_nsfw has joined #ruby
rdavila has joined #ruby
s00pcan has joined #ruby
drptbl has joined #ruby
atomical has joined #ruby
Wompy_ has joined #ruby
dotix has quit [Ping timeout: 260 seconds]
InvGhost has quit [Ping timeout: 260 seconds]
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> Ox0dea there is ruby 2.2.4 ! \o/
<shevy> you broke it :D
<shevy> or norc ... with Fiddle
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #ruby
imperator has quit [Quit: Leaving]
<wolffles> can you push a hash into an array?
DavidJone has quit []
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<j416> wolffles: yes?
stannard has quit [Remote host closed the connection]
jbrhbr has joined #ruby
<j416> >> [{foo: :bar}]
<ruboto> j416 # => [{:foo=>:bar}] (https://eval.in/486604)
axl_ has quit [Quit: axl_]
s00pcan has quit [Ping timeout: 260 seconds]
<wolffles> ohh thanks
elifoster has quit [Ping timeout: 272 seconds]
<j416> >> [].push(foo: :bar)
<ruboto> j416 # => [{:foo=>:bar}] (https://eval.in/486605)
<shevy> waffles!
tomphp has joined #ruby
<wolffles> hi
s00pcan has joined #ruby
banister has joined #ruby
dimik has joined #ruby
dlitvak has quit [Remote host closed the connection]
edwinvdgraaf has quit [Remote host closed the connection]
ruid has quit [Ping timeout: 255 seconds]
akem has joined #ruby
p337r has joined #ruby
bronson has joined #ruby
<shevy> hmm quick question... I distribute a tutorial in the form of a standalone .cgi file
<shevy> I have directories in the base level of that gem called ... bin/ lib/ doc/ test/
p337r has quit [Client Quit]
kies^ has quit [Ping timeout: 240 seconds]
<shevy> should I put this into doc/ - and if not, should I use a separate directory and which way to call it then? cgi/ or www/ or something else?
spider-mario has quit [Read error: Connection reset by peer]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
bronson has quit [Ping timeout: 265 seconds]
SCHAAP137 has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ornerymoose has joined #ruby
znz_jp has joined #ruby
Musashi007 has joined #ruby
codeurge has joined #ruby
devoldmx has joined #ruby
CloCkWeRX has quit [Ping timeout: 246 seconds]
shaileshg has joined #ruby
eytanfb has quit [Remote host closed the connection]
eytanfb has joined #ruby
eytanfb has quit [Remote host closed the connection]
eytanfb has joined #ruby
p0wn3d_ has quit [Ping timeout: 240 seconds]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
whippythellama has quit [Quit: WeeChat 1.3]
akem has quit [Read error: No route to host]
akem2 has joined #ruby
devoldmx has quit [Ping timeout: 265 seconds]
gizless has joined #ruby
Alayde has joined #ruby
Alayde has left #ruby [#ruby]
drptbl has quit [Ping timeout: 256 seconds]
blackmesa has joined #ruby
znz_jp has quit [Ping timeout: 260 seconds]
kalopsian has quit [Ping timeout: 256 seconds]
skcin7 has joined #ruby
jawa_ has joined #ruby
drptbl has joined #ruby
gizmore has quit [Ping timeout: 240 seconds]
eytanfb has quit [Remote host closed the connection]
Wompy_ has quit [Remote host closed the connection]
weemsledeux has joined #ruby
howdoicomputer has quit [Ping timeout: 256 seconds]
InvGhost has joined #ruby
znz_jp has joined #ruby
rdavila has joined #ruby
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
wolffles has quit [Quit: wolffles]
RegulationD has quit [Remote host closed the connection]
akem2 has quit [Read error: No route to host]
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
akem has joined #ruby
znz_jp has quit [Ping timeout: 260 seconds]
dfinnin__ has quit [Remote host closed the connection]
steffkes has quit [Ping timeout: 240 seconds]
dfinninger has joined #ruby
dfinninger has quit [Remote host closed the connection]
dfinninger has joined #ruby
htmldrum has joined #ruby
jessemcgilallen has joined #ruby
znz_jp has joined #ruby
douglass1 has joined #ruby
mary5030 has quit [Ping timeout: 240 seconds]
znz_jp has quit [Client Quit]
Musashi007 has quit [Quit: Musashi007]
banister has joined #ruby
howdoicomputer has joined #ruby
znz_jp has joined #ruby
CrazyEddy has quit [Ping timeout: 265 seconds]
druonysus has quit [Remote host closed the connection]
SPEARCHUCKERTOM has joined #ruby
pdoherty has joined #ruby
akem2 has joined #ruby
akem has quit [Read error: No route to host]
<SPEARCHUCKERTOM> why won't niggers become good niggers and start acting like uncle toms instead of the hood trash they are?
SPEARCHUCKERTOM has quit [Client Quit]
rhg135 has quit [Read error: Connection reset by peer]
<demophoon> !ops
<ruboto> fflush, apeiros, banisterfiend, seanstickle, Mon_Ouie, zzak, Radar, Havenn, jhass, sevenseacat, workmad3, miah, Coraline, drbrain, zenspider, slyphon, rubyhacker1, Aria, ljarvis, baweaver, Adaedra
davedev24 has joined #ruby
<havenwood> demophoon: thanks
davedev2_ has quit [Ping timeout: 240 seconds]
cajone is now known as cajone_afk
Musashi007 has joined #ruby
akem2 has quit [Read error: No route to host]
<xybre> Do non-trolls use the web interface?
dlitvak has joined #ruby
dlitvak has quit [Remote host closed the connection]
<jhass> yes
akem has joined #ruby