Live data from Hacker News

An Ode to Ruby

blog.yboulkaid.com

101–110 of 204 posts

Re: An Ode to Ruby

#101
Want something easy to host? Use PHP.

Want something fast and simple? Use Go.

Want something really fast and powerful? Use Rust.

Want something ubiquitous, with lots of developers in the labor market? Use Java.

Excuse my ignorance, but what is Ruby's strength?

Re: An Ode to Ruby

#102

Want something easy to host? Use PHP. Want something fast and simple? Use Go. Want something really fast and powerful? Use Rust. Want something ubiquitous, with lots of developers in the labor market? Use Java. Excuse my ignorance, but what is Ruby's strength?

Productivity.

Also you can short circuit a lot of what you said with Crystal lang (for speed) or Ruby on Jets (for ease of deployment, serverless, etc). At Arist (YC S20), we were able to fully rebuild our app in Ruby on Jets, pass a pen test, get SOC 2 compliance, all in under 12 months. This frankly would have taken years if we couldn't lean on the Rails ecosystem, and our Appdex score is 0.999 typically, and we are prepared to 10-20x our current traffic because everything is serverless and each endpoint in each controller automatically becomes its own lambda upon deployment. Yet we can lean on the usual rails app structure, and use gems and features designed for rails.

With things like Go, basic string operations like reverse string are left to the user to implement. In the ruby/rails ecosystem we have Active Support. To that same point, you also get the most fully featured ORM in the world in the form of ActiveRecord. No other ORM comes even close to the features AR provides.

To your point though, we do use Rust for image and gif processing in one small lambda. I love Rust, but there simply isn't a web framework with the "sane defaults, everything included by default" mentality of rails yet. Cookie management, CSRF protection, etc., are largely left to the programmer to configure correctly, and it's simply a waste of time if you are trying to iterate quickly as a startup.

Re: An Ode to Ruby

#103

One of my goals for 2022 is to write my first real web app. I want to understand things like authentication, creating an API, and security. My initial impression is that the JS/Node world is miserable. Rails looks 1000 times more pleasant.

When you learn Rails, you mostly just learn Rails. If you want to learn the nitty gritty details I think a different language might be better suited. I think Go strikes a nice balance between "doing everything yourself" and "just putting pieces together" If you constrain yourself to the standard library.

Re: An Ode to Ruby

#104

Want something easy to host? Use PHP. Want something fast and simple? Use Go. Want something really fast and powerful? Use Rust. Want something ubiquitous, with lots of developers in the labor market? Use Java. Excuse my ignorance, but what is Ruby's strength?

Productivity. Also you can short circuit a lot of what you said with Crystal lang (for speed) or Ruby on Jets (for ease of deployment, serverless, etc). At Arist (YC S20), we were able to fully rebuild our app in Ruby on Jets, pass a pen test, get SOC 2 compliance, all in under 12 months. This frankly would have taken years if we couldn't lean on the Rails ecosystem, and our Appdex score is 0.999 typically, and we ar…

Thank you. I sometime read that too much "magic" and abstractions can quickly get in the way when doing something complicated that is not covered by a heavely opinionated framework. Is this nonsense in your estimation, or is this something to look out for?

Re: An Ode to Ruby

#105

I like that the Ruby community has embraced the fact it is no longer cool. I recently interviewed for a ruby/rails job where the dev team had come from a previous start up that tried to port an existing Rails app to a React/Microservices one with disastrous results. For this job they were relishing coming back to a monolithic Rails app. I hope this trend continues!

Yes, I find that community interest tends to peak about 10 years before business interest peaks in any given language. Right now we have more companies using Ruby/Rails than perhaps we ever did, but community interest peaked 10 years ago. Perhaps we'll see something similar with Rust a decade from now.

Re: An Ode to Ruby

#106

I like that the Ruby community has embraced the fact it is no longer cool. I recently interviewed for a ruby/rails job where the dev team had come from a previous start up that tried to port an existing Rails app to a React/Microservices one with disastrous results. For this job they were relishing coming back to a monolithic Rails app. I hope this trend continues!

A sports car might be cool but it's terrible as an Uber. Context is important when making any choice, tech stack or otherwise.

Ruby and Rails are pragmatic choices for building a business, they may not be cool anymore but they are focused on developer happiness and productivity.

Re: An Ode to Ruby

#107
post #64

Earlier quoted context omitted.

Surprised you didn't try Elixir? What about Sorbet?

Well, I did a little bit of research on Elixir a couple of years ago, so I felt like I had that covered. Using Kotlin + Ktor was also tempting.

it's way different now. I've actually never deployed elixir on a deployment service till last week (either: "was R&D and never deployed to prod", "I ran elixir on-prem inside a DC", "my prod environments have been managed by ops team"). It was surprisingly easy, had my first deploy (including installing the service provider's tool) in about... 3 hours?

Re: An Ode to Ruby

#108
post #6

It's too bad Ruby isn't seen as 'cool' anymore, it's just so easy to be productive in it. And now MJIT, YJIT and TruffleRuby are making some very impressive performance gains. Rails is also better than ever and I still can't think of a better language for scripting.

What was cool was Rails, IMHO, and Ruby was the surprise inside it. I've had my own personal Advent of Code these holidays, coding a small API for a personal need. Ruby (Sinatra) took one morning to full deployment in Heroku. Then I tried Crystal (Kemal) and it took me a couple of days to figure out how to map JSON to Crystal data structures. Then I rewrote it again in Rust (Rocket). Two weeks till I figured out, wel…

Hot take: I'd love to see JSON die and get replaced with something more strongly typed and safer to work with. What, I'm not sure, but it is, as you say, a major pain point no matter what language you're in. Either it's easy to work with, but insecure, or it's difficult to work with.

Re: An Ode to Ruby

#109

Earlier quoted context omitted.

What was cool was Rails, IMHO, and Ruby was the surprise inside it. I've had my own personal Advent of Code these holidays, coding a small API for a personal need. Ruby (Sinatra) took one morning to full deployment in Heroku. Then I tried Crystal (Kemal) and it took me a couple of days to figure out how to map JSON to Crystal data structures. Then I rewrote it again in Rust (Rocket). Two weeks till I figured out, wel…

I also took a while to get used to the typing in Crystal but once you do get it, it's worth the effort IMO. I occasionally still fire up Ruby but if I have anything more to do than a quick command-line command, I use Crystal, so many less problems.

Crystal is also my go-to for writing a quick script to do something.

Re: An Ode to Ruby

#110

Earlier quoted context omitted.

What was cool was Rails, IMHO, and Ruby was the surprise inside it. I've had my own personal Advent of Code these holidays, coding a small API for a personal need. Ruby (Sinatra) took one morning to full deployment in Heroku. Then I tried Crystal (Kemal) and it took me a couple of days to figure out how to map JSON to Crystal data structures. Then I rewrote it again in Rust (Rocket). Two weeks till I figured out, wel…

Hot take: I'd love to see JSON die and get replaced with something more strongly typed and safer to work with. What, I'm not sure, but it is, as you say, a major pain point no matter what language you're in. Either it's easy to work with, but insecure, or it's difficult to work with.

I moved to gRPC and protobufs for this exact reason. It’s so nice to work with.
Post reply on HN