Hacker News new | ask | show | jobs
by ichiwells 456 days ago
I run engineering for a venture backed AI-first startup and we use Ruby/Rails.

For us, it made sense to leverage one of the best domain modeling and ORM frameworks out there. Most of our inference is http calls to foundational models, but we can still fine tune and host models on GPUs using Python.

Inference matters, but part of building an effective user platform are the same old SaaS problems we’ve had before, and Rails just works. Inbound and outbound email done in a day. Turning an OCR’d title from ALL CAPS into Title Case is one method call and not a whole custom algorithm, etc.

A lot of people seem to think Ruby is slow for some reason but it’s as fast as Python, and with falcon as fast as node for async behavior. Safe to say the application language taking 0.03 seconds instead of 0.003 seconds when you have to wait 3 seconds for first token is absolutely not the bottleneck with LLM heavy workflows, anyway.

And yes, metaprogramming is a powerful tool with which you can easily shoot yourself in the foot. We culturally just don’t write any code that’s not greppable so don’t use method_missing kinds of things unless it’s in a robust gem like active record. Pretty trivial problem to solve really.

PS - We’re hiring, if that philosophy aligns with you!

3 comments

What's a good way to learn the modern Ruby ecosystem nowadays?

I played with Ruby when I was a teenager (~2015 or so), and I definitely remember enjoying it. I know there's still a vocal group of users who love it, so I would be interested in digging in again.

Yea, just agreeing with the other commenter. Creating a Rails app is the way to go to get started with Ruby. https://guides.rubyonrails.org/getting_started.html

It's my favorite programming language but I seldom get to use it because I'm an AI Engineer. But I just recently went out on my own so I guess that can change now, hm...

I would actually start with the Rails Guides docs, they’re very good and running the given commands should actually work:

https://guides.rubyonrails.org/getting_started.htm

Just have a toy app you want to build in mind

Rails still the “batteries included” piece of Ruby. Recently added parts like Hotwire, SolidQueue etc are pretty interesting to know.

Outside of it, you might find interesting libraries like sinatra, sequel, roda, dryrb, faraday, sorbet, truffle ruby…

In terms of LLM code generation as well, the well structured nature of a Rails application, where there is a place for everything, a structure for tests to be added, really helps from the perspective of getting a comprehensible application out of it that is easy to modify. In addition to the existence of well tested component for most normal web application tasks, maybe it helps that a lot of Rails has already been based on old-fashioned code generation for 20 years.
I have this same suspicion. I dusted off a hobby Rails app from two years ago I was making with Cursor. I decided to try completely changing the main functionality of the app with the much better LLMs of today and was shocked how well it did with one-shot.

Now compare that to my recent experience with having Cursor help me work on a preexisting Node/React app...geez. What a pain. (It doesn't help that I wasn't the one that originally created the React app though.)

Absolutely love this approach. The power and versatility Rails provides for data modeling is top notch. You're 100% right that many of the problems you must solve when building a SaaS app are the same.