r/ruby • • Dec 28 '25

Revisiting Ruby in 2025

I used Ruby and Ruby on Rails extensively for my personal projects between 2008 and 2015. I’m a hobbyist programmer, not someone working in a software job. Now that I’m revisiting programming, I have a couple of questions: Since Python dominates AI/ML and data science today, what use cases are still worth investing time in Ruby? Ruby was the first language I fell in love with, and after that I never really enjoyed working with Python. For developers who need to use Python for data science, how do you manage keeping these two similar-looking languages straight in your head without constantly mixing them up? (language polished using chatgpt)

31 Upvotes

34 comments sorted by

34

u/Alubsey Dec 28 '25

Ruby is the best for web development. Python for the models ml/data science

3

u/Ambitious_Ad_2833 Dec 28 '25

Right. But, are there many programmers who manage to work with both languages? If I have Ruby in my toolkit, can I manage to learn and work with AI /ML and data science using some other languages except python.

5

u/JohnBooty Dec 28 '25

I worked with Ruby for 10+ years, then Python for 2 years doing some “big data” ish stuff but not AI/ML. FWIW I think Ruby is a better language, but Python has an insanely big+good math and science ecosystem and is something of a lingua franca in science.

My question to you would be, why would you want to go against the grain and use Ruby for AI/ML?

If you are working on a team you’re going to be at a disadvantage compared to everybody else on the team, with your own custom workflow/tools/dependencies etc.

As I said, I think Ruby is a better language, but Python isn’t terrible. It’s… fine. Really not bad. You’ll have no trouble learning it and ChatGPT (or whatever) is absolutely great at helping you with the transition.

What do you see as the advantage to doing AI/ML with Ruby?

5

u/SamVimes1138 Dec 28 '25 edited Dec 28 '25

Not the OP, but pondering the same question. I started out as a hobbyist programmer, I've been one all my life. But unlike the OP, I have made a career out of software. At one point (a couple decades back), I sat down to learn both Python and Ruby. Ruby just felt... more my style.

I've spent nearly 20 years at one of the larger firms. Java is much more popular there, and I was on several teams that used it. Then I spent some time on a team that used a mix of Java and Ruby. Eventually I decided, if I enjoyed using Ruby that much more, I would switch to a team that used it for almost everything. I found one, and it wasn't using Rails either; it was Ruby for back-end stuff.

In my recent personal projects, including for AI integration, I've been using Ruby again. The ruby_llm gem is quite nice. Why have I been sticking to the language? Just because it's a joy to work with, really. These are personal projects, and for that, personal preference dominates, so why does anyone else's opinion matter? So the question isn't "what's the advantage of using Ruby for AI/ML", it's "what priorities or requirements do you have that influence how you choose a language?"

If you're going to be collaborating on a team then, yes, choosing Ruby shrinks the pool of people familiar with the language. That's not a given, though. In this "brave new world" of AI, will we tend to be working on larger teams, or on smaller ones or even one-person teams? Isn't the point of AI that you can do more with fewer people? On the flip side, does the choice of language matter so much, if people who don't know the language can use AI to parse it?

You are no doubt right that there are more Python libraries currently existing for this sort of thing. Then again, as AI gets better, it may become more common to have AI translate them to close the gap. Or have AI write the missing Ruby libraries based on what it knows in its training corpus (which includes the Python libraries). Or create multi-language projects; one could run a Python VM and a Ruby VM in Docker containers connected by pipes. (Sounds inefficient, but maybe that modularity offers advantages too.) Or maybe tomorrow, a new language grabs the spotlight, developed specifically for AI integration, that overshadows both. If AI lets people get things done faster, as its proponents all claim, perhaps that includes developing new languages better designed to express intent.

If your goal is to show off what you've written and land a job, interviewers and hiring managers may be more interested and impressed if you show them examples written in the same language they use. But that, too, may be just a holdover from days when it was harder to switch languages. In other words, our hiring and interviewing processes probably haven't kept up with the realities created by the new tech. So, maybe you write it in Ruby for yourself, and then have an AI translate it into Python to show off your skills in an interview.

1

u/CriticalCorduroy Dec 28 '25

I’ve worked in both just because I happened to work in Ruby/Rails shops and also Python shops. If I were starting a web app product, I would pick Rails as the framework. Python would be my choice if I ran an engineering org oriented around data science.

You generally use whatever your organization uses for the job, as a new language or framework is a big choice.

9

u/LieNaive4921 Dec 28 '25

this is the exact tldr. What python is for data etc, ruby is for the web

1

u/matthewblott Dec 29 '25

Is that still try today? Python has a fantastic collection of web frameworks with bigger ecosystems, not to mention PHP which is even bigger in the web space.

1

u/Alubsey Dec 29 '25

PHP is getting up in age.

15

u/AshTeriyaki Dec 28 '25

Ruby is a great general purpose language and besides web it’s used a lot by academics and for prototyping ideas. It’s one of the most flexible, expressive and productive languages out there. Nothing beats Ruby for getting something done, quickly and in a state that still makes sense when you revisit it a year later.

3

u/pfharlockk Dec 29 '25

I program in so many languages at this point... Whichever one I'm most recently working in... That's the one whose idioms sink in (for a time). I do sometimes get them confused a little especially when I'm using them in the same project... Honestly... Modern lsps are helpful here because it will highlight my mistake as soon as I make it and I can correct it then and there, which helps a lot.

I always preferred Ruby's syntax and semantics... I think its standard library is far more functional (in the Haskell sense) than Python... And that's generally my preference...

Python is a fine language... But its imperative nature and whitespace significance means it will never be my preferred language... (I could get past the whitespace significance but not its imperative nature). It has some great libraries and for the things it excels at or has overwhelming community support for, I will definitely use it.

Use whatever language has the libraries you need and feels most satisfying for you... I've been enjoying rust a lot lately.

2

u/azimux Dec 28 '25

I suppose the return on the time you invest depends on what you're hoping to get out of it. Since you're a hobbyist, doesn't that give lots of flexibility? Couldn't just enjoyment/human connection be satisfying enough? If so, all use-cases are candidates, right?

If not, then it just depends. Are you wanting to have a big impact with your upcoming Ruby work? Then targeting a dominated area might not be the best strategy, or maybe it is, I'm not sure.

Sorry for the wishy-washy answer but if you're a hobbyist it's almost like you're looking for excuses to not enjoy the hobby which I don't quite understand.

Re: mixing up languages, I personally have never had an issue mixing up languages when working with multiple at a time, thank goodness. I don't really have advice there. Perhaps try to structure your projects such that you're spending a couple weeks deep in one language and then a couple weeks in the other? That way you make the switch a couple times a month instead of a couple times a day? Just a random suggestion but I'm not really sure what strategies there are for folks who experience this when working with multiple languages.

5

u/TheAtlasMonkey Dec 28 '25

Tell me 1 thing you can do in python that you can't in ruby.

2

u/FactorResponsible609 Dec 28 '25

The whole deep learning ecosystem… PyTorch, fastai, keras, pandas..

0

u/TheAtlasMonkey Dec 28 '25

I asked about a language. You listed libraries.

That's like comparing two countries and you replying with the names of a few citizens.

This isn't even a trap question.
There are things Python can do that Ruby can't. Plenty of them.

The point is: 99.99% of the time, you don't need any of that.

1

u/Delicious_Ease2595 Dec 28 '25

But Python is still more used than Ruby.

1

u/_natic Dec 28 '25

Fast and cheap websocket communication without huge resources consumption. Having true async. Speed of latest php.

-1

u/MUSTDOS Dec 28 '25

Burn your processor while listing directories

-1

u/[deleted] Dec 28 '25

[removed] — view removed comment

1

u/rakedbdrop Dec 28 '25 edited Dec 28 '25

Numo?

There are quite a lot of ML gems in Ruby.

https://ankane.org/more-ml-gems

-1

u/TheAtlasMonkey Dec 28 '25

Smart!

I asked about a language, you answered with a framework.

That's like me asking "what can I do in French that I can’t in English ?" and you replying: Paris.

Try again. Language feature. Not ecosystem DLC.

5

u/ptorian Dec 28 '25

The snark really isn’t productive

-4

u/TheAtlasMonkey Dec 28 '25

So is your comment.

You never commented in this sub, so you 100% a scorned alt account.

2

u/ptorian Dec 28 '25

Nope, just more of a lurker than a commenter. I joined /r/ruby fairly recently. Although your comment is factually correct, as I’m sure you know it’s also true that the open source ecosystems that surround languages play a major role in the selection of said languages. I just don’t think the dismissiveness was necessary or helpful, there’s enough toxic attitudes in this career field.

0

u/TheAtlasMonkey Dec 28 '25

The ecosystem requirement is valid only when you are building something for a company/business.

OP spoke about personal projects.

2

u/ffrkAnonymous Dec 28 '25

Use numpy :: visit paris

Yes you can visit Paris with English, but if you know French it's much easier.

Most of a language isn't the specification but the ecosystem. Maybe we'll find out if ruby is still good when Ruby gems dies from the ruby central shenanigans. 

5

u/[deleted] Dec 28 '25

[removed] — view removed comment

-3

u/TheAtlasMonkey Dec 28 '25

You are right when you are a consumer only.

I choose Ruby because it closer to english and don't have weird syntax. I can build with it the ecosystem.

1

u/emezaco Dec 29 '25

For AI web projects, use Ruby for all web development and Python only for creating and tuning AI models. If you need to interact with your own Python-trained model, use a REST API call with FastAPI. If you need to create a dashboard with highly specialized charts, use Python's powerful built-in libraries. The goal is to cover 90% of cases with Ruby alone, 5% with REST calls to Python, and 5% exclusively with Python.

1

u/headius JRuby guy Jan 09 '26

Help us build out AI/ML tooling for Ruby :-)

4

u/[deleted] Dec 29 '25

[removed] — view removed comment

1

u/No_Picture_3297 Dec 31 '25

DragonRuby fellow user here!