I don't think we're going to be talking about languages winning any competitions soon, once we're generating programs with natural language. Natural language is going to win the competition in the long run.
Ask HN: Why did Python win?
131–140 of 856 posts
Re: Ask HN: Why did Python win?
#132By contrast I feel Ruby was very much a one hit wonder with Ruby on Rails.
Re: Ask HN: Why did Python win?
#133Earlier quoted context omitted.
> Ruby relied only on web development Chef, Puppet, Vagrant, Logstash, etc are not web development. Ruby dominated (dominates?) DevOps tooling.
I'm sorry, but for me it seems that Go has is taking the lead in adoption rates for devops tooling. Ruby isn't the go-to language there anymore... probably because GoLang compiles statically.
Re: Ask HN: Why did Python win?
#134Python manages to have decent performance because NumPy uses an APL-like model and it happens to skirt the design flaws (dynamic typing, interpreted). J for instance has a tree-walking interpreter written in C that performs well! Ruby's poor performance hobbles it even in places it's supposed to be good (twitter was rewritten to Scala over rails).
Re: Ask HN: Why did Python win?
#135That changed very fast once deep learning arrived on the scene. Plus the Python ecosystem kept getting better. Google/tensorflow/python was the final nail in the coffin, and the ecosystem had irreversibly shifted to Python.
Re: Ask HN: Why did Python win?
#136Ruby was never similar in popularity to Python. It was just a fad in webdev circles. I've rarely seen ruby before RoR and I've seen python all over. Python was popular as a teaching language, how it gained a foothold in academia. I remember 20 years ago when I was starting out it was popular for game scripting (Lua was more embeddable but python was also used). plenty of first class interfacing methods to native code…
Re: Ask HN: Why did Python win?
#137Earlier quoted context omitted.
I think it upset the Perl hegemony in part because of the enterprise infatuation with object orientation. Perl got a lot of flak from the Java/XML crowd (“Perl’s not a real language—it’s not object oriented!”). You could kind of write Java in Python, and thus a certain kind of enterprise techie couldn’t dismiss Python as “just” a scripting language.
In my experience, Perl got a lot of flak for being "write only", I don't really remember anybody complaining it wasn't "object oriented". Every Perl code base I've seen, or inherited, has been a mess. My favourite was a bunch of utilities all written by the same person who never did anything the same way twice. Each utility was like an entry in an obfuscated 'C' contest. I used Perl to build my first web application…
Re: Ask HN: Why did Python win?
#138But the reason I stuck with it was quick turnaround and solid, maintainable code.
When I was at a local ISP/Yahoo-style portal in the 2010s, it was fashionable to run our own music and storage services. One of our teams implemented a Dropbox clone (called MEO Cloud) that was API-compatible (and had a Python client that I helped test).
At that time, we had a resident music streaming service that had a massive storage array on-premises, and we had a branded music streaming app to go with it. We wanted to implement a Shazam-like functionality, so I borrowed two big multicore Xeons, built an audio fingerprint indexer fot it based on a (now defunct) OSS library, and indexed the entire thing (some hundred million audio files) with Celery. It took me 3 days to write the first version, and two more to tweak things (fingerprinting was done in C++, and the only real constraint was datacenter network).
At that time we had a lousy experience with Rails and Ruby. I was using Basecamp and was interested in it (plus I wrote quite a bit of Ruby for Vagrant and Puppet), but the people we hired to do two or three Rails projects never managed to deliver anything usable or maintainable (since we were mostly a PHP/Java shop when it came to front-ends, reliability and scalability were paramount, and gems were hell to deploy and troubleshoot at the time).
I moved to Python 3 with minimal hassle (perhaps because I took great care in the dependencies I picked), adopted asyncio to great effect (I use my own asyncio code to batch writes to Azure storage these days), and all the while it has remained a very enjoyable, readable language (except when I come across poorly written OOP code that reads like Java fanfic).
My own coding style is closer to LISP/functional programming (I am actually refactoring a piece of code I wrote eight years ago in Hylang, the perennially under construction LISP-equivalent), and I love virtualenvs, the AST, the way I can use decorators to modify code behaviour, and, of course, the fact that today I can run and work in it everywhere (I have multiple interpreters on the iPad, for instance).
I could go on, but I've essentially been using Python as a mix of C/C++ glue, some fairly involved functional programming and a lot of multi-processing and concurrent code (I tend to push the interpreter to the limit when I can't use Cython). And I even wrote my own PasS on 1500 lines of it: https://github.com/piku (which I still use today).
From where I'm sitting, Python won because it is a great, maintainable glue language with some pretty much rock solid libraries (not just the standard library). Bottle and Django come to mind, although these days I'm more into aiohttp.
Re: Ask HN: Why did Python win?
#139Earlier quoted context omitted.
> Rails is far, far more popular than Django. Maybe it used to, but seems a lot more people at least searches for Django pretty much everywhere except US, Canda and Japan. https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...
Fair enough, my information is outdated. StackOverflow agrees. [1] [1] https://insights.stackoverflow.com/trends?tags=django%2Cruby...
Re: Ask HN: Why did Python win?
#140Python 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…
Numpy is certainly amazing, but there are tons of competitors in the data/scientific space, which pure "A-type" data scientists tend to prefer: R, SSPS, Matlab... The difference is that Python doesn't entirely suck as a general-purpose language. Sure, you might have better options, but it's still reasonable to write almost anything in Python. Other scripting languages like Ruby, JS and Lua are probably a little bit b…