havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
code_zombie has quit [Quit: Leaving]
poontangmessiah has joined #ruby
code_zombie has joined #ruby
pb122_3 has joined #ruby
pb122_2 has quit [Ping timeout: 245 seconds]
pb122 has quit [Ping timeout: 245 seconds]
lucasb has quit [Quit: Connection closed for inactivity]
pb122 has joined #ruby
znz_jp has joined #ruby
xall_ has quit [Ping timeout: 245 seconds]
brandoncc has quit [Ping timeout: 240 seconds]
poontangmessiah_ has joined #ruby
poontangmessiah has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
tau has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
<leftylink> huh.
<leftylink> &ri Enumerable#each_with_index
<leftylink> > Given arguments are passed through to each()
<leftylink> have we any `each` that takes arguments?
<adam12> I'm presuming it's the block args.
<leftylink> I see.
<adam12> But I didn't look and could be totally wrong.
<leftylink> sensible, but a shame that I cannot get `#with_index(starting_index)`-like behaviour. oh well
<leftylink> replacing an underscore with a dot in the code, no big deal
Mia has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
<al2o3-cr> rb_block_call(obj, id_each, argc, argv, each_with_index_i, (VALUE)memo) yeah, so basically arguments to the block.
etupat has joined #ruby
dviola has joined #ruby
tau has quit [Ping timeout: 268 seconds]
xall_ has quit [Ping timeout: 240 seconds]
poontangmessiah has joined #ruby
AJA4351 has joined #ruby
psilly0 has quit [Quit: psilly0]
poontangmessiah_ has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
code_zombie has quit [Quit: Leaving]
wildtrees has quit [Quit: Leaving]
Fernando-Basso has quit [Quit: Leaving]
poontangmessiah has quit [Remote host closed the connection]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
mdsn has joined #ruby
xall_ has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
voker57 has quit [Quit: voker57]
etupat has quit [Ping timeout: 268 seconds]
drincruz has joined #ruby
Swyper has joined #ruby
jeremycw has joined #ruby
dviola has quit [Quit: WeeChat 2.6]
_phaul has joined #ruby
phaul has quit [Ping timeout: 268 seconds]
gix has quit [Ping timeout: 245 seconds]
jeremycw has quit [Ping timeout: 240 seconds]
code_zombie has joined #ruby
AJA4350 has quit [Quit: AJA4350]
drincruz has quit [Ping timeout: 240 seconds]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
voker57 has joined #ruby
xco has joined #ruby
uranoss has joined #ruby
kyrylo has joined #ruby
etupat has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
drincruz has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
yasumi2136_ has joined #ruby
etupat has quit [Ping timeout: 240 seconds]
yasumi2136 has quit [Ping timeout: 240 seconds]
<Frankenstein> is there a method like Array#include? but can take a block to do the test?
<mozzarella> any?
<Frankenstein> yep, thats the ticket
<Frankenstein> thanks
lucas has quit [Remote host closed the connection]
r3my has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
mre- has joined #ruby
jenrzzz has joined #ruby
mg has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
code_zombie has quit [Quit: Leaving]
s2013 has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]
mdsn has quit [Ping timeout: 245 seconds]
mre- has quit [Ping timeout: 246 seconds]
i9zO5AP has joined #ruby
Ai9zO5AP has quit [Ping timeout: 246 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
jeremycw has joined #ruby
koti has joined #ruby
ctOS has quit [Quit: Connection closed for inactivity]
fig-le-deunch has quit [Quit: Konversation terminated!]
jeremycw has quit [Ping timeout: 240 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s2013 has joined #ruby
mdsn has joined #ruby
jeremycw has joined #ruby
jeremycw has quit [Ping timeout: 240 seconds]
fphilipe has joined #ruby
fphilipe has quit [Ping timeout: 250 seconds]
mossplix has joined #ruby
Guest11431 has quit [Quit: Leaving]
brool has quit [Ping timeout: 264 seconds]
ur5us has quit [Remote host closed the connection]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
koti has quit [Remote host closed the connection]
koti has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
mdsn has quit [Ping timeout: 245 seconds]
koti has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
hutch has quit [Ping timeout: 252 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
koti has joined #ruby
teardown has joined #ruby
etupat has joined #ruby
mossplix has quit [Remote host closed the connection]
queip has quit [Ping timeout: 245 seconds]
queip_ has joined #ruby
queip_ is now known as queip
mre- has joined #ruby
xall_ has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
kyrylo has joined #ruby
xall_ has joined #ruby
mre- has quit [Ping timeout: 265 seconds]
Swyper has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fphilipe has joined #ruby
duderonomy has joined #ruby
koti has quit [Remote host closed the connection]
rcs has quit [Quit: ZNC - http://znc.in]
hiroaki has quit [Ping timeout: 240 seconds]
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
koti has joined #ruby
Swyper has quit [Remote host closed the connection]
skx86 has quit [Quit: Connection closed for inactivity]
Technodrome has joined #ruby
etupat has quit [Remote host closed the connection]
conta has joined #ruby
mossplix has joined #ruby
tsrt^ has joined #ruby
Intelo has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
koti has quit [Remote host closed the connection]
koti has joined #ruby
uranoss has quit [Quit: Connection closed for inactivity]
mossplix has quit [Ping timeout: 276 seconds]
iNs_ has joined #ruby
amerine has joined #ruby
amerine has quit [Changing host]
amerine has joined #ruby
amerine has quit [Client Quit]
iNs has quit [Ping timeout: 260 seconds]
sauvin has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
fphilipe has quit [Ping timeout: 252 seconds]
Nicmavr has joined #ruby
jenrzzz has joined #ruby
mre- has joined #ruby
MrCrackPot has joined #ruby
Fira__ has joined #ruby
mossplix has joined #ruby
conta has quit [Ping timeout: 245 seconds]
conta has joined #ruby
mre- has quit [Ping timeout: 246 seconds]
Fira___ has quit [Ping timeout: 276 seconds]
dionysus69 has joined #ruby
eljimmy has quit [Quit: This computer has gone to sleep]
absolutejam2 has joined #ruby
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
eljimmy has joined #ruby
koti has quit [Remote host closed the connection]
eljimmy has quit [Client Quit]
cd has quit [Quit: cd]
koti has joined #ruby
fphilipe has joined #ruby
queip has quit [Ping timeout: 268 seconds]
lucas has joined #ruby
eljimmy has joined #ruby
eljimmy has quit [Client Quit]
Intelo has quit [Ping timeout: 245 seconds]
conta has quit [Ping timeout: 240 seconds]
queip has joined #ruby
conta has joined #ruby
andikr has joined #ruby
bambanx has quit [Ping timeout: 268 seconds]
xall_ has quit [Ping timeout: 240 seconds]
akemhp_ has joined #ruby
Intelo has joined #ruby
xall_ has joined #ruby
akem has quit [Ping timeout: 246 seconds]
akem__ has joined #ruby
akemhp_ has quit [Ping timeout: 265 seconds]
xall_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
xall_ has joined #ruby
znz_jp has quit [Ping timeout: 264 seconds]
Intelo has quit [Ping timeout: 276 seconds]
absolutejam2 has quit [Ping timeout: 252 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
queip has quit [Ping timeout: 240 seconds]
koti has quit [Ping timeout: 260 seconds]
queip has joined #ruby
xall_ has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
Intelo has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
akem__ is now known as akem
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
queip has quit [Ping timeout: 268 seconds]
queip_ has joined #ruby
akem has quit [Quit: Leaving]
queip_ is now known as queip
schne1der has joined #ruby
hyperreal has quit [Quit: kthxbai]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
queip has quit [Ping timeout: 246 seconds]
queip_ has joined #ruby
queip_ is now known as queip
absolutejam2 has joined #ruby
xall_ has joined #ruby
mossplix has quit [Ping timeout: 276 seconds]
BH23 has joined #ruby
jeremycw has joined #ruby
xall_ has quit [Read error: Connection reset by peer]
conta has quit [Ping timeout: 265 seconds]
jeremycw has quit [Ping timeout: 268 seconds]
vondruch has joined #ruby
xall_ has joined #ruby
conta has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
bvdw has quit [Read error: Connection reset by peer]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
queip has quit [Ping timeout: 276 seconds]
bvdw has joined #ruby
queip_ has joined #ruby
queip_ is now known as queip
zone_31 has joined #ruby
mayamai has quit [Ping timeout: 264 seconds]
iamayam has joined #ruby
iamayam has quit [Ping timeout: 250 seconds]
iamayam has joined #ruby
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamayam has quit [Ping timeout: 268 seconds]
sarna has joined #ruby
iamayam has joined #ruby
xco has joined #ruby
iamayam has quit [Ping timeout: 250 seconds]
Fernando-Basso has joined #ruby
safe has quit [Read error: Connection reset by peer]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamayam has joined #ruby
<wbnns> Hello. I have an array containing three objects: https://dpaste.de/wWkQ
<wbnns> How do I calculate the total sum for the value of "sugar" from each object?
<Frankenstein> hi again. eaten = candies.map { |candy| candy.sugar }.sum
znz_jp has joined #ruby
<al2o3-cr> wbnns: eaten.sum { |o| o.sugar }
<Frankenstein> oh, til
<al2o3-cr> Frankenstein: sum takes a block
<Frankenstein> listen to al2o3-cr not me
<wbnns> Hi again. :) Thank you both for your help. It looks like "eaten.sum" doesn't aggregate the total sum from the array (https://dpaste.de/wWkQ). It returns 88 instead of 242.
xco has joined #ruby
mossplix has quit [Remote host closed the connection]
iamayam has quit [Ping timeout: 240 seconds]
mossplix has joined #ruby
absolutejam2 has quit [Ping timeout: 268 seconds]
mossplix has quit [Read error: Connection reset by peer]
<al2o3-cr> wbnns: are you sure?
mossplix has joined #ruby
<wbnns> I see my error. Apologies. Thank you all again for the assistance.
<Frankenstein> \o/
<wbnns> :)
sameerynho has joined #ruby
<al2o3-cr> wbnns: np ;)
mossplix has quit [Ping timeout: 246 seconds]
Mia has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
absolutejam2 has joined #ruby
iamayam has joined #ruby
phaul has joined #ruby
iamayam has quit [Ping timeout: 264 seconds]
mre- has joined #ruby
jenrzzz has joined #ruby
dasher00 has joined #ruby
mre- has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip_ is now known as queip
jenrzzz has quit [Ping timeout: 268 seconds]
mossplix has joined #ruby
ellcs has joined #ruby
sandstrom has joined #ruby
akemhp has joined #ruby
phaul has quit [Ping timeout: 264 seconds]
akemhp has quit [Ping timeout: 246 seconds]
FlorianFa has joined #ruby
honigkuchen has quit [Quit: Leaving]
phaul has joined #ruby
AJA4350 has joined #ruby
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
queip_ is now known as queip
sylario has joined #ruby
sameerynho has quit [Quit: WeeChat 2.6]
akemhp has quit [Ping timeout: 265 seconds]
Fernando-Basso has quit [Quit: Leaving]
lxsameer has joined #ruby
yasumi2136_ has quit [Remote host closed the connection]
MrCrackPot has quit [Quit: Leaving]
Fira__ has quit [Read error: Connection reset by peer]
Fira__ has joined #ruby
leftylink has quit [Ping timeout: 276 seconds]
leftylink has joined #ruby
sarna has quit [Ping timeout: 240 seconds]
conta has quit [Ping timeout: 240 seconds]
akemhp has joined #ruby
jacksoow has joined #ruby
jacksoow_ has quit [Ping timeout: 240 seconds]
xco has joined #ruby
akemhp has quit [Ping timeout: 268 seconds]
yasumi2136 has joined #ruby
MinSrodowiska has joined #ruby
conta has joined #ruby
akemhp has joined #ruby
akemhp has quit [Excess Flood]
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has joined #ruby
conta has quit [Ping timeout: 276 seconds]
mre- has joined #ruby
jenrzzz has joined #ruby
akemhp has quit [Ping timeout: 246 seconds]
conta has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 268 seconds]
jacksoow has quit [Read error: Connection reset by peer]
cd has joined #ruby
MinSrodowiska has quit [Quit: Bye Bye]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
andikr has quit [Remote host closed the connection]
chalkmonster has joined #ruby
MinSrodowiska has joined #ruby
jacksoow has joined #ruby
gnufied__ has joined #ruby
conta has quit [Ping timeout: 240 seconds]
MinSrodowiska has quit [Quit: Bye Bye]
xco has joined #ruby
teclator has quit [Ping timeout: 265 seconds]
akemhp has joined #ruby
gnufied__ has quit [Ping timeout: 250 seconds]
Fira__ has quit [Ping timeout: 276 seconds]
Haris has joined #ruby
<Haris> hello all
absolutejam2 has quit [Ping timeout: 245 seconds]
<Haris> how to remove redundant bundler or make system use the latest one
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
teclator has joined #ruby
rwb has quit [Quit: rwb]
rwb has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
rwb has quit [Ping timeout: 276 seconds]
cow[moo] has joined #ruby
akemhp has quit [Remote host closed the connection]
akemhp has joined #ruby
absolutejam2 has joined #ruby
NL3limin4t0r_afk is now known as NL3limin4t0r
<NL3limin4t0r> Haris: I guess you're looking for this: https://stackoverflow.com/questions/5902488/uninstall-old-versions-of-ruby-gems
<Haris> doesn't wrk
hutch has joined #ruby
<Haris> tried this for bundler. it doens't remove old version
<Haris> old version might have come with rvm
<Haris> or its pkgs for ruby 2.6.3
schne1der has quit [Remote host closed the connection]
hutch has quit [Ping timeout: 252 seconds]
jacksoow has quit [Read error: Connection reset by peer]
jacksoow has joined #ruby
<NL3limin4t0r> Haris: Doesn't bundler default to the newest version in new projects? In existing projects you might have to update the bundler version at the bottom of the Gemfile.lock
jacksoow_ has joined #ruby
jacksoow has quit [Ping timeout: 252 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
jacksoow has joined #ruby
FlorianFa has quit [Quit: Leaving]
jacksoow_ has quit [Ping timeout: 245 seconds]
MinSrodowiska has joined #ruby
schne1der has joined #ruby
gnufied__ has joined #ruby
akemhp has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
AndreYuhai has joined #ruby
jcalla has joined #ruby
<AndreYuhai> Hey there, I am using capybara, capybara/poltergeist with crawlera proxy. When I am trying to send a request to an HTTP website, everything works fine but when I try, for example, https://google.com then I get StatusFailError
jenrzzz has quit [Ping timeout: 265 seconds]
berlin_RAO has joined #ruby
akemhp has joined #ruby
<AndreYuhai> And if I do not use --ssl-client-certificate-file option then session.visit 'https://google.com' returns success but session.html is just "<html><head></head><body></body></html>"
<AndreYuhai> which you can see here : https://paste.ofcode.org/RyTr8AxUBJYdzXMSvsDm9
berlin_RAO has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
arup_r has joined #ruby
brendan- has joined #ruby
mossplix has quit [Ping timeout: 265 seconds]
jacksoow_ has joined #ruby
lucasb has joined #ruby
jacksoow has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
gnufied__ has quit [Ping timeout: 264 seconds]
Swyper has joined #ruby
mossplix has joined #ruby
Swyper has quit [Read error: Connection reset by peer]
Swyper has joined #ruby
john2496 has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
Jonopoly has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
bvdw has joined #ruby
hutch has joined #ruby
Swyper has quit []
sandstro_ has joined #ruby
akemhp has quit [Ping timeout: 268 seconds]
Azure has quit [Ping timeout: 268 seconds]
mossplix has quit [Ping timeout: 268 seconds]
sandstrom has quit [Ping timeout: 252 seconds]
yasumi2136_ has joined #ruby
hutch has quit [Ping timeout: 246 seconds]
skx86 has joined #ruby
drincruz has joined #ruby
yasumi2136 has quit [Ping timeout: 276 seconds]
<Haris> I got two defaults yesterday when I ran command for new version. old one remained default as per output of gem info
mre- has joined #ruby
<Haris> Installed at (2.0.2, default): /usr/local/rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0
<Haris> (1.17.3, default): /usr/local/rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0
rcs has joined #ruby
chalkmonster has joined #ruby
iNs_ has quit [Remote host closed the connection]
arup_r has quit []
iNs has joined #ruby
Intelo has quit [Ping timeout: 264 seconds]
mossplix has joined #ruby
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
rbruchal has joined #ruby
mossplix has quit [Read error: Connection reset by peer]
mossplix_ has joined #ruby
akemhp has joined #ruby
akemhp has quit [Remote host closed the connection]
<adam12> AndreYuhai: Without the proxy, can you crawl https?
mossplix_ has quit [Ping timeout: 264 seconds]
Fira__ has joined #ruby
GodFather has joined #ruby
<Haris> You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError) <--- trying to install redmine 4.0.5. I think earlier version came with rvm, for ruby 2.6.3
MinSrodowiska has quit [Quit: Bye Bye]
mre- has quit [Ping timeout: 265 seconds]
akemhp has joined #ruby
phaul has quit [Ping timeout: 252 seconds]
CalimeroTeknik has quit [Ping timeout: 240 seconds]
phaul has joined #ruby
CalimeroTeknik has joined #ruby
jacksoow has joined #ruby
fphilipe has quit [Quit: WeeChat 2.4]
jacksoow_ has quit [Ping timeout: 265 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
Intelo has joined #ruby
Yxhuvud has joined #ruby
john2496 has quit [Ping timeout: 268 seconds]
akemhp has quit [Ping timeout: 240 seconds]
gnufied__ has joined #ruby
<AndreYuhai> adam12, Yes, I can.
Intelo has quit [Ping timeout: 252 seconds]
akemhp has joined #ruby
mre- has joined #ruby
eljimmy has joined #ruby
kyrylo has joined #ruby
mre- has quit [Ping timeout: 276 seconds]
john2496 has joined #ruby
mre- has joined #ruby
Azure has joined #ruby
jeremycw has joined #ruby
akemhp has quit [Ping timeout: 268 seconds]
<al2o3-cr> &>> srand 884234309; 6.times.map { |i| rand(97..122).chr }.join
<rubydoc> # => "google" (https://carc.in/#/r/7vyi)
Esa_ has joined #ruby
greengriminal has joined #ruby
jacksop has joined #ruby
<al2o3-cr> shit i should of timed it :(
<jhass> Haris: does using bundle _2.0.2_ exec work?
ellcs has quit [Remote host closed the connection]
<adam12> AndreYuhai: The ssl-client-cert-file is provided by the proxy?
Jonopoly has quit [Quit: WeeChat 2.5]
tsrt^ has quit [Ping timeout: 240 seconds]
absolutejam2 has quit [Ping timeout: 265 seconds]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
mre- has quit [Ping timeout: 264 seconds]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
etupat has quit [Client Quit]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
suukim has joined #ruby
BH23 has quit [Ping timeout: 240 seconds]
MrCrackPot has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
Technodrome has joined #ruby
hutch has joined #ruby
leitz has joined #ruby
dionysus69 has quit [Ping timeout: 268 seconds]
dbugger has joined #ruby
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
queip_ is now known as queip
AJA4351 has joined #ruby
<AndreYuhai> adam12, Yes, I've used it.
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
BTRE has quit [Remote host closed the connection]
sandstro_ has quit [Quit: My computer has gone to sleep.]
Deesl has joined #ruby
greengriminal has joined #ruby
BTRE has joined #ruby
mossplix has joined #ruby
<Haris> redmine 4.0.5 wants bundler 2 and above for it to work
<Haris> checking
<Haris> getting load error on running 'bundle _2.0.2_ exec'
wildtrees has joined #ruby
<ruby[bot]> Haris: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<ruby[bot]> Haris: as I told you already, please use https://gist.github.com
<Haris> ok
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
ElFerna has quit [Quit: Leaving.]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
tsrt^ has joined #ruby
tsrt^ has quit [Max SendQ exceeded]
mossplix has quit [Read error: Connection reset by peer]
Inline has joined #ruby
hutch has quit [Ping timeout: 252 seconds]
RougeRR has joined #ruby
<RougeRR> using a method name vs __method__ discuss
hutch has joined #ruby
AJA4351 has joined #ruby
jacksop has quit [Remote host closed the connection]
<adam12> RougeRR: To refer to itself?
<RougeRR> yes
<RougeRR> its calling a :recall method which sets it back up to call the same method
<adam12> RougeRR: Really makes no difference IMHO. Make it obvious for your team (if any).
<RougeRR> kk
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
jacksop has joined #ruby
jacksop has quit [Remote host closed the connection]
jacksop has joined #ruby
<ytti> __callee__
<ytti> so things don't get weird with aliases
<al2o3-cr> ytti: goo call
<al2o3-cr> *good
rippa has joined #ruby
mossplix has joined #ruby
<NL3limin4t0r> Haris: Have you already looked at this answer? https://stackoverflow.com/a/57125886/3982562
<Haris> checking
<Haris> get error on bundle update --bundler
<NL3limin4t0r> If you're sure you have a new version of bundler installed, which you can check by running `gem list bundler`, you might have to run `bundle update --bundler`.
<Haris> # gem update --system
<Haris> Latest version already installed. Done.
mossplix has quit [Ping timeout: 264 seconds]
<NL3limin4t0r> hmm
<NL3limin4t0r> What does `gem list bundler` report for the bundler installation?
<Haris> # gem list bundler
<Haris> *** LOCAL GEMS ***
<Haris> bundler (default: 2.0.2, default: 1.17.3) \n bundler-unload (1.0.2) \n rubygems-bundler (1.4.5)
<NL3limin4t0r> So you ran `gem update --system`, but have you also ran `bundle update --bundler`?
<NL3limin4t0r> oh
<NL3limin4t0r> you got the error
<NL3limin4t0r> what does that say?
<ruby[bot]> Haris: as I told you already, please use https://gist.github.com
greengriminal has quit [Quit: This computer has gone to sleep]
greengriminal has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
mre- has joined #ruby
ellcs has joined #ruby
<NL3limin4t0r> Have you already tried a reinstall?
<Haris> trying
<Haris> how to reinstall
Nicmavr has joined #ruby
<Haris> looks like the new version is throwing some error
<NL3limin4t0r> `gem uninstall bundler -v 2.0.2` then `gem install bundler -v 2.0.2` if I'm not mistaken
<Haris> # gem uninstall bundler -v 2.0.2
<Haris> ERROR: While executing gem ... (Gem::InstallError)
<Haris> gem "bundler" cannot be uninstalled because it is a default gem
<NL3limin4t0r> sec
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Haris> uninstalled it. reinstalled fresh. getting same error on running bundle update --bundler
<Haris> this is centos 7
<Haris> have to run. bbl
Haris has left #ruby [#ruby]
dviola has joined #ruby
hutch has quit [Ping timeout: 264 seconds]
ellcs has quit [Ping timeout: 245 seconds]
i9zO5AP has quit [Quit: WeeChat 2.5]
AJA4351 has joined #ruby
AndreYuhai has quit [Quit: Leaving]
hutch has joined #ruby
Ai9zO5AP has joined #ruby
AJA4350 has quit [Ping timeout: 264 seconds]
AJA4351 is now known as AJA4350
<RougeRR> fuck me
<RougeRR> im so tierd at work
<RougeRR> every time i write something its wrong
<RougeRR> > stop spending so long on work
<RougeRR> > having to redo work 3 times when its perfectly acceptable
mre- has quit [Ping timeout: 240 seconds]
<adam12> Either you're not getting help early enough, or your team isn't providing enough guidance along the way. It's a common problem.
* leitz agrees with adam12.
queip has quit [Ping timeout: 265 seconds]
queip_ has joined #ruby
queip_ is now known as queip
psilly0 has joined #ruby
<RougeRR> yeah...its a 2 man team
<RougeRR> im a self taught jr
<RougeRR> i duno im fedup with it.
<RougeRR> ive heard the below about my latest story
<RougeRR> > dont make it to complex as its only temporary
hutch has quit [Ping timeout: 264 seconds]
<RougeRR> > make sure its extendable in case we migrated again
<RougeRR> there was something else but ive forgotten
mossplix has joined #ruby
<RougeRR> i dont know ive never worked anywhere else
<RougeRR> programming*
<RougeRR> worked other stuff in tech
schne1der has quit [Ping timeout: 252 seconds]
<RougeRR> id like to work somewhere else just to know if its me or them at this point
poontangmessiah has joined #ruby
phaul has quit [Ping timeout: 276 seconds]
nowhere_man has joined #ruby
<leitz> RougeRR, their two statements are self-contradictory.
<leitz> And there's an axiom: Nothing is as permanent as a temporary solution.
<leitz> I'm self-taught as well. Sometimes you have to walk away for a few minutes. Other times you have to walk away from a job.
ellcs has joined #ruby
jacksop has quit []
<RougeRR> leitz, yeah thats kind of my point
<RougeRR> ive been both told that its both too brittle as it only allowed the 2 options
<RougeRR> and that ive over complicated it by allowing it to be extendable
<RougeRR> the reason i asked about __method__ early was
<RougeRR> I got accused of trying to be obtuse/over complicating code
<RougeRR> when its a clear style choice/guide that is really minimal
chalkmonster has quit [Quit: WeeChat 2.6]
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<al2o3-cr> RougeRR: fly kick em' in the head, HADOUKEN!
<RougeRR> would be fun, albeit not conducive to keeping my job haha
AJA4350 has quit [Ping timeout: 268 seconds]
<leftylink> ohhhhhhhhhh
cow[moo] has joined #ruby
<leftylink> I thought it'd be like, __foo__, substituting the name of a particular method!!! but now I see that the `method` in there was not to be replaced. it was meant to be __method__
<leftylink> ohhhhhhhhhhhhh
<leftylink> now I get it
<al2o3-cr> \o/ /o\ \o/ /o\ hell yeah!
<leftylink> I was like "what is this __foo__ thing I have never seen this before!!!"
<NL3limin4t0r> RougeRR, leitz: Self tought is a loose term imo. I've finished an bachelor's degree ICT, but we mainly used Java for studying purposes. (C for OS and network programming.) However it was never about the programming language, more about application design than anything else. I applied for an internship during the study and self-tought myself Ruby, however a lot of the concepts I had learned came in handy.
rbruchal has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Deesl has joined #ruby
<RougeRR> haha lefty yeah
<al2o3-cr> &>> def foo() return __method__, __callee__ end; alias bar foo; [foo, bar]
<rubydoc> # => [[:foo, :foo], [:foo, :bar]] (https://carc.in/#/r/7w02)
<RougeRR> NL3limin4t0r, i did a short course for programming..id say 90% self taught
<RougeRR> but ive worked in networks/security/support roles for 3-4 years before that
<RougeRR> yeah im wishing i knew more on the design side
<RougeRR> am studying a bit
<al2o3-cr> ruby is stupidly simple
<al2o3-cr> s/stupidly/beautifully/
mre- has joined #ruby
<NL3limin4t0r> leftylink: I mostly use __method__ to refer to the method. Mainly for the reason that if I'd ever rename a method I don't have to change it.
jacksoow_ has joined #ruby
<leitz> NL3limin4t0r, my degree is in bureaucracy, with a C and Pascal class snuck'd in.
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RougeRR> i dont know
<leitz> Not much computer theory, though I did electronics support in the military. With vacuum tubes and actual iron ferrite core memory.
jacksoow has quit [Ping timeout: 240 seconds]
<RougeRR> funky
<RougeRR> yeah i didnt do a degree
<RougeRR> drop out haha
<RougeRR> thought about military at one point in my life, doing comms
<al2o3-cr> is it weird i like this song and i don't know why: https://www.youtube.com/watch?v=q0hyYWKXF0Q
<RougeRR> not my thing but its funky haha
<al2o3-cr> i just don't know what it is about this song.
yann-kaelig has joined #ruby
<NL3limin4t0r> al2o3-cr: Nah, I've discovered that one about 1-2 months ago, when I heard it on the radio. It makes you wanna dance, that's why it's so likable.
cow[moo] has joined #ruby
<al2o3-cr> same here. heard it on the radio and like who's this, pretty likable song tbh. it's got me anyway ;)
hiroaki has joined #ruby
<al2o3-cr> my grammer is atrocious :P
bambanx has joined #ruby
sandstrom has joined #ruby
mjacob has joined #ruby
<mjacob> is it possible to enable that frozen string literals are enabled for all the ruby files in my project?
<al2o3-cr> best way is probaly using an environment variable
<NL3limin4t0r> al2o3-cr: I've also played this one non-stop when it just came out https://youtu.be/IOX30CHr4JY =)
<mjacob> al2o3-cr: i think this would enable it for all files loaded by the ruby process (including all dependencies of my project)
<al2o3-cr> mjacob: then i'd just include the magic comment with which files you want in that case
<psilly0> why do i get tehse errors
<psilly0> when running a ruby script
<psilly0> `Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem pristine executable-hooks --version 1.3.2`
<al2o3-cr> NL3limin4t0r: not a bad tune tbf
<al2o3-cr> psilly0: did you try `gem pristine executable-hooks --version 1.3.2`
MinSrodowiska has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
nowhere_man has quit [Ping timeout: 264 seconds]
<al2o3-cr> NL3limin4t0r: another one: https://www.youtube.com/watch?v=A9hcJgtnm6Q
<al2o3-cr> only because i didn't think she would sing anything like this.
<al2o3-cr> i actually quite like her voice in this, believe or not :P
dviola has quit [Ping timeout: 240 seconds]
MinSrodowiska has quit [Client Quit]
bambanx_ has joined #ruby
hutch has joined #ruby
yann-kaelig has quit [Quit: yann-kaelig]
bambanx has quit [Ping timeout: 268 seconds]
drincruz has quit [Read error: No route to host]
drincruz has joined #ruby
rbruchal has joined #ruby
ElFerna has joined #ruby
<psilly0> is there a way to change rvm version / gemset just in a single ruby script
<psilly0> or have it always use a certain version
sauvin has quit [Read error: Connection reset by peer]
gix has joined #ruby
<NL3limin4t0r> psilly0: You can set a Ruby version in your Gemfile `ruby '2.4.1'` for example. When `cd`ing into the directory RVM should use the specified Ruby version in the Gemfile.
mre- has joined #ruby
<NL3limin4t0r> You should get the message:
<NL3limin4t0r> > RVM used your Gemfile for selecting Ruby, it is all fine - Heroku does that too,
<psilly0> yes but i have encapsulated my gemfile within my ruby script
<psilly0> following this
<psilly0> can i make a new gemset just for this particular script
akemhp has joined #ruby
akemhp_ has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has quit [Ping timeout: 250 seconds]
mre- has quit [Ping timeout: 276 seconds]
infernix has quit [Ping timeout: 264 seconds]
ElFerna has quit [Quit: Leaving.]
mre- has joined #ruby
<mjacob> al2o3-cr: i don't like boilerplate code, but at the moment this seems to be the best way
bitwinery has joined #ruby
ur5us has joined #ruby
ellcs has joined #ruby
bambanx_ has quit [Quit: Leaving]
akem__ has joined #ruby
<NL3limin4t0r> psilly0: You could do something like that using system commands, but I'm not sure if there is an easy way to do this from Ruby itself.
<NL3limin4t0r> al2o3-cr: I have no trouble believing that. Miley has quite a good voice, too bad most of her songs are meh.
akemhp_ has quit [Ping timeout: 240 seconds]
<NL3limin4t0r> psilly0: Something like: exec(%()) unless ARGV[0] ==
<NL3limin4t0r> psilly0: Something like: exec(%(/bin/bash -l -c "rvm use 2.4.1 && rvm gemset use yourgemset && ruby #{__FILE__} true")) unless ARGV[0] == "true"
<NL3limin4t0r> ^ haven't tested the above
suukim has quit [Quit: Konversation terminated!]
ellcs has quit [Remote host closed the connection]
hutch has quit [Ping timeout: 264 seconds]
ellcs has joined #ruby
mre- has quit [Ping timeout: 240 seconds]
<psilly0> NL3limin4t0r: will try this! Thanks DUDE!
<psilly0> NL3limin4t0r: is that ruby or bash?
bambanx has joined #ruby
yasumi2136_ has quit [Quit: Leaving]
MinSrodowiska has joined #ruby
yasumi2136 has joined #ruby
<psilly0> sorry its obvilousy bash
yasumi2136 has quit [Client Quit]
yasumi2136 has joined #ruby
mre- has joined #ruby
wymillerlinux has quit [Remote host closed the connection]
wymillerlinux has joined #ruby
mossplix has quit [Ping timeout: 240 seconds]
Jonopoly has joined #ruby
hutch has joined #ruby
akemhp_ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mossplix has joined #ruby
queip_ has joined #ruby
akem__ has quit [Ping timeout: 268 seconds]
queip has quit [Ping timeout: 268 seconds]
queip_ is now known as queip
<RougeRR> would anyone be able to look over my code. yes i know dont ask to ask
bvdw has quit [Read error: Connection reset by peer]
<RougeRR> im really stumped on how else to do this
infernix has joined #ruby
<_phaul> is this still the metaprogrammed Logger thing? Or something new?
<RougeRR> nope
<RougeRR> same thing
<RougeRR> as i expected rejected every time
<RougeRR> i got it looking far better too
bvdw has joined #ruby
mossplix has quit [Remote host closed the connection]
<_phaul> ah, man, you are having a good time with that. I guess you learn a lot from doing it in so many defferent ways though :)
mossplix has joined #ruby
<RougeRR> yeah im sort of enjoying
<RougeRR> or have been
<RougeRR> but im beginning to tier now
<_phaul> sorry I'm changing my nick...
<RougeRR> ive learn a lot
_phaul is now known as phaul
<RougeRR> but im in shit with work if i dont get it done
<RougeRR> and its like...how
<phaul> paste it and see ifI can suggest anything
<RougeRR> my colleauge thinks the method sshould be able to handle themselves
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<RougeRR> sanitizing
mossplix has quit [Ping timeout: 276 seconds]
<NL3limin4t0r> psilly0: It should be executable in ruby. What I'm doing there is replace the current process (Ruby) with a bash command unless the parameter "true" is provided, in which case it skips the line.
<NL3limin4t0r> In the bash command I set the ruby version, gemset and re-run the script providing "true" the second time around. Otherwise you'd land in an endless loop.
<RougeRR> phaul,
NL3limin4t0r is now known as NL3limin4t0r_afk
<RougeRR> and some of the expected errors/results if things go wrong
<RougeRR> i cant see how you wrap the logic to check supported storage locations inside one method
<RougeRR> and handle error
<RougeRR> also ignore line 13
<RougeRR> that should not be there
jeremycw has quit [Ping timeout: 240 seconds]
<RougeRR> ive thought about using forwarder or delegator modules
<RougeRR> or something like that
<RougeRR> but ive got limited/next to no experience with both
<phaul> (klass || const_get(active_storage)) could be put in a method, as it's repeated twice
<RougeRR> its already down in a method
<RougeRR> but yeah could be
<RougeRR> im mostly concerned with how to do it recursively
<RougeRR> without the recheck helper method
<RougeRR> or idk some other way
<RougeRR> i feel like ive politely been called an idiot for overcomplicating this by both my colleauges
<RougeRR> 'politely'
<RougeRR> like i think this code is perfectly acceptable tbh
<RougeRR> might be nice to check if the result is okay and then call recheck
<phaul> I can't even see the recursion :) wehere is it? where calls recheck. and then?
<RougeRR> result = send(action, input, const_get(store), true)
<RougeRR> colleague wants me to completly get rid of that recheck method
<RougeRR> because its "overly complicated"
<phaul> I' mean it's not easy to follow... that fore sure
<RougeRR> ehhh
<phaul> what is action in that send?
<RougeRR> look at what is sent in
<RougeRR> __method__
<RougeRR> i could kwargs it
<phaul> ah, it's where
<RougeRR> thought about that
<RougeRR> yeah i agree method naming could be fixed
<RougeRR> method params*
<RougeRR> i did have this so it was more explicit before phaul. but collauge was like ehh to many lines save here here
jeremycw has joined #ruby
<RougeRR> ie id get klass
<RougeRR> then sanitize it
<RougeRR> then instantiate it etc
<RougeRR> seperate lines
<phaul> it's not about naming it's just the two methods calling each other is hard to get you head around. especially if you pass you name to the other for it to use send
<RougeRR> yeah i can see what you mean
<RougeRR> i just cant see another way of doing it better
<phaul> why not just call where(..) in recheck. at least then the recursion becomes more evident
<RougeRR> because its handling save and where
<phaul> ah
<RougeRR> i could put that logic manually into both methods
<RougeRR> but that seems....dumb?
<RougeRR> but its the only way i can see of doing what he wants
<RougeRR> do you have any suggestions on other ways to do this?
MinSrodowiska has quit [Quit: Bye Bye]
<RougeRR> sorry if i sounded dismissive phaul
<phaul> right Im starting *slowly* to understand what you are doing...
<RougeRR> its been a long day
<RougeRR> phaul, yeah so i have an active storage type
<RougeRR> and a passive storage array
<RougeRR> (which includes the active)
<RougeRR> supported_storage*
<phaul> nah. no probs. Im being slow too, late here. working all day. I still try to think about ot though...
<RougeRR> do you want me to add comments
<RougeRR> i was going to do it before
<RougeRR> we dont use comments here lol
<phaul> no, just give us some minutes to digest what's there
<RougeRR> kk
<RougeRR> no worries
john2496 has quit []
<RougeRR> phaul, i had used something like before too
<leftylink> keep in mind that I have not thought about whether this is possible at all, but you know what I would really like. I agree the mutual recursion may be difficult. so what if it were possible to make only one function recursive, which would be `recheck`. and `save` and `where` need to express to `recheck` how they differ
<leftylink> I think that would be my idea.
<RougeRR> just parsing that leftylink
<RougeRR> thanks for input
<leftylink> that way, `recheck` doesn't need to `send`. it only needs to call itself
<RougeRR> leftylink, phaul
<RougeRR> i had considered a stack like approach
<RougeRR> that might have bugs in it, but it shows the idea
<RougeRR> leftylink, im not quite sure what you mean by only making recheck recurrsive?
<RougeRR> not saying you are wrong, im probably just tierd and not following
<phaul> I'm having so hard time to work out what this is doing from the code... Can't you describe it in pseudo code and see if someone comesup with some simpler implementation?
<RougeRR> sure
dostoyevsky has quit [Quit: leaving]
<RougeRR> its easier that it looks tbh
<RougeRR> ill comment in
<RougeRR> which bit are you struggling with btw?
<phaul> the recusrion with the checking toggle
<RougeRR> so let me try explain
dostoyevsky has joined #ruby
<RougeRR> log.save will either raise an exception or return true/false
<RougeRR> log.where will always return and empty hash, an empty array or raise an exception
<RougeRR> so we have different success criteria for saving a log and searching for a log
<leftylink> yeah you know what my problem is, I skipped the part where I bothered to try to understand what the code should be doing, because I didn't feel sufficiently motivated to reason through the mutual recursion
<RougeRR> i dont even know the term mutual recursion haha
<RougeRR> storage wise
<RougeRR> lets say we have 3
<RougeRR> local, postgres, elasticsearch
<RougeRR> and they might take slightly different inputs/queries
<RougeRR> so what we do is, we call recheck with the method and sort the storage so that the active storage is first to be checked
<RougeRR> if we dont get a success
<RougeRR> we call the method again with the correct class for the next storage
<RougeRR> ive tried this so many ways....
<RougeRR> if someone has a solution that is better, i have no pride any more...
poontangmessiah_ has joined #ruby
<phaul> so [local, postgres, ealstic].each {|storage| do stuff ; break if succesful? }
<RougeRR> return/break yes
chalkmonster has joined #ruby
<RougeRR> ill use break(result, errors) if i decided to do good error handling
<RougeRR> but for now yes
<RougeRR> return
<RougeRR> does that make sense? its ok if not
<phaul> but... what's the need for recursion?
<phaul> why not the simple loop I tried?
<RougeRR> because we want to call @controller.where(query)
<RougeRR> maybe im tierd and missing it, if you think you have a solution i might just be too blind to see it
poontangmessiah has quit [Ping timeout: 268 seconds]
<RougeRR> originally i was calling it like
<RougeRR> @controller.delegate(:where, input)
wymillerlinux has left #ruby [#ruby]
<RougeRR> and then it called the where/save
<RougeRR> but that wasnt good enough for my colleauge
MinSrodowiska has joined #ruby
<RougeRR> s
mre- has quit [Ping timeout: 246 seconds]
<RougeRR> i thought recursion was the wrong way to do it, hence why i rewrote it without it
sandstrom has quit [Quit: My computer has gone to sleep.]
<RougeRR> hang on ill get you the non recursion version
<phaul> yaay
<phaul> :)
<RougeRR> my manager and colleauge both said no to it
<RougeRR> and to me using method_missing
<RougeRR> tbh im not a fan of method_missing here
<RougeRR> we know what our methods are
sandstrom has joined #ruby
sandstrom has quit [Client Quit]
<RougeRR> got it
<RougeRR> let me just update a bit
ogres has joined #ruby
<adam12> RougeRR: You didn't have a blog post written about you did you?
<RougeRR> adam12, haha no
<RougeRR> why
<adam12> RougeRR: Let me see if I can find it.
<RougeRR> i might know the one you mean if its about method_missing mind
<RougeRR> define_method > method_missing every time
<RougeRR> haha similar
<adam12> RougeRR: Just seeing the bits about :where made me wonder :P
<RougeRR> yeah haha
<RougeRR> probably
<RougeRR> must be someone here
<RougeRR> i agree, that version was not good
<RougeRR> let see what they said
<RougeRR> glad it was anon enough
chalkmonster has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
<RougeRR> if so maybe ive found a solution hahahaha
hutch has quit [Ping timeout: 264 seconds]
<RougeRR> good article tbh
<RougeRR> think it might be missing a key bit
<RougeRR> yeah it is
ellcs has quit [Ping timeout: 245 seconds]
<RougeRR> fuck it guna call it a night
<RougeRR> its 10pm...
greengriminal has quit [Quit: This computer has gone to sleep]
<phaul> you leave us hanging now ? :)
<RougeRR> hahaha
<RougeRR> fiiiine
<RougeRR> i just feel a little weird someone doing a blog on my code as well
<RougeRR> i mean its useful and i agree with it
<phaul> sure I would feel weird too. but what's the key bit that they missed?
<RougeRR> There is a couple of bits
<RougeRR> partly to do on whether a class or instance method is called
<RougeRR> and also on priority of which backend to call
<RougeRR> still looking through tbh
<RougeRR> maybe ill message the author my solution when i get it
<phaul> the priorities seem to be there
<RougeRR> ah yeah and on the fly priority changing
<RougeRR> but i can seee how to add it
<RougeRR> let me have a go
<phaul> ok, but don't stay late I didnt want to drag you back into it, I was just wondering what was missing.
<RougeRR> haha nah its done now
<RougeRR> im guna finish it
<RougeRR> ill head off in 30 mins
<RougeRR> if i dont
<RougeRR> i also did use some of his bits actually
<RougeRR> like i had the hash map of types
chalkmonster has quit [Quit: WeeChat 2.6]
* baweaver wanders in
<baweaver> RougeRR: Well if it's any consolation it wasn't me, but I thought the same thing reading it (someone on here wrote it)
<RougeRR> baweaver, i dont mind at all
<RougeRR> i agree with them
<RougeRR> im trying to see if the solution would work for what i need
<RougeRR> i agree the one i posted before was bad
<RougeRR> id sort of been directed to do it thatway
<baweaver> I don't agree with airing it on a blog post though
<RougeRR> using const_get etc
<baweaver> kinda poor taste
<baweaver> and a lot of grandstanding
<RougeRR> a bit yeah
<baweaver> There are ways to use const_get that make sense.
<RougeRR> i dont know im unsure how to feel about it
<baweaver> Want to see a fun bit of metaprogramming around that idea?
<RougeRR> the blog not const get
<RougeRR> sure man :)
<RougeRR> let me justy finish this but ill look
<baweaver> Part three has most of it, but the first two warm you up for it.
<RougeRR> will have a shifty through
<RougeRR> i might not get back to you tonight
<RougeRR> but ill let you know what i think
<RougeRR> saved it in bookmarks
mre- has joined #ruby
<baweaver> Eh, no rush.
rbruchal has quit [Ping timeout: 264 seconds]
<phaul> it's not difficult to see who did it :) their name is right under the blogpost
<RougeRR> vov
<RougeRR> its okay
<RougeRR> i can remember enough anyway haha
<RougeRR> im not fussed
mre- has quit [Ping timeout: 240 seconds]
<RougeRR> fair enough
<RougeRR> also thanks haha
<baweaver> Mostly annoyed at the consent portion of it
<baweaver> baweaver == lemur == keyslemur == keystonelemur
baweaver is now known as lemur
<lemur> And a lemur I am
lemur is now known as baweaver
<baweaver> Anyways.
<baweaver> original alias was lemur. baweaver is me trying to be semi-professional and getting an authorly name
<phaul> fair
<baweaver> B.A. Weaver
<baweaver> All good authors have initials, it's classy
* baweaver is being mildly facetious
<RougeRR> baweaver, yeah i guess it does put people off posting to code to irc
<RougeRR> i think that would be the main issue
<RougeRR> im not that fussed about, but i could see how some would be
<RougeRR> im just happy to try his solution and rip up mine haha
rwb has joined #ruby
<RougeRR> also lol i came to exact same conclusion as him the following morning, that it was awful code
<RougeRR> hence the rewrite
<baweaver> It takes me a day or two to simplify some code
dionysus69 has joined #ruby
<baweaver> and some of my drafts are really horrid things
<baweaver> Just ask havenwood, he's had to read some of it XD
<baweaver> Jokes aside, the article presents this as finished code instead of as WIP which isn't exactly fair.
<baweaver> Now if they had broken this down and analyzed the patterns and why they might not be necessary it would be a much more useful article
<RougeRR> yeah i agree
<baweaver> especially if they paired with you on it to play around a bit
<RougeRR> haha yeah woulda been fun
<baweaver> That's how you grow people
<RougeRR> and yes his code does make it seem super super simple
<RougeRR> no real error handling
<RougeRR> but its given me a good and totally different direction
jeremycw has quit [Ping timeout: 240 seconds]
<baweaver> Tell you what, remind me this weekend and we can play with it a bit.
<baweaver> Well looks like they left IRC.
<RougeRR> haha
<RougeRR> idm
<RougeRR> ive been positive about it
<RougeRR> which i think is the best thing
<baweaver> Yeah, you're fine, I just want to call out that this may not go over well with other people and it's a bit insensitive.
dviola has joined #ruby
<RougeRR> yeah i agree with that
<RougeRR> im not "THAT" junior
<RougeRR> but yeah could imagine a year or so ago oof
<RougeRR> haha
<baweaver> Honestly same, I still have some of that code somewher
<baweaver> e
* RougeRR shudders
<RougeRR> been doing this full time for a year now
<RougeRR> every 3 months i look back at old code and just...ugh
<RougeRR> its horrible
<baweaver> Aha, found some
<RougeRR> haha nice
<baweaver> That was very early Ruby for me
<baweaver> I didn't know much about `map` or `Enumerable` back then
<RougeRR> off to a good start on this line
<RougeRR> JSON.parse(ssh.exec!('wstalist')).each.inject([]){ |a,d| a << d["lastip"] }
<RougeRR> hahaha
leitz has quit [Quit: Leaving]
<RougeRR> please
Skarlso has quit [Quit: The Lounge - https://thelounge.chat]
<baweaver> ssh.exec!(cmd).then(&JSON.:parse).map(&Mf["lastip"])
<baweaver> ssh.exec!(cmd).then(&JSON.:parse).map { _1["lastip"] }
<baweaver> Though if I was smart I'd have saved all of that indexed by IP so I didn't have to ask more than once.
<baweaver> Aha, also globals everywhere because I didn't know about block scoping yet.
dviola has quit [Changing host]
dviola has joined #ruby
<RougeRR> ahh yeahh
<RougeRR> oh god i started fixing my friends irc framework
<RougeRR> its python
<baweaver> To be absolutely 100% fair I was also brand new to Ruby and taught myself with no other Ruby people around.
<RougeRR> and i....
<baweaver> Well, really I was the only programmer there.
<RougeRR> i ripped out over 1000 lines and replaced it with a YAML document and 10 lines of initializaton
<RougeRR> yeah that is fair baweaver
<baweaver> I never really rip newer code, I just teach how it could potentially be written instead
<baweaver> because we all start somewhere
<RougeRR> yeah
<baweaver> and there's no faster way to kill someone's drive to program than to say "look how foolish this new person is!"
<RougeRR> ikwym
<baweaver> I'm still a fool
* RougeRR is too
<RougeRR> im better at networking than i am programming
<baweaver> and there's nothing wrong with that, it's a journey to get better and improve
<RougeRR> and now im slowly forgetting all the nitty gritty of that side haha
* RougeRR nods
<baweaver> Now if one revels in their foolishness and avoids growth, that's a different matter.
hyperreal has joined #ruby
<baweaver> Heh, I had one of the directors (2 levels above my head) at work when I joined their org start the conversation with "So you're the new Ruby expert here!"
<RougeRR> heheh
<RougeRR> i assume you were not a ruby expert then lol
<baweaver> Proceed with me iterating 100 reasons why not, and smart brain shutting my mouth before they uttered a single line of it
<RougeRR> haha
<baweaver> Smart brain said "accept the compliment and move on"
shansen has joined #ruby
<RougeRR> glad to hear imposter syndrome keeps on kicking
<baweaver> I don't call myself an expert because I know people like tenderlove and avdi around
<baweaver> but what really kicks you is when people start using your name in those sentences and your first reaction is "whoa whoa, hold up a second there"
<RougeRR> never call ya self an expert
Skarlso has joined #ruby
<RougeRR> then you have to be THEE expert
<RougeRR> and THEIR expert lol
<RougeRR> i think my worst recently was being like "yeah ill just write a script to fix it"
<RougeRR> to a friend
<RougeRR> and thought ahh windows has powershell
<RougeRR> how hard can it be
<RougeRR> ...several hours later of me refusing to give up and install ruby/python
<RougeRR> turns out some powershell function inheintly expect a string regexp
<RougeRR> and my string had brackets...
queip has quit [Ping timeout: 265 seconds]
<baweaver> It's always something.
queip_ has joined #ruby
queip_ is now known as queip
<RougeRR> yeah, tbh we were doing it over drinks which did not help
<RougeRR> solution was just using the builtin REGEXP escape
ur5us has quit [Remote host closed the connection]
mre- has joined #ruby
dostoyevsky has quit [Quit: leaving]
dostoyevsky has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
poontangmessiah has joined #ruby
poontangmessiah_ has quit [Ping timeout: 246 seconds]
mre- has joined #ruby
spiette has quit [Quit: ZNC 1.7.5 - https://znc.in]
spiette has joined #ruby
<RougeRR> baweaver, phaul think im there
<phaul> uhm? where?
<phaul> here?
<RougeRR> as in i used the guys err approach
<RougeRR> and have made it work for my needs
<phaul> ah right :D
<RougeRR> ive not tested it but im pretty sure its good
<phaul> cool
<RougeRR> voila
MinSrodowiska has quit [Quit: Bye Bye]
<RougeRR> i far prefer it, would have been nice to see this a few days ago haha
jeremycw has joined #ruby
<RougeRR> oops typo
<RougeRR> lol still
<RougeRR> im tierd
<RougeRR> keep rushing
<phaul> is it 11pm where you are?
<phaul> 213651 RougeRR | ill head off in 30 mins
<RougeRR> whatever
<RougeRR> there
<RougeRR> phaul,
<RougeRR> errrrrr
<RougeRR> going home?
<RougeRR> ive done it though
<RougeRR> will test tommorow
<phaul> cool, yeah. better to do that fresh in the morning :)
<RougeRR> yeah :)
<RougeRR> my colleauges at work were pointing me in completly the wrong direction
<RougeRR> and i think that might be why i wrote some crazy code lol
jeremycw has quit [Ping timeout: 265 seconds]
<RougeRR> i didnt stop to think of totally different approaches
<phaul> sometimes it's hard to communicate ideas like these which I guess is why patterns and things like UML were invented. I hate both though
<leftylink> oh
<phaul> take it with a pinch of salt... hate is maybe strong word
<RougeRR> nah i know what you mean
<RougeRR> also ive seen a bug
<RougeRR> not sure how to fix hmmm
<RougeRR> ah yes i do
<leftylink> I am much more likely to want to read it now that I don't have to figure out how two different functions call each other
<leftylink> ping pong
<RougeRR> hahaha
<RougeRR> leftylink, the where wasnt quite right
<RougeRR> something like that
<RougeRR> or
<RougeRR> return result if result.present? || logger = @loggers.last
<RougeRR> or keep track of index
<RougeRR> and if results.present? || i = @loggers.length
xco has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
Esa_ has quit []
<phaul> you could remove the if here input = sanitize(input) if logger.name == 'PgLog' with a polymorphic logger.sanitize(input) where each logger sanitizes "the right way"
chalkmonster has joined #ruby
<RougeRR> mmmm i had considered something like that phaul
<RougeRR> you would need empty methods or a respond_to?
<RougeRR> call
<RougeRR> its a nice idea.
<RougeRR> let me see
<RougeRR> ah issue
<phaul> "don't ask, tell" -- as https://martinfowler.com/bliki/TellDontAsk.html
<RougeRR> good point on it
<RougeRR> the input needs to be sanitized before the log can be instantiated mind
<phaul> you already send name to logger. therefore you should be able to tell it to sanitize
<phaul> I'm talking non behaviour changing refactor
<RougeRR> yeah but they dont all need to sanitize
ur5us has quit [Ping timeout: 268 seconds]
<RougeRR> they do all need prognames
<phaul> they can just return input unchanged
rwb has quit [Quit: rwb]
<RougeRR> its also after the class is instantiated
<RougeRR> but yeah i could get them to return it hmmmm
<RougeRR> do it as a class method
<phaul> it removes one special path from the code
<RougeRR> yep i agree
<RougeRR> its the odd man out
<RougeRR> hence why i hid it in a method lol
<RougeRR> so phaul
<RougeRR> call looks like
<RougeRR> input = log.sanitize!(input)
<phaul> I would not change a local variable like that, instead I would sanitized_input = logger.sanitize!(input)
<RougeRR> hmmm
<RougeRR> its being used for the last time on the next line
<RougeRR> i can see what you mean though
<RougeRR> could just call it sanitized
<RougeRR> doesnt look right with that
<RougeRR> so scratch what i just said
<phaul> also I'm not sure you need the bang on sanitize
<RougeRR> yeah i dont, at one point it was in place
<RougeRR> now it returns a new object
<RougeRR> i think. lol hashes
<RougeRR> phaul, yeah ive learnt a lot playing with this
<RougeRR> and the pieces that join to it
<RougeRR> controller is only one piece of a much large puzzle lol
<leftylink> for those situations, I use a scapegoat and ask the scapegoat to expand the url for me
<RougeRR> its a 'link' that should be 'lefty' 'alone
<RougeRR> just a good ol rick roll
jeremycw has joined #ruby
<RougeRR> phaul, my class already has a sanitize method on the parent
<RougeRR> what do you think of :clean as the method name
<RougeRR> i mean it doesnt do much the sanitize lol its just active record....
<RougeRR> but i dont wana mess with it
<RougeRR> yeah so it just calls to_s and wraps anything you feel it in single quotes
<phaul> I don't know. tbh
<RougeRR> its okay
<RougeRR> im done for the day
<RougeRR> thanks not so anon blog man for helping
<RougeRR> and phaul and others
RougeRR has quit [Quit: Leaving]
* phaul back to bingeing the good place
gnufied__ has quit [Ping timeout: 245 seconds]
jeremycw has quit [Ping timeout: 268 seconds]
chalkmonster has quit [Quit: WeeChat 2.6]
tobiasvl has quit [Ping timeout: 276 seconds]
ogres has quit [Quit: Connection closed for inactivity]
drincruz has quit [Ping timeout: 240 seconds]
SCHAPiE has quit [Quit: ZNC - https://znc.in]
tvl has joined #ruby
tvl is now known as tobiasvl
SCHAPiE has joined #ruby
mre- has quit [Ping timeout: 268 seconds]
AJA4350 has joined #ruby
ellcs has joined #ruby
code_zombie has joined #ruby
Intelo has joined #ruby
<leftylink> does `begin` create a scope?
<leftylink> &>> begin a = 5 end; p a
<rubydoc> # => 5... check link for more (https://carc.in/#/r/7w0e)
<leftylink> okay then
<baweaver> It's an expression at least
bambanx_ has joined #ruby
<leftylink> I guess if I wanted temporaries not to escape I could use a function or something
bambanx_ has quit [Remote host closed the connection]
AJA4351 has joined #ruby
<leftylink> the actual context was indeed somethng like
<phaul> only files, classes, modules, methods and blocks are afaik
<phaul> blocks being special
<leftylink> &>> b = begin a = 5; a + 1 end; puts a; puts b
<rubydoc> # => 5... check link for more (https://carc.in/#/r/7w0f)
bambanx has quit [Ping timeout: 268 seconds]
<leftylink> so if I wanted to hide a, then it'd be...
<leftylink> &>> b = -> { a = 5; a + 1 }[]; puts b; puts a rescue :undefined
<rubydoc> # => 6... check link for more (https://carc.in/#/r/7w0g)
AJA4350 has quit [Ping timeout: 276 seconds]
<leftylink> eh... doesn't seem worth the trouble
<baweaver> IIFE - Immediately invoked function expression
<baweaver> If you were looking for a name for it
<leftylink> dang, I wonder what circumstances led to it having a name
wildtrees has quit [Quit: Leaving]
<baweaver> Javascript
<baweaver> It's rIIFE with odd names :D
AJA4350 has joined #ruby
AJA4351 has quit [Ping timeout: 240 seconds]
bambanx has joined #ruby
<phaul> &>> a = 1 ; 1.then {|;a| a = 3 }; a
<rubydoc> # => 1 (https://carc.in/#/r/7w0h)
yasumi2136 has quit [Quit: Leaving]
jeremycw has joined #ruby
mossplix has joined #ruby
jeremycw has quit [Ping timeout: 246 seconds]
meinside has quit [Quit: Connection closed for inactivity]
poontangmessiah has quit [Remote host closed the connection]
mossplix has quit [Remote host closed the connection]
mossplix has joined #ruby
bitwinery has quit [Read error: Connection reset by peer]
psilly0 has quit [Remote host closed the connection]
bitwinery has joined #ruby
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
<baweaver> Ah right, that thing
<baweaver> eam showed me once forever ago.
<baweaver> I'm still not fond of the syntax for it.
ellcs has quit [Ping timeout: 250 seconds]
<Frankenstein> what is |;a| ?
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
ur5us has joined #ruby
dbugger has quit [Remote host closed the connection]
dasher00 has quit [Ping timeout: 240 seconds]
ExoUNX has joined #ruby