News for hackers. Stuff that matters.
Re:Ruby 3.2.0 Is from Another Dimension by arnvald on Wednesday January 04, 2023 @05:22AM (#34244005)
I explored this topic a while ago on my blog [0]

In essence, I don't think it has anything to do with elegance, syntax, or "easiness". It's more about timing + origin + corporate adoption:

* Python was created in Europe, Ruby was created in Japan - when Ruby gained more recognition in English-speaking world (~2004), Python has already been present and used worldwide for a decade

* Ruby was created as a personal, hobby project; Python was created while Guido worked in research institutions, and it helped Python gain recognition in academia environment

* Guido joined Google in 2005, boosting the adoption of Python; Ruby has never gained such a large corporate backing

Eventually I believe it was the combination of the latter 2 that pushed Python to top spot in popularity - scientists all over the world were familiar with Python, and with the rise of Data Science/ML (with Google being one of the main forces behind it), it became the most obvious choice for the new tools.

[0] https://www.notonlycode.org/why-python-has-won/

Re:Ruby 3.2.0 Is from Another Dimension by skywal_l on Wednesday January 04, 2023 @05:32AM (#34244061)
> * Ruby was created as a personal, hobby project; Python was created while Guido worked in research institutions, and it helped Python gain recognition in academia environment

As a data point, I remember interviewing for an internship in a research institution doing some work on medical images around 2002/2003 and the supervisor telling me that Python was the lingua franca in this domain (from a research and POC development perspective).

Re:Ruby 3.2.0 Is from Another Dimension by pjmlp on Wednesday January 04, 2023 @03:18PM (#34250857)
While I was at CERN during early 2000's, it was already being used for the build tooling and package management of HLT.

Trainings for getting Python skills were a common offering.

Re:Ruby 3.2.0 Is from Another Dimension by 4m1rk on Friday January 06, 2023 @01:04AM (#34271541)
These explain why Python is the defacto for AI/ML which is interesting but I still totally agree with the idea of Python's simplicity making it just a better choice to get things done. I had a journey from Scala, a compile-time type-safe, flexible and exciting language to Python a dynamic, simple and boring one. Python code just end up being done fast and clean. Scala one never gets the team consensus and is never consistent.
Re:Ruby 3.2.0 Is from Another Dimension by masklinn on Wednesday January 04, 2023 @05:51AM (#34244156)
Note that the Python core team started working with the scientific community very early on, the first scientific packages (as well as additions to python for scicom like extended slices) date back to the mid 90s.

GvR’s background probably helped spread the word and thus get feedback, but as often Python’s overnight success was the result of years of work.

Re:Ruby 3.2.0 Is from Another Dimension by jacquesm on Wednesday January 04, 2023 @08:54AM (#34245498)
The Python core team early on was part of the scientific community. GvR worked at CWI (Centrum voor Wiskunde en Informatica), which was a part of the particle accelerator installation that Amsterdam had once upon a time until most such research went to Switzerland and the USA. CWI has, together with NikHef (the Dutch Nuclear Phyiscs Institute) done a lot of ground breaking research over the years and was the cradle of quite a few spin-off projects.
Re:Ruby 3.2.0 Is from Another Dimension by bhaak on Wednesday January 04, 2023 @09:22AM (#34245770)
Oh, I didn't realized until now that Guido worked there.

So we got at least two major contributions from the CWI. One is Python and the other one is the game of Hack. :)

Re:Ruby 3.2.0 Is from Another Dimension by jacquesm on Wednesday January 04, 2023 @10:06AM (#34246316)
There are many more:

The father of A*:

https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm

ALGOL 60 and ALGOL 68

First node on the Internet outside of the USA

Python

Various contributions to the improvement of encryption.

CWI has a long, long history of quietly contributing to all kinds of stuff the world over and has a pretty good reputation.

https://en.wikipedia.org/wiki/ALGOL_60

Re:Ruby 3.2.0 Is from Another Dimension by recuter on Wednesday January 04, 2023 @05:54AM (#34244174)
Be that as it may, what does it matter? You are chronicling ancient history at this point. These languages are more alike than they are different.

Or at least they are similar enough that one pulled ahead and subsumed the other. Like a twin eating his brother in the womb. Maybe it could have gone the other way and we would have ended up pretty much in the same place. Or maybe it is a case of worse is better. But not that much worse/better frankly and here we are. Salivating over rust. ;)

Re:Ruby 3.2.0 Is from Another Dimension by optimuspaul on Wednesday January 04, 2023 @09:43AM (#34246011)
> These languages are more alike than they are different.

I agree with this point. I learned python years before I learned Ruby and I found them to be very similar. Ultimately I dropped ruby because I didn't care much for the syntax and I like whitespace.

Re:Ruby 3.2.0 Is from Another Dimension by taf2 on Wednesday January 04, 2023 @07:07AM (#34244600)
Agreed on timing… twitter, Shopify, GitHub, Stripe - to name a few notable brands that followed using Ruby as their core language
Re:Ruby 3.2.0 Is from Another Dimension by keithalewis on Wednesday January 04, 2023 @08:31AM (#34245305)
Isn't Excel 10x, 100x? more "popular". If that is your measurement stick.
Re:Ruby 3.2.0 Is from Another Dimension by chucke on Wednesday January 04, 2023 @08:39AM (#34245373)
I think you're spot on. Ruby actually gained wider appeal only when it gained visibility in the US (via rails). Being present in the markets which drive adoption matters more than being consistent, which python isn't ("one way of doing things" is mostly a meme nowadays, everyone touching python knows it's fake).
Re:Ruby 3.2.0 Is from Another Dimension by ilyt on Wednesday January 04, 2023 @10:46AM (#34246903)
PHP got popular coz it could get barely code-literate HTML/CSS web designer to write a dynamic app, and host it easily

Ruby got popular coz Rails could get barely code-literate graduate to write CRUD app and so it was cheap (famous 15 minutes to blog tutorial) for companies.

JS got popular coz, well you ain't got fucking choice on frontend and having your then-frontend JS/HTML/CSS designer be able to also do backend is, well, again, easy and cheap.

There is clear pattern here...

Re:Ruby 3.2.0 Is from Another Dimension by hoipaloi on Wednesday January 04, 2023 @11:45AM (#34247877)
I'm gonna disagree with

"Ruby got popular coz Rails could get barely code-literate graduate to write CRUD app and so it was cheap (famous 15 minutes to blog tutorial) for companies."

That's not what happened, instead Ruby got popular with advanced web developers working in Java who saw that Rails was had better answers than J2EE. If you were barely code-literate graduate you wouldn't recognize that Rails was offering new unique ways doing things.

The 15 minute blog tutorial wasn't really indicative of what Rails was like, just a small sample about how it was different.

It was an advanced tool for advanced users with a long learning curve that eventually paid off in better productivity.

Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @01:39PM (#34249579)
> advanced web developers working in Java who saw that Rails was had better answers than J2EE

I was not "advanced" at web development in 2006, but this is exactly what got me to try Ruby. Previously I had been reasonably happy with JSP and Java Servlets, but this Rails thing promised a better way. And it turned out for most of my needs, it was much better.

Also, the Rails Depot book was excellent, even back in the 1.x days (IIRC). It covered enough that you could build a fully working app with sessions, auth, crud, and reasonably abstracted layouts/views. Oh, and because Ruby was "simple", you honestly could start with that Rails book without knowing Ruby.

Re:Ruby 3.2.0 Is from Another Dimension by pjmlp on Wednesday January 04, 2023 @03:26PM (#34250973)
I was doing J2EE and was hardly surprised with Rails.

We did Rails one decade earlier with our own version of AOLServer.

The very reason we went to .NET (as beta testers during its availability only to MSFT partners) was because we were fed up having to rewrite TCL into C due to performance issues.

All the Active Record stuff was already something that AOLServer introduced, and we had an improved approach on our product.

The founders of that company went on to create OutSystems based on our learnings.

Re:Ruby 3.2.0 Is from Another Dimension by mhink on Wednesday January 04, 2023 @01:00PM (#34249039)
> JS got popular coz, well you ain't got fucking choice on frontend and having your then-frontend JS/HTML/CSS designer be able to also do backend is, well, again, easy and cheap.

IIRC, a bigger reason for Node's popularity (at least at the very beginning of its popularity) was the fact that it had event-based I/O, which let a single process handle a lot more in-flight requests than Ruby (where the concurrency model was to spin up a bunch of processes and multiplex across them with nginx or similar).

Re:Ruby 3.2.0 Is from Another Dimension by pjmlp on Wednesday January 04, 2023 @03:33PM (#34251078)
Famous TCL paper from 1995, regarding event based programming.

"Why Threads Are A Bad Idea (for most purposes)"

https://web.stanford.edu/~ouster/cgi-bin/papers/threads.pdf

Re:Ruby 3.2.0 Is from Another Dimension by samsquire on Thursday January 05, 2023 @02:37PM (#34265308)
I don't think threads are a poor idea but they have sharp edges.

I work on multithreaded software and I get 31,516,776 synchronizations per second with a lock free algorithm and 31,565,052 on the lock benchmark.

When the threads are increased to 100 (contention) the lock benchmark does 3,419,271 requests per second whereas the lock free algorithm does 19,926,428 so the contention hurts them both but the lock free benchmark scales far better.

Threads aren't bad. The domain is not easy.

Re:Ruby 3.2.0 Is from Another Dimension by tragomaskhalos on Wednesday January 04, 2023 @08:57AM (#34245530)
For me personally, the killer was that python is typically pre-installed on linuxen while Ruby isn't, and if those environments are controlled or locked down in any way it can be a ballache to get ruby on there. Hence python is the path of least resistance.
Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @01:16PM (#34249251)
This is absolutely a reason to choose Python. I’ve experienced this and made the same choice in the past.

In terms of pre installed options, especially on older systems, Python is the best choice for integrating and extending systems.

Re:Ruby 3.2.0 Is from Another Dimension by ralkr on Wednesday January 04, 2023 @10:15AM (#34246440)
I agree with the timing and origin. I think corporate backing was just luck.

Google used Python very early, but other languages became more prominent in 2005, culminating in the creation of Go, after which GvR left.

Indeed people talked a lot about Google "supporting" Python, but the support was pretty minimal (50% job for GvR, where you cannot really do much).

Python has way better marketing though the PSF though. They understood that you can create a circus around the language that is completely removed from engineering, fundamentals and actual core development. If Ruby had been as shameless, it might be #1 today.

Re:Ruby 3.2.0 Is from Another Dimension by asdf123wtf on Wednesday January 04, 2023 @10:43AM (#34246874)
I think the timing was the most important factor.

Perl was everywhere (on Linux/Unix). Then Python came along an offered enough net benefit over Perl that it really started to displace it, and became the defacto scripting language that you would reach for when creating programs on Linux/Unix.

Ruby has some niceties over python, but doesn't provide enough of a net benefit over it for that same kind of displacement to happen.

Re:Ruby 3.2.0 Is from Another Dimension by oezi on Wednesday January 04, 2023 @10:58AM (#34247100)
I think Python was conveniently there when teaching was looking to switch away from Java. Each wave of students exiting their institutions with a Python background made Python more popular in the field.
Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @01:43PM (#34249620)
> Python was conveniently there when teaching was looking to switch away from Java. Each wave of students exiting their institutions with a Python background made Python more popular in the field

This, plus what other commentors have noted regarding Pythons early developments in academia, have had multiplying effects on adoption.

The alternatives were C, C++, some "academic" language like Lisp (which I wish had really broken into commerce more), Prolog etc., and eventually Java. Python was at such a higher level that it definitely made more sense as a first language for many people... especially since it was capable enough to be more than just a first language.

Re:Ruby 3.2.0 Is from Another Dimension by cjohnson318 on Wednesday January 04, 2023 @11:09AM (#34247300)
I don't know about corporate adoption. I started programming around 2008 or so, and the first things I encountered outside of grad school were Ruby and Python. At first I used Ruby because I felt like anything I wrote "just worked", but later I switched to Python because there was just "one way to do things", and also because of NumPy/SciPy/Jupyter.
Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @01:19PM (#34249288)
The thing is, the “one way” is not at all true now. Maybe it was then.

Today’s landscape is better but also very different. And when looking up how to do certain things in Python, Stackoverflow will show you a multitude of options.

The problem for me is that I dislike most of them.

Re:Ruby 3.2.0 Is from Another Dimension by cjohnson318 on Wednesday January 04, 2023 @09:08PM (#34254981)
> The thing is, the “one way” is not at all true now.

Agreed. It was a smaller language then, but it's never been as expressive as Ruby.