TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Can anyone explain why Ruby is so popular?

16 pointsby xkcdfanboyalmost 12 years ago
It seems to me like a hybrid of python with perl. It does a ton of things and from what I've heard, it's slow as molasses because of all of the metaprogramming syntax that's built in. RubyMotion allows you to build iOS apps in Ruby. It doesn't seem like other languages get the attention that ruby does. It feels like a scripting language but gets the attention of a compiled one, I don't get it. Is it becoming the first programming language that some people learn? It's actually about the only language I don't know (and I know x86 asm, C, PHP, ObjC++, Python, Perl, C#, you name it.) Thanks in advance.

13 comments

mjhea0almost 12 years ago
Ruby is popular because of Rails. If you're not going to use Rails, I don't see much reason to learn Ruby as in my opinion Python is easier to learn and is applicable to so much more than Ruby.<p>That said, I agree that the syntax did feel like a hybrid of Python and Perl (with a bit of crack mixed in) - but once I started playing around with it, I really started to appreciate the syntax.
评论 #5785793 未加载
评论 #5784198 未加载
评论 #5784426 未加载
spoileralmost 12 years ago
I love Ruby's syntax. I tries Python, but I didn't like it as much as Ruby, what putt me off about python is the meaningful indentation (although I do not mind that in CoffeeScript). Also, Ruby itself is not slow, but CRuby (MRI, YARV, whatever you call it) is slow; Rubinius ("rbx") is a wonderful (and my personal favourite) alternative for MRI. In fact, I use rbx and EventMachine for a fun app that has a growing number of users! However, when I found some things were too slow in Ruby I just wrote a C extension (yes, yes, I know it's a bit of a controversy).<p>As to why I learnt it: it looked fun, and I was right, Ruby brings me pleasure!
评论 #5784914 未加载
评论 #5784310 未加载
Skoofooalmost 12 years ago
"I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language." -Matz<p>Ruby and its ecosystem revolves around your happiness and productivity. Isn't that great?
评论 #5821222 未加载
adrianlmmalmost 12 years ago
I personally love the syntax, and in my own experience is not that slow, I use it with Sinatra and my productivity is huge.<p>I'm also a C# and Delphi developer. I learned Ruby cause I had the need the learn an scripting language, and the reason to not learn python was that it looks like it is stock for ever in the 2.7 version, so I chose Ruby and I'm very pleased with my decision.
评论 #5784203 未加载
评论 #5784119 未加载
jayferdalmost 12 years ago
Metaprogramming syntax isn't built in to ruby. Instead, it's really internally consistent and lets you leave out a few tokens, which means it's <i>really easy to write libraries with beautiful interfaces</i>.<p>The built-in features usually try to solve the general case, rather than focusing on specific use-cases. For example, in python you have iterators, which make it easy to have a block of code that is run multiple times with different bindings. In Ruby, you have block syntax, which solves the more general problem of "let me pass this anonymous block of code to this function", and they built iterators on top of that.
csensealmost 12 years ago
I'm interested in the answers to these questions:<p>1. What does Rails do that Django doesn't? (Feel free to substitute any other Web framework for Django if you think it'll help your answer be more illustrative.)<p>2. Why hasn't the Python community seen whatever Ruby's doing and copied whatever makes Ruby popular? Are there any Python/Ruby experts reading this who are willing to port or reimplement the good parts of Ruby in Python?<p>3. Are there any other reasons to prefer Ruby over Python besides Rails? For example, do Gems do things that are impossible with Pip?
评论 #5784519 未加载
评论 #5784189 未加载
评论 #5784206 未加载
tudorconstantinalmost 12 years ago
I am a perl dev for almost 3 years and i learned it at my job after i tried ruby and python.<p>For more than a year i felt i should have chosen ruby because of how intuitive it feels: you read the code always from left to right, whereas in perl you often either go from right to left or from the center of the line outward. Besides that, fuby also has that principle of less surprise.<p>However, after I got accustomed with perl, i started to love its expressiveness and flexibility. And now, I almost got to love the "there's more than one way to do it" mantra. Regarding Python, I see it more close to Perl from a readingness perspective, but with much less flexibility embedded.
评论 #5786209 未加载
meeritaalmost 12 years ago
As designer who's learning to code, I find Ruby code more easy to learn and read. Other programs are too, let's say, cryptic syntax. And for the projects I am working for I don't need to work with another programming language.<p>If you let me chose, I would go all the way with Erlang or Go, but it's hard to learn for a non-coder.
nayefcalmost 12 years ago
Ruby is just beautiful. I learnt Python and Ruby last year, and even though they're both really good, I find Ruby's syntax hard to resist.<p>Metaprogramming is also great (others have commented about that)
ksherlockalmost 12 years ago
When I gave up on perl, I considered other scripting languages and it turned out that ruby was the best match for my programming style. I think ruby users and ruby on rails give it a bad name, though :)
chrisgwalmost 12 years ago
I learned Ruby because of Rails.<p>If I need a scripting language, I prefer Ruby because I know it the best now. I'm pretty good at Python, but feel more comfortable in Ruby because I use it more often.
wglaalmost 12 years ago
One word: Rails.
websitescenesalmost 12 years ago
Thanks for what? Sounds like your opinion is made up. Still trying to figure out if this is a question. I like Ruby about as much as PHP; I think it's more about what you build on the language or what framework you use.
评论 #5786589 未加载