havenwood changed the topic of #ruby to: Ruby 3.4.1, 3.3.6 https://www.ruby-lang.org | Log https://libera.irclog.whitequark.org/ruby
<FetidToot> hi! quick question... i'm spinning up a small modular sinatra app, along with grape (for the api) and sidekiq (async jobs). the setup for sinatra + grape is easy, and sinatra + sidekiq is easy, but i can't figure out how to run all three together. for example...
<FetidToot> This 'run Rack::URLMap.new('/' => App, '/sidekiq' => Sidekiq::Web)' sets up sinatra and sidekiq, and...
<FetidToot> This `run Rack::Cascade.new [App, API]` sets up sinatra and grape. how does one form a command to properly mount all three in the config.ru file?
<o0x1eef> I think might want you want to create an app that mounts all three, then run the app
<o0x1eef> run Rack::Builder.app { mount '/' => App ... etc }
<o0x1eef> Ah not mount. It is map.
<FetidToot> that's kind of what i'm doing with the config.ru file and running `rackup`. it's just a rack app at that point that mounts the various apps.
<FetidToot> i just can't find a way to mount all three apps and make them all happy.
<o0x1eef> Maybe the order matters ? Did you try to mount Sidekiq::Web first ? Perhaps it's not being routed properly. What I suggested isn't quite right anyway so ignore it.
<o0x1eef> Is there a reason to not use Rack::URLMap with 'API' as well ? If you put the /api and /sidekiq first, and App last at /, that might work
<FetidToot> i'll give it a shot. i'm basically to the trial and error stage anyway. :) one sec...
<o0x1eef> I gotta bounce for a bit
<FetidToot> thanks for the help!
grenierm has quit [Ping timeout: 240 seconds]
deadmarshal_ has quit [Remote host closed the connection]
weaksauce has quit [Ping timeout: 244 seconds]
weaksauce has joined #ruby
konsolebox has joined #ruby
deadmarshal_ has joined #ruby
Rounin has quit [Ping timeout: 265 seconds]
Rounin has joined #ruby
TomyLobo has quit [Read error: Connection reset by peer]
s-liao-200 has joined #ruby
s-liao-200 has quit [Client Quit]
s-liao-200 has joined #ruby
chenggong7788 has joined #ruby
chenggong7788 is now known as nil78_
nil78 has joined #ruby
Inline has joined #ruby
nil78_ has quit [Client Quit]
nil78 has left #ruby [Leaving...]
duderonomy has joined #ruby
grenierm has joined #ruby
s-liao-200 has quit [Quit: Client closed]
mjanssen has quit [Read error: Connection reset by peer]
Inline_ has joined #ruby
Inline has quit [Ping timeout: 248 seconds]
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
grenierm has quit [Quit: Client closed]
jvalleroy has joined #ruby
grenierm has joined #ruby
konsolebox has quit [Ping timeout: 240 seconds]
mjanssen has joined #ruby
Linux_Kerio has joined #ruby
konsolebox has joined #ruby
mjanssen has quit [Ping timeout: 265 seconds]
Furai has quit [Quit: WeeChat 4.5.1]
Furai has joined #ruby
mjanssen has joined #ruby
cappy has joined #ruby
TomyWork has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
Linux_Kerio has joined #ruby
Linux_Kerio has quit [Read error: Connection reset by peer]
niv has quit [Quit: ZNC - https://znc.in]
niv has joined #ruby
cappy has quit [Quit: Leaving]
Inline_ is now known as Inline
Linux_Kerio has joined #ruby
Vonter has quit [Ping timeout: 252 seconds]
Vonter has joined #ruby
konsolebox has quit [Ping timeout: 250 seconds]
niv has quit [Quit: ZNC - https://znc.in]
hwpplayer1 has joined #ruby
duderonomy has quit [Read error: Connection reset by peer]
grenierm has quit [Quit: Client closed]
konsolebox has joined #ruby
denvermullets has joined #ruby
niv has joined #ruby
nil78 has joined #ruby
user71 has joined #ruby
denvermullets has quit [Remote host closed the connection]
konsolebox has quit [Ping timeout: 240 seconds]
dannyAAM has quit [Quit: Will be back soon!]
dannyAAM has joined #ruby
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #ruby
dannyAAM has quit [Quit: Will be back soon!]
dannyAAM has joined #ruby
Inline_ has joined #ruby
Inline has quit [Ping timeout: 252 seconds]
dannyAAM has quit [Quit: Will be back soon!]
nil78 has quit [Quit: Client closed]
dannyAAM has joined #ruby
dannyAAM has quit [Remote host closed the connection]
dannyAAM has joined #ruby
cahoots_ has joined #ruby
dannyAAM has quit [Remote host closed the connection]
chenggong7788 has joined #ruby
chenggong7788 is now known as nil78
dannyAAM has joined #ruby
Vaevictus has joined #ruby
<Vaevictus> can anyone help me understand what stupid thing i'm doing?
<ruby[bot]> Vaevictus: 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 or https://dpaste.org/
<Vaevictus> ugh.
<Vaevictus> dpaste doesn't work with my corporate network
<Vaevictus> for some reason, #9 isn't true?
<Vaevictus> what am i doing?
dannyAAM has quit [Remote host closed the connection]
<Vaevictus> 30 > 4 and is checked first... but 30>10 fires instead?
cahoots_ has quit [Quit: Client closed]
cahoots_ has joined #ruby
dannyAAM has joined #ruby
<adam12> Vaevictus: Are these all strings?
<adam12> >> "30" > "4"
<ruby[bot]> adam12: # => false (https://carc.in/#/r/hlj4)
<adam12> >> "30" > "10"
<ruby[bot]> adam12: # => true (https://carc.in/#/r/hlj5)
Inline_ has quit [Ping timeout: 245 seconds]
cahoots_ has quit [Quit: Client closed]
<Vaevictus> hmm.
<Vaevictus> the critical/warning levels are argv so yeah, those are strings ... and the other are \d match results... so those probably aren't
<Vaevictus> thanks for the clue
<Vaevictus> yeah, that was it. all strings instead of converted to integers :D
Inline has joined #ruby
Inline_ has joined #ruby
Inline is now known as Guest1232
Inline_ is now known as Inline
Guest1232 has quit [Killed (osmium.libera.chat (Nickname regained by services))]
<adam12> Nice :)
gorom has joined #ruby
<gorom> I am 75 IQ programmer first day ruby and I need help
<adam12> gorom: Ask your question.
<gorom> why this code is so bad
<ruby[bot]> gorom: 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 or https://dpaste.org/
<adam12> gorom: Bad how?
<gorom> doesnt count counter
<gorom> and when I write in input something like :wq it returns everything at once few times haha
<adam12> gorom: @counter is in the wrong scope. You should put it into an `initialize` method.
<gorom> oh ok, I will try
<adam12> I mean `@counter = 0`
<adam12> So you should make `def initialize` and then inside that method, `@counter = 0`.
<gorom> hmm, still no success tho
<gorom> maybe I messed up some logic, I don't see any errors tho
<gorom> ruby so stronk, kuso
<gorom> i'll debug it with print statements
<gorom> oh okay print statement is the best debugger, now I see why my iq is below 80
<adam12> gorom: Show updated code block.
<gorom> it never checks if it is 3
<gorom> counter is fine now because it counts, but nobody checks it haha
<adam12> gorom: I'm not sure what you're going for here. Why do you reset `@counter = 0` inside isThree?
<gorom> because unexperienced I guess
<gorom> I mean I'm looking for some other checkpoint now
<adam12> gorom: Tell me what you're trying to achieve.
<gorom> I need to say bye 3 times in a row to finish the program
<gorom> uppercase like BYE
<gorom> if not in a row then program continue
<adam12> I don't think isBye should call isCapital.
<gorom> sure, I have to take different approach, I'll meditiate over it a little more
<gorom> but you could send me some good practices when writing ruby code if there are any
<gorom> oh okay haha
<gorom> my logic is bad
<gorom> smooth brain
<adam12> Sure. `Klasa = Solution.new` should be `klasa =` (lower case for variables). We don't normally use `isXX` in favour of `xx?`. ie. `def capital?`.
<adam12> I'd use a `case` statement somewhere.
<adam12> I'd move the `loop` into your class.
<o0x1eef> For the sake of all that is good someone rewire ruby[bot] to be less pedantic and annoying
<adam12> You don't need to `return` at the end of a method.
<adam12> o0x1eef: Yes. Let me see if I can remove that. Trick is if jhass is around to deploy.
<o0x1eef> Thanks :)
<adam12> o0x1eef: I had started dropping the follow up nag. I wonder if that's good enough.
<o0x1eef> I think it's just generally bad form. Guests arrive, share a link, and then they're told they're doing it wrong.
<gorom> thanks, I Appreciate Your Help
<o0x1eef> Also, it might as well be working for Microsoft at this stage :D
<ruby[bot]> adam12: 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 or https://dpaste.org/
<adam12> I guess the follow up nag did ship.
<o0x1eef> Nice. That's an improvement
Inline_ has joined #ruby
Inline is now known as Guest1981
Guest1981 has quit [Killed (lead.libera.chat (Nickname regained by services))]
Inline_ is now known as Inline
<o0x1eef> pastebin does not load slowly though, nor does it have ads, and who is the bot to speak for 234 people? Well. Whatever. My opinion on that is well known.
nil78 has quit [Ping timeout: 240 seconds]
<o0x1eef> Without an umatrix it does indeed have ads, so that's a fair point. I still think it is weird to police links and phrases such as 'guys'. I'm in a few IRC channels where links are shared, and #ruby is unique in this regard.
<adam12> There's a police for `guys`?
<adam12> Test: hey guys
<adam12> ?guys
<ruby[bot]> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<adam12> ?guys
<ruby[bot]> Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<o0x1eef> Not anymore, but historically, people risked being banned for saying 'Thanks guys!'. I mean, they had no ill intent, and it's ridiculous to go that far.
<adam12> Weird. Old ops?
<o0x1eef> Yep it's from an old op
<adam12> I dont' remember it, but I left this channel for similar reasons.
<adam12> Test: guys
Inline_ has joined #ruby
Inline is now known as Guest5268
Inline_ is now known as Inline
Guest5268 has quit [Killed (silver.libera.chat (Nickname regained by services))]
<adam12> Must just be a fact.
<adam12> I don't see any code that guards on `guys` being in PRIVMSG.
<o0x1eef> I think it was usually called out manually, with ?guys but my memory is fuzzy. The point is all these little things contribute to an environment that isn't comfortable. Everyone is walking on egg shells in case they say the wrong word.
Inline has joined #ruby
Inline has quit [Killed (erbium.libera.chat (Nickname regained by services))]
Inline_ has joined #ruby
Inline_ is now known as Inline
Inline has quit [Killed (zirconium.libera.chat (Nickname regained by services))]
Inline has joined #ruby
Inline_ has joined #ruby
TN__ has joined #ruby
Inline is now known as Guest9284
TN__ is now known as Inline
gorom has quit [Remote host closed the connection]
TN__ has joined #ruby
Inline is now known as Guest6543
TN__ is now known as Inline
TN__ has joined #ruby
Inline is now known as Guest8658
TN__ is now known as Inline
Guest9284 has quit [Ping timeout: 244 seconds]
Inline_ has quit [Ping timeout: 244 seconds]
TN__ has joined #ruby
Inline is now known as Guest767
Guest767 has quit [Killed (molybdenum.libera.chat (Nickname regained by services))]
TN__ is now known as Inline
Guest6543 has quit [Ping timeout: 244 seconds]
denvermullets has joined #ruby
dionysus69 has joined #ruby
Guest8658 has quit [Ping timeout: 244 seconds]
Inline has quit [Ping timeout: 276 seconds]
hightower2 has quit [Remote host closed the connection]
denvermullets has quit [Ping timeout: 248 seconds]
Sheilong has joined #ruby
TomyWork has quit [Ping timeout: 252 seconds]
hwpplayer1 has quit [Read error: Connection reset by peer]
szkl has joined #ruby
Guest38 has joined #ruby
Sampersand has joined #ruby
Inline has joined #ruby
hwpplayer1 has joined #ruby
Inline_ has joined #ruby
Inline is now known as Guest1044
Inline_ is now known as Inline
Guest1044 has quit [Ping timeout: 264 seconds]
Inline_ has joined #ruby
Inline is now known as Guest7076
Guest7076 has quit [Killed (copper.libera.chat (Nickname regained by services))]
Inline_ is now known as Inline
tardybaker_ has joined #ruby
tardybaker has quit [Ping timeout: 252 seconds]
<Guest38>  Hello, I am someone who is interested in programming. I was introduced to Ruby in 2019, and a lot has changed since then. I want to learn a bit more now, but I have some questions. I'm curious to hear from those who use Ruby: what do you think about its future? Are you actively using Ruby for large projects, or is it mostly for hobby purposes
<Guest38> now? What types of projects do you prefer to use Ruby for? Are there any tools or libraries you feel are lacking when working with Ruby? How do you evaluate the level of interaction within the Ruby community? What platforms or resources do you prefer for getting help? I'm sorry if my English is hard to understand, and thank you for your help.
user71 has quit [Quit: Leaving]
<caleb> that's a pile of questions
Inline_ has joined #ruby
nckr has quit [Quit: Connection closed for inactivity]
<caleb> you're obviously going to get biased answers from a Ruby IRC channel of all places, that being said... Ruby has a bright future, is widely used, and a joy to work in. I've spent almost the entirety of my professional life writing Ruby since 2010 for large projects at startups to big companies. I also use it for hobby projects. It's lacking in the bluetooth arena. Trying to do radio/signals/bluetooth things in Ruby is an exercise in pain.
Inline has quit [Ping timeout: 244 seconds]
<caleb> I think a the funniest tongue-in-cheek comment I've heard from younger folks who know their history is that Ruby is Perl for millennials.
<o0x1eef> > What do you think about its future ?
<o0x1eef> I think the future is bright, but it is less popular than earlier years. If I was starting from scratch, I might choose another language - like Python. It is strong in the AI / machine learning fields. Ruby not as much. Ruby is still a popular web language, and there are plenty of companies using it.
<o0x1eef> And - with web assembly, pycall.rb (a bridge between Python <=> Ruby) - that gap in AI / machine learning might eventually become smaller over time.
Sampersand has quit [Quit: Client closed]
Inline_ is now known as Inline
<Guest38> thank you for sharing your thoughts/experiences :D
Guest38 has quit [Quit: Client closed]
Sampersand has joined #ruby
zphinx has quit [Quit: Bye!]
zphinx has joined #ruby
Inline has quit [Quit: Leaving]
Inline has joined #ruby
Inline has quit [Ping timeout: 260 seconds]
Linux_Kerio has quit [Ping timeout: 260 seconds]
<adam12> jhass: Much thanks.
JulioPapel has joined #ruby
grenierm has joined #ruby
Sampersand has quit [Quit: Client closed]
JulioPapel has quit [Quit: JulioPapel]
hightower2 has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
mange has joined #ruby
Sampersand has joined #ruby
<o0x1eef> I second that.
<Sampersand> caleb > I think a the funniest tongue-in-cheek comment I've heard from younger folks who know their history is that Ruby is Perl for millennials.
<Sampersand> oh, yeah, 100%
Sampersand has quit [Ping timeout: 240 seconds]
chenggong7788 has joined #ruby
chenggong7788 is now known as nil78