Earlier quoted context omitted.
I'll bite on "just a fad in webdev circles", in case you are serious and not trolling. Railsworld is celebrating the 20th anniversary of Rails this year. As I'm sure you know, Rails is built on Ruby. 20 years does not fit my definition of fad.
I don't think moonchrome was disparaging Rails or minimizing its popularity, but, rather pointing out that Ruby is only as popular as it is because of webdev, because of Rails (and the Rails-likes that came after)—outside of that specific niche, it's not very commonly used just about anywhere else, especially when compared to Python.
Ask HN: Why did Python win?
781–790 of 856 posts
Re: Ask HN: Why did Python win?
#782Re: Ask HN: Why did Python win?
#783Earlier quoted context omitted.
I have seen Python in action since 2010 plenty of times, including the present. It's been a mess every time. My worldview is driven by F# and Elixir, namely the `dotnet` and `mix` tooling, respectively. So no, Python's tooling does not impress me in the slightest. The first thing you need to do is get agreement on all the different checkers, linters, formatters. For Elixir, there's one tool for each task. My worldvie…
You see tooling in a different view than typical Python users. Python users see things like iPython, notebooks, the ability to quickly do statistics and plot results, as tooling - to do their jobs. Data Science. Machine learning. Things that perplex and confound static-typing OOP purists. So yes, by your world view - Python is a mess. There's no one way to do things, there's no one tool, no one linter, no one formatt…
That doesn't surprise me.
I do what you mentioned with F# in Polyglot Notebooks (which support several languages in the same notebook) and Elixir in Livebook all the time, both of which are superior notebook implementations to the outdated Python Jupyter notebooks.
My worldview is not driven by comparing Python to C#, Java, C++, and other such ilk.
Re: Ask HN: Why did Python win?
#784Re: Ask HN: Why did Python win?
#785Earlier quoted context omitted.
But it is absolutely unintuitive why it shouldn't be if mylist.length > 10
If the length of mylist ... see how length comes first? Only unintuitive if you never spoke English or other european languages.
In Ruby I thus often write something such as:
if mylist.empty?.!
Because my line of thinking goes from the object to a function or attribute and then chains further along. Calling the `.!` method on the returned boolean object is very nice, because I don't have to go back to before mylist and insert the !-operator there.Re: Ask HN: Why did Python win?
#786Python 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).
All performances are relative. Ruby or Python is very performant for 99% of websites, generally the bottleneck is the database.
Rails has enabled Twitter to develop and iterate faster. But now that the social network has to manage several tens of millions of users, the 200 req/s of Rails are no longer sufficient.
And Ruby in 2013 didn't have the same performance as in 2023. Hardware no longer had the same performance, too.
(https://blog.twitter.com/engineering/en_us/a/2013/new-tweets...)
Re: Ask HN: Why did Python win?
#787Python 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…
However aside from that R is vastly inferior.
Re: Ask HN: Why did Python win?
#788Earlier quoted context omitted.
> my impression is that the DSL is so extensive you might as well be writing something that's not Ruby. This is just how Ruby is. It's designed around the idea of building DSLs, so writing in Ruby is almost always an exercise in writing in one DSL or another.
I've spent year and a half writing chef as my first "programming" job, like 6 years ago. I learned almost 0 ruby, and that's probably why ruby didn't stick that much.
Re: Ask HN: Why did Python win?
#789Earlier quoted context omitted.
I think it's kinda nonsense. No programming language is intuitive. It's arcane by nature. Having slightly more concise syntax saves you maybe a week of learning time. I used to write Perl about as fast as I could think because I had a lot of practice with it. I mostly do Python now, but do a lot less coding in general and I have to google syntax constantly. Python is less noisy, but it's not really more intuitive for…
Yes, Java has very good IDE integration, but for other languages, being easy to write without an IDE was important back then. A lot of people were using text editors. The situation has changed now that having at least somewhat reasonable IDE integration is common. AI tools can also give you pretty good autocomplete.