<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]
<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
<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>
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/
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
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.