havenwood changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
hahuang62 has quit [Ping timeout: 250 seconds]
dcunit3d has joined #ruby
minimalism has quit [Ping timeout: 252 seconds]
<wixad_> hi all im trying to implement OptionParser to ruby quiz when i call the script it just returns the passed in argument instend of changing the size of the digits here is the code
armyriad has quit [Ping timeout: 276 seconds]
dcunit3d has quit [Ping timeout: 260 seconds]
armyriad has joined #ruby
karmatr0n has joined #ruby
Rickmasta has quit [Ping timeout: 276 seconds]
Rickmasta has joined #ruby
laska has quit [Ping timeout: 252 seconds]
xall has joined #ruby
ijij__ is now known as ijij
karmatr0n has quit [Ping timeout: 244 seconds]
psmmr has quit [Ping timeout: 276 seconds]
laska has joined #ruby
symm- has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 264 seconds]
rkoller has quit [Quit: Textual IRC Client: www.textualapp.com]
MrBusiness has joined #ruby
ur5us has quit [Remote host closed the connection]
djbkd has joined #ruby
mattwashere has joined #ruby
hutch34 has joined #ruby
Yzguy has joined #ruby
astrobunny has joined #ruby
jhack has quit [Quit: jhack]
minimalism has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
houhoulis has quit []
Yzguy has quit [Quit: Zzz...]
shinnya has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
nettoweb has quit [Read error: Connection reset by peer]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hutch34 has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
nettoweb has joined #ruby
sdothum has joined #ruby
agentmeerkat has joined #ruby
tomchapi_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 246 seconds]
Pwnna has left #ruby ["Leaving"]
marr has quit []
evansbee has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
creat has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
creat has joined #ruby
agentmeerkat has quit [Ping timeout: 252 seconds]
jhack has quit [Quit: jhack]
hahuang62 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
Ropeney has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
Rodya_ has joined #ruby
giz|work has joined #ruby
hutch34 has joined #ruby
jhack has joined #ruby
Guest4031 has quit [Ping timeout: 244 seconds]
Azure has quit [Ping timeout: 252 seconds]
Rodya_ has quit [Ping timeout: 250 seconds]
GodFather has quit [Ping timeout: 250 seconds]
tomchapin has joined #ruby
hutch34 has quit [Ping timeout: 260 seconds]
Azure has joined #ruby
CloCkWeRX has joined #ruby
smathy has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
hutch34 has joined #ruby
yfeldblum has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 1.5]
hutch34 has quit [Ping timeout: 244 seconds]
wixad_ has quit [Quit: Leaving]
SCHAAP137 has quit [Quit: Exiting...]
AcidCras_ has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
astrobunny has quit [Remote host closed the connection]
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
snsei has joined #ruby
AcidCrash has quit [Ping timeout: 260 seconds]
karmatr0n has joined #ruby
evansbee has quit [Ping timeout: 260 seconds]
xall has joined #ruby
djbkd has quit [Remote host closed the connection]
karmatr0n has quit [Ping timeout: 244 seconds]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
LoneHermit has quit [Remote host closed the connection]
xall has quit [Ping timeout: 272 seconds]
arlek has quit [Ping timeout: 240 seconds]
LoneHermit has joined #ruby
mattwashere has quit [Remote host closed the connection]
Uranio has quit [Quit: Leaving]
blackmesa has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
laska has quit [Quit: Lost terminal]
hahuang62 has quit [Ping timeout: 250 seconds]
djbkd has quit [Ping timeout: 276 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
giz|work has quit [Ping timeout: 258 seconds]
Yiota has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
Bugboy1028 has joined #ruby
Bugboy1028 has quit [Remote host closed the connection]
flashpoint9 has joined #ruby
djbkd has joined #ruby
jhack has quit [Quit: jhack]
Sembei has quit [Read error: Connection reset by peer]
`tim` has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jhack has joined #ruby
Sembei has joined #ruby
flashpoint9 has quit [Ping timeout: 260 seconds]
Bugboy1028 has joined #ruby
torandu has joined #ruby
saneax_AFK is now known as saneax
mattwashere has joined #ruby
<shevy> wheee I never knew that they would use ruby https://github.com/freebsd/portupgrade
hutch34 has joined #ruby
confounds has joined #ruby
confounds has left #ruby [#ruby]
leitz has quit [Quit: Nappy time]
jhack has quit [Quit: jhack]
jhack has joined #ruby
LoneHermit has quit [Remote host closed the connection]
gfvcastro has joined #ruby
hutch34 has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
mshowman has joined #ruby
Axy has joined #ruby
astrobunny has joined #ruby
Mia has quit [Ping timeout: 246 seconds]
karmatr0n has joined #ruby
astrobunny has quit [Ping timeout: 246 seconds]
szu has joined #ruby
hutch34 has joined #ruby
szu has quit [Remote host closed the connection]
pilne has quit [Quit: Quitting!]
karmatr0n has quit [Ping timeout: 240 seconds]
pilne has joined #ruby
xall has joined #ruby
jhack has quit [Quit: jhack]
hutch34 has quit [Ping timeout: 244 seconds]
jhack has joined #ruby
xall has quit [Ping timeout: 260 seconds]
pwnd_nsfw` has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Ping timeout: 260 seconds]
eljimmy has joined #ruby
Rickmasta has joined #ruby
dcunit3d has joined #ruby
pawnbox has joined #ruby
jhack has quit [Quit: jhack]
Rickmasta has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
jancel has joined #ruby
nchambers has quit [Ping timeout: 272 seconds]
jhack has joined #ruby
robot has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 240 seconds]
karmatr0n has joined #ruby
davedev24 has quit []
nchambers has joined #ruby
saneax is now known as saneax_AFK
jhack has quit [Quit: jhack]
Rickmasta has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
karmatr0n has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
Rickmasta has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
jancel has quit [Remote host closed the connection]
braincras has quit [Ping timeout: 244 seconds]
robot has joined #ruby
sauvin has joined #ruby
yardenbar has joined #ruby
agentmeerkat has joined #ruby
giz|work has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
nankyokusei has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
agentmeerkat has quit [Ping timeout: 272 seconds]
jhack has joined #ruby
ornerymoose has joined #ruby
nankyokusei has quit [Ping timeout: 252 seconds]
Cohedrin has quit [Quit: Textual IRC Client: www.textualapp.com]
_gautam_ has joined #ruby
jhack has quit [Quit: jhack]
CloCkWeRX has quit [Ping timeout: 264 seconds]
skweek has quit [Remote host closed the connection]
saneax_AFK is now known as saneax
jhack has joined #ruby
Rickmasta has quit [Ping timeout: 258 seconds]
Rickmasta has joined #ruby
djbkd has quit [Remote host closed the connection]
jhack has quit [Quit: jhack]
braincrash has quit [Quit: bye bye]
someish has joined #ruby
djbkd has joined #ruby
<i8igmac> im getting a file read error 'invalid byte sequence in UTF-8"
<i8igmac> string.split <---
giz|work has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
<toretore> ?code i8igmac
<ruby[bot]> i8igmac: We can't help you without your code, please post it to https://gist.github.com
Kero has quit [Ping timeout: 260 seconds]
<ruby[bot]> i8igmac: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/7c242b0a468f1875ca942eb6ee1da7a8
<ruby[bot]> i8igmac: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
evansbee has joined #ruby
pawnbox has joined #ruby
Kero has joined #ruby
<toretore> gist the stacktrace too
djbkd has quit [Ping timeout: 252 seconds]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<toretore> which encoding is `data` in?
evansbee has quit [Ping timeout: 264 seconds]
<i8igmac> its binary data
pawnbox has quit [Ping timeout: 240 seconds]
LoneHerm_ has joined #ruby
<i8igmac> could be a image or mp3 file
<toretore> what does `data.encoding` return?
<i8igmac> #<Encoding:UTF-8>
<toretore> you have to tell File that it's binary data when you read it
giz|work has joined #ruby
pilne has quit [Quit: Quitting!]
xall has joined #ruby
LoneHerm_ has quit [Ping timeout: 244 seconds]
k3rn31 has joined #ruby
<i8igmac> i have tried binread instead but still the same thing
<i8igmac> years ago i had to do something like this
<i8igmac> string.encode!('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '')
<i8igmac> but i cant remeber
braincrash has joined #ruby
braincrash is now known as braincras
arescorpio has joined #ruby
xall has quit [Ping timeout: 250 seconds]
<shevy> if it is binary data, using binread. You can try the encoding ASCII-8BIT too
<shevy> wheee they are working on ruby 2.4.0 \o/ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L42
LoneHerm_ has joined #ruby
charliesome has joined #ruby
hutch34 has joined #ruby
<shevy> https://rubygems.org/stats interesting that mime-types is one of the top ten most downloaded gems ... is it pulled in via some other dep dependency perhaps?
k3rn31 has quit [Quit: Computer has gone to sleep.]
terminalrecluse has joined #ruby
gix has quit [Ping timeout: 244 seconds]
giz|work has quit [Ping timeout: 260 seconds]
mattwashere has quit [Remote host closed the connection]
<Radar> shevy: It's a Rails dependency.
hutch34 has quit [Ping timeout: 260 seconds]
karmatr0n has joined #ruby
gix has joined #ruby
edwardly has quit [Max SendQ exceeded]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
karmatr0n has quit [Ping timeout: 252 seconds]
jancel has joined #ruby
blackmesa has joined #ruby
Bear_ has quit [Read error: Connection reset by peer]
LoneHerm_ has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
hutch34 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kareeoleez has joined #ruby
hk238 has joined #ruby
jancel has quit [Ping timeout: 272 seconds]
ornerymoose has quit [Quit: ornerymoose]
blackmesa has quit [Ping timeout: 276 seconds]
<shevy> ah ok
hutch34 has quit [Ping timeout: 276 seconds]
saneax is now known as saneax_AFK
<Radar> through actionpack I think
pawnbox has joined #ruby
mattwashere has joined #ruby
pawnbox has quit [Ping timeout: 260 seconds]
mattwashere has quit [Ping timeout: 244 seconds]
k3rn31 has joined #ruby
charliesome has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
voodoofish430 has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rinzlit has joined #ruby
rkazak has joined #ruby
pawnbox has joined #ruby
xall has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 250 seconds]
xlegoman has quit [Quit: Leaving]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
charliesome has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
_gautam_ has quit [Quit: Lingo: www.lingoirc.com]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
karmatr0n has joined #ruby
hahuang62 has joined #ruby
Coldblackice has quit [Ping timeout: 258 seconds]
gfvcastro has quit [Quit: Textual IRC Client: www.textualapp.com]
gfvcastro has joined #ruby
karmatr0n has quit [Ping timeout: 258 seconds]
hahuang62 has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
nankyokusei has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
amincd has joined #ruby
<amincd> Hi, can anyone recommend any documentation for #to_io ? I have no idea how it works and nothing I've found online has helped me understand it
<Radar> ?ri to_io
<ruby[bot]> Radar: I don't see no to_io, whom should I tell about ri?
<Radar> @ruby[bot]: WRONG
blackmesa has quit [Ping timeout: 252 seconds]
<Radar> Well isn't that handy.
<Radar> amincd: It appears that it simply returns itself.
<Radar> amincd: Similar to how to_s on a string will return the string.
<amincd> Radar: what is the point of that?
<Radar> >> "abcd".to-s
<ruby[bot]> Radar: # => undefined method `to' for "abcd":String (NoMethodError) ...check link for more (https://eval.in/591864)
<Radar> >> "abcd".to_s
<ruby[bot]> Radar: # => "abcd" (https://eval.in/591865)
i8igmac has quit [Quit: Leaving]
<Radar> My guess is that it's implemented in case you have some other object you want to convert to an IO.
<Radar> and you're not sure if that object is already an IO object or if it's that other kind of object.
<amincd> so it would test if it's an IO?
<amincd> I mean, that would be the purpose of the method, to test?
nankyokusei has quit [Ping timeout: 250 seconds]
<Radar> Not to test. The method will convert return an IO object which corresponds to the initial object.
<amincd> but if it's returning the same object, how is that a 'conversion'
d0nn1e has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
<Radar> In the case of `to_io`, it will return the same object
<Radar> Sorry, that's `IO#to_io`
bluOxigen has joined #ruby
<Radar> Same as this method
lightt has joined #ruby
<amincd> yea, I see how it works now (I think). I just don't understand in what contexts it would be useful
giz|work has joined #ruby
<Radar> [14:48:07] <Radar>My guess is that it's implemented in case you have some other object you want to convert to an IO.
<Radar> [14:48:15] <Radar>and you're not sure if that object is already an IO object or if it's that other kind of object.
d0nn1e has joined #ruby
<amincd> but does this method convert non-IO objects into IO objects?
conta has joined #ruby
<Radar> No.
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
<Radar> this method only exists on objects of the IO class.
pontiki has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<amincd> correct me if I'm wrong, but does this " you're not sure if that object is already an IO object or if it's that other kind of object." mean "use IO#to_io to test if the object is an IO object"?
<Radar> I am confused by your use of "test"
<Radar> test to me would mean that it would return true/false depending on if the object is an IO or not
<amincd> true it's not a classical test
<pontiki> more like "ensure"
laska has joined #ruby
<amincd> pontiki: there that's the word
harfangk has joined #ruby
SilverKey has joined #ruby
<amincd> ok it's clear to me now, thanks a lot
<pontiki> note that i was remarking on grammar, not accuracy of Ruby methods
<amincd> I'm just going to assume this is what the method does
dh64 has quit [Quit: Konversation terminated!]
<Radar> Yes, its likely intended design is to ensure you always end up with an IO object.
arescorpio has quit [Quit: Leaving.]
laska has quit [Client Quit]
laska has joined #ruby
<laska> exit
webus has joined #ruby
laska has quit [Client Quit]
ngw has joined #ruby
coyo has quit [Read error: Connection reset by peer]
LoneHerm_ has joined #ruby
kareeoleez has quit [Remote host closed the connection]
someish has quit [Quit: someish]
DTZUBDUB has quit [Ping timeout: 244 seconds]
evansbee has joined #ruby
howdoi has joined #ruby
LoneHerm_ has quit [Ping timeout: 264 seconds]
conta has quit [Ping timeout: 246 seconds]
evansbee has quit [Ping timeout: 250 seconds]
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
binaryplease1 has joined #ruby
saneax_AFK is now known as saneax
arooni has quit [Ping timeout: 250 seconds]
binaryplease has quit [Ping timeout: 258 seconds]
xall has joined #ruby
amincd has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
jpterry has quit [Quit: ZNC Quit]
certainty has joined #ruby
giz|work has quit [Ping timeout: 240 seconds]
craigp has joined #ruby
SilverKey has quit [Quit: Halted.]
lightt has quit [Remote host closed the connection]
xall has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 252 seconds]
binaryplease1 is now known as binaryplease
zacstewa1t has quit [Ping timeout: 240 seconds]
jancel has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Dimik has joined #ruby
jpterry has joined #ruby
giz|work has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
northfurr has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
jancel has quit [Ping timeout: 250 seconds]
certainty has joined #ruby
karmatr0n has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sammichmaker has joined #ruby
pawnbox has quit [Remote host closed the connection]
hahuang62 has joined #ruby
pawnbox has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
Guest15111 is now known as awk
karmatr0n has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
safe has quit [Quit: Leaving]
certainty has quit [Ping timeout: 244 seconds]
hahuang62 has quit [Ping timeout: 272 seconds]
hutch34 has joined #ruby
LoneHerm_ has joined #ruby
mercerist has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
last_staff has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
abprime has joined #ruby
abprime has quit [Client Quit]
apofis has joined #ruby
yardenbar has joined #ruby
n1x-nz has joined #ruby
d0lph1n98 has joined #ruby
apofis has quit [Max SendQ exceeded]
kareeoleez has joined #ruby
certainty has joined #ruby
charliesome has joined #ruby
Yiota has joined #ruby
duncannz has joined #ruby
jas02 has joined #ruby
tcopeland1 has joined #ruby
northfurr has quit [Quit: northfurr]
tcopeland has quit [Ping timeout: 252 seconds]
snsei has quit [Remote host closed the connection]
charliesome has quit [Client Quit]
DTZUBDUB has joined #ruby
AlexRussia has quit [Ping timeout: 240 seconds]
vuoto has quit [Remote host closed the connection]
DTZUBDUB has quit [Ping timeout: 244 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
saneax is now known as saneax_AFK
amclain has quit [Quit: Leaving]
mercerist has quit [Quit: Computer has gone to sleep.]
lightt has joined #ruby
vuoto has joined #ruby
the_drow has joined #ruby
Nawn has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
certainty has quit [Ping timeout: 240 seconds]
blaxter has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lightt has quit [Remote host closed the connection]
Nawn has quit [Remote host closed the connection]
xall has joined #ruby
koooge has quit [Quit: Leaving...]
firstdayonthejob has joined #ruby
last_staff has quit [Quit: last_staff]
zacstewart has joined #ruby
fenre has joined #ruby
xall has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
norc has joined #ruby
blaxter has quit [Quit: foo]
harfangk has quit [Quit: harfangk]
CloCkWeRX has quit [Ping timeout: 258 seconds]
aganov has joined #ruby
zacstewart has quit [Ping timeout: 250 seconds]
n1x-nz has quit [Ping timeout: 244 seconds]
Hobogrammer has quit [Quit: WeeChat 0.4.2]
jxs__ has joined #ruby
flughafen_ has joined #ruby
DTZUBDUB has joined #ruby
dh64 has joined #ruby
tildes has joined #ruby
jaiks1 has quit [Ping timeout: 250 seconds]
flughafen has quit [Ping timeout: 264 seconds]
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
karmatr0n has joined #ruby
conta has joined #ruby
Ishido has joined #ruby
bluOxigen has joined #ruby
bigkevmcd has joined #ruby
xall has joined #ruby
vuoto has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 260 seconds]
karmatr0n has quit [Ping timeout: 260 seconds]
agentmeerkat has joined #ruby
mercerist has joined #ruby
rdark has quit [Quit: leaving]
ecksit has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
DTZUBDUB has quit [Ping timeout: 250 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has quit [Ping timeout: 250 seconds]
tmtwd has joined #ruby
dionysus69 has joined #ruby
nankyokusei has joined #ruby
ramfjord has joined #ruby
agentmeerkat has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
Niham has joined #ruby
codecop has joined #ruby
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
nankyokusei has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
bigkevmcd has quit [Read error: Connection reset by peer]
bigkevmcd has joined #ruby
kies has joined #ruby
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
giz|work has joined #ruby
k3rn31 has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
jgt1 has joined #ruby
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
Zarthus has joined #ruby
certainty has joined #ruby
lsmola has joined #ruby
fenre_ has joined #ruby
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fenre__ has joined #ruby
fenre has quit [Ping timeout: 260 seconds]
Hounddog has joined #ruby
fenre_ has quit [Ping timeout: 240 seconds]
n1x-nz has joined #ruby
DTZUBDUB has joined #ruby
wuyin has quit [Ping timeout: 250 seconds]
evansbee has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
bluOxigen has quit [Ping timeout: 250 seconds]
bluOxigen has joined #ruby
evansbee has quit [Ping timeout: 260 seconds]
jgt1 has quit [Ping timeout: 244 seconds]
fenre__ has quit [Remote host closed the connection]
LoneHerm_ has quit [Remote host closed the connection]
bumao has joined #ruby
fenre has joined #ruby
tmtwd has quit [Ping timeout: 246 seconds]
xall has joined #ruby
neanderslob has joined #ruby
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
solars has joined #ruby
neanderslob has joined #ruby
tmtwd has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
madgen has joined #ruby
zacstewart has joined #ruby
edwinvdgraaf has joined #ruby
charliesome has joined #ruby
xall_ has joined #ruby
zacstewart has quit [Ping timeout: 240 seconds]
jaguarmagenta has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
xall has quit [Ping timeout: 250 seconds]
DTZUBDUB has quit [Ping timeout: 244 seconds]
neanderslob has quit [Remote host closed the connection]
neanderslob_ has quit [Remote host closed the connection]
Wsewolod has joined #ruby
jaguarmagenta has joined #ruby
ur5us has joined #ruby
ta_ has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
terlar has joined #ruby
karmatr0n has joined #ruby
astrobunny has joined #ruby
andikr has joined #ruby
kknight has joined #ruby
karmatr0n has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
tmtwd has quit [Ping timeout: 244 seconds]
multi_io has quit [Ping timeout: 240 seconds]
jaguarmagenta has quit [Remote host closed the connection]
mercerist has joined #ruby
harfangk has joined #ruby
biberu has joined #ruby
multi_io has joined #ruby
ngw has joined #ruby
dionysus69 has quit [Remote host closed the connection]
aberen has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
yfeldblum has joined #ruby
startupality has joined #ruby
Dimik has quit [Ping timeout: 246 seconds]
startupality has quit [Client Quit]
startupality has joined #ruby
hutch34 has joined #ruby
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias has joined #ruby
Coldblackice has joined #ruby
hutch34 has quit [Ping timeout: 252 seconds]
tesuji_ has joined #ruby
ruby-lang193 has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
tesuji_ has quit [Read error: Connection reset by peer]
ruby-lang193 has quit [Client Quit]
giz|work has quit [Ping timeout: 244 seconds]
Cyneyt has joined #ruby
giz|work has joined #ruby
vondruch has joined #ruby
elaptics`away is now known as elaptics
ethereon has quit [Ping timeout: 276 seconds]
symm- has joined #ruby
ljames has joined #ruby
jaruga___ has joined #ruby
kedare has joined #ruby
charliesome has joined #ruby
charliesome has quit [Ping timeout: 276 seconds]
moty66 has quit [Remote host closed the connection]
the_drow has joined #ruby
charliesome has joined #ruby
skade has joined #ruby
charliesome has quit [Client Quit]
DoubleMalt has joined #ruby
rkoller has joined #ruby
Mon_Ouie has joined #ruby
araujo has joined #ruby
madgen has quit [Ping timeout: 276 seconds]
zacstewart has joined #ruby
giz|work has quit [Ping timeout: 260 seconds]
DTZUBDUB has joined #ruby
startupality has quit [Quit: startupality]
joneshf-laptop has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
mrgrieves has joined #ruby
stan has quit [Ping timeout: 276 seconds]
zacstewart has quit [Ping timeout: 260 seconds]
DTZUBDUB has quit [Ping timeout: 250 seconds]
startupality has joined #ruby
hutch34 has quit [Ping timeout: 244 seconds]
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weckl has joined #ruby
jericon_ is now known as jericon
startupality has quit [Ping timeout: 252 seconds]
Moosashi has joined #ruby
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
karmatr0n has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby
giz|work has joined #ruby
ngw has joined #ruby
lxsameer has joined #ruby
mooru has joined #ruby
<p1k> what is the JSON method to parse a string literal ? e.g. "42"
mooru has quit [Max SendQ exceeded]
marr has joined #ruby
mooru has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
arlek has joined #ruby
<apeiros> p1k: you'll have to use a non-standard-lib json library. ruby's json library still uses an older spec of json, where only objects and arrays are valid root elements.
arlek has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
nankyokusei has joined #ruby
<apeiros> you can use JSON.load, but not sure about the security implications (its docs warn from using it on userinput)
<xpt> /part
<xpt> whops
xpt has left #ruby ["too many buffers to handle :("]
tesuji_ has joined #ruby
salexa has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
futilegames has joined #ruby
nankyokusei has quit [Ping timeout: 264 seconds]
jgt1 has joined #ruby
f4cl3y has joined #ruby
moeabdol has joined #ruby
stan has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
futilegames has quit [Quit: futilegames]
JammyHammy has quit [Read error: Connection reset by peer]
ocbtec has joined #ruby
solocshaw has joined #ruby
futilegames has joined #ruby
ur5us has quit [Remote host closed the connection]
futilegames has quit [Client Quit]
jancel has joined #ruby
Rickmasta has joined #ruby
jancel has quit [Ping timeout: 244 seconds]
ur5us has joined #ruby
evansbee has joined #ruby
vuoto has joined #ruby
jinie has quit [Max SendQ exceeded]
czerasz has joined #ruby
jinie has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
workmad3 has joined #ruby
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
evansbee has quit [Ping timeout: 260 seconds]
Moosashi has quit [Quit: Moosashi]
vuoto has quit [Remote host closed the connection]
czerasz has quit [Quit: Ex-Chat]
infra-red has joined #ruby
Moosashi has joined #ruby
araujo_ has joined #ruby
infra-red has quit [Client Quit]
fenre has quit [Remote host closed the connection]
salexa has left #ruby ["PART ##machinelearning :PART #learnprogramming :PART ##namespace :PONG :asimov.freenode.net"]
araujo has quit [Ping timeout: 252 seconds]
araujo_ has quit [Client Quit]
ferr1 has joined #ruby
joes_ has joined #ruby
zacstewart has joined #ruby
blackmesa has joined #ruby
Coldblackice has quit [Ping timeout: 276 seconds]
joes_ has quit [Client Quit]
hutch34 has joined #ruby
postmodern has quit [Quit: Leaving]
Moosashi has quit [Quit: Moosashi]
zacstewart has quit [Ping timeout: 260 seconds]
joes_ has joined #ruby
duncannz has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 244 seconds]
Niham has joined #ruby
guardianJ has joined #ruby
charliesome has joined #ruby
karmatr0n has joined #ruby
saneax is now known as saneax_AFK
ur5us has quit [Remote host closed the connection]
agentmeerkat has joined #ruby
madgen has joined #ruby
karmatr0n has quit [Ping timeout: 258 seconds]
Snowy has joined #ruby
fenre has joined #ruby
jaguarmagenta has joined #ruby
johnmilton has quit [Quit: Namaste]
agentmeerkat has quit [Ping timeout: 272 seconds]
chip_ has joined #ruby
guardianJ has left #ruby [#ruby]
jaguarmagenta has quit [Ping timeout: 276 seconds]
rikkipitt has joined #ruby
n1x-nz has quit [Quit: Computer says no]
CloCkWeRX has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
sameerynho has joined #ruby
ta__ has quit [Ping timeout: 244 seconds]
lxsameer has quit [Ping timeout: 240 seconds]
tcopeland1 has quit [Quit: Leaving.]
FooMunki has quit [Read error: Connection reset by peer]
FooMunki has joined #ruby
workmad3 has quit [Quit: Lost terminal]
workmad3 has joined #ruby
harfangk has quit [Quit: harfangk]
<marahin> Hello. Having an array of addresses, what is the proper way to find closest address from the array, when given another specific location?
<marahin> There is Geocoder, but as I see it requires Rails / something with models, and I want to keep it as simple as possible.
Sashimi has joined #ruby
<p1k> apeiros: I see, thanks
fenre has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 250 seconds]
madgen has joined #ruby
rahc_ is now known as rahc
elaptics is now known as elaptics`away
Sashimi has quit [Max SendQ exceeded]
Sashimi has joined #ruby
jaguarmagenta has joined #ruby
<marahin> jhass, uh... Pardon me, as I am a learning person: the method shown seems to be only searching for a place, and I particularly have to find a place from @array, that is closest to @another_place
<marahin> so in pseudocode I'd do like @array.closest( @another_place ) or something.
<jhass> I was just hinting the fact that while it's focused on usage inside AR, it is not required
<marahin> that is true
harfangk has joined #ruby
platzhirsch has joined #ruby
<marahin> and I am aware of that :( it's just that it's rather a CLI program, I don't need (and want ActiveRecord) for that
<marahin> so, any idea how can I bite this?
<platzhirsch> What's the nicest way of adding a constant for a long string which you can break over multiple lines without
<platzhirsch> \n are added to it?
CloCkWeRX has joined #ruby
<jhass> platzhirsch: you can use \ at the end of a line inside "", %() and heredocs too
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<platzhirsch> jhass: that seems reasonable
p0p0pr37 has quit [Remote host closed the connection]
<jhass> marahin: map all your addresses to geo coordinates using search, then to distances using Geocoder::Calculations.distance_between and then just #min_by
CloCkWeRX has quit [Ping timeout: 260 seconds]
ta__ has joined #ruby
p0p0pr37 has joined #ruby
Snowy has quit [Quit: ragequit]
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
Gasher has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
c355e3b has joined #ruby
fenre has joined #ruby
ta_ has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
* apeiros wonders whether a KD-tree would/could work with geocoords
* apeiros off - cya all :)
<lupine> apeiros: just use postgres :p
giz|work has quit [Ping timeout: 276 seconds]
Rinzlit has left #ruby ["Got Cancer and died"]
mdw has joined #ruby
Macaveli has quit [Client Quit]
tvw has quit [Read error: Connection reset by peer]
Sashimi has joined #ruby
Sashimi has quit [Client Quit]
astrobunny has quit [Remote host closed the connection]
blackgoat has joined #ruby
DoubleMalt has quit [Ping timeout: 272 seconds]
certainty has quit [Ping timeout: 264 seconds]
CloCkWeRX has joined #ruby
DTZUBDUB has joined #ruby
zacstewart has joined #ruby
diegoaguilar has joined #ruby
CloCkWeRX has quit [Ping timeout: 240 seconds]
jaguarmagenta has joined #ruby
sdothum has joined #ruby
giz|work has joined #ruby
DTZUBDUB has quit [Ping timeout: 260 seconds]
zacstewart has quit [Ping timeout: 272 seconds]
sepp2k has joined #ruby
karmatr0n has joined #ruby
charliesome has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
karmatr0n has quit [Ping timeout: 272 seconds]
nankyokusei has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 246 seconds]
nankyokusei has quit [Ping timeout: 244 seconds]
CloCkWeRX has joined #ruby
GodFather has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
yeticry has joined #ruby
johnmilton has joined #ruby
chip_ has quit [Ping timeout: 272 seconds]
Dysp has joined #ruby
<Dysp> Hi there fellas. I have an array [1, 2, 3, 4, 5]. Is there anyway to iterate over them but always skipping the first?
<Dysp> I know there is.
<ltd> [1,2,3,4,5][1..-1].each { ... } ?
<Dysp> I don't think I quite understand the syntax here.
<ltd> irb(main):001:0> [1,2,3,4,5][1..-1].each { |i| p i }
<ltd> 2
<ltd> 3
<ltd> 4
<ltd> 5
<Dysp> I see, okay. Thx!
gnufied has joined #ruby
<ltd> the [] method of array supports range object
<ltd> 1..-1 is second element to last element
<ltd> and when given a range it will return an array
<Dysp> Yes, that was what I just needed to understand. I got it now :)
diegoaguilar has joined #ruby
<gregf_> drop(1)
<ltd> or drop, yes
saneax_AFK is now known as saneax
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elaptics`away is now known as elaptics
freerobby has joined #ruby
rodfersou has joined #ruby
senayar has quit []
charliesome has joined #ruby
airmac has joined #ruby
Vingador has joined #ruby
airmac has left #ruby [#ruby]
evansbee has joined #ruby
diegoaguilar has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Ping timeout: 246 seconds]
madgen has quit [Ping timeout: 250 seconds]
romistrub has quit [Ping timeout: 250 seconds]
ornerymoose has joined #ruby
GodFather has quit [Quit: Ex-Chat]
GodFather has joined #ruby
icey has joined #ruby
evansbee has quit [Ping timeout: 240 seconds]
<jhass> !spam airmac
k3rn31 has quit [Quit: Computer has gone to sleep.]
ornerymoose has quit [Ping timeout: 250 seconds]
kknight has quit [Quit: Leaving]
d0lph1n98 has quit [Ping timeout: 260 seconds]
Vingador_ has joined #ruby
<Dysp> Okay, stuck another (for me) hard one. I have an array [1, 2, 3, 4] for each element I want to divide by each element in another array [0, 1, 2, 3, 4], starting from the 1st position. (Not 0th).
<Dysp> struck*
<Dysp> Using map would work, but how I get the other array into work I can't figure out
blackmesa has quit [Ping timeout: 250 seconds]
Vingador has quit [Ping timeout: 272 seconds]
diegoaguilar has joined #ruby
<lupine> you could zip then map
DTZUBDUB has joined #ruby
<jhass> Dysp: starting from the 1st position of both arrays or just shifting the other by 1?
<Dysp> No, only the second one.
<jhass> as.zip(bs.drop(1)).map {|a, b| a / b }
<Dysp> Hmm.
<Dysp> I'll try to understand it :d
<Dysp> ty!
<lupine> the first time I came across Array#zip, I thought "why?!?!"
<jhass> alternative: as.map.with_index(1) {|a, i| a / bs[i] }
hutch34 has joined #ruby
<Dysp> If it wasn't for you guys, I would never have learned to program.
diegoaguilar has quit [Max SendQ exceeded]
<Dysp> I consider myself a proud phase 2 newb now ^^
diegoaguilar has joined #ruby
harfangk has quit [Quit: harfangk]
<Dysp> After reading the api for zip, I now know exactly as little as I did when I started reading the api.
mradmacher has joined #ruby
saneax is now known as saneax_AFK
<ltd> it's a confusing function, i'll admit
<Dysp> Some day. :d
joneshf-laptop has joined #ruby
<ltd> one i've not had an application for yet tbh
hutch34 has quit [Ping timeout: 244 seconds]
hanmac has quit [Ping timeout: 258 seconds]
fenre_ has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
tesuji_ has quit [Read error: Connection reset by peer]
tesuji_ has joined #ruby
rikkipitt has quit [Remote host closed the connection]
tesuji_ has quit [Read error: Connection reset by peer]
<jhass> the most common real world usecase is something like keys.zip(values).to_h
rikkipitt has joined #ruby
senayar has joined #ruby
d0lph1n98 has joined #ruby
fenre has quit [Ping timeout: 260 seconds]
tesuji_ has joined #ruby
karmatr0n has joined #ruby
tesuji_ is now known as tesuji
blackmesa has joined #ruby
karmatr0n has quit [Ping timeout: 260 seconds]
bigkevmcd has quit [Quit: Outta here...]
dionysus69 has joined #ruby
hanmac has joined #ruby
ldnunes has joined #ruby
Cyneyt has quit [Quit: Page closed]
bigkevmcd has joined #ruby
ornerymoose has joined #ruby
SirOliver has joined #ruby
pawnbox has quit [Remote host closed the connection]
ddv has left #ruby ["Textual IRC Client: www.textualapp.com"]
pawnbox has joined #ruby
flughafen_ has quit [Ping timeout: 264 seconds]
gnufied has quit [Quit: Leaving]
gregf_ has quit [Quit: leaving]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
madgen has joined #ruby
joast has quit [Ping timeout: 244 seconds]
gnufied has joined #ruby
axxyhtrx has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
mooru has quit [Ping timeout: 244 seconds]
guardianJ has joined #ruby
DTZUBDUB has quit [Ping timeout: 276 seconds]
synthroid has joined #ruby
pawnbox has quit [Remote host closed the connection]
hutch34 has joined #ruby
c0mrad3 has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
moos3 has joined #ruby
GinoManWorks has joined #ruby
giz|work has quit [Ping timeout: 240 seconds]
flughafen_ has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
axxyhtrx has quit [Quit: Textual IRC Client: www.textualapp.com]
arthurnn has quit [Ping timeout: 272 seconds]
mercerist has quit [Ping timeout: 244 seconds]
GinoManWorks has quit [Ping timeout: 258 seconds]
RazorX- has quit [Ping timeout: 264 seconds]
irick has quit [Ping timeout: 264 seconds]
codecop has quit [Ping timeout: 240 seconds]
Jamo_ has quit [Ping timeout: 244 seconds]
hfp has quit [Ping timeout: 260 seconds]
mattp_ has quit [Ping timeout: 260 seconds]
cfillion_ has quit [Ping timeout: 272 seconds]
z3uS has quit [Ping timeout: 252 seconds]
jtd_ has quit [Quit: No Ping reply in 180 seconds.]
wldcordeiro has quit [Ping timeout: 264 seconds]
irick has joined #ruby
Canucktux has joined #ruby
kkh has quit [Ping timeout: 260 seconds]
spacemud_ has quit [Ping timeout: 252 seconds]
roundabout22 has quit [Ping timeout: 264 seconds]
pabs has quit [Ping timeout: 264 seconds]
juanfra has quit [Remote host closed the connection]
low-profile has quit [Ping timeout: 260 seconds]
pabs has joined #ruby
johnmilton has quit [Remote host closed the connection]
jtd has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
juanfra has joined #ruby
fmcgeough has joined #ruby
Jamo has joined #ruby
johnmilton has joined #ruby
Niham has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt1 has quit [Ping timeout: 260 seconds]
Sammichmaker has quit [Ping timeout: 260 seconds]
arthurnn has joined #ruby
fenre_ has quit [Remote host closed the connection]
RazorX has joined #ruby
Karunamon has quit [Ping timeout: 240 seconds]
atom3 has quit [Ping timeout: 240 seconds]
mshowman has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yardenbar has quit [Ping timeout: 244 seconds]
Weavel has joined #ruby
low-profile has joined #ruby
k13nox has joined #ruby
Mon_Ouie has quit [Ping timeout: 240 seconds]
cfillion has joined #ruby
xall_ has joined #ruby
atom3 has joined #ruby
chrisarcand has quit [Ping timeout: 260 seconds]
Mon_Ouie has joined #ruby
bhaak has quit [Ping timeout: 264 seconds]
abort has quit [Ping timeout: 264 seconds]
biox has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
chrisarcand has joined #ruby
duracrisis has joined #ruby
z3uS has joined #ruby
abort has joined #ruby
aberen has quit [Ping timeout: 252 seconds]
ytti has quit [Ping timeout: 252 seconds]
bitemyapp has quit [Ping timeout: 272 seconds]
bhaak has joined #ruby
ytti has joined #ruby
duracrisis is now known as Guest46485
GinoManWorks has joined #ruby
scottschecter has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
spacemud has joined #ruby
gregf_ has joined #ruby
bitemyapp has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
shaman42 has quit [Ping timeout: 244 seconds]
Karunamon has joined #ruby
roamingdog has quit [Remote host closed the connection]
shaman42 has joined #ruby
jas02 has quit [Quit: jas02]
johnny56 has quit [Ping timeout: 264 seconds]
scottschecter has joined #ruby
fenre has joined #ruby
xall_ has quit [Ping timeout: 250 seconds]
hfp has joined #ruby
agentmeerkat has joined #ruby
Akuma has joined #ruby
minimalism has quit [Quit: minimalism]
codecop has joined #ruby
SirOliver has joined #ruby
SirOliver has quit [Client Quit]
mayamai has quit [Ping timeout: 276 seconds]
biox has joined #ruby
yardenbar has joined #ruby
Tempesta has quit [Quit: See ya!]
yasu___ has quit [Read error: Connection timed out]
greg has joined #ruby
Tempesta has joined #ruby
iamayam has joined #ruby
agentmeerkat has quit [Ping timeout: 244 seconds]
DTZUBDUB has joined #ruby
roamingdog has joined #ruby
DoubleMalt has joined #ruby
zacstewart has joined #ruby
Gasher has quit [Quit: Leaving]
Gasher has joined #ruby
Riba has joined #ruby
yasu___ has joined #ruby
aupadhye has joined #ruby
infra-red has joined #ruby
armyriad has quit [Ping timeout: 260 seconds]
icey has quit [Remote host closed the connection]
zacstewart has quit [Ping timeout: 240 seconds]
mshowman has joined #ruby
armyriad has joined #ruby
jancel has joined #ruby
shinnya has joined #ruby
karmatr0n has joined #ruby
Vile` has quit [Ping timeout: 244 seconds]
k13nox has quit [Read error: Connection reset by peer]
Riba has quit [Quit: Page closed]
guardianJ has quit [Remote host closed the connection]
tmi1 has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
mattp_ has joined #ruby
wldcordeiro has joined #ruby
jancel has quit [Ping timeout: 244 seconds]
jgt1 has joined #ruby
tmi1 has joined #ruby
aryaching has quit [Ping timeout: 244 seconds]
aryaching has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
nankyokusei has joined #ruby
chip_ has joined #ruby
xcesariox has joined #ruby
M-Kodo1 has quit [Remote host closed the connection]
M-shine has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
Fernando-Basso has quit [Quit: WeeChat 1.3]
nankyokusei has quit [Ping timeout: 246 seconds]
Fernando-Basso has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yiota has joined #ruby
craigp has quit [Ping timeout: 276 seconds]
emilkarl has joined #ruby
Weavel has quit [Read error: Connection reset by peer]
ChiefAlexander has joined #ruby
saneax_AFK is now known as saneax
ihme-TTilus has quit [Ping timeout: 240 seconds]
TTilus has joined #ruby
icey has joined #ruby
garethrees has joined #ruby
madgen has quit [Ping timeout: 244 seconds]
Sashimi has joined #ruby
fenre has quit [Remote host closed the connection]
fenre has joined #ruby
jgt1 has quit [Read error: No route to host]
snath has quit [Ping timeout: 240 seconds]
jgt1 has joined #ruby
rikkipitt has quit [Remote host closed the connection]
blackmesa has joined #ruby
ruby-lang386 has joined #ruby
ruby-lang386 has quit [Client Quit]
gfvcastro has joined #ruby
pandaant has joined #ruby
shadeslayer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
shadeslayer has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
johnny56 has joined #ruby
crankhar1er is now known as crankharder
<CustosLimen> hij
joast has joined #ruby
<CustosLimen> I'm not sure how to get rb_backtrace in gdb
<crankharder> can someone explain why 'assert' is undefined when this proc is called, but not in the lines immediately above it? https://gist.github.com/anonymous/fbf16511cf6ea6f25e5feef5606d7221
M-shine has joined #ruby
<CustosLimen> oh wait nvm got it
ChiefAlexander_ has joined #ruby
<workmad3> crankharder: because the `should` block is being instance_evaled on an instance of a test class that provides `assert`, whilst your proc is being run with the context of the top-level TestCase class (which doesn't have access to `assert`)
someish has joined #ruby
eljimbo has joined #ruby
garethrees is now known as ghr
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
imperator has joined #ruby
pandaant has quit [Remote host closed the connection]
<crankharder> workmad3: seems odd to me that the context switches
someish has quit [Client Quit]
<crankharder> curious if you see a workaround?
Hounddog has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 260 seconds]
snath has joined #ruby
infra-red has quit []
<Mon_Ouie> instance_eval(&p), or pass self as a parameter to p
<norc> crankharder: instance eval the block
* norc sighs.
* norc is just too slow for this world.
joast has quit [Ping timeout: 276 seconds]
agentmeerkat has joined #ruby
<shevy> haha
M-Kodo has joined #ruby
dionysus69 has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
Hounddog has joined #ruby
craigp has joined #ruby
CJKinni has joined #ruby
AcidCras_ is now known as AcidCrash
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aryaching has quit [Ping timeout: 244 seconds]
jrafanie has joined #ruby
CJKinni has quit [Read error: Connection reset by peer]
CJKinni has joined #ruby
aryaching has joined #ruby
mattwashere has joined #ruby
dionysus69 has joined #ruby
frem_ has joined #ruby
snath has quit [Ping timeout: 250 seconds]
malconis has joined #ruby
zacstewart has joined #ruby
hutch34 has quit [Ping timeout: 276 seconds]
nettoweb has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
sameerynho has quit [Quit: WeeChat 1.5]
roamingdog has quit [Remote host closed the connection]
SilverKey has joined #ruby
zacstewart has quit [Ping timeout: 260 seconds]
roamingdog has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
blackmes1 has joined #ruby
karmatr0n has joined #ruby
ChiefAlexander_ has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 240 seconds]
hutch34 has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
roundabout22 has joined #ruby
modin has quit [Quit: ZNC - 1.6.0 - http://znc.in]
madgen has joined #ruby
ChiefAlexander has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
modin has joined #ruby
aegis3121 has joined #ruby
M-mistake has joined #ruby
karmatr0n has quit [Ping timeout: 250 seconds]
madgen has quit [Read error: Connection reset by peer]
madgen has joined #ruby
bmurt has joined #ruby
shinnya has quit [Ping timeout: 260 seconds]
prestorium has joined #ruby
snath has joined #ruby
ponga has joined #ruby
karmatr0n has joined #ruby
giz|work has joined #ruby
rikkipitt has joined #ruby
gettalong has joined #ruby
<Dysp> jhass: Am I so lucky that you are available at this very moment?
AlexRussia has joined #ruby
DTZUBDUB has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
<jhass> Dysp: just ask your question, don't focus on people to answer them
iCHAIT_ has left #ruby [#ruby]
<Dysp> Haha, I have no question. You are just my favorite grammar nazi and I've refactored my code; hopefully for the better. I was wondering if you would take a look at it and yell at me, like you normally do!
<Dysp> (And I can't access gist because of slow internet atm, so I cannot just post..)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fenre has quit [Remote host closed the connection]
symm- has quit [Ping timeout: 276 seconds]
joonty has joined #ruby
ta__ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
karmatr0n has quit [Read error: Connection reset by peer]
pocketprotector has quit [Ping timeout: 258 seconds]
greg has quit [Remote host closed the connection]
karmatr0n has joined #ruby
<jhass> "Can I get this code reviewed?" is a perfectly fine, open question
<Dysp> https://gist.github.com/Dysp/34dbaa317a90c5636ee068c1f049238b - How does my code look? Should I do stuff differently? Is it readable? Formatting? Am I using the correct variables, etc. etc?
Snowy has joined #ruby
Snowy has quit [Remote host closed the connection]
<Mon_Ouie> #extract_values can be rewritten using sheets.map { … } instead of building an array explicitly
pocketprotector has joined #ruby
d10n-work has joined #ruby
<Dysp> I actually do have a specific question. All these "nested" functions - is there a proper way of ordering them? I mean; some functions are divided into subfunctions and my natural intuition would tell me do indent these, so it shows. But is this bad practice?
<Dysp> Mon_Ouie: I'll take a look! Ty
ponga has quit []
bluOxigen has quit [Ping timeout: 244 seconds]
<Mon_Ouie> You mean if one method calls another method?
<aegis3121> On your ifs, unless you really need to check against booleans, no need to check == true. if positive?(val) is the same as if positive?(val) == true in terms of truthiness
<Mon_Ouie> I would usually put the high-level API at the top and utility methods used to define these methods at the end (possibly indicating them as private)
<Dysp> I mean like.. I have one function called "calculate", which again uses a shit tonne of other functions. These other functions would never be used by anything else.
<Dysp> Oh, yeah, the truthiness is implicit, right?
<aegis3121> You can always make a second class that handles the calculations
<aegis3121> then it looks less cluttered in this class by pulling it into the class that needs to know how to do that.
<aegis3121> Dysp: yup. Anything except nil and false is truthy.
<Dysp> Ah okay, so there isn't really any proper way of doing it. Seems like it depends on what you demand from it.
<jhass> Dysp: Clean Code recommends to put the highest level methods at the start and order the other methods in call order below them; so def public_api; a; b; end; private; def a; end; def b; end;
<Dysp> Alrighty.
<jhass> that is order of first call
<jhass> that usually naturally leads to something you can read top down
<Dysp> Another question for ya'll.
<aegis3121> #positive? doesn't need the if/else; `array.inject(:+).quo(array.size) > 0` would be sufficient for the entire method
axl_ has joined #ruby
craigp has quit [Ping timeout: 272 seconds]
pocketprotector has quit [Ping timeout: 246 seconds]
<Dysp> Now I have created an object with the instance variables I need; how do access these variables? I've seen that you can access these via "instance get" or something. But then I was told that wasn't a good way of doing it?
<aegis3121> creating attr_reader :name_of_ivar would work
<Dysp> I cannot search the interwebs right now, as I think the web/DNS/whatever of my workplace is crashing
<Dysp> So it is the attr_reader I need to read up on.
SilverKey has joined #ruby
<aegis3121> then use it like any other method name. attr_reader :something; def foobar; puts something; end
chip_ has quit [Ping timeout: 260 seconds]
pocketprotector has joined #ruby
<Dysp> If I were to use something like foobar.r1.mvc, would I need to create that sort of API?
<Dysp> To extract the mvc from r1.
ebbflowgo has joined #ruby
<Dysp> Right now it is {right => {"r1" => {.... mvc: mvc... }...}
palms has joined #ruby
<aegis3121> you would need to make r1 an object rather than a hash, yes. Otherwise accessing it like a hash would work.
dangerou_ has joined #ruby
hk238 has joined #ruby
swills has joined #ruby
<Dysp> r1 is a hash within a hash within a hash right now.
<Dysp> You are saying I should somehow pull it out and make it its own object when called upon?
<aegis3121> If you want to access it like that, yes. If you're fine doing hash[:right]['r1'][:mvc], then I'd leave it like that. It's personal preference, though objects are nicer. Just have to weight out if the effort is worth any benefits.
chip_ has joined #ruby
Dimik has joined #ruby
<Dysp> Well, eventually I will be creating some kind of frontend that should be able to pull every single tiny detail.
<Dysp> Hopefully fully customizable.
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<Dysp> To be honest I don't know which approach to go with. Eventually I will of course just go with whatever works and then refactor when I learn more.
<jhass> Dysp: rename all variables until none of them have the words array or hash in them. Name them after the data they represent, not its structure
<jhass> Array[] is a rather verbose way to write []
<Dysp> You are right and I will do that. I simply did call them something with array/hash, so I could find my own way around them.
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gfvcastro has joined #ruby
jaguarmagenta has joined #ruby
<jhass> ll 122-125 want to be a .map too
agent_white has joined #ruby
mattwashere has quit [Remote host closed the connection]
<Dysp> Be aware; I am noting these things down :)
<agent_white> Mornin'
<jhass> each.with_index -> each_with_index
<Dysp> Any difference?
diegoviola has joined #ruby
<jhass> creates one less Enumerator instance
rikkipitt has quit [Remote host closed the connection]
<jhass> or actually in this case just .map.with_index
gfvcastro has quit [Client Quit]
mdw has quit [Ping timeout: 258 seconds]
<jhass> what's line 65 trying to do?, copy?
<Dysp> What does the line start with?
rikkipitt has joined #ruby
<Dysp> I posted comments
<Dysp> fucked up the line numbers
<jhass> first in def baseline
dionysus69 has quit [Ping timeout: 244 seconds]
<jhass> data.first(100) already returns a new array
<Dysp> It's from the old script.
<Dysp> baseline = data.first(100)
<Dysp> Better, right?
<jhass> yes
chouhoul_ has quit []
<jhass> data.reject!.each_with_index -> data.reject!.with_index
<Dysp> Yay \o/
<Dysp> why?
jaguarmagenta has quit [Ping timeout: 260 seconds]
<jhass> less noisy?
<Dysp> yes, sure. But doesn't the iteration come from the .each call?
<jhass> the each_ made me think you have useless each loop in the first second
diegoaguilar has quit [Remote host closed the connection]
<jhass> that reject! iterates is quite obvious
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
norc has quit [Ping timeout: 250 seconds]
jancel has joined #ruby
rikkipitt has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
davedev24 has joined #ruby
joast has joined #ruby
<Dysp> Alrighty. Also found a bug while at it.. Gotta work that bad boy out
<Dysp> ty for all ya help
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
mdw has joined #ruby
jancel has quit [Ping timeout: 244 seconds]
SolarSailor has joined #ruby
iCHAIT_ has joined #ruby
tjohnson has joined #ruby
zacstewart has joined #ruby
kareeoleez has quit [Remote host closed the connection]
mikecmpb_ has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Dysp> Considering I have a long-ass array with data (data), why does this: [0, 1, 2, 3, 4].each do { |t| array << data.fetch(t. nil) } return an array with [0, 1, 2, 3, 4]?
mikecmpbll has quit [Ping timeout: 260 seconds]
<Dysp> Oh, the dot should be a comma.
<Dysp> Typing mistake
zacstewart has quit [Ping timeout: 260 seconds]
bmurt has joined #ruby
jenrzzz has joined #ruby
SilverKey has joined #ruby
zacstewart has joined #ruby
rippa has joined #ruby
emilkarl has joined #ruby
aganov has quit [Ping timeout: 244 seconds]
<apeiros> Dysp: because .each always returns the receiver
<Dysp> So I need just to return the array?
<Dysp> Which I append to
<apeiros> I don't know what you need.
<Dysp> Thank you, my light and savior.
<Dysp> Oh sorry. Shared the code earlier, forgot that this was asked out of context
polishdub has joined #ruby
blackmes1 has quit [Ping timeout: 276 seconds]
chip_ has quit [Ping timeout: 260 seconds]
mooru has joined #ruby
CloCkWeRX has left #ruby [#ruby]
jenrzzz has quit [Ping timeout: 260 seconds]
nankyokusei has joined #ruby
terlar has quit [Ping timeout: 276 seconds]
ta__ has joined #ruby
<jhass> Dysp: again, that's a .map
ta_ has quit [Read error: Connection reset by peer]
<Dysp> Yeah, I am starting to get it ^^
<jhass> or in this special case it's even a Array.new(5) {|t| }
dangerou_ has quit [Read error: Connection reset by peer]
mercerist has joined #ruby
jmignault has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
nankyokusei has quit [Ping timeout: 240 seconds]
ChiefAlexander has quit [Remote host closed the connection]
pawnbox has joined #ruby
dionysus69 has joined #ruby
e3c has joined #ruby
ChiefAlexander has joined #ruby
<Dysp> Hm.
lalalaaa has joined #ruby
Dimik has quit [Ping timeout: 252 seconds]
<Dysp> I am now starting to get back "inifity" when dividing by numbers that do definetly not equal to anything near infinity. Why is this?!
yardenbar has quit [Ping timeout: 260 seconds]
jrafanie_ has joined #ruby
<Dysp> If I do 34,9 / 0,05 I am getting "infinity".
spiette has joined #ruby
weckl has quit [Quit: Leaving]
<Dysp> Must be the code, though. ms_dif_nm.map!.with_index(1) { |a, i| a / (@time_values[i] / 1000) }
<toretore> >> 34.9 / 0.05
<ruby[bot]> toretore: # => 697.9999999999999 (https://eval.in/592210)
jrafanie has quit [Read error: Connection reset by peer]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vuoto has joined #ruby
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SolarSailor has joined #ruby
SolarSailor has quit [Client Quit]
chip_ has joined #ruby
CJKinni` has joined #ruby
Yiota has joined #ruby
kobain has joined #ruby
nettoweb has quit [Ping timeout: 258 seconds]
<Dysp> [11.99, 34.94, 88.99, 79.70]map!.with_index(1) { |a, i| a / ([0, 30, 50, 100, 200][i] / 1000) }
davedev24 has quit []
<Dysp> This is giving me plentiful of inifinities. Ohhh whyaaaaaay?!
fujinuma has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> a / (0 / 1000) == (a / 0)
CJKinni has quit [Ping timeout: 260 seconds]
<Dysp> Mon_Ouie: Please elaborate.
beneggett has joined #ruby
<Mon_Ouie> >> 30 / 1000
<ruby[bot]> Mon_Ouie: # => 0 (https://eval.in/592216)
CloCkWeRX has joined #ruby
<Dysp> The fixnum trap?
<toretore> why are you doing with_index(1) ?
<Mon_Ouie> And division by zero for floating point numbers is defined to be an infinity
<Dysp> toretore: I am not sure exactly what I am doing here. Let me explain.
codecop has quit [Remote host closed the connection]
<Dysp> I am trying to: For each element in 'a' divide by each element in 'b' (divided by 1000).
beneggett has quit [Client Quit]
<Dysp> Except the 1st element, which is 0.
<Dysp> So start from "1", not "0". Does it make sense?
tcopeland has joined #ruby
beneggett has joined #ruby
tcopeland has quit [Client Quit]
mensvaga has left #ruby [#ruby]
SilverKey has quit [Quit: Halted.]
<Dysp> Mon_Ouie: You were of course right. The fixnum trap, as I call it.
dsea has joined #ruby
Xeago_ has joined #ruby
<toretore> Dysp: need more context
`tim` has joined #ruby
mattwashere has joined #ruby
pawnbox has quit [Remote host closed the connection]
<Dysp> If you want to know, I will tell you. But Mon_Ouie made me realize what is wrong and it now works.
dionysus69 has quit [Ping timeout: 260 seconds]
roamingdog has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
roamingdog has joined #ruby
Xeago_ has quit [Ping timeout: 260 seconds]
mikecmpb_ has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
synthroid has quit [Remote host closed the connection]
Mattx has joined #ruby
Dysp has quit [Quit: Page closed]
conta has quit [Ping timeout: 240 seconds]
<Mattx> Hey guys, any of you using MongoDB? I want to give it a try but I've found the documentation of the gem "mongo" is awful and in many cases outdated. Any idea?
kareeoleez has joined #ruby
<Mattx> for instance there's a method called #hint(hash) to query documents, but all the doc says is "Provides the query with an index hint to use."
<Mattx> WTF
SilverKey has joined #ruby
rikkipitt has joined #ruby
<Papierkorb> Mattx: https://docs.mongodb.com/ecosystem/tutorial/ruby-driver-tutorial/ the mongodb people have a extensive tutorial for their stuff, including the ruby gem
ta__ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
<Mattx> Papierkorb, that's what I'm reading. check the example above. how are you supposed to use .hint?
polysics has joined #ruby
<Mattx> or even #batch_size(integer), something way more useful
kareeoleez has quit [Remote host closed the connection]
<Mattx> what's the default value? no idea...
<Papierkorb> I just used #find for my 10 queries or so I ever needed to do with mongo
rodfersou is now known as rodfersou|lunch
kareeoleez has joined #ruby
<Papierkorb> if there is no default given, you have to pass it anyway. if one is given and it is nil, it's probably a server selected value or so.
the_drow has quit [Quit: This computer has gone to sleep]
<Mattx> well, my point is that it's not documented
<Mattx> using find() surely selects a default batch_size
roamingdog has quit [Remote host closed the connection]
<Mattx> or probably not, who knows :P
roamingdog has joined #ruby
mercerist has quit [Quit: Computer has gone to sleep.]
rikkipit_ has joined #ruby
l4v2 has joined #ruby
pawnbox has joined #ruby
spiette has quit [Ping timeout: 260 seconds]
<l4v2> I am trying to do a tutorial for practicing testing, but when I run this command ‘bundle exec ruby tests/array_test.rb’ I get this error message -bash: /usr/local/bin/bundle: /usr/local/opt/ruby/bin/ruby: bad interpreter: No such file or directory
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rikkipitt has quit [Ping timeout: 246 seconds]
<l4v2> It’s a unsupported version of Ruby now too 1.9.3
SolarSailor has joined #ruby
AcidCrash has quit [Read error: Connection reset by peer]
tesuji has quit [Killed (leguin.freenode.net (Nickname regained by services))]
karmatr0n has quit [Ping timeout: 260 seconds]
gettalong has quit [Ping timeout: 264 seconds]
AcidCrash has joined #ruby
crystal77 has joined #ruby
pawnbox has quit [Ping timeout: 272 seconds]
SolarSailor has quit [Client Quit]
tesuji_ has joined #ruby
jhack has joined #ruby
k3rn31 has joined #ruby
wrkrcoop has joined #ruby
pawnbox has joined #ruby
kies has quit [Ping timeout: 252 seconds]
pietr0 has joined #ruby
joes_ has quit [Quit: leaving]
banister has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spiette has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has quit [Remote host closed the connection]
l4v2 has quit [Quit: l4v2]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
ltd has quit [Ping timeout: 240 seconds]
pietr0 has quit [Quit: pietr0]
solars has quit [Ping timeout: 244 seconds]
emilkarl has joined #ruby
ltd has joined #ruby
polysics has quit []
bmurt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
hk238 has joined #ruby
synthroid has joined #ruby
gfvcastro has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ChiefAlexander has joined #ruby
solars has joined #ruby
ItSANg___ has joined #ruby
<wrkrcoop> from inside my ec2 instance i can get in irb and connect to S3, but for some reason in my app I can’t connect to S3 … any idaes on why this might be?
jenrzzz has quit [Ping timeout: 244 seconds]
moos3 has quit [Quit: leaving]
moos3 has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ItSANgo has quit [Ping timeout: 272 seconds]
andikr has quit [Remote host closed the connection]
Vingador_ has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
Xiti has quit [Quit: Xiti]
<imperator> suggestions for handling an arbitrary list of (hash-based) filters on an array of complex objects?
<imperator> right now i'm just iterating over the hash like: filter.each{ |k,v| list = list.select{ |x| x.send(k) == v } }
<imperator> but i suspect there's a better way
ferr1 has quit [Quit: WeeChat 1.5]
hutch34 has quit [Quit: WeeChat 1.5]
jgt1 has quit [Ping timeout: 246 seconds]
jgt1 has joined #ruby
hutch34 has joined #ruby
cevett has joined #ruby
nerium has joined #ruby
axl_ has quit [Quit: axl_]
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies has joined #ruby
kedare has quit [Quit: Leaving]
Snowy has joined #ruby
bhjcps has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
edwinvdgraaf has quit [Ping timeout: 244 seconds]
rkazak has joined #ruby
mooru_ has joined #ruby
yardenbar has joined #ruby
mooru has quit [Ping timeout: 246 seconds]
aegis3121 has quit [Ping timeout: 260 seconds]
maucar has joined #ruby
kareeole_ has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
Yiota_ has joined #ruby
dhollinger has joined #ruby
amclain has joined #ruby
eGGshke has joined #ruby
rkazak has quit [Ping timeout: 252 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
mrgrieves has quit [Ping timeout: 276 seconds]
kies has quit [Ping timeout: 252 seconds]
`tim` has joined #ruby
mooru_ has quit [Ping timeout: 260 seconds]
<jhass> mh, don't see anything much better, could list.select {|item| filters.all? {|field, expected_value| item.public_send(field) == expected_value } }
kareeoleez has quit [Ping timeout: 264 seconds]
GodFather has joined #ruby
<jhass> that'd at least short-circuit
<jhass> and allocate less
conta has joined #ruby
KCmetro has joined #ruby
hogetaro_ has joined #ruby
Yiota has quit [Ping timeout: 276 seconds]
chip_ has quit [Ping timeout: 260 seconds]
hogetaro has quit [Ping timeout: 272 seconds]
bencc has joined #ruby
<bencc> "gem install rouge -V" is stuck at
<bencc> Parsing documentation for rouge-2.0.1
<bencc> Parsing sources...
<bencc> 45% [109/240] lib/rouge/formatters/html_pygments.rb
<jhass> "stuck"?
<bencc> jhass: cpu is close to 100% but I don't see progress
weemsledeux has joined #ruby
<jhass> since?
cpruitt has joined #ruby
<bencc> few mintues
jrafanie_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bencc> ruby 2.3.0p0, ubuntu 16.04
GodFather has quit [Read error: Connection reset by peer]
<jhass> "few minutes" tells me nothing
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cpruitt has quit [Client Quit]
crystal77 has joined #ruby
<bencc> jhass: maybe I don't understand your question. since what?
weemsledeux has quit [Max SendQ exceeded]
<jhass> 2 minutes? 10?
jrafanie has joined #ruby
<bencc> jhass: 5 mintues. I can wait more
<jhass> I'd give it 10
<bencc> ok
<bencc> I'll see you in 10 mintues :)
<jhass> if you don't actually need the docs just --no-doc
<bencc> jhass: I don't need the docs. trying without them
cdg has joined #ruby
<jhass> eh actually it's --no-document or -N for short
<bencc> looks good
iCHAIT_ has left #ruby [#ruby]
GodFather has joined #ruby
[Butch] has joined #ruby
<bencc> thanks
kareeole_ is now known as kareeoleez
Hounddog has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
jancel has joined #ruby
SCHAAP137 has joined #ruby
VectorX has joined #ruby
<VectorX> hi, im running unicorn on a port, is it possible to add basicauth to this ?
madgen has quit [Ping timeout: 246 seconds]
gzn has joined #ruby
craigp has joined #ruby
ngw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jancel has quit [Ping timeout: 244 seconds]
rodfersou|lunch is now known as rodfersou
shadeslayer has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
gzn has quit [Remote host closed the connection]
TomyLobo has joined #ruby
jaguarmagenta has joined #ruby
shadeslayer has joined #ruby
diegoaguilar has joined #ruby
rikkipit_ has quit [Remote host closed the connection]
Snowy has quit [Remote host closed the connection]
<havenwood> VectorX: A Rack app? Rack ships with basic auth support. Take a look at the protectedlobster examples: https://github.com/rack/rack/tree/master/example
coolboy has joined #ruby
borodin has joined #ruby
jgt1 has quit [Quit: WeeChat 1.4]
jgt has joined #ruby
f4cl3y has quit [Ping timeout: 260 seconds]
RegulationD has quit [Remote host closed the connection]
roamingdog has quit [Read error: Connection reset by peer]
<havenwood> oops, misstell
blandflakes has joined #ruby
roamingdog has joined #ruby
<havenwood> VectorX: ^
<VectorX> havenwood thanks
jaguarmagenta has quit [Ping timeout: 258 seconds]
moeabdol has joined #ruby
platzhirsch has quit [Quit: WeeChat 1.4]
the_drow has joined #ruby
vuoto has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaruga___ has quit [Quit: jaruga___]
ramfjord has joined #ruby
iCHAIT_ has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
fujinuma has quit [Quit: WeeChat 1.5]
GodFather has joined #ruby
<CustosLimen> so I want something that I can use to handle graceful shutdown - I made ShutdownHandler with wait method - so then I do shutdown_handler = ShutdownHandler.new - which traps signals with queue push... - and then I have wait method on ShutdownHandler that does queue.pop
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gfvcastro has joined #ruby
<CustosLimen> the thing is though - this is not working really
RegulationD has joined #ruby
Moosashi has joined #ruby
<CustosLimen> the @queue.pop never returns
<CustosLimen> even though stuff is being added to queue
<kareeoleez> I have a gem which can be installed only in specific systems (RPI, gem: dht-sensor-ffi) and the only way to use it in my development vm is to comment it out each time. Is there any other way to control this ?
<CustosLimen> I think this is maybe consequence of this all happening in one threads though
gfvcastro has quit [Client Quit]
troulouliou_div2 has quit [Quit: Leaving]
senayar has quit []
<CustosLimen> ;(
<Veejay> Try to use queue.pop(true) and see if an exception is raised
<CustosLimen> let me just send it to another thread
Vingador has joined #ruby
<CustosLimen> Veejay, it will be as queue will be empty first time its called
d0lph1n98 has quit [Ping timeout: 250 seconds]
<Veejay> If the queue is empty, queue.pop suspends the calling thread
<Veejay> IIRC
<CustosLimen> Veejay, yes - but the queue gets filled every time I send ctrl+c
VectorX has left #ruby [#ruby]
<CustosLimen> Veejay, and in output (shared in bpaste) you can see queue getting bigger - but still pop does not return
<CustosLimen> anyway - I'm pretty sure it wont work if its all in one thread
jenrzzz has joined #ruby
<CustosLimen> I think this is what this proposal is about: https://bugs.ruby-lang.org/issues/8823
<CustosLimen> so I have to redirect the queue to another thread
<CustosLimen> and then redirect the event back to main thread
braincras has quit [Ping timeout: 244 seconds]
madgen has joined #ruby
KCmetro has quit [Remote host closed the connection]
hogetaro has joined #ruby
<jhass> kareeoleez: you could add an environment variable to skip the check
<shevy> \o/
<kareeoleez> hmm
<jhass> MY_GEM_SKIP_PLATFORM_CHECK=true
<shevy> HERE_BE_DRAGONS=true
<kareeoleez> there's also grouping and --without x
<jhass> ^ good one
<jhass> oh
braincrash has joined #ruby
<jhass> I didn't see bundler in the context of the question
<jhass> --without is indeed preferable
mooru has joined #ruby
<jhass> or if not needing it is actually the more common case, group :rpi, optional: true do; and do --with rpi on the pi
hogetaro_ has quit [Ping timeout: 260 seconds]
wrkrcoop has quit [Quit: wrkrcoop]
nankyokusei has joined #ruby
jenrzzz has quit [Ping timeout: 244 seconds]
Impaloo has joined #ruby
<Impaloo> Hey, does anyone use ruby-switch(1) here?
<kareeoleez> jhass: and what about the methods that use this gem ?
<jhass> they should check defined?
<jhass> ?anyone Impaloo
<ruby[bot]> Impaloo: Just ask your question, if anyone has, is or can, they will respond.
<kareeoleez> jhass: for example <td><%= DhtSensor.read(4, 11).temperature %>*C</td> returns a uninitialized constant ActionView::CompiledTemplates::DhtSensor (obviously)
<jhass> defined?(DhtSensor) &&
bencc has left #ruby [#ruby]
<kareeoleez> this is awesome
<kareeoleez> jhass: thank you.
nankyokusei has quit [Ping timeout: 246 seconds]
<shevy> hmm
<shevy> would defined?(DhtSensor) be equivalent to Object.const_defined?(:DhtSensor)
ljames has quit []
banister has joined #ruby
pilne has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
lazaro has joined #ruby
lazaro has quit [Client Quit]
SilverKey has quit [Quit: Halted.]
aegis3121 has joined #ruby
lazaro has joined #ruby
am55 has joined #ruby
lazaro has quit [Client Quit]
<jhass> shevy: in this case they have the same result, but no, defined? is actually a keyword
wrkrcoop has joined #ruby
<shevy> ok
darkxploit has joined #ruby
wrkrcoop has quit [Client Quit]
KCmetro has joined #ruby
tribals has joined #ruby
braincrash has quit [Ping timeout: 246 seconds]
<tribals> hi there
wrkrcoop has joined #ruby
<jhass> hi
blackmes1 has quit [Ping timeout: 276 seconds]
Guest38_ has joined #ruby
musl has joined #ruby
tomchapin has joined #ruby
Xiti has joined #ruby
Uranio-235 has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
braincrash has joined #ruby
shinnya has joined #ruby
<tribals> consider this: https://gist.github.com/tribals/32c82a21a7ad5f94a688236637db7617 it doesn't work. my attempt is to yield each parsed number for each line, but i don't understand how to do that. can i yield form block?
Impaloo has left #ruby [#ruby]
<ljarvis> "it doesn't work"
<tribals> yes
mistermocha has joined #ruby
<ljarvis> ok thanks for the info, I'll just hop onto the guessing train, choo choo
ramfjord has joined #ruby
<ljarvis> tribals: but seriously.. why doesn't it work? it's not really an optimal description of your issue
smathy has joined #ruby
<ljarvis> looks like it works to me
tomchapin has quit [Quit: Textual IRC Client: www.textualapp.com]
mikecmpbll has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
Vingador_ has joined #ruby
<tribals> ljarvis: it doesn't work because it is piece of shit, not code. what i asking for is how to implement a parser that supports enumeration on it (`#each`, `#map`, etc), and one line can contain multiple parsed values
bgresham is now known as demophoon
gettalong has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
mistermocha has quit [Remote host closed the connection]
mistermocha has joined #ruby
<apeiros> tribals: if it doesn't work, then you should fix it.
Vingador has quit [Ping timeout: 240 seconds]
<ljarvis> hehe
<ljarvis> tribals: you probably want to check out the Enumerable module
<apeiros> if "you should fix it" sounds like an unspecific useless piece of information, then that's because "it doesn't work" is too
<ljarvis> that said, there's a bug in your implementation
<tribals> apieros: i not asking you to fix it
<ljarvis> but I dont think you'll notice it until you start using enumerable methods
<apeiros> ?tabnick tribals
<ruby[bot]> tribals: pro-tip - use tab completion for nicks. avoids typos in nicks.
ddffg has joined #ruby
<ljarvis> ahh good old apieros is back
blaxter has joined #ruby
<apeiros> "can I yield form[sic] block" - if you mean "can I yield within a block", then yes, you can.
<ljarvis> my example shows that anyway
<ljarvis> line 19 has a bug
<ljarvis> is a bug, rather
blaxter has quit [Client Quit]
<ddffg> why do i get such error undefined method `beginning_of_day' for #<DateTime:0x00556b918a8570>
<ljarvis> or it's just silly
<ljarvis> the line is fine
tomchapin has joined #ruby
<ljarvis> ddffg: because you didn't require active support
<ddffg> ruby 2.3.0 and 2.3.1
<ljarvis> ddffg: it's an active support extension (monkey patch)
Macaveli has joined #ruby
<ljarvis> require "active_support/date" or something
<ddffg> what is alternaivity
<ljarvis> excuse me?
<apeiros> today's spelloday
<ljarvis> an alternative?
<tribals> apeiros: sorry for typo
<ljarvis> or something about being naive
<tribals> in your nick
<ddffg> yes
<ljarvis> ddffg: well, you can just build a new date object and set the time to 0
xall_ has quit [Ping timeout: 244 seconds]
<ljarvis> e.g. something like d = Date.today; DateTime.new(d.year, d.month, d.day, 0)
<ljarvis> i guess
<ljarvis> >> d = Date.today; DateTime.new(d.year, d.month, d.day, 0)
<ruby[bot]> ljarvis: # => uninitialized constant Date ...check link for more (https://eval.in/592239)
<ljarvis> >> require "date"; d = Date.today; DateTime.new(d.year, d.month, d.day, 0)
<ruby[bot]> ljarvis: # => #<DateTime: 2016-06-20T00:00:00+00:00 ((2457560j,0s,0n),+0s,2299161j)> (https://eval.in/592240)
coolboy has quit [Ping timeout: 276 seconds]
<adam12> tribals: Were you looking to do something like this? https://eval.in/private/26ba9a833bdd88
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Eiam has joined #ruby
rikkipitt has joined #ruby
<tribals> adam12: yes! thanks!
<adam12> tribals: That actually might not work for you, and you might have to consider including Enumerable.
<adam12> I was thinking because it responded to each it would handle calls for `map`, etc, but I think I am mistaken.
eGGshke has quit [Remote host closed the connection]
DTZUBDUB has joined #ruby
rcvalle has joined #ruby
Moosashi has quit [Quit: Moosashi]
tribals has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
schuuu has joined #ruby
Moosashi has joined #ruby
mistermo_ has joined #ruby
firstdayonthejob has joined #ruby
eGGshke has joined #ruby
Uranio-235 has quit [Quit: WeeChat 1.5]
bigkevmcd has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
giz|work has quit [Ping timeout: 252 seconds]
madgen has quit [Ping timeout: 244 seconds]
giz|work has joined #ruby
Coldblackice has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
jetpackjoe has joined #ruby
replay has joined #ruby
wrkrcoop has joined #ruby
crystal77 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
coolboy has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
palms has quit [Ping timeout: 264 seconds]
ta_ has joined #ruby
palms has joined #ruby
<marahin> Having a hash: http://hastebin.com/xunadafula.coffee - how can I search if any of the values return nil?
<marahin> As in: how can I deep search hash to find out if there's a nil value in **any** place
nerium has quit [Quit: nerium]
Moosashi has quit [Ping timeout: 258 seconds]
mdw has quit [Quit: Sleeping Zzzzz]
jenrzzz has quit [Ping timeout: 258 seconds]
ruby[bot] has joined #ruby
craigp has joined #ruby
<coolboy> some_hash.any? { |d| d.nil? } ?
xall has joined #ruby
last_staff has joined #ruby
spider-mario has joined #ruby
djbkd has joined #ruby
giz|work has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<marahin> coolboy,
<marahin> [18] pry(main)> a
<marahin> => {:a=>{:a1=>nil, :a2=>"c"}, :b=>{:b1=>2, :b2=>"test"}}
<marahin> [19] pry(main)> a.any?{ |d| d.nil? }
<marahin> => false
<marahin> it should return true, as a[:a][:a1] is nil.
e3c has quit [Ping timeout: 260 seconds]
<toretore> if you want any level you need to write a separate function which recurses the structure
Moosashi has joined #ruby
<coolboy> ahhh sorry, glossed over "deep"
<coolboy> In vacation mode.
<marahin> toretore, I see. What would be the good approach? What functions should I use?
<marahin> coolboy, haha no worries :)
jgt has quit [Ping timeout: 252 seconds]
<coolboy> recursion is good for nested traversal.
roamingdog has quit [Remote host closed the connection]
<marahin> aight
ddffg has quit [Quit: Leaving]
blackmes1 has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
SilverKey has joined #ruby
bmurt has joined #ruby
ule has quit [Ping timeout: 260 seconds]
ule has joined #ruby
rikkipitt has quit [Quit: Leaving...]
nankyokusei has joined #ruby
freerobby has quit [Quit: Leaving.]
ocbtec has quit [Quit: leaving]
<coolboy> warning: probably not the best way to do this.
postmodern has joined #ruby
bluOxigen has joined #ruby
palms has quit [Ping timeout: 252 seconds]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
aegis3121 has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
blackmes1 has quit [Ping timeout: 240 seconds]
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
roamingdog has joined #ruby
<ljarvis> marahin: if a value is an array, do you need to check the entire array?
Moosashi has quit [Quit: Moosashi]
<ljarvis> or are there nested hashes?
ramfjord has joined #ruby
<ljarvis> also do you need to check keys?
Pumukel has joined #ruby
jhack has quit [Quit: jhack]
ule has quit [Changing host]
ule has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ChiefAlexander has joined #ruby
ocbtec has joined #ruby
ta_ has joined #ruby
<marahin> ljarvis, it's just a nested hash with unique symbols as keys
<ljarvis> marahin: do you care about speed?
moonman has joined #ruby
<marahin> ljarvis, look at the example hash - it's a hash of two nested hashes with two values each
<marahin> e.g. 4 elements
<ljarvis> marahin: yes I see
<marahin> I don't think there _could_ be an algorithm that would make it slow ;)
<ljarvis> >> {a: { b: nil, c: 1 }, b: { c: "2" } }.values.flat_map(&:values).any?(&:nil?)
<ruby[bot]> ljarvis: # => true (https://eval.in/592300)
<marahin> beautiful
<marahin> ljarvis, thank you!
<ljarvis> np, the performance comment was because this code wouldn't be good if the hash was huge
evansbee has joined #ruby
<ljarvis> (in which case you'd want a recursive method that would return at the first occurence of nil)
nankyokusei has quit [Remote host closed the connection]
jpterry has quit [Quit: ZNC Quit]
nankyokusei has joined #ruby
ych has joined #ruby
ltd has quit [Ping timeout: 260 seconds]
Ankhers has quit [Ping timeout: 260 seconds]
Ankhers has joined #ruby
ltd has joined #ruby
nerium has joined #ruby
jaguarmagenta has joined #ruby
sauvin has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 276 seconds]
evansbee has quit [Ping timeout: 258 seconds]
palms has joined #ruby
Rickmast_ has joined #ruby
chip_ has joined #ruby
Rickmasta has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Ping timeout: 258 seconds]
<Synthead> I'm stuck on some implementation with net-sftp concerning net-ssh: http://pastie.org/10884399
spiette has quit [Ping timeout: 276 seconds]
<Synthead> as line 3 reads: "If I comment this line out, the .loop hangs. If I don't, it works without issues."
mshowman has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmes1 has joined #ruby
<Synthead> something with the sftp but makes the ssh.loop hang, but only when I call sftp first
<Synthead> is there a need to "reset" or "close" the sftp connection or something?
emiltin has joined #ruby
jpterry has joined #ruby
<Synthead> I'd really like to do this work without multiple connections
aegis3121 has joined #ruby
<Synthead> oh, and the sftp but must happen before the command (synchronously, not async)
<adam12> Synthead: Not directly related, but have you tried scp instead?
emiltin has quit [Client Quit]
emiltin has joined #ruby
bhjcps has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 244 seconds]
<Synthead> adam12: no, but I'm open to the idea
<Synthead> I need to write a string to a file, but I could do that with StringIO.new(string)
darkxploit has quit [Quit: Leaving]
<Synthead> yeah why not... I'll try it
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Fernando-Basso has quit [Quit: Leaving]
ta_ has quit [Remote host closed the connection]
gfvcastro has joined #ruby
<Synthead> adam12: can it piggyback off of the Net::SSH connection?
DTZUBDUB has quit [Ping timeout: 240 seconds]
blandflakes has joined #ruby
fenre has joined #ruby
coolboy has quit [Remote host closed the connection]
blackmes1 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
moeabdol has quit [Ping timeout: 250 seconds]
<lalalaaa> Synthead: Did you see Lord of the synths just now?
<Synthead> lalalaaa: no, haha
palms has quit [Ping timeout: 272 seconds]
<Synthead> omg, that's awesome
<lalalaaa> yes !! lol
<Synthead> I'm at work but I'll watch the whole thing later XD
<lalalaaa> :D
<lalalaaa> like that other swedish one couple of months back just as good
<adam12> Synthead: I believe so? `ssh.scp.upload!(local_path, remote_path)`
the_drow has joined #ruby
<Synthead> adam12: very interesting... I'll check it out!
<adam12> Synthead: I'm using a StringIO object for local path, so I am not sure if you need to pass an open file object, but you can check docs.
<Synthead> adam12: I'm ok with a StringIO object
spiette has joined #ruby
<Synthead> I think it's a lot less crufty than opening a file and doing a .puts anyway
<adam12> Synthead: Actually I backscrolled and saw that.
<Synthead> HA
<Synthead> I am responding to my own text
<Synthead> man, I am just on three wheels today
<adam12> lol
kareeole_ has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
jancel has joined #ruby
boogeyman has joined #ruby
moeabdol has joined #ruby
jenrzzz has joined #ruby
<adam12> Synthead: I'm using this as well, which I probably stole from somewhere years ago. https://gist.github.com/04130922ba7e610dc7de3cfda2f807f7
Vingador_ has quit [Remote host closed the connection]
karmatr0n has joined #ruby
kareeoleez has quit [Ping timeout: 272 seconds]
<Synthead> adam12: yeah that's actually nearly verbatim to what I'm doing, hah
<Synthead> adam12: the scp bit piggybacked with the ssh connection worked with StringIO :)
<Synthead> I'm gonna see if it crashes the channel still
<adam12> I was tired of reproducing it for every command so it got abstracted.
<adam12> Cool! Good luck.
Coldblackice has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
<Synthead> some guy made net-ssh-simple, but I looked at it and the syntax wasn't as nice as I wanted
<Synthead> thanks :)
gusrub has joined #ruby
the_drow has joined #ruby
symm- has joined #ruby
blaxter has joined #ruby
jancel has quit [Client Quit]
moeabdol has quit [Ping timeout: 264 seconds]
jenrzzz has quit [Ping timeout: 244 seconds]
the_drow has quit [Read error: Connection reset by peer]
moonman has quit [Quit: bb]
edwinvdgraaf has joined #ruby
xall_ has joined #ruby
the_drow has joined #ruby
ruby-lang367 has joined #ruby
<Synthead> adam12: works beautifully! thanks for the help!
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-lang367> hi
<ruby-lang367> I need some help grabbing links
<adam12> Synthead: cheers :)
fenre has quit [Remote host closed the connection]
symm-_ has joined #ruby
KCmetro has quit [Remote host closed the connection]
xall has quit [Ping timeout: 244 seconds]
wolffles has joined #ruby
mooru_ has joined #ruby
symm- has quit [Ping timeout: 244 seconds]
mooru has quit [Ping timeout: 276 seconds]
<ruby-lang367> Under Most admired 2015, go here: http://fortune.com/worlds-most-admired-companies/2015/
<ruby-lang367> can someone help me grab the links
<ruby-lang367> for all the companies
mikecmpbll has joined #ruby
<lupine> so, um. I like 3M
<lupine> the rest are a bit evil
dikaio has joined #ruby
KCmetro has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
palms has joined #ruby
<nerium> Is there a gem that makes it possible to get a value from a hash using a query language? I.e ”key1.key2[2]” would result in {key1 => {key2 => [1,2,3]}} => 3
<smathy> ruby-lang367, the people here are more interested in teaching you how to improve your knowledge of ruby, rather than give you free solutions to your underlying problem.
<Synthead> ruby-lang367: you probably want to use rest-client and nokogiri
blaxter has quit [Quit: foo]
<Synthead> ruby-lang367: also, the company list is paginated, so you'll want to account for that
<smathy> nerium, the dig method.
<Synthead> ruby-lang367: in chrome/chromium, open the console, go to the network tab, refresh the page, then scroll the results to see what I mean
<smathy> (assuming 2.3)
<Synthead> it'll make ajax calls as you scroll with uris of 2/, 3/, 4/, etc
<ruby-lang367> ok thx
jgt has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
vuoto has joined #ruby
<Synthead> also, I didn't look at the ajax data, but you might be able to just JSON.parse the payload from that instead of using nokogiri
<nerium> smathy: That will only work on non nested object, or am I missing something?
ramfjord has quit [Ping timeout: 244 seconds]
the_drow has joined #ruby
<Synthead> nerium: key1["key2"][2] ?
<Synthead> nerium: ["key1"]["key2"][2], rather?
<Synthead> oh I see what you're doing, nevermind
<nerium> Synthead: I was hoping for a query language :)
norc has joined #ruby
mistermo_ has quit [Remote host closed the connection]
<Synthead> nerium: what's the use case?
ornerymoose has quit [Ping timeout: 240 seconds]
diegoaguilar has quit [Remote host closed the connection]
<nerium> I’m trying to select a value from a deep nested hash
<Synthead> nerium: in a static or dynamic fashion?
<nerium> This is the key ”.context.dispatcher.stores.PageStore.pages./nrj/latlista.data[1].modules[2].content[0].title”
<nerium> (just to give you an idea)
<nerium> Synthead: Not sure what you mean
the_drow has quit [Read error: Connection reset by peer]
<Synthead> nerium: as in, is the code always going to be (i.e.) "x.y.z", or are you going to be taking user input for this or something?
jgt has quit [Ping timeout: 260 seconds]
<nerium> Synthead: Aha. Then it’s dynamic
zeroDi has joined #ruby
<Synthead> nerium: are you going to be using this query-esque language just for your own code, or is it going to be seen in the final product?
the_drow has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
<nerium> Synthead: final
<adam12> nerium: You could likely build some sort of proxy or adapter that a) responded to method missing and b) overwrote/defined #[]
<Synthead> nerium: ah, ok
<adam12> nerium: I'm not sure I would do something like that tho?
<nerium> Why not? :)
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adam12> nerium: I think the tools Ruby provides for accessing nested hashes is good enough... :)
<Synthead> nerium: the reason why I'm asking these questions is because it sounds like a bit of code smell over here
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Synthead> it's custom, so others will not know how to look it up, use it, it would have to be maintained, there might be weird bugs, etc
roamingdog has quit [Remote host closed the connection]
kareeole_ is now known as kareeoleez
<Synthead> and on the turn of things, it'll likely be slower than standard ruby, and provide limitations (what if the key must have a "." in it?)
<nerium> I need something that can be expressed on a single line and fail with a proper error message
<Synthead> I think you're better off using an Array of keys, then using a recursive function with .fetch to dig into the object a bit
<nerium> True. That’s why I’m asking for an already exiting language
<nerium> That already solved these problems
banister has joined #ruby
<dsimon> this was added to 2.3 and might help
hinbody has quit [Ping timeout: 244 seconds]
<nerium> Or I can force the user to escape . and [] like most other languages does
banister has quit [Client Quit]
<nerium> dsimon: Know about that one, thanks :)
<dsimon> you'll still have to split the key yourself
<Synthead> or dig! I didn't know about that one!
<Synthead> that's a cool method!
<dsimon> it is :-)
<toretore> nerium: are you sure you actually do need to expose this functionality to the user?
smathy is now known as smathy_afk
<dsimon> i think they put it in after adding &. because there wasn't a good way to use &. with the [] operator
<Synthead> 1% of my code got uglier today by learning dig :D
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
crystal77 has joined #ruby
the_drow has quit [Read error: Connection reset by peer]
<nerium> toretore: No. It’s for internal code
<toretore> nerium: what's the context?
the_drow has joined #ruby
banister has joined #ruby
thegunbuster has joined #ruby
thegunbuster has quit [Changing host]
thegunbuster has joined #ruby
<toretore> nerium: nerium why does it have to be a query? is it to be entered by a user/admin and the stored somewhere before it's used?
<nerium> Would like to access JSON/Hash keys like css queries to print better error messages and reduce the amount of code needed
craigp_ has joined #ruby
<toretore> so this is something that never leaves your code?
<adam12> nerium: I encourage you to reconsider but I whipped up something quick and likely not optimal. https://gist.github.com/adam12/a722172021778fcc3055abb366624037
djbkd has quit [Remote host closed the connection]
<nerium> Then the parser can use it to print propper messages. I.e ”You passed a.b[1].c but a.b is not an array"
djbkd has joined #ruby
craigp has quit [Ping timeout: 260 seconds]
the_drow_ has joined #ruby
<toretore> nerium: still missing a lot of context here to be able to see the big picture
<nerium> I might have been a bit unclear. I can something like this my self but was hoping for something already exiting so that I dont have to spend time testing, documenting and fixing small bugs in the code for the next weeks
<nerium> toretore: I can show you some example usage
<adam12> nerium: My implementation is 19 lines, unoptimized. I'm not sure I'd want another dependency in place of it.
<nerium> *usages
<thegunbuster> Would anyone be interested to contribute to a ruby stats library? (https://github.com/vaibhav-y/statistical)
the_drow has quit [Read error: Connection reset by peer]
<toretore> nerium: what i'm getting at is that it's complicated and there is nothing afaik that will integrate cleanly and easily with your case
kappy has joined #ruby
<thegunbuster> If this isn't allowed here, let me know I won't do that again
juanfra has quit [Quit: juanfra]
SCHAAP137 has quit [Ping timeout: 276 seconds]
globalall0c has joined #ruby
mooru_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
juanfra has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
<globalall0c> ruby vs python
<thegunbuster> For?
serbalgi has joined #ruby
the_drow_ has quit [Read error: Connection reset by peer]
<globalall0c> why is python recommended as the ideal language for beginners? instead of ruby
* nerium toretore: Here’s in an example. #get itterates the first object using the second argument split by ”.”
* nerium I would like to do
serbalgi has quit [Client Quit]
<nerium> get(data, ”ProgramInstance.Elements[-1].TrackTitle”
shinnya has quit [Ping timeout: 276 seconds]
the_drow has joined #ruby
<nerium> Without having to implement my own language (like I’ve now)
<nerium> or is there a better way?
<thegunbuster> globalall0c various factors. But the biggest I recall is that ruby caught on in popularity later.
<thegunbuster> There's also performance and closeness to psuedo code, along with standards enforcement (which python does better)
johnmilton has quit [Quit: Namaste]
<nofxx> I would recommend ruby first, way more clear and well thought globalall0c
<thegunbuster> by standards enforcement I mean the PEP guidelines
<nerium> adam12: The problem is that you code isn’t tested or documented – something that takes quite sometime
yardenbar has quit [Ping timeout: 260 seconds]
<nerium> I’m not saying it’s bad :)
<globalall0c> nofxx, i program in c and asm
<globalall0c> my gf, knew to cs, wants to learn ruby
the_drow has quit [Read error: Connection reset by peer]
<globalall0c> clearly, c && asm != ruby
<thegunbuster> What do you eventually want to do with ruby?
<lupine> I'd suggest learning scheme first
<lupine> HtDP is god
<globalall0c> thegunbuster, nothing. i want to help her learn
<thegunbuster> Is it just a language or are you interested in a specific application, like scientific computing, web-dev, simulations etc
<thegunbuster> oh
<nofxx> globalall0c, you'll have fun teaching her. Also you'll know both sides of all of this
albedoa has joined #ruby
<nofxx> globalall0c, asm raw it can gets, ruby the high level smarter it gets
<globalall0c> nofxx, i also do .net
<toretore> nerium: there are json query languages like http://goessner.net/articles/JsonPath/ but i probably wouldn't add such a dependency for internal use
<globalall0c> im insanely biased to low level stuff
<nerium> toretore: Why?
freerobby has joined #ruby
<globalall0c> but my gf, being smarter than me, wanted to do high level
the_drow has joined #ruby
<toretore> nerium: i don't like introducing dependencies when i don't have to
<nofxx> globalall0c, haha...yeah, I'm ok with ~200 programming an AVR in C... asm NO PLEASE
roamingdog has joined #ruby
<nofxx> ~200~500 lines of C*
<thegunbuster> ask her again, if she wants to apply the language somewhere specific
<toretore> nerium: the threshold for added value / cost for me is quite high
<thegunbuster> ASM is a nightmare to navigate :(
<nofxx> globalall0c, I remember skipping 8085 classes to drink beer. Don't regret ;)
<nerium> toretore: Not having to write, test, document, maintain any piece of code is a win (for me)
<thegunbuster> otherwise, a good resource for ruby is the ruby-koans project
<lupine> learning a language is muc h less important than learning to program
<lupine> you can do that in any language, scheme happens to have good resources
<toretore> nerium: dependencies hide complexity that you don't control
smathy_afk is now known as smathy
<nofxx> globalall0c, check chris pine learn to program, great and online
<nerium> toretore: True. Read an aricle about that a few month ago
<globalall0c> nofxx, im trying to stray away from anything online. i learned from books and hands on, i think online material doesnt teach correctly IMO
<nerium> I gues that’s something you need to take into considuration
<toretore> nerium: the alternative is to access your data only using the methods provided on built-in data structures, which is what i would do until it became close to unbearable
dikaio has joined #ruby
<smathy> nerium, you caught up now re dig?
<thegunbuster> globalall0c, I learnt with these: http://rubykoans.com/ (Great after an introductory book)
<globalall0c> thegunbuster, she thinks it clear-er than other languages and she likes the rapid development behind it
<nerium> toretore: Not sure I understand what you mean
<nerium> smathy: What?
<nofxx> globalall0c, that's an ASM concept =D drop it. high lvl langs changes monthly
the_drow has quit [Read error: Connection reset by peer]
<smathy> nerium, you're clear? I just got back, saw you asked me something about nesting, but you seem to be ok now?
<nofxx> at least their libs... reuse of code... we call 'gems'
SCHAAP137 has joined #ruby
eGGshke has quit [Quit: Leaving...]
<norc> globalall0c, no book teaches correctly. Only practice does.
mattwashere has quit [Remote host closed the connection]
<thegunbuster> I agree about video series, the best way to learn the language is to use it! & maybe read about the caveats
<nofxx> yup... and up to date material saves times
<nerium> smathy: Sort of. Do you know any json query language simular to css selectors for ruby?
<globalall0c> norc, i agree, but when i started ages ago i would read books cover to cover
<globalall0c> it helped me improve.. A LOT
<norc> globalall0c, actually writing code and participating on github would have helped you improve... MORE.
<thegunbuster> But then, I got my hands on turbo-c++
<norc> globalall0c, Im not saying that books are bad, but actual real world practice is better.
mtkd has quit [Ping timeout: 276 seconds]
<norc> You can have a book along side if you chose though.
the_drow has joined #ruby
<globalall0c> norc, it all depends on the person. i do malware dev and offensive security
mattwashere has joined #ruby
<smathy> More xpath than css selectors, but might suit your goals.
djbkd has joined #ruby
<norc> globalall0c, I find that offensive.
mtkd has joined #ruby
<globalall0c> but, again, it all depends. my idea was always a project or an established goal
<globalall0c> but i did it independently
mshowman has joined #ruby
<thegunbuster> Lets all agree that different people learn differently?
<nerium> smathy: *reading* thanks!
karmatr0n has quit [Ping timeout: 252 seconds]
<thegunbuster> So would anyone be able to comment / or some tips for this: https://github.com/vaibhav-y/statistical ?
<smathy> It's a github repo.
<thegunbuster> It's a statistics library I'm working on
<thegunbuster> Exactly, I was hoping to get a few more eyes to look at it
<norc> globalall0c, well as I said. It's not a bad strategy, but books do not give you experience. They just give you theory.
<smathy> thegunbuster, that was my comment.
SilverKey has quit [Quit: Halted.]
<thegunbuster> smathy, I am regretting my lack of specificity
mooru has joined #ruby
<smathy> :)
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
the_drow has quit [Ping timeout: 250 seconds]
<smathy> thegunbuster, "Changes:" is a bad first line for a git commit.
<thegunbuster> duly noted. I'll try with a shorter summary
cdg has quit [Remote host closed the connection]
[Butch] has quit [Quit: I'm out . . .]
SilverKey has joined #ruby
<toretore> git commit -m"some stuff"
cdg has joined #ruby
ych has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
symm-_ is now known as symm-
mikecmpbll has joined #ruby
<thegunbuster> toretore, whoa where?
<smathy> He was just giving more examples of bad first lines :)
<toretore> thegunbuster: in all of my repos
<smathy> My personal favorite `git commit -mWIP` :)
<thegunbuster> ayy
<norc> smathy, I use compact git commit messages at work all the time
mattwashere has quit [Remote host closed the connection]
<norc> "stuff unfucked"
<norc> It's quite handy.
<toretore> git commit -m"use git show dumbass"
mattwashere has joined #ruby
<thegunbuster> I like spam committing and then I squash them all
<adam12> thegunbuster: I looked over it. Looks good, tho I don't know shit about stats. I noticed you use explicit returns in some places where they aren't needed. Assuming this is for a certain styleguide?
Wsewolod has quit [Quit: Leaving]
DTZUBDUB has joined #ruby
<norc> squashing is if your colleagues cant handle profanity, in which case I recommend a better job.
<smathy> git ci -m"squash this"
<thegunbuster> adam12, Yes it's just a style preference, I come from C so I find it easier to have methods end with a return
<thegunbuster> Had to fight rubocop for that one
<adam12> Hah. Yep.
<elomatreb> squashing also creates gigantic diffs. Hard to scan quickly
<norc> thegunbuster, do you also declare the return type for every method?
kirun has joined #ruby
<thegunbuster> I try to as much as possible in the yardoc comments
<norc> thegunbuster, honestly rubocop is misused for the most part.
crank1988 has quit [Ping timeout: 252 seconds]
<norc> thegunbuster, the only thing I use it for is converting the random "" to '' strings.
<thegunbuster> and trimming trailing WS :D
<norc> thegunbuster, both vi and git will cry if I have trailing WS.
<thegunbuster> I'm coding from c9.io
<thegunbuster> my laptop is finally potato
<marahin> How can I define a method, that would react to this: a = Model.new; a('argument')?
<toretore> you can't
<marahin> really?
<toretore> no
<adam12> marahin: use case
<adam12> ?
KCmetro has quit [Remote host closed the connection]
<thegunbuster> a is a Model object. You pass data to a method
moeabdol has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<marahin> uh-huh
<thegunbuster> unless you define the () method for a
KCmetro has joined #ruby
<marahin> adam12, I just wanted to learn really, if that's possible or not :)
<thegunbuster> which you can't IIRC (restricted by ruby)
<elomatreb> Are you coming from PHP? __invoke() was a mistake
<marahin> thegunbuster, and defining such method is impossible, yes?
<marahin> elomatreb, not at all :P
<marahin> thegunbuster, that's what I wanted to know
<thegunbuster> you can try def self.[](*args); # something; end
<marahin> thank you guys.
<thegunbuster> square brackets are the only exception to this rule
<adam12> marahin: Some people will (ab)use [] to achieve similiar results.
<thegunbuster> (like me)
<adam12> Sequel is a great example of this, which is done well.
<Mon_Ouie> You can also do foo.(argument) which is a special syntax to call the #call method
crank1988 has joined #ruby
<thegunbuster> Ha, didn't know that #call can be done that way too
craigp_ has quit [Ping timeout: 272 seconds]
<thegunbuster> adam12, anything else you'd like to add? Like specific features that you expect from a stats library?
<adam12> thegunbuster: tbh, not super familiar with stats, so I'd probably defer any answer.
<thegunbuster> All I planned right now is RNGs, Distributions and a Hypothesis (A-B testing) module
moei has quit [Quit: Leaving...]
karmatr0n has joined #ruby
<thegunbuster> Got it.
moeabdol has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<thegunbuster> well guys, if you do get any ideas feel free to open an issue at https://github.com/vaibhav-y/statistical
<thegunbuster> I'll head to sleep, G'night!
thegunbuster has quit [Quit: Leaving]
ur5us has joined #ruby
KCmetro has quit [Remote host closed the connection]
KCmetro has joined #ruby
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
moei has joined #ruby
hahuang62 has joined #ruby
codecop has joined #ruby
joonty has joined #ruby
mattwashere has quit [Remote host closed the connection]
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwashere has joined #ruby
ta_ has joined #ruby
madgen has joined #ruby
rkazak has joined #ruby
maucar has quit [Quit: Leaving]
mattwashere has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 252 seconds]
mynameisbrian has joined #ruby
<mynameisbrian> is it uncommon to have an instance attribute as an array?
skade has joined #ruby
<mynameisbrian> I wanted to do: obj.prop = 'hello' and then 'hello' gets pushed onto the array
<smathy> Only when something else would make more sense.
<mynameisbrian> what about that setter syntax? Or is a method to add onto the array more common?
yfeldblum has joined #ruby
<mynameisbrian> because then there would be no way to delete, and so I would have to provide a method for this
<smathy> Overriding `prop=` to mean `prop <<` is a terrible API cludge.
mshowman_ has joined #ruby
<mynameisbrian> I have a list of folders I want to generate, so I'm just trying to think of the best way to store the folder names
spudowiar has quit [Read error: No route to host]
ramfjord has joined #ruby
mshowman has quit [Ping timeout: 264 seconds]
mattwashere has joined #ruby
YaknotiS has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
YaknotiS has joined #ruby
mooru has quit [Ping timeout: 260 seconds]
spudowiar has joined #ruby
Wixy has joined #ruby
Mattx has quit [Disconnected by services]
Wixy is now known as Mattx
johnmilton has joined #ruby
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has quit [Quit: WeeChat 1.5]
gfvcastro has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
rkazak has quit [Ping timeout: 272 seconds]
SilverKey has quit [Read error: Connection reset by peer]
dikaio has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
yardenbar has joined #ruby
RegulationD has quit [Remote host closed the connection]
SilverKey has joined #ruby
ebbflowgo has quit [Read error: Connection reset by peer]
mattwashere has quit [Remote host closed the connection]
Tachikomas has joined #ruby
ebbflowgo has joined #ruby
gfvcastro has quit [Client Quit]
albedoa has joined #ruby
mattwashere has joined #ruby
karmatr0n has quit [Ping timeout: 264 seconds]
roamingdog has quit [Remote host closed the connection]
moeabdol has joined #ruby
roamingdog has joined #ruby
cdg has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
<imperator> jhass, thanks
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tachikomas has quit [Remote host closed the connection]
ruby[bot] has quit [Remote host closed the connection]
Macaveli has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
ruby[bot] has joined #ruby
roamingd_ has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
schuuu has quit [Quit: Leaving.]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
roamingd_ has quit [Read error: Connection reset by peer]
mistermo_ has joined #ruby
mynameisbrian has quit [Quit: Page closed]
roamingdog has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
blackgoat has joined #ruby
joonty has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
Moosashi has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
spiette has quit [Ping timeout: 244 seconds]
bmurt has joined #ruby
dionysus69 has quit [Remote host closed the connection]
craigp_ has joined #ruby
dionysus69 has joined #ruby
SilverKey has quit [Quit: Halted.]
chip_ has quit [Ping timeout: 260 seconds]
codecop has quit [Remote host closed the connection]
spiette has joined #ruby
yardenbar has quit [Ping timeout: 276 seconds]
Rickmast_ has quit [Ping timeout: 246 seconds]
blaxter has joined #ruby
blaxter has quit [Client Quit]
RegulationD has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
evansbee has joined #ruby
solars has quit [Ping timeout: 244 seconds]
johnmilton has quit [Ping timeout: 264 seconds]
diegoaguilar has joined #ruby
ornerymoose has joined #ruby
synthroid has quit []
snebel has joined #ruby
jgt has joined #ruby
<albedoa> [['a', 1], ['b', 2], ['c', 3]] <— how do i isolate the first elements (['a', 'b', 'c'] or 'abc' for instance)?
ornerymoose has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
evansbee has quit [Ping timeout: 252 seconds]
swills has quit [Ping timeout: 240 seconds]
ornerymoose has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
<snebel> Hi, may be a silly question.. anyway I'm looking for a mechanism to checkout some ruby version and gemfile and have rvm taking that config by default
<snebel> I'm playing right now with .ruby-version and .ruby-gemset
<snebel> but is not working
blackgoat has joined #ruby
<snebel> just created both files in an empty folder..
<snebel> i do ruby --version and nothing the default version is shown..
Moosashi has quit [Quit: Moosashi]
jgt has quit [Ping timeout: 244 seconds]
<snebel> instead of the one that is specifiec on the ruby-version file
noodle has quit [Quit: /quit]
jenrzzz has quit [Ping timeout: 264 seconds]
<Mon_Ouie> albedoa: map(&:first)
<tobiasvl> was just going to suggest the same but with collect
<albedoa> Mon_Ouie thank you
ecksit has joined #ruby
Moosashi has joined #ruby
minimalism has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
johnmilton has joined #ruby
mattwashere has quit [Remote host closed the connection]
solars has joined #ruby
beneggett has joined #ruby
mshowman_ has quit [Quit: Textual IRC Client: www.textualapp.com]
ChiefAlexander has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<albedoa> Mon_Ouie is there a way to use the & operator for procs with more than one argument, such as: sort_by { |k, v| v }
brian_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chris2 has quit [Read error: No route to host]
yfeldblum has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
brian_ has quit [Client Quit]
<norc> albedoa, you could write your own method on Symbol that implements it.
jord-n has joined #ruby
Moosashi has quit [Quit: Moosashi]
<albedoa> sort_by(&:last) works
<scorphus> how do I expect(an_element) to be_included_in an_array?
beneggett has joined #ruby
<norc> albedoa, https://eval.in/592337
<norc> example code included.
<albedoa> sweet thanks
symm- has quit [Ping timeout: 252 seconds]
brian_ has joined #ruby
<Mon_Ouie> albedoa: That proc actually gets called with only one argument, which happens to be an array. That |k, v| syntax, which makes it look like there are two arguments, extracts the first and second element from the array.
<norc> scorphus, expect(ary).to include(1) ?
mwlang has joined #ruby
<norc> scorphus, note that it works on any object that responds to #include?
<scorphus> quite that, norc, but the other way around
<albedoa> Mon_Ouie gotcha, thanks. now i understand why my solution worked :D
<norc> scorphus, what do you mean?
<scorphus> so it should read expect([opt1, opt2, opt3) to include testing_method("test_string")
<scorphus> I mean, testing_method is the one method I'm writing this test for
<scorphus> s/opt3/opt3]/ sorry
<norc> scorphus, you can simply use enumerable
<norc> scorphus, mmm
rodfersou has quit [Quit: leaving]
<norc> scorphus, you dont have to put the subject into the expect()
<scorphus> expected = [this_one, that_one, or_another]
<norc> scorphus, rspec does not have such a matcher built in that I am aware of
* scorphus goes looking for enumerable
ecksit has quit [Quit: Textual IRC Client: www.textualapp.com]
<norc> scorphus, how do opt1, opt2 and opt3 relate to testing_method ?
<scorphus> they are possible return values
<scorphus> either of them are acceptable returns
<norc> scorphus, then test against the one you expect the method to return.
<norc> Given some input the method should behave predictably. If there is a random component, use seeds and mocks to enforce it.
<norc> Otherwise you have a case where a test might sometimes fail depending on what it returns.
FooMunki has quit [Quit: FooMunki]
<scorphus> got what you mean, norc
<scorphus> thanks! :)
FooMunki has joined #ruby
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruby-lang367 has quit [Ping timeout: 250 seconds]
wolffles has quit [Quit: wolffles]
wrkrcoop has joined #ruby
ICantCook has quit [Read error: Connection reset by peer]
ICantCook has joined #ruby
Ranoppinsky has joined #ruby
dikaio has joined #ruby
Rodya_ has joined #ruby
Ranoppinsky has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
danostrowski has joined #ruby
chris2 has joined #ruby
brian_ has quit [Read error: Connection reset by peer]
ldnunes has quit [Quit: Leaving]
jhass changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.3.1; 2.2.5; 2.1.9: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || logs @ http://irclog.whitequark.org/ruby/
brian_ has joined #ruby
karmatr0n has joined #ruby
mjal has joined #ruby
schmoot- has quit [Quit: ZNC - http://znc.in]
ornerymoose has quit [Read error: Connection reset by peer]
ornerymoose has joined #ruby
jgt has joined #ruby
<wrkrcoop> what is the point of rack?
<lupine> servlets
<lupine> wsgi
<lupine> etc
<chris2> total waste of time ;)
<norc> wrkrcoop, play around with rack middleswares to find out whats so nice about it.
<wrkrcoop> norc: so is it just middleware?
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
AlexRussia has quit [Ping timeout: 276 seconds]
<norc> wrkrcoop, well rack itself is just an interface.
<lupine> it's a repeated pattern for a reason
<wrkrcoop> does rails use rack?
<lupine> since 2.3
<norc> wrkrcoop, yes. and so does sinatra.
snebel has quit [Quit: Leaving]
<lupine> bloody stupid rails
<wrkrcoop> norc: interesting
<lupine> (I had a rack organiser application. needless to say, a new toplevel Rack constant was not welcome)
<lupine> arrogating new toplevel names should be a major, not minor, version change
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<wrkrcoop> what is the value of rake? why not just create a method that runs the code that would be in a rake task?
<adaedra> you're taking your rails gemfile line by line and asking the value of each line?
Rodya_ has quit [Remote host closed the connection]
<lupine> rake can always be replaced with make
jmignault has quit [Ping timeout: 240 seconds]
<lupine> and arguably should be
<adaedra> well, except if you need, you know, ruby.
* lupine got to cope with a C project with a file-rules-based rakefile for building it once
<lupine> make can always shell out to a ruby script in the very rare occasion where you might actually need ruby
<lupine> which is ~0% of the time
<adaedra> of course, because your use case is our use case.
<lupine> preference != requirement
<lupine> (I'm trolling a bit, I don't actually like make that much)
ornerymoose has quit [Ping timeout: 252 seconds]
diegoviola has quit [Quit: WeeChat 1.5]
beneggett has joined #ruby
ICantCook has quit [Ping timeout: 244 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<norc> wrkrcoop, the best way to recognize the value of a particular part is to interact with it enough until you get a feeling for it.
<wrkrcoop> norc: why can’t u just tell me the value
<norc> wrkrcoop, because no matter what I tell you its gonna be biased.
<wrkrcoop> norc: i see
<norc> And you won't know any better other than to quote someone who said something on some IRC channel
mikecmpbll has joined #ruby
<norc> who may or may not be a complete dork.
skweek has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
aupadhye has quit [Quit: Leaving]
oryman has joined #ruby
ornerymoose has joined #ruby
norc has quit [Read error: Connection reset by peer]
symm- has joined #ruby
moeabdol has joined #ruby
ledestin has joined #ruby
Moosashi has joined #ruby
Pumukel has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
mjal has quit [Quit: Saliendo]
emiltin has quit [Quit: Computer has gone to sleep.]
GodFather has joined #ruby
roamingdog has joined #ruby
imperator has quit [Quit: Leaving]
brian_ has quit [Ping timeout: 272 seconds]
banister has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
d0nn1e has quit [Ping timeout: 276 seconds]
Moosashi has quit [Ping timeout: 240 seconds]
d0nn1e has joined #ruby
oryman has quit [Quit: Leaving]
oryman has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
Rodya_ has joined #ruby
agentmeerkat has quit [Ping timeout: 244 seconds]
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sashimi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gettalong has left #ruby [#ruby]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
oryman has quit [Client Quit]
bkxd has joined #ruby
jooni has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
Moosashi has joined #ruby
jord-n has quit [Ping timeout: 244 seconds]
SilverKey has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jord-n has joined #ruby
palms has quit [Ping timeout: 258 seconds]
albedoa has left #ruby ["Textual IRC Client: www.textualapp.com"]
ChiefAlexander has joined #ruby
ChiefAlexander has quit [Client Quit]
jackjackdripper has joined #ruby
ruby-lang147 has joined #ruby
SilverKey has quit [Client Quit]
gnufied has quit [Quit: Leaving]
dhollinger has quit [Quit: WeeChat 1.5]
mradmacher has quit [Quit: WeeChat 0.4.2]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 246 seconds]
Masstodon has joined #ruby
jrafanie has quit [Ping timeout: 258 seconds]
moeabdol has joined #ruby
Masstodon has quit [Client Quit]
lalalaaa has quit [Ping timeout: 252 seconds]
Masstodon has joined #ruby
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aegis3121 has quit [Ping timeout: 250 seconds]
TomyLobo has quit [Ping timeout: 260 seconds]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brian has joined #ruby
danostrowski has joined #ruby
brian is now known as Guest62079
aeterne has joined #ruby
febuiles has joined #ruby
agit0 has joined #ruby
snath has quit [Ping timeout: 260 seconds]
nullwarp has quit [Quit: ZNC - http://znc.in]
ornerymoose has quit [Read error: Connection reset by peer]
spiette has quit [Ping timeout: 260 seconds]
moeabdol has quit [Quit: WeeChat 1.4]
nankyokusei has joined #ruby
CJKinni` has quit [Read error: Connection reset by peer]
CJKinni` has joined #ruby
mattwashere has joined #ruby
hahuang62 has quit [Ping timeout: 260 seconds]
symm- has quit [Ping timeout: 246 seconds]
smathy has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
kareeoleez has quit [Remote host closed the connection]
BugBlatter has joined #ruby
febuiles has quit [Quit: febuiles]
pontiki has joined #ruby
lalalaaa has joined #ruby
jaguarmagenta has joined #ruby
CJKinni` has quit [Read error: Connection reset by peer]
programmerq has quit [Ping timeout: 240 seconds]
KCmetro has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
jaguarmagenta has quit [Ping timeout: 276 seconds]
jooni has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
jei2 has joined #ruby
jhack has joined #ruby
snath has joined #ruby
madgen has quit [Ping timeout: 250 seconds]
mattwashere has quit []
Dimik has joined #ruby
Gasher has quit [Quit: Leaving]
polishdub has quit [Quit: Leaving]
zenlot6 has joined #ruby
zenlot has quit [Ping timeout: 258 seconds]
wixad_ has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
<wixad_> hi ppl
<wixad_> when is it good to use getoptlong and optionsparser?
sepp2k has quit [Quit: Leaving.]
GodFather has quit [Ping timeout: 260 seconds]
<jhass> for the cases where you don't want to install slop, obviously
<wixad_> does that mean both have the same functionality?
gfvcastro has joined #ruby
SilverKey has joined #ruby
programmerq has joined #ruby
GodFather has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
Wsewolod has joined #ruby
Sammichmaker has joined #ruby
SilverKey has quit [Client Quit]
evansbee has joined #ruby
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
skweek has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
evansbee has quit [Ping timeout: 260 seconds]
sarlalian has quit [Ping timeout: 272 seconds]
Moosashi has quit [Quit: Moosashi]
sarlalian has joined #ruby
gfvcastro has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
febuiles has joined #ruby
agent_white has quit [Quit: headin' home]
spider-mario has quit [Remote host closed the connection]
boogeyman has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Ping timeout: 276 seconds]
zacts has quit [Quit: WeeChat 1.5]
boogeyman has joined #ruby
prestorium has quit [Quit: Leaving]
sdwrage has joined #ruby
zacts has joined #ruby
ornerymoose has joined #ruby
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
SilverKey has joined #ruby
rcvalle has quit [Quit: rcvalle]
mtkd has quit [Ping timeout: 260 seconds]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #ruby
mtkd has joined #ruby
replay has quit []
danostrowski has joined #ruby
mistermo_ has quit [Remote host closed the connection]
moos3 has quit [Ping timeout: 244 seconds]
tmi1 has quit [Ping timeout: 260 seconds]
amclain has quit [Read error: Connection reset by peer]
<zacts> hello rubyists
Rickmasta has quit [Ping timeout: 244 seconds]
amclain has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
Rickmasta has joined #ruby
xall_ has quit [Ping timeout: 264 seconds]
SCHAAP137 has joined #ruby
SCHAAP137 has quit [Changing host]
SCHAAP137 has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
<jhass> hello zacts
Moosashi has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper2 has joined #ruby
jackjackdripper2 has quit [Read error: Connection reset by peer]
jackjackdripper3 has joined #ruby
Moosashi has quit [Client Quit]
Rickmasta has quit [Ping timeout: 240 seconds]
tomchapin has joined #ruby
Masstodon has left #ruby [#ruby]
<zacts> yo yo
AcidCrash0x00 has joined #ruby
<zacts> jhass are you a contributor to diaspora?
<jhass> yes
<zacts> I saw your nick in a commit I think, I'm wanting to learn more about the project
<zacts> is there a good channel to chat about it?
<jhass> well, #diaspora ;)
jackjackdripper has quit [Ping timeout: 260 seconds]
AcidCrash has quit [Ping timeout: 252 seconds]
Rickmasta has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
Moosashi has joined #ruby
Moosashi has quit [Client Quit]
diegoaguilar has joined #ruby
<smathy> lulz
larsss has joined #ruby
jackjackdripper3 has quit [Quit: Leaving.]
<zacts> jhass: heh, indeed. I guess I meant for a development chat. sorry. :-D
Rickmasta has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
replay has joined #ruby
Rickmasta has joined #ruby
Xiti has quit [Ping timeout: 264 seconds]
tmi1 has joined #ruby
<wixad_> thx smathy
<smathy> Np.
BugBlatter has quit [Remote host closed the connection]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
last_staff has quit [Quit: last_staff]
toblogan has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
Vile` has joined #ruby
toblogan has quit [K-Lined]
mistermo_ has joined #ruby
toblogan has joined #ruby
toblogan has quit [Max SendQ exceeded]
SilverKey has quit [Quit: Halted.]
toblogan has joined #ruby
toblogan has quit [Max SendQ exceeded]
SilverKey has joined #ruby
edwardly has quit [Ping timeout: 258 seconds]
diegoaguilar has quit [Remote host closed the connection]
toblogan has joined #ruby
toblogan has quit [Max SendQ exceeded]
toblogan has joined #ruby
toblogan has quit [Max SendQ exceeded]
lightt has joined #ruby
KCmetro has joined #ruby
ICantCook has joined #ruby
arlek has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
ocbtec has quit [Quit: leaving]
jetpackjoe has quit [Quit: WeeChat 1.5]
jetpackjoe has joined #ruby
firstdayonthejob has quit [Ping timeout: 260 seconds]
koooge has joined #ruby
Guest38_ has quit [Read error: Connection reset by peer]
toblogan has joined #ruby
toblogan has quit [Max SendQ exceeded]
jhack has quit [Quit: jhack]
saneax is now known as saneax_AFK
jgt has quit [Ping timeout: 240 seconds]
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
boogeyman has quit [Quit: bb]
Moosashi has joined #ruby
cbyrda has joined #ruby
agentmeerkat has joined #ruby
Xiti has joined #ruby
SilverKey has quit [Quit: Halted.]
danostrowski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rkazak has joined #ruby
<ruby-lang147> is the michael hartl book good? I need to learn ruby...already know python, c, etc..
Moosashi has quit [Ping timeout: 276 seconds]
saneax_AFK is now known as saneax
agentmeerkat has quit [Ping timeout: 250 seconds]
banister has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
wrkrcoop has quit [Quit: wrkrcoop]
<xybre> That's a Rails book, ruby-lang147.
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dikaio has joined #ruby
biberu has quit []