havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com || Ruby 2.5.0, 2.4.3, 2.3.6, 2.6.0-preview1: https://www.ruby-lang.org || Paste 4+ lines of text to https://gist.github.com || Rails questions? Ask in #RubyOnRails || Books: https://goo.gl/wpGhoQ || Logs: https://irclog.whitequark.org/ruby
orbyt_ has joined #ruby
bigblind has quit [Ping timeout: 264 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
willmichael has joined #ruby
jordanm has joined #ruby
alfiemax has joined #ruby
willmichael has quit [Read error: Connection reset by peer]
cschneid has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 264 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Freshnuts has joined #ruby
cschneid has joined #ruby
sauvin_ has joined #ruby
sauvin_ is now known as bocaneriu
bocaneriu is now known as bocaneri
AJA4350 has quit [Remote host closed the connection]
houhoulis has joined #ruby
AJA4350 has joined #ruby
Psybur has joined #ruby
houhouli_ has joined #ruby
DTZUZU has quit [Quit: WeeChat 1.9]
cschneid has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
houhoulis has quit [Ping timeout: 260 seconds]
willmichael has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
schneider has quit [Ping timeout: 265 seconds]
AJA4350 has quit [Ping timeout: 260 seconds]
phaul has quit [Ping timeout: 264 seconds]
amatas has quit [Quit: amatas]
workmad3 has joined #ruby
Psybur has quit [Quit: Leaving]
mtkd has quit [Ping timeout: 264 seconds]
BaD_CrC has joined #ruby
alfiemax has joined #ruby
mtkd has joined #ruby
bigblind has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
Puffball has quit [Remote host closed the connection]
Freshnuts has quit [Ping timeout: 264 seconds]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
John_Ivan has quit [Read error: Connection reset by peer]
mtkd has quit []
alex`` has quit [Ping timeout: 265 seconds]
adlerdias has quit [Quit: adlerdias]
ryzokuken has quit [Quit: Connection closed for inactivity]
x0f has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
Dimik has quit [Ping timeout: 256 seconds]
x0f has joined #ruby
orbyt_ has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
cagomez has quit [Remote host closed the connection]
marr has quit [Ping timeout: 264 seconds]
cschneid has quit [Ping timeout: 264 seconds]
sylario has quit [Quit: Connection closed for inactivity]
cschneid has joined #ruby
BTRE has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
alfiemax has joined #ruby
GinoMan has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
govg has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
kapil___ has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
arescorpio has joined #ruby
alfiemax has joined #ruby
alfiemax has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
isg has joined #ruby
x0f has quit [Ping timeout: 268 seconds]
x0f has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
isg has quit [Client Quit]
cschneid has joined #ruby
dinfuehr_ has quit [Ping timeout: 256 seconds]
dinfuehr has joined #ruby
mniip has quit [Ping timeout: 256 seconds]
mniip has joined #ruby
alfiemax has joined #ruby
workmad3 has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
cdg has joined #ruby
workmad3 has quit [Ping timeout: 248 seconds]
habs has quit [Read error: Connection reset by peer]
Guest74 has joined #ruby
<Guest74> Hi guys
cdg has quit [Remote host closed the connection]
gizmore has joined #ruby
sammi` has quit [Quit: Lost terminal]
<mozzarella> wassup bruhhhh
<Guest74> hahah
<Guest74> can tu test my program?
bigblind has quit [Ping timeout: 240 seconds]
<mozzarella> what does it do
bocaneri has quit [Ping timeout: 264 seconds]
sauvin_ has joined #ruby
gizmore|2 has quit [Ping timeout: 260 seconds]
willmichael has quit [Ping timeout: 240 seconds]
JammyHammy has quit [Read error: Connection reset by peer]
sammi` has joined #ruby
<Guest74> mozzarella
<Guest74> try it
apparition has joined #ruby
Guest74_ has joined #ruby
Guest74_ has quit [Client Quit]
Guest74 is now known as JonaBurgos
<JonaBurgos> mozzarella it's an automated ping
\void has quit [Quit: So long, and thanks for all the fish.]
sameerynho has quit [Ping timeout: 264 seconds]
<weaksauce> you should hardly ever need to use to_i
<JonaBurgos> Okay, it's my first program weaksauce
<JonaBurgos> weaksauce: Did it work well?
<weaksauce> i didn't try it but just looked at it
<JonaBurgos> weaksauce: ok
<weaksauce> just a few thoughts: typical ruby is indented 2 spaces
<weaksauce> array.new is not usually used
<weaksauce> same with hash.new
nowhereman_ has quit [Ping timeout: 256 seconds]
nowhere_man has joined #ruby
<weaksauce> unless you need a default when you have a missing key
<JonaBurgos> @a = {} or @ b = []
<weaksauce> yeah
<weaksauce> @mi_array.each on line 78 is not doing anything
<JonaBurgos> weaksauce: Wow, I will connect more often here, everything learned from Google
alfiemax has quit [Remote host closed the connection]
<JonaBurgos> weaksauce: ok, if I do not occupy that line the result is 0
<JonaBurgos> Found 0 host(s) in 3.116 seconds | Range: 1-255 | Timeout: 1.
naprimer2 is now known as beremenjushka
<weaksauce> actually yeah that does do something my bad
<weaksauce> not a bad first go at it JonaBurgos though. not idiomatic ruby but it looks like it would work
<JonaBurgos> weaksauce: it works
<JonaBurgos> weaksauce: Do you know a lot about Ruby?
<weaksauce> i know a decent bit sure
<JonaBurgos> weaksauce ok
<weaksauce> there are many in here that know a lot more about ruby than me though
<JonaBurgos> in a program I need to clean the html code and just leave the url
jshjsh has joined #ruby
JoshS has quit [Ping timeout: 240 seconds]
<JonaBurgos> example: href="www.google.com/a/b/c" </>. ...
<JonaBurgos> to : www.google.com/a/b/c"
<JonaBurgos> weaksauce Can that be done with pure ruby?
<JonaBurgos> weaksauce With Perl you can
<JonaBurgos> Perl is very complete when it comes to editing strings
willmichael has joined #ruby
<weaksauce> sure ruby can do that
milardovich has quit [Remote host closed the connection]
<JonaBurgos> weaksauce: How can I clean that example line, would you show me?
<JonaBurgos> only this: href="www.google.com/a/b/c" </>
<weaksauce> >>x="href=\"www.google.com/a/b/c\" </>" x.sub(/href="([^"]*).*/, '\1')
<ruby[bot]> weaksauce: # => /tmp/execpad-cca3659eb3c4/source-cca3659eb3c4:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/969748)
drewmcmillan has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
<weaksauce> >>x='href="www.google.com/a/b/c" </>'; x.sub(/href="([^"]*).*/, '\1')
<ruby[bot]> weaksauce: # => "www.google.com/a/b/c" (https://eval.in/969749)
<weaksauce> many paths to rome though
cschneid has quit [Ping timeout: 260 seconds]
<JonaBurgos> hahah very good weaksauce
<JonaBurgos> weaksauce: Where can I learn that?
<weaksauce> not sure really, just have to keep learning. look up regular expressions and see how ruby does them
<weaksauce> once you know that you can usually find a way to use them to manipulate text. read the docs on strings to see what they offer
arescorpio has quit [Quit: Leaving.]
bigblind has joined #ruby
cschneid has joined #ruby
<JonaBurgos> weaksauce: in Perl is: $x =~ s/(href=\"|\".*)//g
<weaksauce> that probably works in ruby too. ruby is a lot like perl
<JonaBurgos> weaksauce: I mainly use Ruby but I do not know how to edit text that simple
<JonaBurgos> weaksauce: hopefully
<JonaBurgos> weaksauce: Surely someone here knows, I'll connect tomorrow
<JonaBurgos> weaksauce: thanks for the demo :)
<JonaBurgos> Goodnight everyone
JonaBurgos has quit [Quit: Textual IRC Client: www.textualapp.com]
Azure has quit [Quit: Oops.]
mrush has quit [Ping timeout: 256 seconds]
Azure has joined #ruby
_whitelogger has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
mrush has joined #ruby
mrush is now known as Guest95598
nadir has joined #ruby
JonasSteiner has joined #ruby
<JonasSteiner> weaksauce: hi
<weaksauce> hello JonasSteiner
wlarip has quit [Ping timeout: 256 seconds]
<JonasSteiner> weaksauce: try this in irb
<JonasSteiner> a= 'href="www.google.com/a/b/c" </>'
<JonasSteiner> a = a.gsub(/href=\"|".*$/, "")
<JonasSteiner> nothing more
<weaksauce> that works
<JonasSteiner> ;)
<JonasSteiner> weaksauce: well now if I sleep, good night
<weaksauce> night
JonasSteiner has quit [Client Quit]
motstgo has quit [Ping timeout: 276 seconds]
cschneid has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
cschneid has joined #ruby
alfiemax has joined #ruby
sauvin_ is now known as bocaneri
jenrzzz has joined #ruby
webhat has quit [Ping timeout: 240 seconds]
webhat has joined #ruby
modin has quit [Ping timeout: 240 seconds]
alfiemax has quit [Ping timeout: 248 seconds]
modin has joined #ruby
ricer2 has quit [Ping timeout: 268 seconds]
frem has joined #ruby
sandroqz has joined #ruby
BTRE has joined #ruby
sandroqz has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
netherwolfe has joined #ruby
sandroqz has joined #ruby
trautwein has quit [Quit: ZNC 1.6.5 - http://znc.in]
trautwein has joined #ruby
sandroqz has quit [Client Quit]
sandroqz has joined #ruby
sandroqz has quit [Quit: Leaving]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
workmad3 has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
Dimik has joined #ruby
r3m has quit [Quit: ZNC - http://znc.in]
gix- has joined #ruby
gix has quit [Disconnected by services]
r3m has joined #ruby
RougeR has quit [Ping timeout: 264 seconds]
motstgo has joined #ruby
cagomez has joined #ruby
motstgo has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
jeffreylevesque_ has joined #ruby
Flisk has joined #ruby
cschneid has quit [Ping timeout: 248 seconds]
c0ncealed has quit [Remote host closed the connection]
darkhanb has joined #ruby
c0ncealed has joined #ruby
jeffreylevesque_ has quit [Quit: Colloquy for iPhone - http://colloquy.mobi]
psmolen has quit [Ping timeout: 268 seconds]
psmolen has joined #ruby
guardianx has joined #ruby
cschneid has joined #ruby
jeffreylevesque_ has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
psmolen has quit [Ping timeout: 256 seconds]
psmolen has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
jeffreylevesque_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
cagomez has quit []
houhouli_ has quit []
cdg has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
troys has quit [Ping timeout: 252 seconds]
cschneid has quit [Ping timeout: 260 seconds]
cdg has quit [Ping timeout: 276 seconds]
psmolen has quit [Ping timeout: 264 seconds]
psmolen has joined #ruby
cschneid has joined #ruby
milardovich has joined #ruby
guardianx has quit []
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 268 seconds]
cdg has joined #ruby
nowhereman_ has joined #ruby
nowhere_man has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 245 seconds]
bigblind has quit [Ping timeout: 264 seconds]
netherwolfe has quit [Ping timeout: 252 seconds]
Gnut_ has joined #ruby
DTZUZO has quit [Ping timeout: 245 seconds]
sammi` has quit [Quit: Lost terminal]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
workmad3 has joined #ruby
thinkpad has quit [Max SendQ exceeded]
thinkpad has joined #ruby
reber has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 240 seconds]
dionysus69 has joined #ruby
sammi` has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
phaul has joined #ruby
ryzokuken has joined #ruby
bigblind has joined #ruby
cschneid has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
cschneid has quit [Ping timeout: 260 seconds]
jnollette has quit [Remote host closed the connection]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
Dimik has quit [Ping timeout: 264 seconds]
jnollette has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Gnut_ has quit [Ping timeout: 260 seconds]
claudiuinberlin has joined #ruby
cschneid has joined #ruby
dionysus69 has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
BH23 has joined #ruby
BH23 has quit [Client Quit]
BH23 has joined #ruby
BH23 has quit [Client Quit]
_Joes_ has joined #ruby
alex`` has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
_Joes_ has quit [Quit: Leaving]
BH23 has joined #ruby
cschneid has joined #ruby
gh has joined #ruby
cdg has joined #ruby
gh has left #ruby ["Leaving"]
cdg has quit [Ping timeout: 265 seconds]
nadir has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
workmad3 has joined #ruby
ams__ has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
marr has joined #ruby
megamosaren has joined #ruby
biberu has joined #ruby
suukim has joined #ruby
alfiemax has joined #ruby
faces has quit [Ping timeout: 264 seconds]
cschneid has quit [Ping timeout: 264 seconds]
ryzokuke_ has joined #ruby
clemens3 has joined #ruby
ryzokuke_ has quit [Client Quit]
jenrzzz has quit [Ping timeout: 264 seconds]
megamosaren has quit [Quit: Leaving]
motstgo has joined #ruby
bigblind has quit [Ping timeout: 268 seconds]
alfiemax has quit [Remote host closed the connection]
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
motstgo has quit [Ping timeout: 276 seconds]
netherwolfe has joined #ruby
mikecmpbll has joined #ruby
netherwolfe has quit [Ping timeout: 268 seconds]
im0nde_ has joined #ruby
Ltem has joined #ruby
alfiemax has joined #ruby
alfiemax_ has joined #ruby
alfiemax has quit [Ping timeout: 260 seconds]
im0nde_ is now known as im0nde
imode has quit [Ping timeout: 240 seconds]
schneider has joined #ruby
cschneid has joined #ruby
faces has joined #ruby
amatas has joined #ruby
bigblind has joined #ruby
alfiemax has joined #ruby
TinkerTyper has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
n008f4g_ has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax_ has quit [Ping timeout: 264 seconds]
willmichael has quit [Ping timeout: 240 seconds]
willmichael has joined #ruby
suukim has quit [Quit: Konversation terminated!]
mniip has quit [Ping timeout: 240 seconds]
cschneid has quit [Ping timeout: 256 seconds]
shinnya has joined #ruby
mniip has joined #ruby
cschneid has joined #ruby
alfiemax has joined #ruby
postmodern has joined #ruby
<morfin> hello
<morfin> i need help with Selenium - when i do @driver = Selenium::WebDriver.for driver where driver variable have value :firefox i get Net::ReadTimeout: Net::ReadTimeout exception any clue why?
schneider has quit [Quit: WeeChat 2.0.1]
alfiemax has quit [Remote host closed the connection]
<morfin> i see geckodriver starts but firefox not i guess i should start in headless mode?
alfiemax has joined #ruby
willmichael has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
norphex has joined #ruby
workmad3 has quit [Ping timeout: 276 seconds]
halbbalda has quit [Quit: ZNC - http://znc.in]
willmichael has joined #ruby
halbbalda has joined #ruby
alfiemax has quit [Remote host closed the connection]
schneider has joined #ruby
houhoulis has joined #ruby
c0ncealed has quit [Ping timeout: 268 seconds]
jordanm has quit [Ping timeout: 260 seconds]
jordanm has joined #ruby
alfiemax has joined #ruby
aufi has joined #ruby
c0ncealed has joined #ruby
milardovich has quit []
desperek has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
willmichael has quit [Ping timeout: 264 seconds]
cschneid has quit [Ping timeout: 265 seconds]
amatas has quit [Quit: amatas]
sameerynho has joined #ruby
tomphp has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
jinie has quit [Quit: ZNC 1.6.1 - http://znc.in]
jinie has joined #ruby
cschneid has joined #ruby
norphex has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
bigblind has joined #ruby
AJA4350 has joined #ruby
aufi has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 265 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has joined #ruby
zautomata has quit [Ping timeout: 260 seconds]
Mermaid has joined #ruby
<morfin> does Selenium run isolated instances of Firefox?
\void has joined #ruby
alfiemax has quit [Remote host closed the connection]
zipace has joined #ruby
mn3m has joined #ruby
dviola has joined #ruby
bigblind has quit [Ping timeout: 248 seconds]
RougeR has joined #ruby
RougeR has joined #ruby
RougeR has quit [Changing host]
motstgo has joined #ruby
motstgo has quit [Ping timeout: 245 seconds]
dionysus69 has joined #ruby
Guest81558 has quit [Changing host]
Guest81558 has joined #ruby
Guest81558 has joined #ruby
Guest81558 is now known as pskosinski
dionysus69 has quit [Remote host closed the connection]
ta_ has joined #ruby
claudiuinberlin has joined #ruby
cschneid has quit [Ping timeout: 256 seconds]
zipace has quit [Disconnected by services]
ziprar has joined #ruby
goatish has joined #ruby
drewmcmillan has joined #ruby
houhoulis has quit []
konsolebox has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
Guest99240 has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
<MasterOfDisaster> hey, is there a way to use DESTDIR with bundler? I'm having trouble using native dependencies for gems.
ziprar is now known as zipace
Papierkorb has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
nowhereman_ has quit [Ping timeout: 248 seconds]
workmad3 has quit [Ping timeout: 268 seconds]
cdg has joined #ruby
cschneid has joined #ruby
cdg has quit [Ping timeout: 255 seconds]
konsolebox has joined #ruby
netherwolfe has joined #ruby
konsolebox has quit [Ping timeout: 248 seconds]
mn3m has quit [Ping timeout: 264 seconds]
AJA4350 has quit [Quit: AJA4350]
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
tomphp has joined #ruby
ggherdov has joined #ruby
netherwolfe has quit [Ping timeout: 256 seconds]
motstgo has joined #ruby
suukim has joined #ruby
zipace has quit [Quit: Leaving]
motstgo has quit [Ping timeout: 264 seconds]
im0nde has quit [Quit: im0nde]
BH23 has quit [Ping timeout: 245 seconds]
zipace has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
mn3m has joined #ruby
bigblind has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
tomphp has quit [Client Quit]
cschneid has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
_Joes_ has joined #ruby
rabajaj has quit [Quit: Leaving]
rabajaj has joined #ruby
tomphp has joined #ruby
deadnull has joined #ruby
rgiscard has quit [Quit: Gone fishing]
alfiemax has joined #ruby
NielsonRolim has joined #ruby
alfiemax has quit [Remote host closed the connection]
cdg has joined #ruby
kapil___ has joined #ruby
cschneid has quit [Ping timeout: 245 seconds]
cschneid has joined #ruby
NielsonRolim is now known as Exagerado
Exagerado is now known as NielsonRolim
postmodern has quit [Quit: Leaving]
biberu has quit []
biberu has joined #ruby
motstgo has joined #ruby
NielsonRolim is now known as rolim
motstgo has quit [Ping timeout: 240 seconds]
houhoulis has joined #ruby
goatish has quit [Quit: Hibernating]
nadir has joined #ruby
chouhoulis has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
DLSteve has joined #ruby
tomphp has joined #ruby
tomphp has quit [Client Quit]
tomphp has joined #ruby
tomphp has quit [Client Quit]
deadnull has quit [Ping timeout: 252 seconds]
rolim has quit [Quit: Leaving]
rolim has joined #ruby
rolim has quit [Client Quit]
deadnull has joined #ruby
rolim has joined #ruby
<desperek> hm
<desperek> can i ask here about ror?
<apeiros> ?rails desperek
<ruby[bot]> desperek: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
cschneid has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby
karapetyan has joined #ruby
xco has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
<xco> hi. is this "$%{price}" equivalent to “$#{price}" ?
<xco> i haven’t seend “%{}” before
<apeiros> &ri String#%
bigblind has quit [Ping timeout: 245 seconds]
<apeiros> it's not equivalent, no
<apeiros> #{} interpolates immediately. %{} is for String#%, sprintf and friends
lroca has joined #ruby
envex has quit [Ping timeout: 240 seconds]
bauruine has quit [Quit: ZNC - http://znc.in]
bauruine has joined #ruby
<xco> apeiros: thank you. but i’m looking at this: http://guides.rubyonrails.org/i18n.html#passing-variables-to-translations the way they us it is just “%{price}” but in the doc it’s always “string” % arg unlike how it’s used here http://guides.rubyonrails.org/i18n.html#passing-variables-to-translations for “price”
<xco> it’s not the same thing i guess
<apeiros> it's similar
<apeiros> you use the %{} vars in I18n.t
Zaab1t has joined #ruby
drewmcmillan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
envex has joined #ruby
Lomex has quit [Max SendQ exceeded]
Lomex has joined #ruby
kt has joined #ruby
amatas has joined #ruby
drewmcmillan has joined #ruby
suukim has quit [Quit: Konversation terminated!]
deadnull has quit [Quit: deadnull]
cschneid has joined #ruby
motstgo has joined #ruby
adlerdias has joined #ruby
lroca is now known as roca
SuperLag has quit [Quit: reboot]
motstgo has quit [Ping timeout: 248 seconds]
SuperLag has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigblind has joined #ruby
minimalism has quit [Quit: minimalism]
minimalism has joined #ruby
dionysus69 has joined #ruby
apparition has quit [Quit: Bye]
dviola has quit [Quit: WeeChat 2.0.1]
cschneid has quit [Ping timeout: 264 seconds]
dviola has joined #ruby
tomphp has joined #ruby
cschneid has joined #ruby
rolim has quit [Quit: Leaving]
Mike11 has joined #ruby
chouhoulis has quit [Ping timeout: 240 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhere_man has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
netherwolfe has joined #ruby
CodeBug has joined #ruby
cdg_ has joined #ruby
bigblind has quit [Ping timeout: 256 seconds]
nowhere_man has joined #ruby
cdg_ has quit [Remote host closed the connection]
netherwolfe has quit [Ping timeout: 255 seconds]
Mermaid has quit [Quit: Leaving]
tomphp has joined #ruby
cschneid has quit [Ping timeout: 264 seconds]
AJA4350 has joined #ruby
cschneid has joined #ruby
Puffball has joined #ruby
mn3m has quit [Quit: mn3m]
halbbalda has quit [Quit: ZNC - http://znc.in]
halbbalda has joined #ruby
adlerdias has quit [Quit: adlerdias]
ayonkhan has joined #ruby
adlerdias has joined #ruby
JonasSteiner has joined #ruby
opekktar has joined #ruby
opekktar has left #ruby [#ruby]
adlerdias has quit [Client Quit]
adlerdias has joined #ruby
halbbalda has quit [Quit: ZNC - http://znc.in]
halbbalda has joined #ruby
CodeBug has quit [Quit: Well apparently I've left the building]
howdoi has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
halbbalda has quit [Quit: ZNC - http://znc.in]
halbbalda has joined #ruby
espressocannon has joined #ruby
halbbalda has quit [Client Quit]
aufi has joined #ruby
<espressocannon> can somebody help me figure out why this is looping infinitely?
halbbalda has joined #ruby
<espressocannon> my `return` statement doesn't seem to be exiting the function
cschneid has quit [Ping timeout: 260 seconds]
<JonasSteiner> espressocannon: in no time you break the loop
halbbalda has quit [Client Quit]
halbbalda has joined #ruby
<espressocannon> shouldn't the if statement at the top level of the function break it out? or does it only break the current "layer"
<JonasSteiner> espressocannon: Well, I do not have much time to help you ... I'm currently working on a Python program
<espressocannon> o....k.....
<havenwood> espressocannon: It is returning as you expect. The issue is that you're calling the recursive function 13 times.
<havenwood> espressocannon: roman_mapping.size #=> 13
adlerdias has quit [Quit: adlerdias]
<espressocannon> only if the number is divisible by the key
cschneid has joined #ruby
<havenwood> espressocannon: But for each element of the Hash, so if the first one is a match - you still do the second.
<havenwood> But it's the second without regard to the first having happened.
<havenwood> espressocannon: It seems to me like you more want to find the first that matches your criteria and call the recursive function.
<havenwood> Right now, the recursive function is getting called over and over again.
<havenwood> You're branching out more than intended.
<espressocannon> why would it be called if the condition is not met, though
<espressocannon> if (number / k) >= 1 should make it attempt the next key..
<havenwood> espressocannon: On the each loop, it's reusing `number` for each pair.
<havenwood> Since `number` isn't changing, it just keeps doing the same thing for each key value pair - which means a ton of recursive calls.
<espressocannon> but it shouldn't be recursing if that condition is not met
<espressocannon> it should ust be trying all the kv pairs
<espressocannon> then when it finds one, it recurses
<havenwood> espressocannon: Right, but it's not decrementing the number in the #each loop.
<havenwood> It's setting off a recursive call for *every* key value that matches the condition.
<espressocannon> it shouldn't be. it should only decrement when the condition is met
<havenwood> Not the first that matches.
<espressocannon> wait what
<havenwood> Think of it this way, this #each loop *keeps going* after a successful recursive call: https://gist.github.com/ELI7VH/4fe4e0673700c2fa293301baf9e90b32#file-roman_algo-rb-L19
<havenwood> but it doesn't take into account any changes to `number`
<espressocannon> does it go loop until > condition > recurse > loop until > condition > recurse > return
<havenwood> espressocannon: Sorry, I see the issue but am having trouble explaining clearly pre-coffee >.>
<espressocannon> no problem i appreciate the help
<havenwood> It's basically working, but you're calling the recursive function way more times than you mean to, without number getting smaller.
<espressocannon> for the record. I do get theright result. but then it just keeps going
<havenwood> If you just found the first roman mapping that sufficed and did the recursive function, it'd work. But you're calling the recursive function over and over inside the iteration.
<havenwood> espressocannon: So say `1000 => "M"` matches the condition, it calls the recursive function.
<havenwood> You then shouldn't iterate on to `900 => "CM"`, but you are!
<espressocannon> yes. with the new_number, which is number-1000
<espressocannon> why does it keep going if the recursion is calld?
<havenwood> So the recursive function happens (yay, that's what we want) AND you go on to the next key value pair.
<espressocannon> so do i like... break after the function?
motstgo has joined #ruby
<havenwood> The next pair `900 => "CM"` also matches the condition, and does it's own recursive call, and so on.
<espressocannon> recursion* is called
<havenwood> So instead of the first match doing the recursive call, it's doing it for *every* key value pair.
<havenwood> espressocannon: Because #each doesn't stop iterating when a recursive function is called.
<havenwood> So the `1000` was a match, it does the recursive call. You shouldn't *also* carry on and do the `900`.
JonasSteiner has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> espressocannon: You're not stopping your each iteration when you find a condition that matches, so you're doing the second smallest roman and third smallest etc, each acting like the previous hadn't happened.
JonasSteiner has joined #ruby
<espressocannon> ok....
<espressocannon> right
<espressocannon> oooooook
<espressocannon> i think iget it
<havenwood> espressocannon: To fix it, #find one that matches your condition, and recurse. Don't recurse after you find the match. Those are too small, and havent' taken into account that the larger was subtracted.
<havenwood> It's the each continuing on and starting a ton of recursions.
karapetyan has quit [Remote host closed the connection]
<espressocannon> ok so... here is what i did
<havenwood> The first one it finds it shouldn't keep going.
<espressocannon> return map_dat_roman(roman_mapping, new_number, result)
<espressocannon> so that exits the recursion with that function
<havenwood> you could break or return, yeah
motstgo has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
<espressocannon> that is wild
<havenwood> really though, don't you want to #find rather than #each?
<espressocannon> so a "return" only "reutrns' a single recursion
<havenwood> (#each with a break on condition is like a #find)
<havenwood> espressocannon: yes, that would exit the iteration early
<havenwood> (which avoids the problem you're running into where you recurse more than intended)
<espressocannon> ok but, would i have to make a list of all the numbers and then find them?
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> are you familiar with #find?
<espressocannon> i thought ruby had an implicit return
<havenwood> it does have an implicit return - returns here are really not the issue
<espressocannon> but `map_dat_roman(roman_mapping, new_number, result)`
<espressocannon> should have acted as an implicit return right
<havenwood> you're just iterating through a collection and recursing more than intended
<espressocannon> putting `return` in front of that fixed the issue
<havenwood> you don't want to recurse for #each, you want to recurse for the first you #find
jamesaxl has joined #ruby
<espressocannon> oh wait
<espressocannon> because find stops once the condition is met
<espressocannon> ugh. right!
<havenwood> yup!
tomphp has joined #ruby
<espressocannon> im still getting used to all thedifferent methods in ruby. im about 2 weeks into learning rails, and I just started doing ruby quizzes yesterday to actually learn wtf is happening
JonasSteiner is now known as JonaBurgos
<espressocannon> it still kind of puzzles me, but I think I get it, and a find would for sure make more .... efficient?
axsuul has quit [Ping timeout: 240 seconds]
Mike11 has quit [Quit: Leaving.]
tomphp has quit [Ping timeout: 256 seconds]
<espressocannon> thanks again. now go get some coffee, you savage.
pmullins has joined #ruby
JonaBurgos has quit [Quit: Textual IRC Client: www.textualapp.com]
bigblind has joined #ruby
s3nd1v0g1us has joined #ruby
axsuul has joined #ruby
schneider has quit [Ping timeout: 245 seconds]
<espressocannon> oh wow. find is so much nicer
<espressocannon> thank you!
ayonkhan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has joined #ruby
<havenwood> espressocannon: you're welcome!
<havenwood> yeah, that looks way better
<havenwood> espressocannon: then just get rid of those `return`s
<havenwood> A nice way to check `>= 1` is to use #positive?.
<havenwood> espressocannon: if number.positive?
<espressocannon> yeah. I just wanted to make it so if people put a decimal, it would get rid of that
<espressocannon> can you give me your thoughts onthis? is it still readable?
karapetyan has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
sameerynho has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
cschneid has quit [Ping timeout: 252 seconds]
<havenwood> espressocannon: Much better--yeah, that's way more readable.
<havenwood> espressocannon: You can get rid of the parens around `number >= 1`.
guille-moe1 has joined #ruby
guille-moe has quit [Ping timeout: 240 seconds]
guille-moe1 is now known as guille-moe
schneider has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
xco has quit [Quit: xco]
s3nd1v0g1us has quit [Ping timeout: 245 seconds]
raynold has joined #ruby
xco has joined #ruby
CodeBug has joined #ruby
patteh has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
patteh has joined #ruby
adlerdias has joined #ruby
CodeBug has quit [Quit: Well apparently I've left the building]
roca has quit [Quit: roca]
phaul has quit [Ping timeout: 252 seconds]
alfiemax has quit [Remote host closed the connection]
sameerynho has joined #ruby
alfiemax has joined #ruby
<morfin> hmm
<morfin> if i do class Foo < Bar end for already existing class something change?
cschneid has quit [Ping timeout: 264 seconds]
<morfin> ah i can't do this
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
alfiemax has quit [Ping timeout: 256 seconds]
<Mon_Ouie> You can do it only if class Foo is already a subclass of Bar
karapetyan has joined #ruby
imode has joined #ruby
cschneid has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
motstgo has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
schneider has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
adlerdias has quit [Quit: adlerdias]
ta_ has joined #ruby
schneider has joined #ruby
ta_ has quit [Remote host closed the connection]
ta_ has joined #ruby
ta_ has quit [Remote host closed the connection]
orbyt_ has joined #ruby
dviola has quit [Quit: WeeChat 2.0.1]
ayonkhan has joined #ruby
RougeR has quit [Ping timeout: 276 seconds]
ayonkhan has quit [Client Quit]
segy has quit [Quit: ZNC - http://znc.in]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has joined #ruby
bigblind has quit [Ping timeout: 240 seconds]
detectiveaoi has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
Ltem has quit [Ping timeout: 256 seconds]
ta_ has joined #ruby
phaul has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
cschneid has joined #ruby
phaul has quit [Quit: WeeChat 2.0.1]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
phaul has joined #ruby
alfiemax has joined #ruby
karapetyan has joined #ruby
orbyt_ has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
Nicmavr has joined #ruby
Nicmavr is now known as Guest41419
alfiemax has quit [Ping timeout: 252 seconds]
karapetyan has quit [Ping timeout: 276 seconds]
pmullins has left #ruby ["Textual IRC Client: www.textualapp.com"]
Ltem has joined #ruby
alfiemax has joined #ruby
karapetyan has joined #ruby
Zaab1t has quit [Quit: Zaab1t]
milardovich has joined #ruby
Dimik has joined #ruby
Zaab1t has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
banisterfiend has joined #ruby
goatish has joined #ruby
cschneid has joined #ruby
cdg has joined #ruby
tomphp has joined #ruby
cdg has quit [Ping timeout: 256 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
cdg has joined #ruby
espressocannon has quit [Ping timeout: 260 seconds]
dinfuehr has quit [Ping timeout: 260 seconds]
dinfuehr_ has joined #ruby
tomphp has quit [Ping timeout: 256 seconds]
segy has joined #ruby
alfiemax has joined #ruby
motstgo has left #ruby ["WeeChat 1.9"]
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
milardovich has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigblind has joined #ruby
jp has joined #ruby
tomphp has joined #ruby
banisterfiend has joined #ruby
cschneid has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
workmad3 has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bigblind has quit [Ping timeout: 240 seconds]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xco has quit [Quit: xco]
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
za1b1tsu has joined #ruby
xco has joined #ruby
willmichael has joined #ruby
bigblind has joined #ruby
jeffreylevesque has quit [Read error: Connection reset by peer]
biberu has quit []
tvw has joined #ruby
cschneid has quit [Remote host closed the connection]
milardovich has joined #ruby
reber has quit [Remote host closed the connection]
raatiniemi has quit [Ping timeout: 276 seconds]
milardovich has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
alfiemax has quit [Remote host closed the connection]
jamesaxl has quit [Quit: WeeChat 2.0.1]
frem has joined #ruby
alfiemax has joined #ruby
Zaab1t has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
cschneid has joined #ruby
bigblind has quit [Ping timeout: 260 seconds]
ryzokuken has quit [Quit: Connection closed for inactivity]
kn-928 has joined #ruby
cschneid has quit [Ping timeout: 268 seconds]
Ltem has quit [Quit: good night]
n008f4g_ has quit [Ping timeout: 256 seconds]
kn-928 has quit [Ping timeout: 264 seconds]
sameerynho has quit [Ping timeout: 256 seconds]
livcd has quit [Remote host closed the connection]
cschneid has joined #ruby
alfiemax has joined #ruby
bigblind has joined #ruby
amatas has quit [Quit: amatas]
aufi has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 256 seconds]
goatish has quit [Quit: Hibernating]
adlerdias has joined #ruby
adlerdias has quit [Client Quit]
orbyt_ has joined #ruby
willmichael has quit [Ping timeout: 240 seconds]
Rubemlrm has joined #ruby
willmichael has joined #ruby
minimalism has quit [Quit: minimalism]
tolerablyjake has joined #ruby
zipace has quit [Ping timeout: 255 seconds]
hahuang65 has quit [Quit: WeeChat 2.0.1]
alex`` has quit [Ping timeout: 245 seconds]
cschneid has quit [Ping timeout: 240 seconds]
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
nowhereman_ has joined #ruby
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
ledestin has joined #ruby
cschneid has joined #ruby
hahuang65 has joined #ruby
nowhere_man has quit [Ping timeout: 248 seconds]
hahuang65 has quit [Client Quit]
workmad3 has joined #ruby
alfiemax has joined #ruby
Dimik has quit [Ping timeout: 255 seconds]
hahuang65 has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
bigblind has quit [Ping timeout: 256 seconds]
alfiemax has quit [Ping timeout: 245 seconds]
desperek has quit [Quit: xoxo]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
dviola has joined #ruby
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zipace has joined #ruby
karapetyan has quit [Remote host closed the connection]
cschneid has quit [Ping timeout: 264 seconds]
alfiemax has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tolerablyjake has joined #ruby
xco has quit [Quit: xco]
\void has quit [Quit: So long, and thanks for all the fish.]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 264 seconds]
zipace has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
cschneid has quit [Ping timeout: 252 seconds]
frem has quit [Quit: Connection closed for inactivity]
tolerablyjake has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chatchatt has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
hahuang65 has joined #ruby
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
alfiemax has joined #ruby
orbyt_ has joined #ruby
AJA4350 has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 268 seconds]
mynameisdebian has joined #ruby
<mynameisdebian> How can I set an ASCII counter with Ruby, where (for example) it prints 1, the 1 disappears, then it prints 2, the 2 disappears, then it prints 3, and so on? I would like to do this without clearing the screen each time (I just want to clear the line).
hahuang65 has quit [Quit: WeeChat 2.0.1]
hahuang65 has joined #ruby
DarthGandalf has quit [Quit: Bye]
<mynameisdebian> like, the counter changes, but always appears in the same spot
DarthGandalf has joined #ruby
<Flisk> mynameisdebian: 100.times { |i| STDOUT.write " #{i}\r"; sleep 1 }
AJA4350 has joined #ruby
<Flisk> carriage return :)
<mynameisdebian> Flisk: nice one, thank you
<Flisk> works nicely if your number only ever grows
clemens3 has quit [Ping timeout: 264 seconds]
houhoulis has quit []
cdg has quit [Remote host closed the connection]
hahuang65 has quit [Quit: WeeChat 2.0.1]
schneider has joined #ruby
hahuang65 has joined #ruby
za1b1tsu has quit [Quit: Leaving]