Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

21–30 of 856 posts

Re: Ask HN: Why did Python win?

#21
My primary exposure to python is when it is failing in some way, often when I wouldn't have even known python would be involved (like trying to install something with npm or apt).

I'm sure this is less of an issue when you work with it every day and are familiar with it, but I always dread seeing python in the requirements for something because it means the odds of it "just working" on a random system are probably not great. Anybody else have this experience?

Re: Ask HN: Why did Python win?

#22

> Python’s math libraries, numpy and pandas make it appealing to academics; Python is simpler and possibly easier to learn; Rails was so popular that it was synonymous with Ruby Yeah, that’s basically why. Back in its heyday, Ruby had two basic niches. The bigger one was Rails. Rails is still alive today, but after the move towards richer frontends a lot of the hype, and consequently the developers, followed that tre…

The recent DevOps tooling is also not conducive to using code at all - it's YAML all the way down. Nobody is writing Go for everyday DevOps now, whereas for a bit they were writing Ruby and Python.

Re: Ask HN: Why did Python win?

#23
Ruby was more popular, especially when Rails exploded. It was great for scrappy startups, that didn't need Java level quality (and costly time) nor the risks of PHP 4.

The python modules eco-system lead to the stake change. Scikit-learn, Pandas and Numpy made it so useful for visualisation, research, old school modelling ML. Writing and saving files was simple. Making your own module took 2 files with 4 lines of code. How easy.

After establishing use cases in Python 2, which already allowed a lot of C code in practise for speed, Python 3 changed everything with a simpler language that makes it clear what is normal and weird. You might dislike [:-1] at first, but you definitely know it's weird compared to other languages, so you can know what to search for. Not true of abstractions in some other languages like Ruby, for migrating devs.

Then Python caught with Tensorflow/PyTorch a real wave of being the place to go. Kaggle involved 100,000s all coding in Python for data science in the latter half of the 10s. It did this at the same time as the LAMP stack and LAMP pre-installed VPS running cPanel were dying to React/node.js and PaaS approaches on the one hand, and big cloud providers on the other. So suddenly, there was not an easy default 'nix environment with PHP to rely on being available so easily, and adding python to an existing server is super easy (and Flask/Django easy to grep), making adding a backend for ML or whatever, very easy too. Ruby wasn't even on the playing field for many of these use cases.

I think a last small impact was that Ruby was misused where shell scripts could have worked. Many people made Ruby cli tools for their internal team, when shell scripts would have been fine - this frustrated some of their peers away from Ruby. There is no difference from Python here, but I just noticed it more.

Re: Ask HN: Why did Python win?

#24

My primary exposure to python is when it is failing in some way, often when I wouldn't have even known python would be involved (like trying to install something with npm or apt). I'm sure this is less of an issue when you work with it every day and are familiar with it, but I always dread seeing python in the requirements for something because it means the odds of it "just working" on a random system are probably no…

Yes, but I also had that very same experience with Perl, Ruby, Tcl, and Java during their peak heights of popularity, that they were pervasive and problematic. I feel the landscape of operating systems architectures were much more diverse, and the frequency of software releases and permutations of version combinations in the layers is larger than ever before.

Re: Ask HN: Why did Python win?

#25
post #8

I think it just survived naturally, filling in the cracks left by Java / C++. And now the era of Textual ( https://textual.textualize.io/ ) is here, python may get the spotlight even more.

Can you elaborate why we're living in the era of Textual? Genuinely. It seems like a pretty nifty library but I'm not sure it transcends to killer library territory. Thanks!

Re: Ask HN: Why did Python win?

#26
I'll just add that python provides a pretty good transition for matlab people doing scientific programming, it keeps all the simplicity for scripting, had a good range of packages, etc, another person brought this up too.

For the generation who used matlab in grad school and then abandoned engineering and science to become software engineers, it provided a good soft landing to transfer skills.

Re: Ask HN: Why did Python win?

#27
Python is the scriptiest lang that is mostly understandable from other popular C-based langs like C++, Java, JavaScript.

Ruby is too different; too many symbols and idiosyncrasies inherited from Perl, Smalltalk, and created by itself.

That is the root reason why they diverged and Python ended up with the scientific ecosystem.

This is further evidenced by Ruby’s popularity only shooting up with Rails, when 2005 web 2.0 attracted lots of non-CS people to come into the field with no prior C-based experience, so they learned Ruby, html, and css fresh.

Re: Ask HN: Why did Python win?

#28
Python got Numpy very early on, and other languages never got an equivalent.

And then lots of things were built on top of Numpy - image processing, reading GIS raster data, scipy, pandas, etc etc - and they're all trivial to combine because it's all just Numpy arrays.

Python also had a very friendly and approachable community from the start, and great docs, while Ruby had its documentation in Japanese only for some time.

Django is also top quality, imo. Similar to Rails. But it always seemed Ruby was only good for Rails, whereas Python combines with everything.

So as usual, it's not about the language, it's about the rest.

Re: Ask HN: Why did Python win?

#29
post #9

> My impression is that in the ‘00s, Python and Ruby were both relatively new They were, but Python is close to 5 years older than Ruby (February 1991 vs December 1995), so in the ‘00s, Python was significantly older than Ruby. Ruby also was more or less a Japanese-only thing until around 2000. https://en.wikipedia.org/wiki/Ruby_(programming_language)#Ea... : “In 1999, the first English language mailing list ruby-tal…

> Ruby also was more or less a Japanese-only thing until around 2000

And after that it still took quite a few years until "English support" really became first-class and comparable to Python. I looked at Ruby around 2002-2003 or so (I was looking at many different languages back then, pretty much anything I could get my hands on), and lots of Ruby stuff was in Japanese or poor English.

That's all fine, but I specifically remember that was the major reason I ended up not using Ruby at the time.

(I did end up programming a lot of Ruby many years later, and for what it's worth I do prefer Ruby for most things now)

Re: Ask HN: Why did Python win?

#30

I often hear this kind of praise for Ruby but have never really dug into it myself. Does anyone have any links to pages that do a good job of covering some of the main selling points of Ruby in terms of syntax, features, ecosystem, etc.?

This is probably a decent enough intro to get a general "feel": https://learnxinyminutes.com/docs/ruby/
Post reply on HN