News for hackers. Stuff that matters.
Re:Ask HN: Why Did Python Win? by moonchrome on Tuesday August 29, 2023 @04:21PM (#37313413)
Ruby 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 (still remember c++ boost shipping python binding generator).

Many tools shipped python as an embedded scripting language.

Python was used for creating build systems.

Not to mention any distro out there ships python, it replaced perl in that regard. Batteries included and being available helped it become the norm for random scripting.

Python was big before numpy/ML.

Re:Ask HN: Why Did Python Win? by cutler on Tuesday August 29, 2023 @04:44PM (#37313774)
You're forgetting the period of Ruby's popularity in the devops world, especially Chef and Puppet.
Re:Ask HN: Why Did Python Win? by rcarmo on Tuesday August 29, 2023 @05:00PM (#37314029)
Puppet was pretty awesome. We used it to maintain and provision nearly every kind of software across a few thousand machines, even though it had a worrying tendency to remove user accounts (we once got locked out of the master...)
Re:Ask HN: Why Did Python Win? by moonchrome on Tuesday August 29, 2023 @05:16PM (#37314244)
I think that's just building on RoR hype in that same field. Puppet even moved away from Ruby AFAIK.
Re:Ask HN: Why Did Python Win? by cutler on Tuesday August 29, 2023 @07:58PM (#37315829)
I beg to differ. Most sysadmins I knew who used Ruby extensively had never touched Rails. There's no real connection between the two phenomena other than the language.
Re:Ask HN: Why Did Python Win? by raziel2p on Tuesday August 29, 2023 @08:25PM (#37316046)
Puppet was just built with Ruby (and later re-written, I think?), in all my years interacting with it I never actually wrote any Ruby.

Chef you obviously had to, but my impression is that the DSL is so extensive you might as well be writing something that's not Ruby.

Maybe this says something about the power of Ruby, but I don't feel like these tools contributed to the language's popularity or ecosystem - definitely not the way RoR did.

Re:Ask HN: Why Did Python Win? by lolinder on Tuesday August 29, 2023 @08:40PM (#37316151)
> 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.

Re:Ask HN: Why Did Python Win? by cvak on Wednesday August 30, 2023 @10:41AM (#37322860)
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? by lolinder on Wednesday August 30, 2023 @11:44AM (#37323875)
Yeah, I suspect this might be one reason why Ruby hasn't gained as much traction as others: knowledge doesn't translate well between frameworks, so there's little advantage to re-using the same language for a new project (unless it's a new project in the framework you're already comfortable with).
Re:Ask HN: Why Did Python Win? by CTmystery on Tuesday August 29, 2023 @04:50PM (#37313856)
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.
Re:Ask HN: Why Did Python Win? by JAlexoid on Tuesday August 29, 2023 @05:42PM (#37314521)
Just because there are people who still use it, doesn't make the statement that RoR was a fad less true. RoR was "the thing that everyone was using" at one point. It was that for several years. Anyone who's anyone was building stuff with Rails.

Now it's probably the third option, when building websites... and a fourth option, when building APIs.

Re:Ask HN: Why Did Python Win? by _fdsfs12123 on Tuesday August 29, 2023 @07:24PM (#37315522)
fad - an intense and widely shared enthusiasm for something, especially one that is short-lived and without basis in the object's qualities; a craze.

---

I don't think Ruby is a fad. The drop off Ruby had since early 2010s is dramatic, but it stabilized around 5% of all PRs on GH in the last few years:

https://madnight.github.io/githut/#/pull_requests/2023/2

It's still one of the most popular languages for web development.

Re:Ask HN: Why Did Python Win? by cutler on Tuesday August 29, 2023 @08:50PM (#37316227)
> It's still one of the most popular languages for web development.

But is it? Stats on major job boards such as Indeed show a steep decline in recent years. There are consistently twice as many Django/Flask roles listed compared with Rails. Node is the most popular but Spring, ASP.Net and PHP occupy the next level below Node.

Re:Ask HN: Why Did Python Win? by MatthiasPortzel on Tuesday August 29, 2023 @08:52PM (#37316243)
Thanks for linking that graph. I wonder to what extent Ruby’s decline as a percentage is due to its use declining versus other languages growing.
Re:Ask HN: Why Did Python Win? by KptMarchewa on Wednesday August 30, 2023 @09:03AM (#37321457)
>RoR was "the thing that everyone was using" at one point. It was that for several years. Anyone who's anyone was building stuff with Rails.

I extremely doubt that. Maybe in your geographical area with small stage startups.

At any given time Spring has probably seen 10x usage of RoR.

Re:Ask HN: Why Did Python Win? by kstrauser on Tuesday August 29, 2023 @05:24PM (#37314331)
I see what you mean, but I counter with Plone. It's been around for 24 years, and the annual Plone Conference is coming up in a couple months. Still, you don't see a whole lot of new Plone sites rolling out these days, and there's no Automattic-scale company with click-here-to-deploy convenience.

Nothing against Plone (although I was very happy to put its foundation layer, Zope, in my rear view mirror). It's a fine program that's very good at what it was. But just because something's been around a while doesn't mean that it's still vibrant and growing.

Re:Ask HN: Why Did Python Win? by tptacek on Tuesday August 29, 2023 @08:24PM (#37316034)
Plone never had anything even resembling Rails' popularity.
Re:Ask HN: Why Did Python Win? by kstrauser on Tuesday August 29, 2023 @08:53PM (#37316250)
So true. Still, you can't judge that from how long it's been around.
Re:Ask HN: Why Did Python Win? by hnfong on Wednesday August 30, 2023 @05:43AM (#37319547)
That's why RoR was a fad and Plone isn't.

Check out the charts from Google Trends some time.

Re:Ask HN: Why Did Python Win? by moonchrome on Tuesday August 29, 2023 @05:28PM (#37314385)
My point was more that Ruby exploded because of a period when Rails was growing super fast. I don't know what the growth in RoR space is but I'm certain it's nowhere near what it was in late 2000s/early 2010s. And outside of that there's really not much in Ruby space.

Python was all over the place when RoR came out, meanwhile I only remember hearing about Ruby on random forum posts or by some enthusiast before RoR.

Re:Ask HN: Why Did Python Win? by tetha on Tuesday August 29, 2023 @05:07PM (#37314121)
Mh. Honestly, I've encountered ruby in about 3 primary ways. RoR and Sinatra, which are kinda the same webdev thing, and Chef as a config management. There are additional things, but more supporting things - Rake and Capistrano as deployment systems, Berkshelf and such as supporting things.

Outside of this, it's been perl and python, with python replacing perl after that whole perl 6 fiasco while the language and distros started understanding packaging python.

Re:Ask HN: Why Did Python Win? by Cthulhu_ on Tuesday August 29, 2023 @05:31PM (#37314416)
10 ish years ago, pretty much all new hip HN startups plus existing success stories all started in Ruby on Rails, or feels like they did anyway.
Re:Ask HN: Why Did Python Win? by ysavir on Tuesday August 29, 2023 @05:00PM (#37314024)
I think they meant back before either Ruby or Python hit their stride, not afterwards.
Re:Ask HN: Why Did Python Win? by adamrezich on Tuesday August 29, 2023 @04:54PM (#37313929)
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.
Re:Ask HN: Why Did Python Win? by Lutger on Tuesday August 29, 2023 @06:36PM (#37315049)
Chef and puppet are fairly big ones though. Other than config management, I think this is true. Rails is king in ruby land.
Re:Ask HN: Why Did Python Win? by eric-hu on Wednesday August 30, 2023 @10:49AM (#37322999)
Homebrew, the macOS dependency manager, and Cocoapods, the Swift and objective C package manager, are both written in Ruby.
Re:Ask HN: Why Did Python Win? by WhyCause on Tuesday August 29, 2023 @05:00PM (#37314027)
> Many tools shipped python as an embedded scripting language.

I had dabbled with Python before encountering it (in its embedded form), but once I started using it inside ESRI's ArcGIS software, it became my go to language for many, many tasks.

Re:Ask HN: Why Did Python Win? by EdwardDiego on Tuesday August 29, 2023 @05:17PM (#37314251)
When I first looked into Ruby, pre-RoR, but only just, the stdlib docs (in English) were a gaping void compared to the Python docs. Would have been around early Python 2 days, 2.3 I think.
Re:Ask HN: Why Did Python Win? by KaiserPro on Tuesday August 29, 2023 @05:35PM (#37314463)
I first bumped into python because mailman was written in it. It was a large, slow and a bit funny. I saw it as another odd academic language that had spilled out of a university somewhere.

Then in about 2005 I heard about zope, and how easy and wonderful it was compared to php. But it was slow and memory heavy.

In about 2008 more and more stuff started getting python bindings, specifically in VFX (where I was working). There was a tussle between javascript and python, and python won out, even displacing MEL and other domain specific languages.

Ruby was always more obscure to me, it was for people that likes C and wanted a more perl-y version of it, but without the anachy or the universality of CPAN.

I think the biggest reason was that it had loads of stuff in the standard lib, way more than anything else at the time. Much more than perl, so it meant that things were a bit more "portable". So people came for the stdlib, then started adding things to it because they'd spent all that time learning it.