gearnode has quit [Ping timeout: 244 seconds]
yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
bit4bit has quit [Remote host closed the connection]
yxhuvud has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
lunarkitty has quit [Quit: Connection closed for inactivity]
ur5us has joined #ruby
joast has joined #ruby
lunarkitty has joined #ruby
lfalcao has quit [Ping timeout: 240 seconds]
lfalcao has joined #ruby
Milos has quit [Quit: ZNC 1.8.2 - https://znc.in]
Milos has joined #ruby
jetchisel has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
lfalcao has quit [Ping timeout: 268 seconds]
jetchisel has quit [Ping timeout: 268 seconds]
jetchisel has joined #ruby
pwnd_sfw1 has joined #ruby
pwnd_sfw has quit [Read error: Connection reset by peer]
pwnd_sfw1 is now known as pwnd_sfw
gr33n7007h has quit [Ping timeout: 252 seconds]
jetchisel has quit [Quit: Unfortunately time is always against us -- [Morpheus]]
postmodern has quit [Quit: Leaving]
sdfuiojklqaz has quit [Remote host closed the connection]
konsolebox has joined #ruby
lfalcao has joined #ruby
willthechill has quit [Ping timeout: 272 seconds]
jmcgnh has quit [Ping timeout: 244 seconds]
jmcgnh has joined #ruby
ur5us has quit [Ping timeout: 252 seconds]
pwnd_sfw has quit [Quit: Ping timeout (120 seconds)]
pwnd_sfw has joined #ruby
ecommence has joined #ruby
<ecommence> Hello!
<ecommence> Is there a simpler way of writing this? https://clbin.com/Xp5eo
<ecommence> It tries to use Faker::ChuckNorris.fact from https://github.com/faker-ruby/faker to construct entire paragraphs.
<havenwood> ecommence: Just to double check, `rand(4).times` might be zero times. (Zero up to three.)
<ecommence> Ah, thanks I did not know that :)
<havenwood> ecommence: consider using #reduce in that inner loop.
<havenwood> ecommence: rand(4..8).times.reduce('') do |chuckie|
gr33n7007h has joined #ruby
<havenwood> ecommence: maybe something ^ like that?
dviola has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
gr33n7007h has quit [Quit: WeeChat 3.2]
TomyWork has joined #ruby
<ecommence> havenwood: My bad, just got back!
<ecommence> havenwood: Talk about extreme makeover :) That looks gorgeous!
<ecommence> Thanks a lot
<ecommence> This sure beats using Faker::Lipsum
ollysmith has quit [Ping timeout: 268 seconds]
<ecommence> havenwood: here she is so far: https://clbin.com/rfxDp
teclator has joined #ruby
lfalcao has quit [Ping timeout: 268 seconds]
gearnode has joined #ruby
Qchmqs has joined #ruby
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
Qchmqs has quit [Quit: leaving]
Qchmqs has joined #ruby
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
justBull has quit [Read error: Connection reset by peer]
justBull has joined #ruby
aeris has quit [Ping timeout: 252 seconds]
kinduff0 has quit [Quit: The Lounge - https://thelounge.chat]
kinduff0 has joined #ruby
kinduff0 has quit [Client Quit]
aeris- has joined #ruby
dviola has quit [Quit: WeeChat 3.2]
lunarkitty has joined #ruby
Furai has quit [Ping timeout: 268 seconds]
Furai has joined #ruby
xuochi has joined #ruby
peder has quit [Quit: Reconnecting]
peder has joined #ruby
sdfuiojklqaz has joined #ruby
peder has quit [Client Quit]
peder has joined #ruby
Qchmqs_ has joined #ruby
sdfuiojklqaz has quit [Ping timeout: 268 seconds]
Qchmqs has quit [Ping timeout: 240 seconds]
peder has quit [Quit: Reconnecting]
peder has joined #ruby
peder has quit [Quit: leaving]
peder has joined #ruby
Qchmqs_ has quit [Quit: leaving]
Qchmqs has joined #ruby
Qchmqs has quit [Changing host]
Qchmqs has joined #ruby
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #ruby
sdfuiojklqaz has joined #ruby
jinie_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
gr33n7007h has joined #ruby
brw has quit [Remote host closed the connection]
brw has joined #ruby
brw has quit [Remote host closed the connection]
pwnd_sfw6 has joined #ruby
pwnd_sfw has quit [Read error: Connection reset by peer]
pwnd_sfw6 is now known as pwnd_sfw
jinie has joined #ruby
brw has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
brw has quit [Quit: The Lounge - https://thelounge.chat]
brw has joined #ruby
brw has quit [Ping timeout: 268 seconds]
lfalcao has joined #ruby
willthechill has joined #ruby
lfalcao has quit [Ping timeout: 244 seconds]
lfalcao has joined #ruby
crankharder has joined #ruby
crankharder has quit [Client Quit]
ollysmith has joined #ruby
crankharder has joined #ruby
xuochi has quit [Quit: leaving]
roadie has joined #ruby
Rounin has joined #ruby
podge has quit [Changing host]
podge has joined #ruby
<ecommence> Check it out guys! World's first demo of how to use OpenBSD with Rails to host your next killer apps: https://github.com/basicfeatures/openbsd-rails -- feedback/constructive criticism welcome!
jabberwock has joined #ruby
<jabberwock> I'm looking to proxy either `ruby` or `irb` but just settings HTTPS_PROXY= ./ruby etc. isn't working for me
lfalcao has quit [Ping timeout: 264 seconds]
<gearnode> jabberwock: Maybe use Wireshark with mitmproxy can help you :)
teclator has quit [Remote host closed the connection]
roadie has quit [Ping timeout: 272 seconds]
<adam12> jabberwock: Which http library are you using?
lfalcao has joined #ruby
<jabberwock> adam12: this is some internal library. Normally I could set the proxy with that variable but this isn't honoring it
<jabberwock> And the target doesn't have proxychains etc
<jabberwock> I can get around it but it's a pain
<adam12> jabberwock: So is your internal library using Net::HTTP?
<jabberwock> good q! I'm not sure, digging
<adam12> Not sure about HTTPS_PROXY. Maybe HTTP_PROXY (without the S)
<jabberwock> yeah I tried both. I've never used them with ruby, so now I know
goldfish has joined #ruby
<adam12> I’m not sure if all HTTP clients for Ruby will honor them. Net::HTTP should, but again I’m not sure about that specific ENV variable. If it’s a legit var, it might be worth seeing if the `URI` library needs to be modified to support it.
Qchmqs has quit [Ping timeout: 268 seconds]
roadie has joined #ruby
* jabberwock nods
<jabberwock> 👍
<jabberwock> ty
pwnd_sfw5 has joined #ruby
pwnd_sfw has quit [Read error: Connection reset by peer]
pwnd_sfw5 is now known as pwnd_sfw
roadie has quit [Ping timeout: 244 seconds]
jabberwock has quit [Quit: WeeChat 2.8]
roadie has joined #ruby
postmodern has joined #ruby
roadie has quit [Ping timeout: 268 seconds]
lfalcao has quit [Ping timeout: 244 seconds]
roadie has joined #ruby
Guest71 has joined #ruby
roadie has quit [Ping timeout: 264 seconds]
lfalcao has joined #ruby
roadie has joined #ruby
involans has quit [Ping timeout: 268 seconds]
lfalcao has quit [Ping timeout: 244 seconds]
Guest71 has quit [Quit: Client closed]
involans has joined #ruby
involans has quit [Ping timeout: 268 seconds]
roadie has quit [Ping timeout: 268 seconds]
billyruffian has joined #ruby
billyruffian has quit [Ping timeout: 244 seconds]
involans has joined #ruby
lunarkitty has joined #ruby
billyruffian has joined #ruby
roadie has joined #ruby
TomyWork has quit [Remote host closed the connection]
postmodern has quit [Remote host closed the connection]
chonkbit has joined #ruby
billyruffian has quit [Ping timeout: 268 seconds]
Nowaker has quit [Remote host closed the connection]
Nowaker has joined #ruby
billyruffian has joined #ruby
postmodern has joined #ruby
billyruffian has quit [Client Quit]
billyruffian has joined #ruby
billyruffian has quit [Remote host closed the connection]
lfalcao has joined #ruby
atj1 has joined #ruby
roadie has quit [Ping timeout: 240 seconds]
atj has quit [*.net *.split]
atj1 is now known as atj
lfalcao has quit [Ping timeout: 264 seconds]
crankharder has quit [Quit: leaving]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
tempate has joined #ruby
<tempate> Is it possible iterate over a list by getting groups of n elements (e.g. the interations over [1,2,3,4] for n = 2 would be [1,2], [2,3] and [3,4]) ?
<tempate> I guess each_cons is what I'm looking for
billyruffian has joined #ruby
billyruffian has quit [Ping timeout: 268 seconds]
<tempate> Resending because I'm not sure if my last message got through
<tempate> Why is https://bpa.st/ZMUQ not working?
lfalcao has joined #ruby
<tempate> ok, I found out why: I'm supposed to be adding i + 1 to j. Is there are better way of doing this whole thing though?
<weaksauce> tempate permutation?
<weaksauce> or actually probably combination on Array
<tempate> Yeah, that could do the trick
<weaksauce> >> [1,2,3,4].combination(3) do |x| p x end
<ruby[bot]> weaksauce: # => (https://carc.in/#/r/bd5d)
<weaksauce> maybe ruby 3 didn't like that but irb it's fine
<weaksauce> >> [1,2,3,4].combination(3) do |x| p(x); end
<ruby[bot]> weaksauce: # => [1, 2, 3] ...check link for more (https://carc.in/#/r/bd5e)
chonkbit has quit [Ping timeout: 240 seconds]
<nakilon> guys, imagine a Ruby API backend dev. vacancy and a test task to implement the page https://i.imgur.com/gAXD1kb.png where 1) the button Buy subtracts money from user's balance 2) for simplicity every item is of quantity of either 0 or 1 3) for simplicity no need to implement auth 4) "code should be simple, not complicated, no excessive things, but
<nakilon> of high quality"
<nakilon> and imagine this to be a candidate's solution: https://dpaste.org/7YdB/slim -- what would you say?
<weaksauce> not rails; pass
budo has joined #ruby
<mayhew> anyone using Spring with Rails? I notice it's using about 5% CPU constantly even when I'm not interacting with my project, it's called lstat on all of my ruby files over and over. Is this expected? I feel like it should be using inotify or something so it's not polling.
henninb has joined #ruby
<weaksauce> mayhew any luck combing through the issues?
<mayhew> I took a look at those, nothing about CPU usage popped up
<weaksauce> there are a few about it
<weaksauce> polls every .2 seconds
<mayhew> ahhhh
<mayhew> that would explain it!
<weaksauce> there is that gem that you can configure
<weaksauce> listed in there
<mayhew> I wonder if it's more hassle than it's worth
<mayhew> that third party gem hasnt been touched since 2017, spring itself had like 10 commits since 2020
<weaksauce> seems that there are only 20 commits and it's being recommended by spring itself
<weaksauce> so maybe it's just not a thing that needs updating frequently
<weaksauce> yeah it's 65 lines of code wet
<mayhew> ah yeah
<mayhew> you're a smart guy, weaksauce
<mayhew> here I am jumping to conclusions
<mayhew> thanks for talking some sense into me haha
<weaksauce> no worries :)
<mayhew> 65 lines of code is something that can be "done"
<mayhew> I feel like I've gotten used to the constant churn of GitHub and judging projects by "activity" and stuff
<mayhew> bad habbits
<mayhew> thanks again :)
<weaksauce> i try to evaluate gems on that metric too but also on issues open and complexity
henninb has quit [Remote host closed the connection]