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/
dminuoso has joined #ruby
airdisa has quit []
JeanCarloMachado has joined #ruby
equivalent8_ has quit [Ping timeout: 250 seconds]
Jayson_Virissimo has quit []
macsteps has quit [Remote host closed the connection]
VA3VNA has joined #ruby
dminuoso has quit [Ping timeout: 244 seconds]
astrobun_ has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
voxxit has quit [Ping timeout: 240 seconds]
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
astrobun_ has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
astrobun_ has joined #ruby
voxxit has joined #ruby
sdothum has joined #ruby
blackmesa has joined #ruby
sdothum has quit [Client Quit]
astrobun_ has quit [Ping timeout: 250 seconds]
sdothum has joined #ruby
ElFerna has joined #ruby
astrobun_ has joined #ruby
roflmyeggo has quit [Ping timeout: 252 seconds]
astrobun_ has quit [Remote host closed the connection]
AzureStigma has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 276 seconds]
zach2825 has quit [Quit: Leaving]
Es0teric has joined #ruby
blackgoat has quit [Ping timeout: 240 seconds]
hipertracker has quit [Quit: hipertracker]
nando293921 has joined #ruby
pwnd_nsfw` has joined #ruby
s2013 has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
macsteps has joined #ruby
s2013 has quit [Client Quit]
pwnd_nsfw has quit [Ping timeout: 260 seconds]
wrkrcoop has joined #ruby
passbe has joined #ruby
wrkrcoop has left #ruby [#ruby]
<croberts> in this example irb(main):008:0> File::readable? ("/etc/http/conf.d/ssl.conf")
<croberts> is file the object and readable the method?
byteflame has joined #ruby
VA3VNA has quit [Quit: Leaving]
<baweaver> &ri File
<drbrain> croberts: yes
killerkamel has quit [Ping timeout: 260 seconds]
<drbrain> croberts: people don't often use `::` for method calls anymore, usually File.readable?(…)
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<croberts> drbrain: thank you i will use the . instead
nankyokusei has joined #ruby
toretore has quit [Ping timeout: 258 seconds]
saneax is now known as saneax_AFK
rajdesai has joined #ruby
killerkamel has joined #ruby
marr has quit [Ping timeout: 260 seconds]
byteflame has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 265 seconds]
rajdesai has quit [Ping timeout: 258 seconds]
replay has quit []
nando293921 has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
aeterne has joined #ruby
byteflame has joined #ruby
ElFerna has quit [Ping timeout: 260 seconds]
dell has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
Spami has quit [Quit: This computer has gone to sleep]
nerium has quit [Quit: nerium]
howdoi has quit [Quit: Connection closed for inactivity]
rcvalle has quit [Quit: rcvalle]
ensyde has quit [Ping timeout: 258 seconds]
macsteps has quit [Remote host closed the connection]
byteflame has quit [Ping timeout: 244 seconds]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zotherst1 has joined #ruby
zotherstupidguy has quit [Ping timeout: 264 seconds]
SilverKey has joined #ruby
roflmyeggo has joined #ruby
sarbs has quit [Ping timeout: 258 seconds]
dminuoso has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jaguarmagenta has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 240 seconds]
sarbs has joined #ruby
kavanagh has quit [Quit: That's all folks!]
sumobob has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
A_Drone has joined #ruby
JeanCarloMachado has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
Axy has joined #ruby
blackmesa has joined #ruby
Mia has quit [Ping timeout: 250 seconds]
davedev24 has quit [Remote host closed the connection]
blackgoat has joined #ruby
ElFerna has joined #ruby
killerkamel has quit [Ping timeout: 240 seconds]
elifoster has joined #ruby
Ropeney has joined #ruby
_djbkd has quit [Quit: My people need me...]
davedev24 has joined #ruby
ensyde has joined #ruby
spudowiar has quit [Quit: gtg sleepz]
blackmesa has quit [Ping timeout: 258 seconds]
postmodern has quit [Ping timeout: 250 seconds]
tmtwd has joined #ruby
s2013 has joined #ruby
gusrub has quit [Remote host closed the connection]
A_Drone has quit [Ping timeout: 250 seconds]
ElFerna has quit [Ping timeout: 240 seconds]
dhollinger has quit [Quit: WeeChat 1.5]
qguv has joined #ruby
rajdesai has joined #ruby
A_Drone has joined #ruby
macsteps has joined #ruby
der-landgraf has quit [Quit: WeeChat 1.5]
postmodern has joined #ruby
eljimmy has joined #ruby
A_Drone has quit [Remote host closed the connection]
BrianJ has joined #ruby
rajdesai has quit [Ping timeout: 252 seconds]
dhollinger has joined #ruby
bkxd has joined #ruby
qguv has quit [Quit: bye]
Spami has joined #ruby
qguv has joined #ruby
SteenJobs has joined #ruby
davedev24 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 258 seconds]
<SteenJobs> hey all - i need to build a web scraper for a page with about 4000 rows that are lazy loaded - what tools would i need to overcome the lazy loading bit?
<SteenJobs> slash if you have any good blogs/articles/etc i’ll gladly take those
RegulationD has joined #ruby
<baweaver> Look for their official API
<baweaver> if they don't have one, they probably don't want you scraping.
freerobby has quit [Quit: Leaving.]
JeanCarloMachado has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
dell has quit [Ping timeout: 260 seconds]
<SteenJobs> baweaver: it’s not one of those cases…it’s a simple site that just lists tons of rows of vendors for some sort of event, which someone needs to copy and paste by hand into a csv - so instead i’m writing them a script to do it
qguv has quit [Quit: bye]
dell has joined #ruby
johnmilton has quit [Ping timeout: 252 seconds]
<SteenJobs> baweaver: seems like my best bet is to use capybara and just execute a scroll. although i know nothing about capybara so gotta read up on it - like how to know once the data is loaded, etc. so i can begin parsing
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qguv has joined #ruby
<SteenJobs> i guess i can just have a while loop that checks the number of rows against some value, and exits the loop once they match
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
dminuoso has joined #ruby
jaguarmagenta has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
<drbrain> SteenJobs: figure out what request brings in more rows and reqeusts that directly
marxarelli is now known as marxarelli|afk
Dysp has quit [Ping timeout: 250 seconds]
<SteenJobs> drbrain: right - so i tried doing that, and i found the request, but when i ran it i didn’t get any of the contents. i expected a JSON response (on top of that, it specifies the row range, so i figured if i set it to the maximum range, i’d get the entire response)
<drbrain> if you have Chrome, does the inspector's copy to curl give the subset you want?
<drbrain> if so, it's a good start for converting that to ruby
dminuoso has quit [Ping timeout: 276 seconds]
<SteenJobs> drbrain: :). so it gave me a pretty verbose curl, and it worked once…but when i ran it again it didn’t work. problem is i need it to be a repeatable, user friendly script, so can’t have the person using it copy and pasting from chrome’s inspector
<drbrain> maybe there's some session magic going on
<drbrain> bleh
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
gregf has quit [Quit: WeeChat 1.4]
gregf has joined #ruby
<SteenJobs> drbrain: that’s what i figured, based on the ten million headers in the copied curl. but great thinking. that’s where capybara comes in, seems to simulate whatever session magic is going on
<SteenJobs> i think...tbd
jdawgaz has joined #ruby
<drbrain> hopefully
<SteenJobs> drbrain: ok, test 1 worked - used capybara to load the page, then turned the html into a nokogiri object, and was able to get the first relevant row
<SteenJobs> drbrain: so all i need to do is execute a scroll with some vanilla js, and then parse all the rows. the only tricky part is what i mentioned re somehow knowing once all the rows have finished loading.
* drbrain nods
johnmilton has joined #ruby
leea has joined #ruby
qguv has quit [Quit: bye]
<SteenJobs> :) a nod is all the confirmation i needed
qguv has joined #ruby
killerkamel has joined #ruby
blackmesa has joined #ruby
blackgoat has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Ping timeout: 244 seconds]
blackgoat has joined #ruby
killerkamel has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
Sucks has joined #ruby
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
scott_o has joined #ruby
killerkamel has joined #ruby
cd-rum has joined #ruby
Sucks has quit [Excess Flood]
ec0 has quit [Ping timeout: 250 seconds]
Sucks has joined #ruby
nankyokusei has joined #ruby
tmtwd has quit [Ping timeout: 276 seconds]
A_Drone has quit [Ping timeout: 250 seconds]
blandflakes has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
svkurowski has quit [Ping timeout: 252 seconds]
nankyokusei has quit [Ping timeout: 265 seconds]
A_Drone has joined #ruby
rajdesai has joined #ruby
d5sx43 has joined #ruby
eljimador has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
rajdesai has quit [Ping timeout: 252 seconds]
tmtwd has joined #ruby
A_Drone has joined #ruby
RegulationD has joined #ruby
nocd has quit [Read error: Connection reset by peer]
RegulationD has quit [Ping timeout: 244 seconds]
d5sx43 has quit []
dell has quit [Ping timeout: 260 seconds]
dell has joined #ruby
passbe has quit [Ping timeout: 264 seconds]
svkurowski has joined #ruby
alfiemax has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
amclain has quit [Quit: Leaving]
Devalo has joined #ruby
dminuoso has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
Devalo has quit [Ping timeout: 264 seconds]
jaguarma_ has joined #ruby
braincrash has quit [Quit: bye bye]
toretore has joined #ruby
jaguarmagenta has quit [Ping timeout: 240 seconds]
dminuoso has quit [Ping timeout: 258 seconds]
blackgoat has quit [Ping timeout: 265 seconds]
tubuliferous has joined #ruby
edwardly has quit [Ping timeout: 252 seconds]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
aeterne has quit [Read error: Connection reset by peer]
meatchicken has joined #ruby
<meatchicken> rspec - expected: #<ActiveRecord::Relation []>
<meatchicken> got: #<ActiveRecord::Relation []>
<meatchicken> (compared using ==)
tmtwd has quit [Ping timeout: 260 seconds]
<meatchicken> anyone know why this might be the case?
meinside has joined #ruby
zacts has joined #ruby
bkxd has joined #ruby
JesseH has quit [Quit: Leaving]
macsteps has quit [Remote host closed the connection]
P_R_Deltoid has joined #ruby
bkxd has quit [Ping timeout: 258 seconds]
<P_R_Deltoid> Is there a common practice on where I should place a majority of my source files in my projects directory?
<P_R_Deltoid> like /src or something?
tmtwd has joined #ruby
yfeldblum has quit [Remote host closed the connection]
dell has quit [Remote host closed the connection]
nocd has joined #ruby
blackmesa has joined #ruby
braincrash has joined #ruby
rajdesai has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
roflmyeggo has quit [Ping timeout: 264 seconds]
hahuang61 has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
gdonald has joined #ruby
cdg has joined #ruby
zacts has quit [Ping timeout: 250 seconds]
edwardly has quit [Ping timeout: 252 seconds]
hahuang61 has quit [Ping timeout: 258 seconds]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
A_Drone has quit [Remote host closed the connection]
roflmyeggo has joined #ruby
A_Drone has joined #ruby
pawnbox has quit [Ping timeout: 276 seconds]
dreamyspell has quit [Quit: Leaving]
A_Drone has quit [Remote host closed the connection]
pawnbox has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
jdawgaz has joined #ruby
matp has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
davedev24 has joined #ruby
rajdesai has quit [Remote host closed the connection]
grenierm has joined #ruby
matp has joined #ruby
alfiemax has quit [Ping timeout: 258 seconds]
Vingador has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
Vingador has quit [Read error: Connection reset by peer]
qguv has quit [Quit: bye]
Vingador has joined #ruby
grenierm has quit [Ping timeout: 252 seconds]
A_Drone has joined #ruby
LoneHerm_ has joined #ruby
Vingador has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
matp has quit [Ping timeout: 244 seconds]
tubuliferous has quit [Ping timeout: 244 seconds]
qguv has joined #ruby
yfeldblum has quit [Remote host closed the connection]
sumobob has quit [Ping timeout: 250 seconds]
gix has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
yfeldblum has joined #ruby
qguv has quit [Client Quit]
matp has joined #ruby
qguv has joined #ruby
blackgoat has joined #ruby
dminuoso has joined #ruby
gix has joined #ruby
pawnbox has quit [Ping timeout: 244 seconds]
AndrewIsHere has quit [Remote host closed the connection]
eljimmy has quit [Quit: This computer has gone to sleep]
A_Drone has quit [Remote host closed the connection]
l4v2 has left #ruby [#ruby]
LoneHerm_ has quit [Remote host closed the connection]
kobain has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
dminuoso has quit [Ping timeout: 264 seconds]
A_Drone has joined #ruby
qguv has quit [Ping timeout: 264 seconds]
jaguarma_ has quit [Ping timeout: 258 seconds]
Spami has quit [Ping timeout: 276 seconds]
qguv has joined #ruby
Devalo has joined #ruby
matp has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
matp has joined #ruby
jishankai has joined #ruby
A_Drone has quit [Remote host closed the connection]
Spami has joined #ruby
sylario has quit [Quit: Connection closed for inactivity]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
SilverKey has quit [Quit: Cheerio!]
jaguarmagenta has quit [Ping timeout: 244 seconds]
jaguarmagenta has joined #ruby
Charles_leung has joined #ruby
pawnbox has joined #ruby
craigp has quit [Ping timeout: 260 seconds]
govg has joined #ruby
howdoi has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
yardenbar has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
passbe has joined #ruby
craysiii has joined #ruby
tubuliferous has joined #ruby
vuoto has joined #ruby
pawnbox has quit [Ping timeout: 240 seconds]
craysiii has quit [Client Quit]
saneax_AFK is now known as saneax
RegulationD has joined #ruby
ec0 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
jaguarmagenta has joined #ruby
hk238 has joined #ruby
nankyokusei has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
skweek has joined #ruby
tubuliferous has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
nankyokusei has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
scott_o has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
craysiii has joined #ruby
vuoto has quit [Remote host closed the connection]
craysiii has quit [Client Quit]
octa has joined #ruby
octa has left #ruby [#ruby]
phredus_ has quit [Read error: No route to host]
phredus has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Asher has quit [Ping timeout: 240 seconds]
dminuoso has joined #ruby
syndikate has quit [Ping timeout: 252 seconds]
AndrewIsHere has joined #ruby
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
jaguarmagenta has joined #ruby
sepp2k has joined #ruby
LoneHerm_ has joined #ruby
dminuoso has quit [Ping timeout: 240 seconds]
AndrewIsHere has quit [Ping timeout: 250 seconds]
dminuoso has joined #ruby
der-landgraf has joined #ruby
roflmyeggo has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
Asher has joined #ruby
Puffball has quit [Remote host closed the connection]
dminuoso has quit [Ping timeout: 258 seconds]
bkxd has joined #ruby
Es0teric has joined #ruby
Puffball has joined #ruby
Asher has quit [Ping timeout: 240 seconds]
jaguarma_ has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
craigp has joined #ruby
jaguarmagenta has quit [Ping timeout: 260 seconds]
dennisvennink has quit [Read error: Connection reset by peer]
dennisvennink has joined #ruby
A_Drone has joined #ruby
Asher has joined #ruby
skweek has quit [Ping timeout: 276 seconds]
Takumo has quit [Ping timeout: 276 seconds]
duncannz has joined #ruby
Takumo has joined #ruby
Takumo has quit [Changing host]
Takumo has joined #ruby
hahuang61 has joined #ruby
blackmesa has joined #ruby
yardenbar has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
eggoez has quit [Ping timeout: 258 seconds]
arescorpio has quit [Quit: Leaving.]
djbkd_ has joined #ruby
RegulationD has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
bitnap has joined #ruby
<bitnap> So in ruby is everyting an object?
russt has quit [Ping timeout: 258 seconds]
tubuliferous has joined #ruby
raeoks has joined #ruby
hahuang61 has quit [Ping timeout: 250 seconds]
LoneHerm_ has quit [Ping timeout: 276 seconds]
russt has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 258 seconds]
eggoez has joined #ruby
jaguarmagenta has joined #ruby
tubuliferous has quit [Ping timeout: 250 seconds]
tachikomas has joined #ruby
tachikomas has quit [Client Quit]
tachikomas has joined #ruby
jaguarma_ has quit [Ping timeout: 264 seconds]
grenierm has joined #ruby
alfiemax has joined #ruby
jondot has joined #ruby
ecnalyr has joined #ruby
diegoviola has quit [Quit: WeeChat 1.5]
ruby-lang169 has joined #ruby
<ruby-lang169> hey everyone
<ruby-lang169> would anyone be able to help with a web scraping question
ruby910 has joined #ruby
astrobun_ has joined #ruby
<tachikomas> Just ask ;)
ruby-lang169 has quit [Client Quit]
ruby-lang957 has joined #ruby
<ruby-lang957> oops just left the site a moment ago
<ruby-lang957> I'm just a little confused with how to deal with a redirect I thought tools like Mechanizer automatically dealt with those sorts of things
ecnalyr has quit [Ping timeout: 244 seconds]
dminuoso has joined #ruby
<ruby-lang957> in the dictionary site here, the query parameter for the word I want to look up (in this case, the word "effect") is passed but the problem is the site redirects to this
<ruby-lang957> how can I make a web scraper follow that redirect? The page I want to obtain content from is the latter, not the former
ruby910 has quit [Ping timeout: 250 seconds]
jaguarma_ has joined #ruby
davedev24 has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
dionysus69 has joined #ruby
minotep has joined #ruby
<PickAndMix> Hi guys, For 'before_action :method, only [:show, :edit, :update, :destroy]' statement, does it means that
last_staff has joined #ruby
<PickAndMix> example, def show; end, would call the ':method' method before calling 'show'?
jaguarmagenta has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
jaguarma_ has quit [Ping timeout: 260 seconds]
dminuoso has quit [Read error: Connection reset by peer]
TomyLobo has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
pwnd_nsfw` has quit [Ping timeout: 244 seconds]
Sucks has quit [Quit: Leaving]
xcesariox has joined #ruby
dminuoso has joined #ruby
elifoster has quit [Ping timeout: 250 seconds]
jondot has quit [Ping timeout: 258 seconds]
tmtwd has quit [Ping timeout: 265 seconds]
redy has joined #ruby
T2ya has quit [Ping timeout: 240 seconds]
dminuoso_ has joined #ruby
dminuoso has quit [Quit: Reconnecting]
eljimmy has joined #ruby
eljimmy has quit [Remote host closed the connection]
ponga has joined #ruby
Tack has joined #ruby
tachikomas has quit [Ping timeout: 240 seconds]
pawnbox has quit [Read error: Connection reset by peer]
Tack has quit [Client Quit]
tachikomas has joined #ruby
elifoster has joined #ruby
pawnbox has joined #ruby
bocaneri has joined #ruby
Jerrry has joined #ruby
skweek has joined #ruby
dionysus69 has quit [Ping timeout: 250 seconds]
dminuoso has joined #ruby
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
pwnd_nsfw has joined #ruby
dminuoso_ has quit [Ping timeout: 250 seconds]
Mia has joined #ruby
Axy has quit [Ping timeout: 244 seconds]
SteenJobs has quit [Quit: SteenJobs]
blackmesa has joined #ruby
yfeldblum has joined #ruby
firstdayonthejob has joined #ruby
tubuliferous has joined #ruby
SteenJobs has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
craysiii has joined #ruby
nankyokusei has joined #ruby
TomyLobo has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
hipertracker has joined #ruby
jondot has quit [Read error: Connection reset by peer]
jondot1 has joined #ruby
harfangk has joined #ruby
jondot1 has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
djbkd_ has quit [Remote host closed the connection]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
tubuliferous has quit [Ping timeout: 258 seconds]
jondot has joined #ruby
jondot has quit [Max SendQ exceeded]
nankyokusei has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 250 seconds]
argaman has joined #ruby
Hyuk has joined #ruby
weemsledeux has joined #ruby
pawnbox has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
A_Drone has joined #ruby
<Radar> PickAndMix: yes
<Radar> ?rails PickAndMix
<ruby[bot]> PickAndMix: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
pawnbox has joined #ruby
minotep has quit [Quit: minotep]
dminuoso has quit [Remote host closed the connection]
Charles_leung has quit [Ping timeout: 264 seconds]
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
P_R_Deltoid has quit [Quit: Leaving]
argaman has quit [Ping timeout: 258 seconds]
ta_ has quit [Remote host closed the connection]
blaxter has joined #ruby
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anisha has joined #ruby
Macaveli has joined #ruby
dminuoso has joined #ruby
dionysus69 has joined #ruby
craysiii has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
matp has quit [Remote host closed the connection]
argaman has joined #ruby
Beast has joined #ruby
AndrewIsHere has joined #ruby
aufi has joined #ruby
elifoster has quit [Quit: sleep]
govg has quit [Ping timeout: 244 seconds]
argaman has quit [Ping timeout: 244 seconds]
govg has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
Ishido has joined #ruby
AndrewIsHere has quit [Ping timeout: 244 seconds]
bdknls has joined #ruby
daffy_duck_2 has quit [Ping timeout: 244 seconds]
gdonald has quit [Read error: Connection reset by peer]
Hyuk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
gdonald has joined #ruby
Hyuk has joined #ruby
ruby-lang957 has quit [Ping timeout: 250 seconds]
sebstrax has joined #ruby
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
symm- has quit [Ping timeout: 250 seconds]
bkxd has quit [Ping timeout: 258 seconds]
phantummmm has quit [Quit: WeeChat 1.5]
daffy_duck_2 has joined #ruby
mark_66 has joined #ruby
xall has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby
ecnalyr has joined #ruby
A_Drone has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aganov has joined #ruby
RegulationD has joined #ruby
hahuang61 has quit [Ping timeout: 265 seconds]
ecnalyr has quit [Ping timeout: 244 seconds]
tax has quit [Ping timeout: 258 seconds]
MarkBilk__ has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 244 seconds]
hipertracker has quit [Quit: hipertracker]
blackmesa has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
tax has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
Snowy has joined #ruby
last_staff1 has joined #ruby
redy has quit [Ping timeout: 260 seconds]
blackgoat has quit [Ping timeout: 276 seconds]
Emmanuel_Chanel has joined #ruby
grenierm has quit [Quit: grenierm]
last_staff has quit [Ping timeout: 240 seconds]
last_staff1 is now known as last_staff
senayar has joined #ruby
A_Drone has joined #ruby
elaptics`away is now known as elaptics
davedev24 has joined #ruby
tax has quit [Ping timeout: 260 seconds]
antgel has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
Silthias has joined #ruby
CloCkWeRX has quit [Remote host closed the connection]
phredus has quit [Ping timeout: 240 seconds]
the_drow has joined #ruby
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
Pupeno has joined #ruby
pawnbox has joined #ruby
joonty has joined #ruby
ec0 has quit [Remote host closed the connection]
tax has joined #ruby
millerti has quit [Ping timeout: 244 seconds]
xall has joined #ruby
aryaching has joined #ruby
raeoks has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
drahosj_ has joined #ruby
jaruga____ has quit [Ping timeout: 265 seconds]
drahosj has quit [Ping timeout: 276 seconds]
jud has quit [Read error: Connection reset by peer]
mim1k has joined #ruby
helpa-bot has joined #ruby
jud has joined #ruby
HammyJammy has joined #ruby
helpa has quit [Read error: Connection reset by peer]
joonty has quit [Quit: This computer has gone to sleep]
bkxd has joined #ruby
joonty has joined #ruby
d0nn1e has quit [Ping timeout: 260 seconds]
helpa-bot has quit [Remote host closed the connection]
astrobunny has quit [Read error: Connection reset by peer]
helpa has joined #ruby
kireevco has quit [Ping timeout: 258 seconds]
Tony-St4rk has quit [Ping timeout: 258 seconds]
HashNuke has quit [Ping timeout: 258 seconds]
tax has quit [Excess Flood]
ewilliam has quit [Ping timeout: 250 seconds]
astrobunny has joined #ruby
JackMc has quit [Ping timeout: 258 seconds]
watersoul_ has joined #ruby
NightMonkey has quit [Ping timeout: 264 seconds]
mmasaki has quit [Ping timeout: 264 seconds]
AnoHito has quit [Read error: Connection reset by peer]
Lewix has quit [Ping timeout: 250 seconds]
Dimik has quit [Ping timeout: 265 seconds]
jhill has quit [Ping timeout: 258 seconds]
JammyHammy has quit [Ping timeout: 258 seconds]
Tony-St4rk has joined #ruby
AnoHito has joined #ruby
ewilliam has joined #ruby
crdpink has quit [Ping timeout: 250 seconds]
TinkerTyper has quit [Ping timeout: 250 seconds]
passbe has quit [Ping timeout: 258 seconds]
orangey has quit [Ping timeout: 258 seconds]
chosen1_ has quit [Read error: Connection reset by peer]
mgorbach has quit [Ping timeout: 264 seconds]
chosen1_ has joined #ruby
anisha has quit [Read error: Connection reset by peer]
der-landgraf has quit [Ping timeout: 240 seconds]
TheMoonMaster has quit [Ping timeout: 240 seconds]
JackMc has joined #ruby
d0nn1e has joined #ruby
Xiti has quit [Read error: Connection reset by peer]
svkurowski has quit [Ping timeout: 258 seconds]
HashNuke has joined #ruby
orangey has joined #ruby
kireevco has joined #ruby
Psi-Jack has quit [Ping timeout: 264 seconds]
astrobun_ has quit [Ping timeout: 258 seconds]
ineb has quit [Ping timeout: 258 seconds]
Xiti has joined #ruby
stan has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
gigetoo_ has joined #ruby
guacamole has quit [Ping timeout: 250 seconds]
watersoul has quit [Ping timeout: 250 seconds]
ponga has quit [Quit: Connection closed for inactivity]
ytti_ has quit [Ping timeout: 258 seconds]
Helheim has quit [Ping timeout: 260 seconds]
jhill has joined #ruby
TheSpectre has quit [Ping timeout: 240 seconds]
theRoUS has quit [Excess Flood]
stan has joined #ruby
ineb has joined #ruby
NightMonkey has joined #ruby
theRoUS has joined #ruby
bkxd has quit [Ping timeout: 265 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo_ is now known as gigetoo
ytti has joined #ruby
greister has quit [Ping timeout: 240 seconds]
mgorbach has joined #ruby
crdpink2 has joined #ruby
Lewix_ has joined #ruby
Lewix_ has quit [Changing host]
Lewix_ has joined #ruby
anisha has joined #ruby
aibot_ has joined #ruby
astrobun_ has joined #ruby
Papierkorb has quit [Ping timeout: 240 seconds]
aibot has quit [Remote host closed the connection]
TheSpectre has joined #ruby
mmasaki has joined #ruby
guacamole has joined #ruby
Psi-Jack has joined #ruby
Papierkorb has joined #ruby
greister has joined #ruby
svkurowski has joined #ruby
tax has joined #ruby
TinkerTyper has joined #ruby
Silthias has quit [Ping timeout: 240 seconds]
Helheim has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
der-landgraf has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
passbe has joined #ruby
hipertracker has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheMoonMaster has joined #ruby
M-shine has joined #ruby
Beast has quit [Quit: Leaving]
raeoks has joined #ruby
Rickmasta has joined #ruby
raeoks has quit [Max SendQ exceeded]
yfeldblum has joined #ruby
nankyokusei has joined #ruby
A_Drone has joined #ruby
CrazyEddy has quit [Ping timeout: 260 seconds]
Pupeno has quit [Remote host closed the connection]
nankyokusei has quit [Ping timeout: 250 seconds]
connor_goodwolf has quit [Ping timeout: 276 seconds]
Guest28131 has quit [Ping timeout: 244 seconds]
connor_goodwolf has joined #ruby
Silthias has joined #ruby
<jhass> mh, I wonder what kind of IPC ruby sets up so that spawn "foo" raises
andikr has joined #ruby
Guest28131 has joined #ruby
LoneHerm_ has joined #ruby
<dminuoso> jhass: None it seems.
Shashikant86 has joined #ruby
<jhass> mh, what am I missing, the execve/execvp has to happen inside a fork, right?
tvw has joined #ruby
Doow has quit [Ping timeout: 250 seconds]
redy has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has quit [Ping timeout: 258 seconds]
<dminuoso> Why do you think an extra fork is needed?
ur5us has quit [Remote host closed the connection]
mim1k has joined #ruby
TheGillies has joined #ruby
drahosj_ has quit [Ping timeout: 260 seconds]
<jhass> execve/execv replace the current process
<jhass> spawn doesn't
drahosj_ has joined #ruby
astrobun_ has quit [Read error: Connection reset by peer]
binaryplease1 has joined #ruby
zotherstupidguy has joined #ruby
zotherst1 has quit [Ping timeout: 260 seconds]
A_Drone has quit [Ping timeout: 250 seconds]
binaryplease has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
<dminuoso> jhass: Huh?
<bitnap> w
Jerrry has quit [Ping timeout: 250 seconds]
<jhass> dminuoso: what's unclear?
<bitnap> Is their a compiler for ruby that compiles?
<dminuoso> bitnap: What are you trying to do?
kp666 has joined #ruby
<bitnap> I'm doing a lot of number processing
<bitnap> And why looking for something faster than the default ruby interpreter
<jhass> maybe you're actually looking for something like http://sciruby.com/
<dminuoso> bitnap: CRuby does not really optimize its code (yet). You can look at JRuby (in particular Truffle/Graal), which offers far greater optimization for algorithmic flow.
submitnine has joined #ruby
<the_drow> Hi guys, I need to increase the connection pool size without overriding configuration. Is that possible to do programatically for all the databases? I tried http://stackoverflow.com/questions/180349/how-can-i-dynamically-change-the-active-record-database-for-all-models-in-ruby-o but it doesn't work. I get timeouts when acquiring connections
<dminuoso> (Though currently most libraries that I know of outsourced the computational heavy code into a C library that can be optimized AOT)
binaryplease1 is now known as binaryplease
<dminuoso> the_drow: ?rails
<dminuoso> ?rails the_drow
<ruby[bot]> the_drow: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<the_drow> ok sorry
<the_drow> Got no answer there... I thought someone might know
<dminuoso> I wanted to buy a Ford, but since there was no salesman at the Ford shop I went to the Renault shop. Why doesn't anyone there want to sell me a Ford?
anisha_ has joined #ruby
<bitnap> Because you can't aford one?
<the_drow> dminuoso, again, I apologise for the spam
anisha has quit [Ping timeout: 260 seconds]
jobat has joined #ruby
<jobat> Morning all.
<davorb> morning
lxsameer has joined #ruby
<bitnap> it's only 4am
A_Drone has joined #ruby
der-landgraf has quit [Quit: WeeChat 1.5]
postmodern has quit [Quit: Leaving]
Chair has joined #ruby
<jhass> process.c is a nightmare
<jhass> https://github.com/ruby/ruby/blob/trunk/process.c#L3257-L3281 that comment clearly doesn't belong to the function directly below
CrazyEddy has joined #ruby
duncannz has quit [Remote host closed the connection]
bitnap is now known as greentree
greentree is now known as wut
<dminuoso> jhass: You haven't looked at the regex parts then.
wut is now known as Guest72895
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pandaant has joined #ruby
Guest72895 is now known as bakwards
hahuang61 has joined #ruby
bdknls has quit [Remote host closed the connection]
mrgrieves has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
RegulationD has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Charles_leung has joined #ruby
hahuang61 has quit [Ping timeout: 276 seconds]
tubuliferous has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
dreinull has joined #ruby
harfangk has joined #ruby
Shashikant86 has joined #ruby
tubuliferous has quit [Ping timeout: 276 seconds]
craigp has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
pawnbox has joined #ruby
hipertracker has quit [Quit: hipertracker]
xcesario_ has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
xcesariox has quit [Ping timeout: 244 seconds]
<jhass> bakwards: oh btw if you feel a bit experiment, Crystal might be appealing to you
<jhass> *experimental
<bakwards> ok
hexhaxtron has quit [Read error: Connection reset by peer]
<jhass> though our gmp bindings are still somewhat slow for some reason, so if your number crunching exceeds UInt64 you might want to prepare to invest some work into that area
hiyosi has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
Hyuk has quit [Quit: Textual IRC Client: www.textualapp.com]
mrBen2k2k2k has joined #ruby
Gasher has joined #ruby
A_Drone has quit [Remote host closed the connection]
davedev24 has joined #ruby
Tempesta has joined #ruby
Tempesta has quit [Changing host]
Tempesta has joined #ruby
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
Tempesta has quit [Client Quit]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev24 has quit [Ping timeout: 250 seconds]
zarubin has quit [Read error: Connection reset by peer]
zarubin has joined #ruby
shmulik_mobile has joined #ruby
tachikomas has quit []
Pupeno has joined #ruby
A_Drone has joined #ruby
MarkBilk__ has joined #ruby
TheWhip has joined #ruby
mrgrieves has quit [Ping timeout: 260 seconds]
zacts has joined #ruby
sdothum has joined #ruby
triangles has quit [Quit: Leaving]
hipertracker has joined #ruby
A_Drone has quit [Remote host closed the connection]
xall has quit [Ping timeout: 276 seconds]
xcesario_ has quit [Quit: Textual IRC Client: www.textualapp.com]
hk238 has joined #ruby
Ishido has quit [Read error: Connection reset by peer]
Ishido has joined #ruby
ur5us has joined #ruby
bkxd has joined #ruby
M-manveru has joined #ruby
M-mistake has joined #ruby
Tempesta has joined #ruby
Charles_leung has quit [Quit: Charles_leung]
c355e3b has joined #ruby
ruid has joined #ruby
Rickmasta has joined #ruby
bkxd has quit [Ping timeout: 258 seconds]
A_Drone has joined #ruby
cgfbee has joined #ruby
blackmesa has joined #ruby
hipertracker has quit [Quit: hipertracker]
A_Drone has quit [Read error: Connection reset by peer]
A_Drone has joined #ruby
pawnbox has quit [Remote host closed the connection]
ruby-newby has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chosen1 has joined #ruby
<ruby-newby> Hiya fellas, here's the latest version of my game. https://repl.it/CfZu/168 I've refactored it with much of your feedback in mind but in doing so I've reintroduced a bug which I'm hoping someone can help me understand as I don't understand enough about what's going on under the hood and don't have a good ide to step through and inspect it
<ruby-newby> The problem line is 235 where I'm using erb to replace the weapon name (to fix the problem of interpolating the string when there's no value)
pawnbox has joined #ruby
<ruby-newby> to recreate the bug, run the game, pick a name, the axe, cross the draw bridge and then "SHOW the axe"
johnmilton has quit [Ping timeout: 276 seconds]
tubuliferous has joined #ruby
chosen1_ has quit [Ping timeout: 258 seconds]
nankyokusei has joined #ruby
<ruby-newby> I'm expecting it to include the name of the axe in the string but it's blank, now initially I was just interpolating but obiously this bakes the value into the string to early (before its actually) set, what I can't understand is, after the refactor, why is the value still blank? I pass in the new_player object to the game and set properties on it (which I believe is done by *reference* - in that odd sort of ruby way) so I don't u
<ruby-newby> at print time
rodfersou has joined #ruby
<ruby-newby> please forgive my horrendous typing and punctuation - jesus
tubuliferous has quit [Ping timeout: 265 seconds]
<ruby-newby> as always any other feedback on the design is welcome too!
hiyosi has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
Bish has joined #ruby
<Bish> hey, what do i use for creating salted hashs
<tobiasvl> what algorithm?
<Bish> a safe one i suppose
<Bish> i don't care actually, just don't know how to do it
<Bish> im not a cryptoguy
<Bish> guess md5 sucks!?
<tobiasvl> yes
<tobiasvl> use bcrypt for example
<tobiasvl> or scrypt
<Bish> for salt i can take the user name? should i generate random data?
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<tobiasvl> random
hiyosi has quit [Ping timeout: 258 seconds]
<Bish> bleh so i safe a salt for every user?
<tobiasvl> yes
vondruch has joined #ruby
<tobiasvl> this seems to be a comprehensive intro: https://crackstation.net/hashing-security.htm
hipertracker has joined #ruby
<tobiasvl> as for ruby specific stuff, google bcrypt and scrypt
<tobiasvl> scrypt is probably better than bcrypt
<tobiasvl> but bcrypt is older and more used, probably more resources
<tobiasvl> they're both fine I think
<Bish> okeh
<Bish> thanks
<dminuoso> Bish: The salt is not secret (though there is no reason to make it public either) - it's just designed to thwart rainbow table attacks.
<dminuoso> (Salting itself is a trivial process)
yfeldblum has quit [Ping timeout: 250 seconds]
<davorb> and in general you want a unique salt for every user
johnmilton has joined #ruby
<dminuoso> Even if you did not, it wouldn't be too much of a terrible mistake though.
<davorb> the simple answer is "just use bcrypt"
<davorb> TIL "You can literally test all lowercase, alphabetic passwords which are ≤7 characters in less than 2 seconds" https://codahale.com/how-to-safely-store-a-password/
chosen1_ has joined #ruby
Papierkorb has quit [Ping timeout: 258 seconds]
<dminuoso> My solution beats hashing - I simply use 48 character passwords everywhere.]
<dminuoso> randomly chosen, each time.
<dminuoso> The whole idea of salting is that the underlying assumption is that your user is using guessable passwords, perhaps even reusing it.
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<tobiasvl> a fair assumption tbh
<davorb> i really hope more websites start integrating u2f
<dminuoso> tobiasvl: heh.
blackmesa has quit [Ping timeout: 250 seconds]
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
chosen1 has quit [Ping timeout: 258 seconds]
<Bish> dminuoso: i never said i was unsure what a salt is
blackgoat has joined #ruby
<bakwards> It's something you put on food
<ruby-newby> can anyone help? :(
<Bish> is using one-database-per user a bad idea or a horrible idea
<Bish> speaking offtopic mysql right n ow
<tobiasvl> one full database per user? why on earth
Papierkorb has joined #ruby
allcentury has joined #ruby
<Bish> well, im thinking of a scalable architecture
<Bish> where userx gets a subdomain userx.domain.com
kavanagh has joined #ruby
<Bish> meaning i could take his database put it on another server, change the ip and it works
<Bish> this on earth!
<Bish> i know there are some problems with this, but the benefits would be cool
craigp has quit [Quit: WeeChat 1.5]
ecnalyr has joined #ruby
craigp has joined #ruby
<ljarvis> yeah multi-tenancy apps can do that, but it's more effort than it's worth until you really know you need to separate it
craigp has quit [Client Quit]
AndrewIsHere has joined #ruby
craigp has joined #ruby
ecnalyr has quit [Ping timeout: 244 seconds]
<Bish> what is a multi-tenancy app?
bakwards has left #ruby [#ruby]
Papierkorb has quit [Ping timeout: 260 seconds]
ruid has quit [Ping timeout: 244 seconds]
hipertracker has quit [Quit: hipertracker]
gdonald has quit [Read error: Connection reset by peer]
astrobun_ has joined #ruby
Shashikant86 has joined #ruby
gdonald has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
A_Drone has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 265 seconds]
A_Drone has joined #ruby
craigp_ has joined #ruby
blackmesa has joined #ruby
Papierkorb has joined #ruby
craigp has quit [Ping timeout: 252 seconds]
<Bish> nvm i google'd it
<Bish> i think i want that..
rodfersou has quit [Ping timeout: 240 seconds]
hanmac has quit [Ping timeout: 258 seconds]
rodfersou has joined #ruby
umdstu has joined #ruby
hahuang61 has joined #ruby
Pupeno has quit [Remote host closed the connection]
ldnunes has joined #ruby
<strigonLeader> ruby-newby, I ran some tests, erb doesn't the environment it's being called in, I think it's erroring silently
strigonLeader is now known as spectrum
RegulationD has joined #ruby
hahuang61 has quit [Ping timeout: 240 seconds]
Papierkorb has quit [Ping timeout: 252 seconds]
GorillaApe has joined #ruby
<GorillaApe> hello
<GorillaApe> How can I
<GorillaApe> I have this regular expression
<GorillaApe> ^(?:([FSRPAUEW])(?!.*\1))+\/(?:([FSRPAUEW])(?!.*\2))+$|^any$
Papierkorb has joined #ruby
<GorillaApe> but it doesnt work as it shuold
tubuliferous has joined #ruby
ponga has joined #ruby
hanmac has joined #ruby
RegulationD has quit [Ping timeout: 252 seconds]
<tobiasvl> how should it work then
JeanCarloMachado has joined #ruby
tubuliferous has quit [Ping timeout: 244 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
johnmilton has quit [Remote host closed the connection]
kavanagh has quit [Ping timeout: 250 seconds]
<canton7> GorillaApe, if you read your own question, you'll see that it's impossible for anyone to answer it
<GorillaApe> indeed
<GorillaApe> however I fixed it
kavanagh has joined #ruby
Vingador has joined #ruby
<canton7> it's polite to tell us then, otherwise we'll waste our time trying to understand what you mean
<GorillaApe> if you have any suggestions please let me know. problem was that I want to prevent repetion of any specified characters
<GorillaApe> FA/FA should work but not FF/WE
<spectrum> ruby-newby, yeah it gets hairy after that because of how you've structured your classes, erb is probably the correct solution to your problem but you need to have a way of getting to the player and or the game from inside the choice class, and maybe resolve the erb inside there as well
<canton7> wait, I thought you'd fixed the problem?
Es0teric has quit [Quit: Computer has gone to sleep.]
<GorillaApe> yes
<GorillaApe> but I am not sure if it is 100% ok . i pasted the link
<GorillaApe> with example
ur5us has quit [Ping timeout: 240 seconds]
<jobat> well it satisfies your needs
<GorillaApe> i hope so
Es0teric has joined #ruby
ur5us has joined #ruby
<jobat> you probably don't need the .*s though
<jobat> just . would do
freerobby has joined #ruby
A_Drone has quit [Remote host closed the connection]
bkxd has joined #ruby
<spectrum> ruby-newby, actually it's executed inside game class thats fine, just add binding as a parameter to erb.result and change new_player to @player
davedev24 has joined #ruby
kavanagh has quit [Ping timeout: 276 seconds]
ur5us has quit [Ping timeout: 276 seconds]
jrafanie has joined #ruby
bkxd has quit [Ping timeout: 276 seconds]
kavanagh has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
Tomatosoup- has joined #ruby
Tomatosoup- has left #ruby ["Leaving"]
synthroid has joined #ruby
koooge has quit [Quit: Leaving...]
yokel has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 244 seconds]
yokel has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
shmulik_mobile has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
allcentury has quit [Ping timeout: 258 seconds]
AzureStigma has joined #ruby
jrafanie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xall has joined #ruby
SHyx0rmZ has joined #ruby
Pupeno has joined #ruby
giz|work has joined #ruby
Pupeno_ has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 244 seconds]
xall has quit [Ping timeout: 258 seconds]
ElFerna has joined #ruby
mrmortondk has joined #ruby
giz|work has quit [Ping timeout: 244 seconds]
LoneHerm_ has joined #ruby
cyphase has quit [Ping timeout: 258 seconds]
aryaching has joined #ruby
griffindy has joined #ruby
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
kavanagh has quit [Ping timeout: 260 seconds]
johnmilton has joined #ruby
giz|work has joined #ruby
LoneHerm_ has quit [Ping timeout: 265 seconds]
cyphase has joined #ruby
kavanagh has joined #ruby
jrafanie has joined #ruby
ruby-newby has quit [Ping timeout: 250 seconds]
allcentury has joined #ruby
ruby-newby2 has joined #ruby
<ruby-newby2> Hi guys, sorry my browser crashed and I had to clear my cache before I could ge back in, before it did I saw someone kindly posted some advice on my problem with a text adventure game using erb but I'm not sure who it was
<ruby-newby2> would that person mind reporting their chats?
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruby-newby2> sorry about this
<ruby-newby2> I think you said something about it being tricky because of how my classes are structured but I couldn't see the full thing as my window was frozen and it took me forever to get back in :(
<dminuoso> ruby-newby2: Check the topic of this chat, we have a log. :)
<dminuoso> ?topic
<ruby[bot]> dminuoso: I don't know anything about topic
<ruby-newby2> ah ok thanks
<ruby-newby2> ?topic
<dminuoso> ruby-newby2: Sorry I was hoping we had a factoid pointing you towards the topic.
<ruby-newby2> no worried I ound the log cheers
<dminuoso> It should be displayed in your client somewhere, possibly it can also be shown using /topic
minimalism has quit [Quit: minimalism]
<dminuoso> Alright.
nankyokusei has joined #ruby
ElFerna has quit [Ping timeout: 244 seconds]
<ruby-newby2> spectrum: thank you for your help, sorry for the late reply, some machine issues
<ruby-newby2> I'm not sure I follow you about "add the binding"
<jhass> dminuoso: feel free to suggest one. There's ?logs ;)
nankyokusei has quit [Ping timeout: 276 seconds]
hipertracker has joined #ruby
mrmortondk has quit [Quit: Textual IRC Client: www.textualapp.com]
tk__ has joined #ruby
<ruby-newby2> spectrum: I see yous sent me something on bindings that's great thanks but I'm struggling to grasp it a bit. what you suggested sounded really simple, could I be a pain and ask you to show me the changes you propose in a snippet?
<ruby-newby2> would owe you one :)
swills_ has quit [Ping timeout: 265 seconds]
<dminuoso> ruby-newby2: To clear one confusion up about Ruby though, everything in Ruby is passed by value, except it doesn't pass objects but "pointers" by value.
<dminuoso> (A true pass-by-reference is not very common in languages)
<ruby-newby2> yes I've read up a bit on this and it's confusing but I think I get it
<ruby-newby2> it's technically passed by value but in practical terms, objects are passed by reference correct?
<dminuoso> No.
chouhoulis has joined #ruby
<dminuoso> "Pointers to objects" are passed by value. The distinct is really important.
<ruby-newby2> so it passes a point to the object by value but practically we cantreat this as if it's being passed by reference. I saw diagrams that explained it
<ruby-newby2> ok maybe I don't understand it then
hipertracker has quit [Ping timeout: 265 seconds]
A_Drone has joined #ruby
<ruby-newby2> I saw a thing which explained that it's essentially creating a second variable inside the method being called but a variable that points to the same object in memory
<dminuoso> ruby-newby2: Ignore implementation, lets look at behavior
<dminuoso> >> def(arg); arg << 1; end; a = []; foo(a); p a
<ruby[bot]> dminuoso: # => /tmp/execpad-6b11d5facd49/source-6b11d5facd49:2: syntax error, unexpected ';', expecting :: or '.' ...check link for more (https://eval.in/616032)
<dminuoso> >> def foo(arg); arg << 1; end; a = []; foo(a); p a
<ruby[bot]> dminuoso: # => [1] ...check link for more (https://eval.in/616034)
<dminuoso> ruby[bot]: as you can see, the method can modify its argument
<dminuoso> >> def foo(arg); arg = "1"; end; a = []; foo(a); p a
<ruby[bot]> dminuoso: # => [] ...check link for more (https://eval.in/616035)
<dminuoso> but it cannot change the underlying object.
nerium has joined #ruby
<dminuoso> arg is just a pointer to an object. assigning changes that pointer to a new one.
banisterfiend has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
ta_ has quit [Remote host closed the connection]
<dminuoso> ruby-newby2: that last summary sounds about right.
alfiemax has joined #ruby
hk238 has joined #ruby
<dminuoso> ruby-newby2: So no, it's not pass by reference. Pointer semantics allow you to implement almost the same as pass-by-reference, but not quite.
<ruby-newby2> ok I'm studying your example but I don't think I understand it. So it looks like you've defined a method which has an args param and appends '1' to it. You then pass an empty array; 'a' to this method, and I would *expect* it to append a 1 to it but your output shows that it's still empty
<ruby-newby2> in which case... I don't understand (sorry)
Shashikant86 has joined #ruby
<ruby-newby2> I might be lost as I don't have an intuitive grasp of what appending 1 to an array would normally do.... (return [1]?) - still very new to the language and you can't really append an int to an array in c# (where I come from) so I'm sort of making assumptions here which might be my undoing
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> you are confusing the two examples, look closer at them
<toretore> ones uses <<, the other =
<dminuoso> ruby-newby2: https://eval.in/616044
<dminuoso> This should be a bit more readable.
CloCkWeRX has joined #ruby
malconis has joined #ruby
freerobby has quit [Quit: Leaving.]
A_Drone has quit [Ping timeout: 250 seconds]
tyang_ has joined #ruby
freerobby has joined #ruby
freerobby has quit [Client Quit]
<ruby-newby2> ah ok... that's much easier to follow yes
<ruby-newby2> hmmmm
<ruby-newby2> ok
tyang_ has quit [Client Quit]
tyang has joined #ruby
<ruby-newby2> so it can modify, but not assign?
<ruby-newby2> hmmm
hwcomcn has joined #ruby
hwcomcn has quit [Max SendQ exceeded]
hwcomcn has joined #ruby
<ruby-newby2> ok, that's much clearer. It hasn't fully 'sunk in' yet but I understand and can follow the later example, thank you
Asade has joined #ruby
<ruby-newby2> I need to go back to for a bit but I will revisit this, this afternoon. I still have no idea how to solve my game issue but I'll make sure I understand this more deeply before retrying
bmurt has joined #ruby
JeanCarloMachado has quit [Quit: Lost terminal]
kavanagh has quit [Ping timeout: 240 seconds]
fergal has joined #ruby
kavanagh has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
anisha_ has quit [Quit: This computer has gone to sleep]
xall has joined #ruby
saneax is now known as saneax_AFK
ChiefAlexander has joined #ruby
mim1k has joined #ruby
SHyx0rmZ has joined #ruby
xall has quit [Ping timeout: 260 seconds]
anisha_ has joined #ruby
weemsledeux has joined #ruby
vondruch_ has joined #ruby
vondruch has quit [Ping timeout: 244 seconds]
TheWhip has quit [Remote host closed the connection]
lazyatom has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weemsledeux has joined #ruby
weemsledeux has quit [Client Quit]
joonty has quit [Quit: This computer has gone to sleep]
tubuliferous has joined #ruby
kavanagh has quit [Ping timeout: 265 seconds]
weemsledeux has joined #ruby
Asade has quit [Quit: Page closed]
A_Drone has joined #ruby
edgr has quit [Ping timeout: 240 seconds]
nadir has joined #ruby
tubuliferous has quit [Ping timeout: 265 seconds]
edgr has joined #ruby
hahuang61 has joined #ruby
eljimmy has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
harfangk has quit [Quit: Textual IRC Client: www.textualapp.com]
kavanagh has joined #ruby
tyang has quit [Ping timeout: 240 seconds]
johnny56 has quit [Ping timeout: 264 seconds]
swills_ has joined #ruby
MarkBilk__ has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
RegulationD has joined #ruby
hahuang61 has quit [Ping timeout: 244 seconds]
<dminuoso> I must be missing something obvious. Is there some subtle difference in execution flow between these two? https://gist.github.com/anonymous/2c5ebb6c37515904d6fa5e3dbeb00d68
mrmortondk has joined #ruby
vondruch_ has quit [Ping timeout: 244 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tyang has joined #ruby
griffindy has joined #ruby
yardenbar has quit [Ping timeout: 250 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
<toretore> dminuoso: in which scenario, with or without an exception happening?
<dminuoso> toretore: Without an exception.
<dminuoso> Ive been debugging the living crap out of this, and I don't understand why the second variant completely changes the state of "agent" at the time out logout.
<dminuoso> *time of
astrobun_ has quit [Remote host closed the connection]
axl_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<toretore> dminuoso: changes it how?
<toretore> how do you know that it does, and that this difference is why?
AzureStigma has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<dminuoso> toretore: The second is throwing exceptions on agent.logout.
<toretore> what exceptions?
<toretore> i have a feeling the difference lies somewhere in the code you're not showing
<dminuoso> toretore: All this is part of some webscraper. Essentially whats happening is that during the agent.logout using the second variant the Mechanize::Page is incomplete.
<dminuoso> This is the only change Im making.
<dminuoso> These lines.
AzureStigma has joined #ruby
AzureStigma has quit [Client Quit]
pawnbox has quit [Remote host closed the connection]
<dminuoso> (It's missing portions of the page, which causes things to break of course)
Macaveli has joined #ruby
<dminuoso> And yes, the only change Im making is to these three lines.
l4v2 has joined #ruby
jishankai has quit [Ping timeout: 265 seconds]
Shashikant86 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 240 seconds]
JeremyM has joined #ruby
bkxd has joined #ruby
nerium has quit [Quit: nerium]
kgutteridge has joined #ruby
edwinvdgraaf has joined #ruby
davedev24 has joined #ruby
matp has joined #ruby
pawnbox has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
Shashikant86 has joined #ruby
davedev24 has quit [Ping timeout: 258 seconds]
vondruch has joined #ruby
Shashikant86 has quit [Max SendQ exceeded]
pawnbox has quit [Ping timeout: 258 seconds]
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
jaguarmagenta has joined #ruby
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
saneax_AFK is now known as saneax
mrmortondk has quit [Read error: Connection reset by peer]
<dminuoso> About the only exotic thing Im doing, is that all of this happens inside a refinement..
jaguarmagenta has quit [Ping timeout: 265 seconds]
cdg has quit [Ping timeout: 250 seconds]
macsteps has joined #ruby
eizua has joined #ruby
c0mrad3 has joined #ruby
Linell has joined #ruby
macsteps has quit [Remote host closed the connection]
<Linell> I've got a large flac file that I need to split into several files that are less than a minute long each. What's a good starting point for something like that?
last_staff has quit [Quit: last_staff]
nfk has joined #ruby
xall has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Spami has joined #ruby
blackgoat has quit [Quit: WeeChat 1.5]
LoneHermit has joined #ruby
JeremyM has quit [Quit: Textual IRC Client: www.textualapp.com]
kavanagh has quit [Ping timeout: 258 seconds]
weemsledeux has joined #ruby
craigp_ has quit [Ping timeout: 260 seconds]
weemsledeux has quit [Client Quit]
<dminuoso> asm>> 1
<ruby[bot]> dminuoso: I have disassembled your code, the result is at https://eval.in/616117
vondruch has quit [Ping timeout: 276 seconds]
agent_white has joined #ruby
fmcgeough has joined #ruby
pawnbox has joined #ruby
xall has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
LoneHermit has quit [Ping timeout: 258 seconds]
gregf has joined #ruby
<agent_white> Mornin'
mtkd has quit [Ping timeout: 265 seconds]
freerobby has joined #ruby
tomphp_ has joined #ruby
majmon_tsuri has joined #ruby
TheWhip has joined #ruby
tk__ has quit [Quit: ばいばい]
mtkd has joined #ruby
tomphp has quit [Ping timeout: 264 seconds]
<dminuoso> There is something really funky going on here with my blocks..
<dminuoso> At least I now know its not related to ensure anymore.
joonty has joined #ruby
gdonald has quit [Read error: Connection reset by peer]
gdonald has joined #ruby
Devalo has joined #ruby
shinnya has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<dminuoso> Is there a conceivable scenario under which after yielding the block neither code1 nor code2 is executed, but only code3? https://gist.github.com/anonymous/7246fe96880ad8c6424468701bd3b254
<dminuoso> Because this is whats happening right now.
<dminuoso> (I'm not using catch/throw *anywhere* in my entire code)
<fergal> guys in ruby is an empty array [] truthy or falsy?
<dminuoso> fergal: try it and see
ecnalyr has joined #ruby
<dminuoso> fergal: note the shortcut of using !!
<fergal> dminuoso: it doesn’t seem to be either truthy or falsy :/
<dminuoso> >> !![]
<ruby[bot]> dminuoso: # => true (https://eval.in/616138)
<dminuoso> fergal: it seems to be actually.
<dminuoso> fergal: In Ruby everything is truthy except nil and false.
<dminuoso> No exceptions.
sarbs has quit [Max SendQ exceeded]
ChiefAlexander has quit [Ping timeout: 240 seconds]
ChiefAlexander has joined #ruby
<ruby-newby2> Anyone know what spectrum means by " just add binding as a parameter to erb.result and change new_player to @player"? I spent some time google "bindings in ruby" and I'm none the wiser :\ https://repl.it/CfZu/167
kavanagh has joined #ruby
pawnbox has quit [Remote host closed the connection]
submitnine has quit []
<croberts> if i wanted to delete a file but check it first with File.file?(file_name) how would i capture the true output, would I store it to a variable or can I pass it to the next command if true File.delete()
the_drow has quit [Quit: This computer has gone to sleep]
pawnbox has joined #ruby
saneax is now known as saneax_AFK
<fergal> dminuoso: what’s the !! operator called?
dionysus69 has quit [Ping timeout: 260 seconds]
pawnbox has quit [Remote host closed the connection]
mim1k has quit [Ping timeout: 260 seconds]
pawnbox has joined #ruby
yardenbar has joined #ruby
<ljarvis> croberts: if File.file?(file); File.rm(file); end
<ljarvis> or postfix if, File.rm(file) if File.file?(file)
<aeruder> fergal: it is just the ! operator twice
dminuoso has quit [Ping timeout: 276 seconds]
<aeruder> fergal: but has the wonderful side effect of coercing a value into a boolean
blackmesa has joined #ruby
kavanagh has quit [Ping timeout: 260 seconds]
sarbs has joined #ruby
<ljarvis> the double bang
tyang has quit [Ping timeout: 240 seconds]
nando293921 has joined #ruby
<ljarvis> aka not not
<ljarvis> aka the realist
banisterfiend has joined #ruby
nando293921 has quit [Read error: Connection reset by peer]
nando294021 has joined #ruby
hipertracker has joined #ruby
djellemah has quit [Ping timeout: 260 seconds]
<ruby-newby2> ah shit I mean https://repl.it/CfZu/169
<ruby-newby2> Anyone know what spectrum means by " just add binding as a parameter to erb.result and change new_player to @player"? I spent some time google "bindings in ruby" and I'm none the wiser :\ https://repl.it/CfZu/169
<ruby-newby2> sorry for repeat
polishdub has joined #ruby
haylon has joined #ruby
mim1k has joined #ruby
dminuoso has joined #ruby
syndikate has joined #ruby
aufi has quit [Ping timeout: 244 seconds]
syndikate has quit [Remote host closed the connection]
ChiefAlexander has quit [Remote host closed the connection]
syndikate has joined #ruby
OTORelic1 has joined #ruby
RegulationD has joined #ruby
ChiefAlexander has joined #ruby
flashpoint9 has joined #ruby
tyang has joined #ruby
edwardly has quit [Ping timeout: 258 seconds]
saneax_AFK is now known as saneax
hwcomcn has quit [Ping timeout: 276 seconds]
leea has joined #ruby
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
aryaching has quit [Remote host closed the connection]
<Linell> ruby-newby2: what's not working in it?
RegulationD has quit [Ping timeout: 250 seconds]
tubuliferous has joined #ruby
<ruby-newby2> if you run, pick a name, the axe weapon, cross the drawbridge then "Show the axe", the name is blank
<ruby-newby2> apparently I need to pass a binding to erb.result to fix but I have no idea
kavanagh has joined #ruby
leea has quit [Client Quit]
<ruby-newby2> I'm reading up on it but there's so simple explanations I can find
<ruby-newby2> *no simple
Ishido has quit [Remote host closed the connection]
edwinvdgraaf has quit [Ping timeout: 258 seconds]
<ruby-newby2> I understand bindings will allow me to set scope and use the local variables instead of te top level ones but I'm lost beyond that
Es0teric has quit [Quit: Computer has gone to sleep.]
<ruby-newby2> does that make sense Linell ?
Ishido has joined #ruby
leea has joined #ruby
TomyWork has joined #ruby
<ruby-newby2> shit lol, ok I've fixed it but have no idea what's going on, could someone explain line 136 to me? what is that binding arg doing? https://repl.it/CfZu/171
<Zarthus> hmm.. but can I get rid of the troll with my fish
tubuliferous has quit [Ping timeout: 276 seconds]
<jhass> ruby-newby2: it might be easier if you instead defined well known replacements and used String#%, not erb
<Zarthus> yeah, String.format or String#% are easier to use
kavanagh has quit [Ping timeout: 260 seconds]
<jhass> "Swing %{weapon}" % {weapon: "Axe", unusued: "stuff"}
<jhass> >> "Swing %{weapon}" % {weapon: "Axe", unusued: "stuff"}
<ruby[bot]> jhass: # => "Swing Axe" (https://eval.in/616163)
aganov has quit [Remote host closed the connection]
<Zarthus> or of course, string interpolation
yardenbar has quit [Ping timeout: 250 seconds]
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Silthias has quit [Ping timeout: 244 seconds]
<ruby-newby2> I can't use string interpolation because it would bake in the empty value (which isn't set until after the string is passed) and not update at print time
kavanagh has joined #ruby
<ruby-newby2> I think jhass suggested I look into using sprintf before which I did but got the same result (probably did it wrong but here we are)
<Zarthus> string interpolation accepts methods as well
<ruby-newby2> this now works - exactly as I'd like it to... I just don't understand what passing "binding" did... it's transferred the scope somehow but I don't reall understand it
<ruby-newby2> https://repl.it/CfZu/172 < - working
<dminuoso> What control mechanism could cause ruby to not execute code after yielding a block? Its not an exception, the rescue handler is never entered.
<dminuoso> (The ensure block is executed though)
<jhass> throw, fiber, thread comes to mind
tvon has quit [Quit: System is sleeping...]
<dminuoso> jhass: How do fiber/thread play into this?
<jhass> sleep
<dminuoso> Can you elaborate?
<jhass> thread change context at any point, so that too. And then do something in the now active thread that locks up the whole process
<dminuoso> jhass: It's not blocked. I have dead code.
<dminuoso> Brb, leaving train.
<jhass> fiber would be an explicit switch to another one and never switching back
<jhass> then, Kernel#exit of course
<jhass> ruby-newby2: https://repl.it/CfZu/173 works
johnny56 has joined #ruby
LoneHermit has joined #ruby
dminuoso has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndrewIsHere has joined #ruby
dminuoso has joined #ruby
Silthias has joined #ruby
<dminuoso> jhass sorry. Basically I have a yield that is followed by code. The block is called entirely. The code does not get executed.
<jhass> what's in the block?
GorillaApe has quit [Remote host closed the connection]
<dminuoso> Code that uses refined mechanize
yeticry has quit [Ping timeout: 250 seconds]
kobain has joined #ruby
<dminuoso> Its as if Ruby isnt unwinding its callstack properly
etetz has joined #ruby
yeticry has joined #ruby
sepp2k has quit [Quit: Leaving.]
AndrewIsHere has quit [Ping timeout: 265 seconds]
cschnei__ has joined #ruby
<dminuoso> jhass oh my. I have an idea....
<dminuoso> Im gonna stub out things to produce a testcase
soulisson has joined #ruby
tomphp has joined #ruby
<soulisson> Hi, sorry for this question, but are the expressions inside a regular expression, regular expressions them selves
<soulisson> ?
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> depends on how you define what an expression inside a regular expression is
AndrewIsHere has joined #ruby
<dminuoso> jhass: wow. What a strange behavior. Return inside blocks doesnt do what I thought it would
<dminuoso> Holy crap.
<elomatreb> Do you maybe mean matching groups or character classes?
jhack has joined #ruby
<jhass> dminuoso: oh, yeah, return returns from the calling method, break from the called method and next from the block
<soulisson> jhass, like /a|b/, can "a" be considered a regexp and "b" be a regexp?
<jhass> given /a/ and /b/ are both valid regular expressions, sure
<dminuoso> Metaprogramming wise useful Im sure, but this is so misleading....
<jhass> dminuoso: same for procs, only lambda procs change that behavior
<ruby-newby2> thank you jhass, I'm not sure I see the benefit of your solution over my own but one downfall is we're hard coding the weapon in the display_choice_outcome. the game designer may want to add any player property, I ultimately want to let them build their own game from my engine without needed to modify the engine, this works https://repl.it/CfZu/172 I just don't understand what the binding arg does on ln:136
<soulisson> jhass, thanks
zacts has quit [Ping timeout: 250 seconds]
mistermocha has joined #ruby
<dminuoso> jhass considering that lambas are peocs under the hood that seems even more silly.
<aeruder> ruby-newby2: does this help at all ? http://ruby-doc.org/core-2.3.1/Kernel.html#method-i-binding that is what is being passed
<soulisson> another question is there a way to check if something is a method?
<jhass> dminuoso: the semantics seem odd at first, yes, but they integrate quite perfectly into the language
synthroid has quit [Remote host closed the connection]
<ruby-newby2> I'll have a read thanks aeruder
<jhass> soulisson: "something"?
chouhoulis has quit [Remote host closed the connection]
<dminuoso> soulisson no. What are you trying to do?
<soulisson> jhass, for instance the yield keyword
<dminuoso> jhass: the wtf effect I got today was 2 times as large as when I learned about super and super() the real hard way...
<dminuoso> soulisson i can think of a hack actually.
A_Drone has joined #ruby
<dminuoso> It involves inspecting ISeq streams...
<jhass> soulisson: http://ruby-doc.org/core-2.3.1/doc/keywords_rdoc.html here's a list of all keywords, everything else is either a literal, a variable of any kind or a method
<soulisson> If I'm not mistaking yield is a method, like super, no?
<jhass> neither is a method
<aeruder> jhass: doesn't the definition of return/break/next there basically depend entirely on how the block is invoked? as in, next actually depends on it being part of an iteration in the caller
<jhass> soulisson: as proven by both being in the list I linked you
<jhass> aeruder: no
<soulisson> jhass, thanks
<dminuoso> soulisson: The thing is, there is no real method calls. You send a message to an object, either it responds or it doesnt.
kavanagh has quit [Quit: That's all folks!]
<jhass> ?
<jhass> what would a "real" method call be then?
tvon has joined #ruby
tvon has quit [Client Quit]
craigp_ has joined #ruby
hahuang61 has joined #ruby
A_Drone has quit [Ping timeout: 250 seconds]
<dminuoso> jhass: I said method calls, not methods.
<dminuoso> I.e. you dont really call a method. You send a message to the object.
synthroid has joined #ruby
swistak35 has quit [Ping timeout: 250 seconds]
freerobby has quit [Quit: Leaving.]
thejoecarroll has quit [Ping timeout: 250 seconds]
<dminuoso> It kind of has this smalltalk feeling.
<jhass> am I missing an actual technical difference here?
thejoecarroll has joined #ruby
swistak35 has joined #ruby
<jhass> otherwise this seems to be something you'd differentiate to feel smarter...
sevvie has quit [Ping timeout: 264 seconds]
<aeruder> jhass: i'm going to vote the latter
thiesen has joined #ruby
kavanagh has joined #ruby
hahuang61 has quit [Ping timeout: 276 seconds]
malconis has quit [Read error: Connection reset by peer]
malconis_ has joined #ruby
freerobby has joined #ruby
<soulisson> Is there something similar to scan for regular expressions? like regexp.scan(a_string)?
<ruby-newby2> Anyone know a good way to redistribute this game to friends in a way that hides source code (which has spoilers) like is there a pretty-ish online service that lets you share just your program console? I tried packaging with OCRA to run in windows command prompt but the windows command prompt is AWFUL. Wraps text mid word, tiny display window, just awful
banisterfiend has joined #ruby
<ruby-newby2> like can I give someone this game without giving them the code too (which I'm not really bothered about so long as it's hidden initially)
aryaching has joined #ruby
<elomatreb> ruby-newby2: If they look into the sourcecode and get spoilered, isn't it their loss?
gdonald has quit []
<jhass> soulisson: no
LuckyABA has joined #ruby
<ruby-newby2> yes but I'd like to not have it starring them in the face the moment they open the game, as I say if it could be closed initially but all of these sites are for sharing the code and don't seem to offer that
blaxter has quit [Quit: foo]
<soulisson> jhass, ok, thanks
<ruby-newby2> and the windows console might be the ugliest thing I've ever seen
amclain has joined #ruby
<ruby-newby2> to ask another way, anyone know of any free windows apps that will run a .rb file and display it in a reasonably pleasant fashion?
LuckyABA has quit [Client Quit]
<elomatreb> Powershell is supposed to be a lot better than regular cmd.exe, but I haven't used it
<ruby-newby2> yeah, it is, but still does annoying stuff like wrapping text mid word
<ruby-newby2> weird this isn't a problem that's been solved already, perhaps I'm looking at it wrong I don't know
<elomatreb> Hard-wrapping is normal behaviour for shells. Have you tried maybe making your game available on a website, using monospaced fonts? Could look a lot nicer
mooru has joined #ruby
<eam> ruby-newby2: if you're worried about casual spoilers, just uuencode your script and have the running program uudecode it before running
<ruby-newby2> no but I had considered it elomatreb. I'm SUPER new to ruby though so forgive the question, would I need to learn rails to do that?
Macaveli has joined #ruby
<ruby-newby2> eam: I don't know what that means sorry
<elomatreb> ruby-newby2: Rails is one (probably overkill) solution. Sinatra (http://www.sinatrarb.com/) is quite simple, yet based on the same infrastructure as rails
<ruby-newby2> ok thank you, I'll look into that!
bkxd has joined #ruby
<aeruder> i do think there's a valid case for what you are talking about ruby-newby2, but afaik most solutions have been for each individual author to redo their app to take advantage of a gui lib or web, haven't really seen anything to host console ruby programs in a more pleasant way
Rickmasta has joined #ruby
TheWhip has quit [Remote host closed the connection]
<ruby-newby2> thanks eam
* elomatreb has flashbacks to obfuscated PHP code
<eam> you can encode your program into the __END__ block by running: ruby -rbase64 -e'puts Base64.encode64 File.read ARGV.shift' your_original_script.rb
davedev24 has joined #ruby
<ruby-newby2> understood aeruder
<eam> it's trivial to reverse, but will keep people from casually seeing spoilers
<ruby-newby2> that might do
<eam> base64 is an encoding used to turn binary files into 7-bit clean text fields, email and so on uses it
bkxd has quit [Ping timeout: 260 seconds]
TPug has joined #ruby
<ruby-newby2> yeah to encode images as strings etc, I'm familiar, thank you for the suggestion, it might just do
<eam> (realized I had an error in the gist, should be eval not puts)
<ruby-newby2> ok
davedev24 has quit [Ping timeout: 258 seconds]
syndikate has quit [Ping timeout: 250 seconds]
syndikate has joined #ruby
dionysus69 has joined #ruby
TheWhip has joined #ruby
<cschnei__> what's the base class of all numbers? I have to do some type checking and want to say "if this is a number" vs. "if this is a string" ...
<eam> cschnei__: Numeric?
<ljarvis> why not just check if it's a string?
Zapperino has joined #ruby
<Zapperino> Hi
<cschnei__> eam: derp. I got stuck on fixnum in my head :)
<eam> cschnei__: #superclass
<Zapperino> New ruby hopeful here
<cschnei__> >> Fixnum.ancestors => [Fixnum, Integer, Numeric, Comparable, Object, Kernel, BasicObject]
<cschnei__> yep. Thanks
jhooker has joined #ruby
<eam> ljarvis: what if it's a StringIO
<ljarvis> wat
<eam> u wot
<elomatreb> m8
<ljarvis> u wnt sum
<ruby-newby2> eam: what am I missing? https://repl.it/CfZu/174
gusrub has joined #ruby
<ljarvis> D: @ ^
<eam> ruby-newby2: I suspect repl.it doesn't really work like a normal ruby text file
<elomatreb> ruby-newby2: You need parentheses I think
<eam> try it in a real file
<eam> elomatreb: I think the __END__ isn't getting parsed correctly by repl.it
LuckyABA has joined #ruby
djbkd has quit [Quit: Leaving...]
safetypin has joined #ruby
<eam> DATA is only defined if __END__ is used
[Butch] has joined #ruby
<ruby-newby2> ah, but that's the point, I want to use a pretty console simulator like this, I don't suppose I can ref external files from here
<ruby-newby2> ah well
<eam> ruby-newby2: well, if you can't use __END__ and data you can just put it in a string
<eam> str = "my_base64_data"; eval Base64.decode str
pawnbox has quit [Remote host closed the connection]
redy has quit [Ping timeout: 276 seconds]
<eam> the __END__ and DATA thing was just for my own convenience
<eam> >> require 'base64'; eval Base64.decode64 "cHV0cyAidGhpcyBwcm9ncmFtIGhhcyBTUE9JTEVSUyIKcHV0cyAiYnV0IGl0\nJ3Mgb2ssIGJlY2F1c2UgdGhpcyBwYXJ0IGlzIGhpZGRlbiIK\n"
<ruby[bot]> eam: # => this program has SPOILERS ...check link for more (https://eval.in/616216)
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruby-newby2> ah that worked eam, thank you!
<eam> __END__ lets you include arbitrary file content after the interpreter sees that -- and it creates the special file handle DATA to access it
passbe has quit [Ping timeout: 252 seconds]
RegulationD has joined #ruby
synthroi_ has joined #ruby
airdisa has joined #ruby
passbe has joined #ruby
bkxd has joined #ruby
LoneHermit has quit [Remote host closed the connection]
synthroid has quit [Ping timeout: 258 seconds]
sumobob has joined #ruby
pawnbox has joined #ruby
Macaveli has joined #ruby
syndikate has quit [Quit: Leaving]
symm- has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
tmtwd has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
xall has joined #ruby
tomphp has quit [Ping timeout: 250 seconds]
ChiefAlexander has quit [Remote host closed the connection]
davedev24 has joined #ruby
davedev24 has quit [Client Quit]
darix has quit [Quit: may the packets be with you...]
Devalo has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 265 seconds]
Devalo has joined #ruby
dminuoso_ has joined #ruby
xall has quit [Ping timeout: 258 seconds]
thejoecarroll has quit [Ping timeout: 244 seconds]
<ironcamel> is there a best practice for naming files regarding dashes vs underscore, e.g., require 'foo_bar' vs require 'foo-bar'
kp666 has quit [Ping timeout: 276 seconds]
Spami has quit [Quit: This computer has gone to sleep]
DoubleMalt has quit [Remote host closed the connection]
<toretore> underscores
dminuoso has quit [Ping timeout: 276 seconds]
Devalo has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
ChiefAlexander has joined #ruby
<ironcamel> thanks
LoneHerm_ has joined #ruby
rodfersou is now known as rodfersou|lunch
darix has joined #ruby
senayar has quit []
mim1k has quit [Ping timeout: 244 seconds]
mark_66 has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 260 seconds]
Chair has quit [Ping timeout: 264 seconds]
daffy_duck_3 has joined #ruby
armin has quit [Quit: relate to the matter as i drop the bomb]
daffy_duck_2 has quit [Ping timeout: 264 seconds]
hipertracker has quit [Quit: hipertracker]
kavanagh has quit [Ping timeout: 264 seconds]
armin has joined #ruby
kgutteridge has quit [Quit: kgutteridge]
joonty has quit [Quit: This computer has gone to sleep]
<soulisson> Sorry to bother you again, is there a way in pry to clear the screen?
<jobat> doesn't ctrl-l do it?
<soulisson> jobat, thanks
<jobat> soulisson: np. standard command for most shells.
bkxd has joined #ruby
mistermocha has quit [Remote host closed the connection]
<soulisson> jobat, ouaw, I learn something, I always used the clear command
mistermocha has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
<jobat> soulisson: yeah, me too. the more you know
bkxd has quit [Ping timeout: 260 seconds]
yardenbar has joined #ruby
hakunin has quit [Remote host closed the connection]
kavanagh has joined #ruby
chouhoulis has joined #ruby
chouhoul_ has joined #ruby
hakunin has joined #ruby
thiesen has quit [Ping timeout: 260 seconds]
majmon_tsuri has quit [Ping timeout: 250 seconds]
fergal has quit [Quit: fergal]
tubuliferous has joined #ruby
chouhoulis has quit [Ping timeout: 250 seconds]
hiyosi has joined #ruby
rocknrollmarc has joined #ruby
rocknrollmarc has quit [Max SendQ exceeded]
kgutteridge has joined #ruby
rocknrollmarc has joined #ruby
hakunin has quit [Ping timeout: 250 seconds]
Ishido has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 240 seconds]
tubuliferous has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
Snowy has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 240 seconds]
Snowy has joined #ruby
saneax is now known as saneax_AFK
sharkman has joined #ruby
Zapperino has quit [Remote host closed the connection]
andikr has quit [Remote host closed the connection]
<sharkman> if i do, class Stuff; def self.x; @x ||= "a"; end; end; p Stuff.x class LittleStuff < Stuff; end; p LittleStuff.x
djellemah has joined #ruby
<sharkman> will that call to LittleStuff.x use the cached variable from earlier?? or will it recreate it since it is a new class?
symm- has quit [Ping timeout: 276 seconds]
<jhass> the latter
<sharkman> cool thanks jhass
Snowy has quit [Ping timeout: 258 seconds]
zotherst1 has joined #ruby
zotherstupidguy has quit [Ping timeout: 250 seconds]
Zapperino has joined #ruby
Vingador has quit [Remote host closed the connection]
ixti has joined #ruby
antgel has quit [Ping timeout: 264 seconds]
djellemah_ has joined #ruby
soulisson has quit [Ping timeout: 244 seconds]
TPug has joined #ruby
djellemah has quit [Ping timeout: 240 seconds]
AzureStigma has joined #ruby
kgutteridge has quit [Quit: kgutteridge]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
safetypin has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
redy has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
ChiefAlexander has joined #ruby
jobat has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
mahlon has joined #ruby
xall has joined #ruby
AzureStigma is now known as AzureStigma|Away
AzureStigma|Away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
redy has quit [Quit: Leaving]
macsteps has joined #ruby
jhack has quit [Quit: jhack]
xall has quit [Ping timeout: 258 seconds]
macsteps has quit [Remote host closed the connection]
AzureStigma has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djellemah has joined #ruby
macsteps has joined #ruby
roger_rabbit has joined #ruby
diegoviola has joined #ruby
sepp2k has joined #ruby
YaknotiS has quit [Ping timeout: 258 seconds]
elaptics is now known as elaptics`away
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
joonty has joined #ruby
Derperperd has left #ruby [#ruby]
Spami has joined #ruby
Derperperd has joined #ruby
Spami has quit [Remote host closed the connection]
TPug has quit [Read error: Connection reset by peer]
roger_rabbit has quit [Quit: WeeChat 0.3.8]
dopamean_ has joined #ruby
hahuang61 has joined #ruby
freerobby has quit [Quit: Leaving.]
Spami has joined #ruby
freerobby has joined #ruby
djellemah has quit [Quit: Leaving]
chouhoulis has joined #ruby
bkxd has joined #ruby
chouhou__ has joined #ruby
hahuang61 has quit [Ping timeout: 264 seconds]
giz|work has quit [Ping timeout: 260 seconds]
tomphp has quit [Ping timeout: 276 seconds]
djbkd has joined #ruby
guacamole has quit [Quit: leaving]
djellemah__ has joined #ruby
guacamole has joined #ruby
chouhoul_ has quit [Ping timeout: 276 seconds]
hipertracker has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
AndrewIsHere has quit [Ping timeout: 250 seconds]
AndrewIsHere has joined #ruby
thiesen has joined #ruby
djellemah_ has quit [Ping timeout: 260 seconds]
TPug has joined #ruby
tomphp has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hiyosi has joined #ruby
tyang has joined #ruby
rubie has quit []
rodfersou|lunch is now known as rodfersou
AzureStigma has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has quit [Remote host closed the connection]
t1mxg0d has joined #ruby
hiyosi has quit [Ping timeout: 250 seconds]
ponga has quit [Quit: Connection closed for inactivity]
skade has joined #ruby
bkxd has quit [Ping timeout: 258 seconds]
macsteps has quit [Remote host closed the connection]
hakunin has joined #ruby
spiette has quit [Ping timeout: 265 seconds]
spiette has joined #ruby
joonty has quit [Quit: This computer has gone to sleep]
spiette has quit [Max SendQ exceeded]
skade has quit [Ping timeout: 250 seconds]
spiette has joined #ruby
Akuma has quit [Read error: Connection reset by peer]
skade has joined #ruby
DoubleMalt has joined #ruby
thiesen has quit [Ping timeout: 240 seconds]
AzureStigma has joined #ruby
xall has joined #ruby
l4v2 has quit [Quit: l4v2]
TomyWork has quit [Ping timeout: 276 seconds]
spiette has quit [Max SendQ exceeded]
johnmilton has quit [Remote host closed the connection]
kirun has joined #ruby
sumobob has quit [Ping timeout: 258 seconds]
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
poguez_ has joined #ruby
Rickmasta has joined #ruby
roger_rabbit has joined #ruby
shinnya has quit [Ping timeout: 244 seconds]
t1mxg0d has quit [Quit: WeeChat 1.5]
YaknotiS has joined #ruby
AzureStigma has quit [Quit: Gotta run..]
t1mxg0d has joined #ruby
Pupeno has joined #ruby
skade has quit [Ping timeout: 240 seconds]
wrkrcoop has joined #ruby
gusrub has quit [Remote host closed the connection]
<wrkrcoop> im writing some specs. and i have some dummy data. the dummy data are hashes … i was thinking of storing them in their own files as txt and reading them and turning them into hashes
<jhass> just use JSON or YAML
<wrkrcoop> jhass: ok ill use json. but would i just read the file with File.read?
<wrkrcoop> or how would i read it from the file?
<jhass> sure
<wrkrcoop> so i read each line then strip each line of the new line and then turn it into hash?
<Papierkorb> Sounds more like a job for shared_examples
<jhass> no, just use a JSON array as the outer container
<wrkrcoop> jhass: what is that?
<wrkrcoop> so i dont want to read line by line?
<jhass> >> JSON.parse(%([{"foo": 1}, {"bar": 2}]))
<ruby[bot]> jhass: # => uninitialized constant JSON (NameError) ...check link for more (https://eval.in/616304)
<jhass> >> require "json"; JSON.parse(%([{"foo": 1}, {"bar": 2}]))
<ruby[bot]> jhass: # => [{"foo"=>1}, {"bar"=>2}] (https://eval.in/616305)
<jhass> no, you don't
<wrkrcoop> so read the file line by ilne, strip the new line, then use jSON.parsE?
<jhass> no
<wrkrcoop> so if im not reading line by line how do i get the data out of the file?
hk238 has quit [Quit: http://www.kvirc.net/ 4.9.1 Aria]
<jhass> you pass it entirely to JSON.parse
<wrkrcoop> OH
<wrkrcoop> what file method would i need to use? FIle.read(‘path’, r) ?
<jhass> sure
t1mxg0d is now known as dmix
<wrkrcoop> ok thanks
workmad3 has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
artisangoose has joined #ruby
dminuoso_ has quit [Ping timeout: 258 seconds]
dminuoso_ has joined #ruby
<joevandyk> will someone help me debug a ssl connection problem by running a weird script on your computer? :) we're having one connection every 100 fail to this server. https://gist.githubusercontent.com/joevandyk/88bd7bf8f230733e7a722998ccce7677/raw/df3fd5bfd7b4ca3cac0e8155469b0f09d5801b64/gistfile1.txt They said they upgraded to sha-256 today.. but I'm confused why it's failing one out of 100 times
<joevandyk> it can take a while for the error to show up
matp has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Papierkorb> ”You're doing it wrong”
tomphp has joined #ruby
<joevandyk> Papierkorb: i did that this morning actually.. didn't seem to help
<joevandyk> so i figure it was something i'm doing wrong
byteflame has joined #ruby
<Papierkorb> What, run the tester? Well, that alone won't fix anything, yes.
TomyLobo has joined #ruby
<joevandyk> lol
<Papierkorb> Disable RC4 for one, that algorithm is completely broken. Also reconfigure your DH parameters, your current ones are not too good.
Pupeno has quit [Remote host closed the connection]
tyang has quit [Ping timeout: 252 seconds]
AlexRussia has quit [Ping timeout: 264 seconds]
ElFerna has joined #ruby
<drbrain> joevandyk: you might want to talk with some DNS people too: https://gist.github.com/drbrain/fe00e815d62478bc562f349ca312d053
<joevandyk> drbrain: why?
<joevandyk> infinite loop?
bocaneri has quit [Remote host closed the connection]
<drbrain> DNS resolvers are smart enough to not loop forever, but the CNAME pointing to itself is silly regardless
<Papierkorb> drbrain: $ dig only shows a single A record for me
<jhass> joevandyk: the server does send something else every now and then https://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20160802_202757.png
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> nothing you client can do much about
<drbrain> Papierkorb: `dig hostname` == `dig -t A hostname` by default
tyang has joined #ruby
<Papierkorb> drbrain: $ dig webservice.s6.exacttarget.com ANY
nerium has joined #ruby
<drbrain> I guess dig stops on first thing it finds?
<jhass> nope
<drbrain> if I ask for CNAME I get a CNAME, if I ask for MX I get nothing
matp has joined #ruby
<jhass> ANY is its own query, it does not just enumerate client side
<joevandyk> jhass: so i should ask them to fix?
<jhass> joevandyk: yes
<Papierkorb> Doesn't show me any CNAME even if I ask it for it
johnmilton has joined #ruby
<jhass> drbrain: host is considered trash by most DNS folk I know, so I'd trust it less than dig
<jhass> and ditto Papierkorb for me
whathappens has joined #ruby
kavanagh has quit [Quit: That's all folks!]
davedev24 has joined #ruby
<Papierkorb> Asking the four configured nameservers give the same results too
<drbrain> huh, must be a bug inside ubuntu or VMWare
sepp2k has quit [Read error: Connection reset by peer]
<drbrain> outside my VM I get no CNAME
<joevandyk> jhass: can you explain exactly what's different in that response? I'm not well versed in this area.
<aeruder> i'd say that means things haven't fully propagated yet, dig takes another argument @8.8.8.8 instead of using system dns
<aeruder> dig -t CNAME webservice.s6.exacttarget.com @8.8.8.8
<Papierkorb> aeruder: I explicitly asked their own 4 NS's too
<drbrain> aeruder: I don't think so, inside VM, server localhost#53 shows CNAME, outside VM, no CNAME
flashpoint9 has quit [Remote host closed the connection]
<jhass> joevandyk: still looking, it's longer than the working one for starters, which is a big red flag that something is different
<Papierkorb> drbrain: Does vmware have a broken DNS proxy?
<drbrain> Papierkorb: it wouldn't surprise me
<joevandyk> jhass: they said they were upgrading to sha-256 today
<aeruder> drbrain: i don't understand how a bug could cause that with the @syntax
der-landgraf has joined #ruby
<drbrain> aeruder: with @ it shows no cname inside VM
<aeruder> but i could totally understand it being some dorky thing with nat'd vmware and crappy dns proxy
flashpoint9 has joined #ruby
<aeruder> drbrain: really? with 8.8.8.8 ?
<drbrain> aeruder: why are you surprised? @ bypasses the broken resolver
johnmilton has quit [Ping timeout: 258 seconds]
<drbrain> I think we're talking past each other and actually agree
jmignault has joined #ruby
<aeruder> maybe :)
TheWhip has quit [Remote host closed the connection]
<jhass> so it's a different cert, albeit seemingly same public key
<Papierkorb> wat
TheWhip has joined #ruby
mooru has joined #ruby
<aeruder> Papierkorb++ lol
<jhass> joevandyk: https://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20160802_203754.png well different issuer, so I guess in the bad case they miss serving some intermediate cert
<Papierkorb> joevandyk: Are there two machines in a hot standby setup?
macsteps has joined #ruby
umdstu has quit [Quit: umdstu]
<aeruder> "Symantec"
<joevandyk> Papierkorb: i have no idea.. this is a salesforce owned system. we use them to send emails. :)
<Papierkorb> No idea about Salesforces. I don't even know what they are, so there's that
CloCkWeRX has quit [Ping timeout: 265 seconds]
memorasus has joined #ruby
chouhou__ has quit [Remote host closed the connection]
TheWhip has quit [Ping timeout: 265 seconds]
ElFerna has quit [Ping timeout: 276 seconds]
<joevandyk> jhass: thank you!
mtkd has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
fergal has joined #ruby
mtkd has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skweek has quit [Ping timeout: 260 seconds]
bkxd has joined #ruby
CloCkWeRX has joined #ruby
johnmilton has joined #ruby
spider-mario has joined #ruby
jackjackdripper has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
l4v2 has joined #ruby
macsteps has quit [Remote host closed the connection]
haylon has left #ruby ["WeeChat 1.5"]
QORRiE has joined #ruby
<wrkrcoop> im trying to turn a string of json into a hash using JSON.parse. when i use binding.pry it works in my program, but when i try it in my spec it complains about a parse error …
<jhass> well, fix the parse error
tomphp has joined #ruby
<wrkrcoop> it doesnt say where it is, it just says ‘parse erorr'
<jhass> I doubt that
<wrkrcoop> omg its because i wasn’t using JRUBY
<jhass> I doubt that
<wrkrcoop> its true
<wrkrcoop> i didnt change anything
<jhass> I doubt that
SilverKey has joined #ruby
flashpoint9 has joined #ruby
<wrkrcoop> haha
<wrkrcoop> umm maybe its because i didnt run bundle … idk
SilverKey has quit [Max SendQ exceeded]
<jhass> I doubt that
Devalo has joined #ruby
bkxd has quit [Ping timeout: 244 seconds]
Macaveli has joined #ruby
SilverKey has joined #ruby
pandaant has quit [Remote host closed the connection]
SilverKey has quit [Max SendQ exceeded]
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SilverKey has joined #ruby
Rickmasta has joined #ruby
tyang has quit [Ping timeout: 276 seconds]
mooru has joined #ruby
rajdesai has joined #ruby
edwinvdgraaf has joined #ruby
dhollinger has quit [Ping timeout: 260 seconds]
replay has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Dimik has joined #ruby
shinnya has joined #ruby
aryaching has quit [Ping timeout: 260 seconds]
aryaching has joined #ruby
Macaveli has joined #ruby
postmodern has joined #ruby
mooru_ has joined #ruby
mooru has quit [Ping timeout: 240 seconds]
hipertracker has quit [Quit: hipertracker]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
minimalism has joined #ruby
thejoecarroll has joined #ruby
zacts has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
blackmesa has quit [Ping timeout: 250 seconds]
SilverKey has quit [Quit: Halted.]
hakunin has quit [Remote host closed the connection]
nfk has quit [Quit: Try memory.free_dirty_pages=true in about:config]
hakunin has joined #ruby
dhollinger has joined #ruby
Tomatosoup- has joined #ruby
Tomatosoup- has left #ruby ["Leaving"]
tubulife- has joined #ruby
alfiemax has joined #ruby
byteflame has quit [Ping timeout: 244 seconds]
[Butch]_ has joined #ruby
byteflame has joined #ruby
tyang has joined #ruby
fullstack has quit [Changing host]
fullstack has joined #ruby
bascht_ has joined #ruby
Spami has joined #ruby
[Butch] has quit [Ping timeout: 260 seconds]
[Butch]_ is now known as [Butch]
tubulife- has quit [Ping timeout: 260 seconds]
tmtwd has joined #ruby
sharkman has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
hakunin has quit [Remote host closed the connection]
mooru_ has quit [Quit: Textual IRC Client: www.textualapp.com]
macsteps has joined #ruby
pawnbox has quit [Remote host closed the connection]
<kegster> If I want to run a function that's part of an API so I can't control it-- how can I catch ANY error it may give and just do something instead of the script crashing? very new to ruby here and just have to use it for interaction with an API when needed heh
borodin has joined #ruby
pawnbox has joined #ruby
<borodin> if I have an array of hashes, and I want to edit one of them, choosing the one to edit based on a value of one of it's tuples, how do I do that? for example: [{"a"=>1,"b"=>2},{"a"=>3,"b"=>7},{"a"=>1,"b"=>4}]
<elomatreb> kegster: If you want to catch an error, you use begin/rescue blocks or statements. If you want to rescue (basically) anything, you can use a rescue statement without an argument
<borodin> I want to set "a" to 2 where "b" is 2, but I need to add another tuple as well, so I really need to pull the hash out and then put it back in
<kegster> elomatreb, so i have 3 functions i need to run, 1 line per function. i can put all 3 within a begin and then just rescue it?
<kegster> i tried begin / 3 lines of potentially errored code / rescue / my code to run if no errors / end
ineb has quit [Quit: leaving]
<elomatreb> And did it work?
<elomatreb> Ah. the rescue code runs *only* if there is an error
RegulationD has quit [Remote host closed the connection]
the_rhizo has joined #ruby
yfeldblum has joined #ruby
nettoweb has joined #ruby
<aeruder> you'd want else <foo> for the no error case
doublemalt_ has joined #ruby
DoubleMalt has quit [Read error: No route to host]
bkxd has joined #ruby
<elomatreb> aeruder: I have yet to see that feature being used in actual code
spiette has joined #ruby
TomyLobo has quit [Disconnected by services]
pzvxewlxmllzncdz has joined #ruby
pzvxewlxmllzncdz is now known as nmvudnfpktqoodup
nmvudnfpktqoodup is now known as TomyLobo
<aeruder> elomatreb: it seems rarely useful, maybe for closing out some sort of transaction as opposed to aborting it in the other cases
shinnya has quit [Ping timeout: 252 seconds]
wrkrcoop has joined #ruby
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tyang has quit [Ping timeout: 264 seconds]
last_staff has joined #ruby
nando294021 has quit [Ping timeout: 252 seconds]
symm- has joined #ruby
ChiefAlexander has joined #ruby
tyang has joined #ruby
ur5us has joined #ruby
dmix has quit [Read error: Connection reset by peer]
dreamyspell has joined #ruby
[Butch] has quit [Ping timeout: 276 seconds]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
blackgoat has joined #ruby
sergey_makagon has joined #ruby
solars has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
Devalo has quit [Ping timeout: 244 seconds]
<kegster> elomatreb, no it didn't work
<kegster> sorry i'm on hotspot
<kegster> the API is throwing a java error
eizua has quit [Quit: Leaving]
<kegster> i just had to use the api to get around it lol
bkxd has quit [Ping timeout: 240 seconds]
kriskropd has quit [Quit: WeeChat 0.4.2]
rajdesai has quit [Remote host closed the connection]
tmtwd has quit [Ping timeout: 265 seconds]
sharkman has joined #ruby
dreamyspell has quit [Ping timeout: 250 seconds]
dionysus69 has quit [Ping timeout: 264 seconds]
djbkd has quit [Remote host closed the connection]
zacts has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
roflmyeggo has joined #ruby
dreamyspell has joined #ruby
zacts has joined #ruby
<jhass> borodin: ruby is pass by reference, so no need to put anything back in. Just use .find to get a hold of it
<jhass> .find {|h| h["b"] == 2 }.merge!("a" => 2, "c" => 2)
<hightower2> Hey folks, 6 months ago or so someone here gave a 3-4 line recipe how to change the class' parent/superclass in runtime (it involved a pointer manipulation in C). Does anyone what that code snippet was?
<hightower2> s/Does anyone/Does anyone remember/
djbkd has quit [Ping timeout: 252 seconds]
solars has joined #ruby
tyang has quit [Quit: Leaving]
blackmesa has joined #ruby
rajdesai has joined #ruby
<wrkrcoop> can i stub a method and in the return it takes an argument?
<jhass> most likely
<jhass> hightower2: some more googling https://gist.github.com/brainopia/d44476f93880694d5205
<hightower2> jhass, this other thing seems very similar to what I had in mind. Thanks!
<jhass> oh and of course don't actually do this ;)
<hightower2> Too late buddy :)
vuoto has joined #ruby
djbkd has joined #ruby
jenrzzz has joined #ruby
sergey_makagon has quit [Remote host closed the connection]
marr has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
lazyatom has quit [Quit: Connection closed for inactivity]
fmcgeough has quit [Quit: fmcgeough]
hakunin has joined #ruby
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
LuckyABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
postmodern has quit [Ping timeout: 250 seconds]
Tristan-Speccy has quit [Ping timeout: 240 seconds]
doublemalt_ has quit [Ping timeout: 244 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kirun has quit [Quit: Client exiting]
ecnalyr has quit []
rajdesai has quit [Remote host closed the connection]
<OTORelic1> q
swills_ has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 250 seconds]
leea has joined #ruby
synthroi_ has quit []
bkxd has joined #ruby
sharkman has quit [Ping timeout: 264 seconds]
ixti has quit [Quit: WeeChat 1.5]
sharkman has joined #ruby
borodin has quit [Ping timeout: 250 seconds]
postmodern has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 240 seconds]
doublemalt_ has joined #ruby
<wrkrcoop> im trying to test this one method which creates threads. im getting back an array of threads. can ilook into those dead threads to see what data the contain? im expecting an object from all of them
<toretore> no
<jhass> the last expression of a threads body is available as Thread#value
yardenbar has quit [Ping timeout: 250 seconds]
kavanagh has joined #ruby
<wrkrcoop> thank you. will try that
Rickmasta has joined #ruby
hipertracker has joined #ruby
jenrzzz has quit [Ping timeout: 250 seconds]
der-landgraf has quit [Quit: WeeChat 1.5]
LuckyABA has joined #ruby
ineb has joined #ruby
AndyBotwin has quit [Quit: Leaving]
solars has quit [Ping timeout: 240 seconds]
matcouto has joined #ruby
last_staff has quit [Quit: last_staff]
bmurt has joined #ruby
kavanagh has quit [Quit: That's all folks!]
goofy has quit [Quit: Lost terminal]
nando293921 has joined #ruby
eljimmy has joined #ruby
RegulationD has joined #ruby
<wrkrcoop> im trying to stub a method but i want the argument that the real method gets
<wrkrcoop> is there a way to do that?
macsteps has quit [Remote host closed the connection]
hahuang61 has joined #ruby
bmurt has quit [Ping timeout: 276 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
Ariadeno has quit [Ping timeout: 250 seconds]
nando293921 has quit [Ping timeout: 250 seconds]
Ariadeno has joined #ruby
rodfersou has quit [Quit: leaving]
rajdesai has joined #ruby
jenrzzz has joined #ruby
skade has joined #ruby
solars has joined #ruby
mistermo_ has joined #ruby
ldnunes has quit [Quit: Leaving]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang61 has quit [Ping timeout: 244 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
RegulationD has quit [Read error: Connection reset by peer]
dminuoso_ has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
GinoManWorks has joined #ruby
dminuoso_ has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shmuli has joined #ruby
jaequery has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
malconis_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
dminuoso_ has quit [Ping timeout: 258 seconds]
Zapperino has quit [Quit: Bye]
dminuoso_ has joined #ruby
Zapperino has joined #ruby
swills_ has joined #ruby
ruid has joined #ruby
sharkman has quit [Ping timeout: 260 seconds]
mooru has joined #ruby
jhooker has quit [Ping timeout: 258 seconds]
doublemalt_ has quit [Remote host closed the connection]
jhooker has joined #ruby
rocknrollmarc has quit [Read error: Connection reset by peer]
djbkd has quit [Remote host closed the connection]
Zapperino has quit [Read error: Connection reset by peer]
Zapperino has joined #ruby
solrize has joined #ruby
AzureStigma has joined #ruby
<solrize> what's the simplest way in ruby to execute a block of code 17 times?
killerkamel has quit [Ping timeout: 252 seconds]
minimalism has quit [Quit: minimalism]
ChiefAlexander has quit [Quit: Leaving...]
<toretore> 17.times{ code }
<solrize> i'm asking because of a discussion happening in the python community about whether it's bogus to require using a for loop with an index
AndChat|460649 has joined #ruby
<solrize> aha thanks
byteflame has quit [Ping timeout: 240 seconds]
AndChat|460649 has quit [Client Quit]
Zapperino has quit [Read error: Connection reset by peer]
Zapperino has joined #ruby
solrize has left #ruby ["Leaving"]
JeanCarloMachado has joined #ruby
djbkd has joined #ruby
shmuli has quit [Remote host closed the connection]
shmuli has joined #ruby
shmuli has quit [Remote host closed the connection]
Rickmasta has joined #ruby
jmignault has quit [Ping timeout: 276 seconds]
ruid has quit [Ping timeout: 265 seconds]
toretore has quit [Ping timeout: 258 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vuoto has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
<OTORelic1> q!
ensyde has quit [Quit: WeeChat 1.5]
jhack has joined #ruby
weemsledeux has joined #ruby
davedev24 has quit [Remote host closed the connection]
sp_ has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
spudowiar has joined #ruby
nhhc has joined #ruby
zeroDi has joined #ruby
OTORelic1 has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has quit [Quit: WeeChat 1.5]
rajdesai_ has joined #ruby
bkxd has joined #ruby
QORRiE has quit [Quit: Leaving]
nerium has quit [Read error: Connection reset by peer]
nerium has joined #ruby
rajdesai has quit [Ping timeout: 258 seconds]
shmuli has joined #ruby
swills_ has quit [Ping timeout: 252 seconds]
Ariadeno has quit [Ping timeout: 240 seconds]
Ariadeno has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
<fergal> guys, if i have an if statement that calls a function, like `if myfunc …`, and myfunc returns an empty array like [], why does the if body execute when if i change my if to `if myfunc == true …` the if body fails to execute?
<fergal> so i guess my question is why does myfunc returning a [] evaluate to true, whereas checking that the result of myfunc is == true, evaluate to false?
cd-rum has joined #ruby
<drbrain> fergal: the only objects that ruby consides non-true or `nil` and `false`
<drbrain> 0, [], "" are all considered truthy
<drbrain> maybe you want if myfunc.empty?
<fergal> drbrain: but although they are truthy they do not == true?
tvw has joined #ruby
<drbrain> they do not equal true
<drbrain> only true == true
axl_ has quit [Quit: axl_]
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<wrkrcoop> im trying to write a spec to test my threads. im using a file to mock out an endpoint, but im getting this error about
Ariadeno has quit [Ping timeout: 276 seconds]
<wrkrcoop> ah nvm
Bugboy1028 has quit [Ping timeout: 258 seconds]
bkxd has quit [Ping timeout: 265 seconds]
Ariadeno has joined #ruby
grenierm has joined #ruby
swills_ has joined #ruby
byteflame has joined #ruby
macsteps has joined #ruby
Serpent has joined #ruby
nando293921 has joined #ruby
djbkd has quit [Quit: My people need me...]
macsteps has quit [Ping timeout: 258 seconds]
marxarelli|afk has quit [Max SendQ exceeded]
UserInNeed has quit [Ping timeout: 276 seconds]
RegulationD has quit [Remote host closed the connection]
byteflame has quit [Ping timeout: 244 seconds]
UserInNeed has joined #ruby
Silthias1 has joined #ruby
claw has quit [Ping timeout: 260 seconds]
AzureStigma is now known as AzureStigma|Away
AzureStigma|Away has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
definiv has joined #ruby
claw has joined #ruby
chouhoulis has quit [Remote host closed the connection]
definiv has quit [Client Quit]
chouhoulis has joined #ruby
jhooker has quit [Quit: Leaving]
grenierm has quit [Quit: grenierm]
Silthias has quit [Ping timeout: 250 seconds]
grenierm has joined #ruby
Rickmasta has joined #ruby
etetz has quit [Remote host closed the connection]
shmuli has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
etetz has joined #ruby
SilverKey has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
Es0teric has joined #ruby
killerkamel has joined #ruby
<wrkrcoop> is it possible to read a file at the same time with 10 different threads?
mistermo_ has quit [Remote host closed the connection]
aries_liuxueyang has quit [Ping timeout: 276 seconds]
<baweaver> readonly, sure
<baweaver> though the second you try and write...
<baweaver> well, let's just say Mutex is not a fun field of study
mistermocha has joined #ruby
etetz has quit [Ping timeout: 250 seconds]
firstdayonthejob has quit [Ping timeout: 264 seconds]
<wrkrcoop> yeah im not writing to the file
fergal has quit [Quit: fergal]
<wrkrcoop> just trying to run a spec
killerkamel has quit [Ping timeout: 244 seconds]
<baweaver> What I would do is read the file before the threads even have to open
minimalism has joined #ruby
<baweaver> considering it's read-only it's best not to have to read it more than once
astrobun_ has joined #ruby
the_rhizo has quit [Ping timeout: 264 seconds]
mistermocha has quit [Ping timeout: 250 seconds]
<aeruder> you need to open the file 10 times (once per thread)
mooru has quit [Quit: Textual IRC Client: www.textualapp.com]
fergal has joined #ruby
<aeruder> or do what baweaver just suggested
polishdub has quit [Quit: Leaving]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
__void has quit [Ping timeout: 276 seconds]
<drbrain> there's one seek pointer per file handle
<drbrain> if you need to read line-by-line open the file multiple times
<drbrain> or other length-based reads
Spami has quit [Quit: This computer has gone to sleep]
swills_ has quit [Ping timeout: 258 seconds]
Rickmasta has joined #ruby
<wrkrcoop> im trying to stub a method, but i need the stub to get an argument from inside the method im testing …. how can i do that?
agent_white has quit [Quit: leaving]
<drbrain> how does the non-stubbed method get that argument?
__void has joined #ruby
<wrkrcoop> drbrain: it has two params
<wrkrcoop> im thinking i can mock the class … and the method will get overridden
<drbrain> you can customize a method on just one instance of it
<wrkrcoop> drbrain: does that mean mocking?
<leea> offtopic question but should i read the pragmatic programmer or code complete first
Madplatypus has joined #ruby
<drbrain> o = ObjectWithMethodIWantToStub.new; def o.method_I_want_to_stub(arg1, arg2) return important_result_here; end
<wrkrcoop> i see ok ill try that
shmuli has joined #ruby
etetz has joined #ruby
<drbrain> leea: you should skim-read Pragmatic Programmer, read Code Complete, then read Pragmatic Programmer again after 6 months or so
rajdesai_ has quit [Remote host closed the connection]
<leea> alright sounds good drbrain ty
Spami has joined #ruby
<drbrain> even if you have coding experience it's hard to internalize everything Pragmatic Programmer recommends
SCHAAP137 has quit [Quit: Leaving]
grenierm has quit [Quit: grenierm]
Serpent has left #ruby ["Leaving"]
fergal has quit [Quit: fergal]
solars has quit [Ping timeout: 240 seconds]
etetz has quit [Ping timeout: 252 seconds]
airdisa has quit []
solars has joined #ruby
Ishido has quit [Remote host closed the connection]
<leea> drbrain yes it seems that way, tons of practical advice but not something you can implement right away
artisangoose has quit [Quit: Textual IRC Client: www.textualapp.com]
der-landgraf has joined #ruby
zapata has quit [Quit: WeeChat 1.5]
Danny_ has joined #ruby
saneax_AFK is now known as saneax
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
byteflame has joined #ruby
bkxd has joined #ruby
Silthias1 has quit [Ping timeout: 260 seconds]
etetz has joined #ruby
sharkman has joined #ruby
Gasher has quit [Quit: Leaving]
etetz has quit [Ping timeout: 240 seconds]
hipertracker has quit [Quit: hipertracker]
<hightower2> Hey I don't get this behavior of Array#grep: a= ['a','b','c']; a.grep(/a/) == ['a']. However when values are numbers, e.g. a = [1,2,3], then a.grep(/1/) is []. What's the catch here?
rajdesai has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
solars has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
wrkrcoop has joined #ruby
hahuang61 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leea has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AzureStigma has joined #ruby
<drbrain> >> [1, 2, 3].grep 1
<ruby[bot]> drbrain: # => [1] (https://eval.in/616426)
<drbrain> hightower2: /1/ === 1 is false, because a regular expression only works against Strings (and #to_str-ables)
<hightower2> drbrain, right, figured it out in the meantime myself too. Will need to use #select instead of #grep
jaequery has quit [Ping timeout: 250 seconds]
<hightower2> thanks
bkxd has quit [Ping timeout: 258 seconds]
<drbrain> o_O
tubuliferous_ has joined #ruby
<drbrain> you're looking for numbers with a 1 anywhere? so 10 would match?
hahuang61 has quit [Ping timeout: 252 seconds]
l4v2 has quit [Quit: l4v2]
dessm has joined #ruby
shmuli has quit [Ping timeout: 244 seconds]
<davorb> hightower2: you can still use grep if you map to_s on the array
<davorb> but yeah, select is better
cschnei__ has quit [Remote host closed the connection]
c0mrad3 has quit [Quit: Connection closed for inactivity]
freerobby has quit [Quit: Leaving.]
<hightower2> davorb, right, right, sure, thanks
SilverKey has quit [Quit: Halted.]
nando294021 has joined #ruby
nando294021 has quit [Client Quit]
chouhoulis has joined #ruby
tubuliferous_ has quit [Ping timeout: 244 seconds]
shmuli has joined #ruby
RegulationD has joined #ruby
tvw has quit [Ping timeout: 260 seconds]
d0nn1e has quit [Ping timeout: 244 seconds]
jhack has quit [Quit: jhack]
Silthias has joined #ruby
d0nn1e has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
quesker has joined #ruby
nando293921 has quit [Ping timeout: 264 seconds]
astrobun_ has quit [Remote host closed the connection]
tenderlove has joined #ruby
movrbx has joined #ruby
polyidus has joined #ruby
<movrbx> adolf hitler, heil him and you shall get shelter by satan our lord
cyphase has quit [Ping timeout: 264 seconds]
<baweaver> !troll movrbx
movrbx was kicked from #ruby by ruby[bot] [trolling is a bannable offense, see http://ruby-community.com/pages/user_rules]
<quesker> this doesn't remove the trailing dash: s.sub!(/^-|-$/, '')
<matthewd> quesker: It does if there isn't a leading one
<baweaver> !rubular
<quesker> true that
<quesker> so how do you do ///g?
<baweaver> hm, fine. http://rubular.com/
<baweaver> gsub
<quesker> ah thanks
<baweaver> rubular will let you make a bunch of test strings to try out a regex against
mistermocha has joined #ruby
<quesker> ok
karapetyan has quit [Remote host closed the connection]
<drbrain> quesker: use gsub
<quesker> yeah he said that ty
<drbrain> >> ["-hello-".sub(/^-|-$/, ''), "-hello-".gsub(/^-|-$/, '')]
<ruby[bot]> drbrain: # => ["hello-", "hello"] (https://eval.in/616429)
l4v2 has joined #ruby
Rickmasta has joined #ruby
Rodya_ has quit [Remote host closed the connection]
dopamean_ has quit [Ping timeout: 240 seconds]
AzureStigma has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
polyidus has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has joined #ruby
koooge has joined #ruby
killerkamel has joined #ruby
mistermocha has quit [Ping timeout: 250 seconds]
bascht_ has quit [Ping timeout: 250 seconds]
cyphase has joined #ruby
solars has joined #ruby
edwardly has quit [Ping timeout: 265 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
nirix has left #ruby ["Textual IRC Client: www.textualapp.com"]
mostlybadfly has joined #ruby
Rodya_ has quit [Remote host closed the connection]
rkazak has joined #ruby
Danny_ has quit []
dopamean_ has joined #ruby
zeroDi has quit [Quit: WeeChat 1.5]
Rodya_ has joined #ruby
Derperperd has quit [Quit: Derperperd]
ICantCook has joined #ruby
shmuli has quit [Remote host closed the connection]
shmuli has joined #ruby
shmuli has quit [Remote host closed the connection]
pnbeast has joined #ruby
bearlulz has joined #ruby
bearlulz has quit [Remote host closed the connection]
bearlulz has joined #ruby
whathappens has quit [Remote host closed the connection]
rajdesai has quit [Remote host closed the connection]
whathappens has joined #ruby