Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

461–470 of 856 posts

Re: Ask HN: Why did Python win?

#461

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

As a Python programmer in the 2.x days, I think data science happened fortuitously to counteract the exodus over the 2->3 transition. For a long time, it felt to me like python was on the way out because of the changes.

At the same time a lot of undergrad programmers were being introduced to Python 3. I think that’s probably the single biggest factor in the Pythons success.

Re: Ask HN: Why did Python win?

#462
post #154

Earlier quoted context omitted.

numpy exists (somewhat indirectly) because matlab cost $$$. and now numpy is a far larger use of matlab's concepts than matlab will ever be. I haven't seen anything an "A-type" data scientist needs in R/SAS/SPSS that was intrinsic to the language and couldn't be ported to Python. I don't want a "data/scientific" language, or a "web" language, or a "UI" language- I want one language that explicitly supports all the us…

Well, why didn't the free alternatives to Matlab like Octave or Scilab win out then ?

I think people were not ready to switch from some heavy established software. Also by that time, costless was seen as less qualitative (certainly because organisations are happy with licences and are always looking for support contract ?) Coming later, when the market(?) is ready, made R more successful.

I think people used to compare to established standard and detractors are always there to point out missing stuffs, giving impression that Octave or Scilab are behind. Coming with a radical different language, R was condemned to quickly succeed or perish, and anyway avoid direct and frontal comparisons.

Re: Ask HN: Why did Python win?

#463

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

Today I learnt I'm fucking old. My first web programming exposure was Perl CGI scripts

The Mouse Book (https://www.oreilly.com/library/view/cgi-programming-with/15...), by any chance?

Re: Ask HN: Why did Python win?

#464

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

It’s not because of data science, it’s popular for the same reason Java is popular, it’s what they teach in schools. It’s a virtuous cycle, industry adoption grows school adoption which grows industry adoption…

Re: Ask HN: Why did Python win?

#465
post #366

Earlier quoted context omitted.

> But Python is -dramatically- better focused, as a community, on finding a Pythonic way to proceed, and then advocating it, than previous cultures. I would revise that to be that the pythonic culture of one acceptable way to to is better matched with a lot of good development practices. Perl was also very good at finding a Perl way to proceed. It's just that with Perl that often mean a lot of implicitness and "do wh…

But Ruby took all the best bits of Perl so I'm still perplexed as to why Python "won".

Because the best bits of Perl were kinda trash that Python was smart to avoid.

Re: Ask HN: Why did Python win?

#466

Earlier quoted context omitted.

> Ruby relied only on web development Chef, Puppet, Vagrant, Logstash, etc are not web development. Ruby dominated (dominates?) DevOps tooling.

YMMV, but I've only seen Rails fans use any of those.

There was a time when Puppet and Vagrant were head-and-shoulders the best options, and I say this as a JVM/Python guy who never got on with Rails. (I'd argue they still are, but sadly everyone is on docker and k8s these days whether it makes sense for their use case or not)

Re: Ask HN: Why did Python win?

#467

Earlier quoted context omitted.

So I imagine you have that perspective because you started less than 20 years ago. In some ways the idea of the Pythonic Way to do things evolved in opposition to Perl's vigorous advocacy of More Than One Way. Python has been really winning for some time, so it's natural that its ideological discipline has grown ragged. The crop of kids who value options above consistency don't have the scars of the Perl age to infor…

Back when I decided it was time to add a scripting language, Perl and Python seemed like the obvious choices, and in my mind were equally good options. I asked my best friend which I should choose, and he more or less said, "You can't go wrong with either one, but when you ask for help Perl people are assholes and Python people are nice." I can't confirm his thoughts on Perl and I haven't interacted much with Ruby, b…

yep the Perl community kind of had issues around the turn of the millennium and the perl6 debacle did a lot to convince people that Perl was kind of a dead end.

I don't think there was any toxicity in the Ruby community but it was made up of working programmers where as the big leading voices in the python community was teaching assistants and students so it might have been more tailored to newbies.

I don't recall there being much real industrial use of python prior to Ruby emerging even if python is technically older so i think the real answer lies in why the educational sector decided that teaching python was easier and significant whitespace plays a huge part here.

Re: Ask HN: Why did Python win?

#468

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

I'll argue that python is very alive in the system management/scripting space. Because of the library support (especially for data) it's also popular as api servers. It's not as popular for entire applications but is still very active. EDIT: Django is actually about equal or more popular then nodejs based on google trends. Not sure that means anything as idk how many people google "nodejs" when working on it.

I think HTMX has given a new lease of life to old school, server-side frameworks like Django and Flask.

Re: Ask HN: Why did Python win?

#469
post #239

Earlier quoted context omitted.

I use pip 100% of the time

>> I use pip 100% of the time What about pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, ActiveState platform, homebrew, or your Linux / BSD distro's package manager?

I use none of those except for homebrew, but I didn't mention it because it's for installing complete programs that happen to be written in Python, not Python dependencies for when I'm working with Python.

Re: Ask HN: Why did Python win?

#470

What concepts does a language force a new user to be aware of, and how reliable are user's first intuitions about those concepts? I would argue that Python dominates Ruby in this metric. New users wonder how to call functions. They form an intuition ("use parenthesis"), but it's unreliable. "Oh, parenthesis are optional--oh, parenthesis are only optional sometimes". New users wonder what a function is exactly. They f…

Yes, it's essentially UI/UX principles as applied to language design, with developers being the users. You want your users to be able to build reliable mental models of your interface [1].

The optional parentheses example is a good one. That mistake was carried over to Crystal, it's such a silly little inconsistency that I'm sure the designers considered "cute" or "clever". It's naught but a constant pain in the butt.

Another good example is YAML vs JSON. I understood the entirety of JSON syntax pretty much immediately upon seeing it, it's trivial. YAML is supposed to be "easier for humans", but by forgoing a uniform and consistent syntax it ended up an order of magnitude harder.

[1]: https://news.ycombinator.com/item?id=36396256

Post reply on HN