Why does anyone ever use Ruby when Python exists?

Why does anyone ever use Ruby when Python exists?

Is it just an obsolete language at this point? Literally what's the point when there's MORE people use Python, better webframeworks in Python, more Libraries in Python, more and better projects in it too (besides metasploit)?

Literally what's the point of Ruby

Other urls found in this thread:

harmful.cat-v.org/software/ruby/
harmful.cat-v.org/software/ruby/rails/is-a-ghetto
twitter.com/NSFWRedditGif

In the end it's about personal preference.

Personally I can hardly imagine someone knowing Ruby well and preferring Python. Ruby is much more expressive and way simpler at the same time. Ruby's blocks and iterators are things python people can just look at with big eyes.

As for Frameworks, there are tools like Chef/Puppet, and of course the web frameworks. Django is not bad, but Rails has a lot of nifty power features (i.e. the code generators, automatic protection from request forgery, the asset pipeline..) and constantly got better, i.e. in Rails5 you can turn it into an API "out of the box" or use Action cable for chats..

I mean it's not perfect, but which framework is? I really like Rails. And if you don't want the magic, go down to Sinatra, Cuba or even Jekyll. But whatever you do, you will never develop so smooth as in Rails, RSpec is a godsent.


Also Ruby has every web library you can dream of. You want to upload videos to Vimeo? You want your output as Excel/PDF/Hologram? There's a gem for it.

This guy gets it. I use both Ruby and Python at work. I usually use whatever works, and whatever has the better library for doing what I want to do, which more often than not is some shitty vendor library. I always try to make Ruby work first if it doesn't matter. Programming in Ruby just feels great. Python isn't bad but it's got nothing on Ruby.

I also use Puppet and chef and like the other guy said, that's all Ruby.

Lastly, I have a lot of experience making web apps for admining and automating tech. I've used django, used to use php codeingnter a lot (like hundreds of thousands of loc), but Rails is so easy and does so much for you. I just released a new Rails 5 app last week and it was the best programming experience I've ever had, so good. Django is a fucking joke.

But let me add:

Even if Ruby was an obscure little language nobody would know, I'd still use it. It's just good fun and super comfy.


Python has more traction in the academic field and numerical stuff, and that's OK. If everybody would use Ruby, it would be boring. This way we can call the python fags "normies" while they can call us "hipsters" and everybody is happy. A win-win situation.

Fuck...

So should I go with ruby then? I'm just trying to decide what to learn, Python seems way more used, but ruby is cool too.

What should i go with if i want to start?

Haskell/C

It doesn't matter. Once you are an experienced programmer you can switch languages on the fly. I will say if you start with Ruby you'll be frustrated with a lot of other languages, especially Python.

but python or ruby to start with?

Which is best in terms of easiness, comfort, and how I can use it? Python seems to have 10000 tutorials and everyone using it for everything, ruby seems a bit more obscure.

Dunno, but it's not obsolete. I published a web app with no knowledge of web design a few months ago.

There are
>up to date learning resources
>up to date gems for pretty much everything

And it's easy to use. I want to use Elixir and Phoenix next if I have to make another we app, but if I had to describe my experience with RoR in one word I would say nice.

If you consider doing other stuff than just webdevelopment, I'd go for python.

Because python is used outside webdevelopment substantially and there's a lot of resources available.

Want got make a webscraper? There's scrapy. Want to write an artificial intelligence? There's Tensorflow. Want to analyse data? NumPy. Want to hack the WiFi? Python's got your back.

It is extremely versatile.

If it really is _just_ about webdevelopment, I would definitely look into nodejs. It is javascript and you'll need to learn that anyway for whatever site you plan to do. So you'll save one language.

You're right familia

Python it is.

Python was originally designed as a learning language.

Personally, I started out with Java and did fine. (Java won't be a good starting language until Java 9 though.)

So long as you focus on concepts and not the implementational details, you'll do just fine.

I think it's one of the reasons why C is a decent starting language still. It has very few abstractions, so when you use other languages, you see the magic for what it is.

I think Python is a fine language for starting out, but it does start in the other end, with a lot of abstractions made for you already. If you want to make a small desktop application, Python might be just right for you. If you want to make mostly web-things, Ruby starts to look really nice. (Hell, the framework I'm currently using can be summed up as Sinatra-clone for Java.)

harmful.cat-v.org/software/ruby/
harmful.cat-v.org/software/ruby/rails/is-a-ghetto

That faggot says everything is "harmful". Has he ever worked on a single project?

Didn't Uriel literally kill himself?

Ruby is designed better. It's little things, like how iteration and resource clean up are handled with the same feature in Ruby, but require two different systems in Python. In Ruby, the only false values are 'nil' and 'False'. In Python, there's several. Python has functions that call methods on their argument, like 'len' and 'abs', but Ruby just makes every method a method. Ruby makes it easy to make a dictionary with default values; python requires an import or a special function for changing dictionary values. Functions like 'map' and 'filter' are just methods, which makes sense. Python is addicted to syntactic sugar, but Ruby tries to be easy to understand.

# Idioms for checking if a collection is empty
# idiomatic Python
not seq

# idiomatic Ruby
seq.empty?

Easy. Ruby is a good language, Python's a bad one.

>quoting redditors
>having lots of methods is bad
>a slow implementation means the language is bad
>the Rails community being bad makes Ruby bad
cat-v has always been a pile of shit. These are the people who like Go.

Ruby, the original meme language

metasploit is solely written in ruby

Wow this guy is one angry cunt. Dude clearly can't work well with others. If everyone you encounter is an asshole, you're probably the asshole.

So was twitter, I love Ruby, but saying such and such project is written in it doesn't mean shit.

Python is a horrid piece of shit. But it has numpy and scipy and it's not that software manifestation of metastatic cancer called Matlab so we clench our teeth, spread our butts and do what we must...

If you want to learn both, start with Python3.

If you go from Python to Ruby, you will discover new features and discover a great language. If you go from Ruby to Python, Python will feel "clumsy" for you.

In the end, both are just tools and you can start anywhere.


The perception that Ruby is "only for web" is wrong. Ruby is a great all purpose language. You can do everything in Ruby, take a look at the book "Everyday Scripting with Ruby: for Teams, Testers, and You"..

Webscraping is a breeze with Nokogiri, for AI you can simply use C libraries. And don't tell me there are no C libraries for that.


>Python was originally designed as a learning language.

No, Python was originally designed as replacement for Bash.

Nevertheless, solid advice:
Starting with Java or C is a good idea.


Zed Shaw is such a retarded person.


This.


Twitter is a very special case. Look up the "lessons learned" presentation they wrote about rails. Rails is not the best when it comes to scaling, but you aren't developing the next twitter, are you?

GitHub, GitLab.. there's a lot of large scale Rails applications that work just fine. Just make sure to use something like Erlang for the mean parts..
Ruby is not a "heavy lifting" language, it is a smooth, quick and agile language. If you do large scale development, you can do a "proof of concept" or prototype in no time with rails. If you still need raw power, rebuild it with something like Java spring boot.

But for the "normal" stuff Rails works just fine.

>The perception that Ruby is "only for web" is wrong. Ruby is a great all purpose language. You can do everything in Ruby, take a look at the book "Everyday Scripting with Ruby: for Teams, Testers, and You"..
Ruby is so slow that the SJWs pushing it on the industry could only get away with using it in environments where its slowness was masked by network latency. I guess they wised up about that part because they're moving on to Rust.

Ruby is just as "slow" as python, which is pretty fast for scripting languages. In other words: Both are more than fast enough for what they are designed for. A comparison with Rust is not really smart, since Rust is a systems language while Ruby is a scripting language. There is no competition between those two.

Is a motorcycle better than a truck because it's faster? A SUV is slower than a Ferrari, but if you are going to the mountains, it might still be the better option.
Developer time is expensive, computers are not. People look at the execution speed or response time, but this is only one tiny part of the equation. If the network or computation is your bottleneck, you can optimize as much as you want.


There is no silver bullet, everything comes at a cost. You like C? Good, now find the buffer overflow. You like Java or Go? Cool, now have fun with your verbose boiler plate code. And so on.

Damn makes u think...

This is actually true

because railsfags

flip a coin, it doesnt fucking matter. just learn to suck less and you can switch between them trivially

i use both at work for different stuff. just shut up and start making shit

> he doesn't generate the boilerplate code
> he doesn't use annotations to invoke compiler macros to solve that shit for you

What is this, 1996?

I don't know anything about these languages, just javascript (I know, we all have to start somewhere) and I want to pick one of them to start with.

What's the job market look like for both languages? I'm not trying to learn the language just for money, but I'd like it to look good on my resume and if it gets me a job while I learn other languages, I'll take it.

Why does anyone still use FORTRAN when Swift exists?

Because Ruby was made in glorious nippon!

Python is ok, but whitespace is objectively a bad means of delineating shit.

Also Ruby was designed with simplicity in mind.

Rails and the other web frameworks are well and beyond django. If all you want to do is script and desktop stuff then sure python is fine, but for webdev ruby is the way to go. It also has a larger userbase for web stuff.

The fucked-up Ruby license is a big reason. They should have had a license modeled after the Python license, a big reason that Python jusifiably succeeded.