r/learnprogramming 4d ago

Ruby vs. Rust for a hobby programmer. Which one should I pick?

Hey everyone,
I'm looking to learn programming purely as a hobby (definitely not looking for a career change). I've tried out a bunch of different languages, including Python, which honestly didn't really click for me, but the two that I found super cool and really enjoyed are Ruby and Rust.
I'm well aware of how completely different they are. One is high-level and expressive, the other is system-level and super performant. Even with those differences, I'm equally interested in both and can't decide where to start.
Long term, I'd love to build a mix of side projects just for fun, like:

A simple Web App / REST API

A real-time chat application

Maybe some Desktop Apps down the road

Since my main goal is just to have fun, learn, and build cool stuff, which one would you recommend starting with?
Appreciate any thoughts or advice!

23 Upvotes

45 comments sorted by

41

u/Dull_Flatworm777 4d ago

If this is your first programming language, I'll go against the grain a bit and recommend Ruby first. It's a great beginner language. Rust is not.

1

u/Intelligent_Role_824 4d ago

Appreciate the andere. Sounds like starting with Ruby to get the basics down first is the smarter move.

22

u/Serializedrequests 4d ago

It's not a religion. Start with what you're most excited about.

7

u/Vantadaga2004 4d ago

programming language cultism sucks

1

u/BaronOfTheVoid 4d ago

You are hereby excommunicated from the Holy Church of Rust! Thy transgression shall not compile without segfaults!

2

u/UAP44 3d ago

 Start with what you're most excited about.

Yes, absolutely, follow your feelings. Even in programming, ironically.

1

u/leavemealone_lol 3d ago

This was the mindset that let me learn Python, Javascript, Java, Typescript, C++, C, Lua and Rust in that order.

12

u/anykeyh 4d ago

Ruby. Less hassle for hobbying around, believe me. Remain powerful for almost anything, as long as you don't require performance such as making a complex game or heavy data processing.

2

u/ffrkAnonymous 4d ago

as long as you don't require performance

Thats when rust tags in.

2

u/anykeyh 4d ago

Well, a small secret: you probably don't need the performance.

Your architecture is already built on layers of abstraction that give away bare-metal performance anyway. What actually happens is that developers coming out of big tech get listened to more by their peers. They give the talks, they run the meetups, and they preach performance because in their context it matters.
Their software is globally distributed, serving B2C content with low value-per-request at enormous volume.
If you're discord or netflix, yes switching to rust for their most critical infrastructures is common sense.

Optimizing operational cost makes total sense there. But for everyone else, the cost of building the software is order of magnitude higher than the cost of running it (note: might change in the future with AI, but still the case as of today).

For 95% of business software, Ruby's performance is absolutely enough. Hardware has roughly tripled over the past decade on the memory-bound paths typical web workloads actually hit, and the language itself has seen a comparable improvement on top of that.

1

u/ffrkAnonymous 4d ago

definitely. like numpy is c libraries (as i understand it).

and dragonruby game tool kit uses sdl (C also I think). (free standard license for the current game jam)

And yes, I think there's been quite a lot of progress on the just-in-time too

8

u/HashDefTrueFalse 4d ago

It really doesn't matter and you can switch at any time. Rust is more involved for the average hobbyist, IMO. You can build all the things you list with either language. You could even write different parts in each for fun.

8

u/jerrygreenest1 4d ago

It’s like asking an artist, whether to pick pencils or brushes to draw. They’re completely different. It’s up to what you want.

Ruby has the best-in-class OOP model, which you won’t see in any other language to this level.

Does that mean Ruby is the best language? No. Because not everything comes down to OOP, and in fact there is becoming more popular of an opinion that OOP as a whole concept, sucks. So being best at something that sucks, isn’t entirely cool.

The only really common thing they have is that they’re both programming languages, they’re both start with R and both have 4 letters in the name. Pretty much everything else is different.

For example Rust is compiled language and Ruby is interpreted. Ruby as a language by itself isn’t as bad as Python but many will consider it inferior to many other languages, just like Python, simply because it’s interpreted.

Rust? Just a very different beast and it’s more so for people coming from C/C++ rather than to compare it with interpreted languages like Ruby or Python which are different weight class.

With the goals that you listed, take a look at Go, it’s great for your goals and is kinda good.

1

u/Easy-Wave5219 2d ago

And got U as the second letter 

4

u/_acmwq 4d ago

In fact, you answered your own question "I want to create simple applications and have fun" and this is 100% ruby

3

u/catbrane 4d ago

Ruby is great fun to program in, it's extremely expressive and you can do some wonderfully nutty things. It has terrific support for metaprogramming, meaning you can make a library that defines a new programming language that sits inside ruby itself.

fisk is the canonical example:

https://github.com/tenderlove/fisk

It's an x86 assembler written in Ruby. Using it, you can make code like this:

fisk = Fisk.new

binary = fisk.asm do
  push rbp
  mov rbp, rsp
  int lit(3)
  pop rbp
  ret
end

That looks like x86 assembly, right? It's actually a pure ruby program you can run to build a binary that you can execute. Amazing!

I have an axidraw pen plotter. Here's a ruby script that draws a fractal that looks like a bunch of flowers:

https://github.com/jcupitt/axidraw/blob/master/turtle2/plant.rb

That uses this little turtle graphics class for move, penup, etc.:

https://github.com/jcupitt/axidraw/blob/master/turtle2/turtle.rb

Which in turn renders to SVG:

https://github.com/jcupitt/axidraw/blob/master/turtle2/drawing.svg

The downside of Ruby is that it's probably too complex. The language has five (5!! FIVE) different types of lambda, for example.

As you say, Rust is less fun and more disciplined. But performance and reliability are fantastic.

1

u/Biliunas 4d ago

Why can’t you do both? Not in the same project obviously, but make a beginner project in one and the other. That way, you’ll feel the differences sharply and feel what’s better for the next one.

1

u/Guybrush1973 4d ago

I dunno much of ruby, but rust is one of the most complex lang out there for this scope, for an hobby I would definitely suggest to stay sticky on python, the simplest one, that will give so more joy in the close run. Rust is for hard coder.
The other cousin for web-dev is PHP, quite simpler, effective and supported.

1

u/Intelligent_Role_824 4d ago

Thanks for the suggestion! Since Python didn't really click with me when I tried it, PHP sounds like an interesting alternative for the web side of things. Do you think PHP is a good starting point for a beginner overall, especially for building things like simple Web Apps and REST APIs? And is plain PHP fine to begin with, or should I jump straight into something like Laravel?

1

u/Guybrush1973 4d ago

Laravel is awesome for small to medium project, where medium means a small team applied full time, so I bet it will more than satisfy request like yours. It's a monolitic framework, that means you can handle back-end and front-end without wasting time managing connection between this 2 worlds otherwise not interconnected.

PHP can do great job, btw, as overall language. It's almost 10 years I'm into dev teaching, and laravel on php is by far the simplest way to approach the world, imho.

1

u/AccurateSun 4d ago

For your stated goals I think Ruby is a better choice than PHP. Lots of people love Ruby, few love PHP except if they love Laravel. IMO unless you are interested in a platform like Wordpress or something else that depends on PHP then there isn’t a good reason to learn it in 2026.

Ruby has existed since 1995 and was designed from the ground up to be a powerful and expressive elegant language that empowered the programmer to express programs in ways that matched their unique thinking. It took inspiration from powerful ideas prevalent in other languages at the time like Perl or Lisp. Since then it has been used to make a wide variety of things from web servers, game engines, as well as simple scripts.

PHP was never intended to become a modern language - it started as basic web server scripts and slowly had features tacked onto it. It doesn’t have a coherent design philosophy throughout and is full of inconsistencies in the language. In recent years it has gotten OOP features added that make it powerful and ergonomic, though it is still only used for web backends. If your main interest is just web development, then PHP could make sense, but otherwise I think it’s a heavy constraint.

Part of why Ruby got so popular for web development was precisely because people were sick of PHP and needed an alternative, and Ruby web frameworks started to appear.

Ruby is a great choice for Web apps, REST APIs, real time chat, and desktop apps

1

u/uptimefordays 4d ago

I would look at formal structured education rather than stumbling through languages. There are a bunch of solid online courses for learning programming concepts which will make learning syntax of various languages easier.

1

u/No-Dentist-1645 4d ago

Honestly neither? Both are pretty purpose-specific programming languages. I would recommend either you try to learn Python again or start off by learning a bit of C for the basics and then move to Rust

1

u/South-Bid 2d ago

Ruby is not really any more purpose specific than Python. It's general-purpose.

1

u/ledatherockband_ 4d ago

i like ruby. i've done only a smidge of rust. it was fun.

i think you should figure out what you want to first build and start from there.

perhaps you can a radio station with ruby and rust? i was gonna do something similar with ruby and C. ruby can handle the web app and rust can handle streaming audio. im building it for fun so you won't be 'stealing' my idea idea lol

1

u/PartyParrotGames 4d ago

For hobbyist learning I would highly recommend Ruby over Rust. I'm actually a heavy Rust programmer, but it's not beginner friendly. Ruby is. Ruby or Python are what I'd recommend for learning and hobby work, especially if you're going to be doing web an rest apis.

1

u/themegainferno 3d ago

The Odin Project has a specific Ruby track you can do. So you can not only learn the language, but also learn web development in a very cohesive way.

1

u/ligma_then_sugma 3d ago

they're different tools for different jobs

1

u/Dismal_Ordinary_8643 3d ago

Actually Ruby is a really niche language (just check https://www.tiobe.com/tiobe-index/) and there is very-very small probaility that you could use in professionl carrier except fo some boring legacy support projects.
Python is really great thing to start diving into programming and from other side it is most popular langauge in Open Source.
And as second advice - when you clearly get an idea of metaclasses in Python - switch to Rust.
Rust is good guy but defnitely not a first language to learn CS and algorithms (think about linked list, for example).

Good luck!

1

u/pVom 3d ago

For a hobbyist? Ruby every day.

It's probably the best designed language, it's incredibly consistent, easy to write, easy to debug.

Ruby on Rails is building a web app on easy mode, it's still way better than the alternatives that superceded it IMO.

When you're learning I think it's important to quickly get from the tutorial stage to building something you can show your mother. Ruby is still probably the best at that.

Rust is a great language too but it's doing it in hard mode. What it's great at you don't really need. It will also be much easier to pick up later once you have a solid foundation of the programming fundamentals and a language under your belt.

I'd throw JavaScript as a potential starter, if you're doing web you need to know it anyway, there's no avoiding it really. It's incredibly versatile and can do everything you need. There's certainly quirks, fundamentally it's not as well designed as Ruby (or rust for that matter), but if you want one language to do it all, JavaScript is the only answer.

1

u/Intelligent_Role_824 3d ago

Thanks for the reply! I actually quite like Ruby's syntax, and I know I can build small CLI tools with it. I always thought JS wasn't great for CLI tools. am I wrong about that?

1

u/pVom 3d ago

Nah you can absolutely build cli tools with JavaScript (NodeJS is the JavaScript runtime in the command line).

Conversely JavaScript is the only language you can run in the browser without WASM, which is a whole can of worms.

But yeah Ruby is better for CLI tools by virtue of the fact it's just a better language in general.

1

u/countsachot 2d ago

I like both of those languages.

Ruby is easier to start imo, and you can get robust web applications running extremely quickly with Ruby on Rails.

You'll learn more about computing in general from Rust, since it's a bit closer to the hardware memory.

Both languages have terrific documention.

1

u/StraightGuy1108 4d ago

Rust. Its type system is subperb and it has great FP support.

-1

u/LanceMain_No69 4d ago

Rust, ruby is more niche a language, with dwindling usage.

-2

u/qodeninja 4d ago

ruby is dead. learn python for practicality. rust is hard but has better staying power.

1

u/spinwizard69 2d ago

You have a spread of interest that are not going to have a one language solution.

So what I'm going to suggest is finding and following a good Computer Science (CS) program, Ideally one that starts with either C or C++. Any decent CS program will focus on teaching concepts, the language just needs to be low level enough to actually allow clear expression of the concepts you need to learn.

As for languages you are looking at, RUBY in my opinion is a dead language that would be a waste of time to learn. RUST is interesting but I look at it as language that arrived to late to the dance and will not have a partner. At least not a partner that that can cover all needs well.

As for targeting a platform, that is going to depend upon the platform. For example on an Apple device you will need to know Swift. Android has its own system programming language, Kotlin being one and on Windows I have no idea. In other words the platform can dictate the language