Remix.run Logo
stouset 2 hours ago

I’ll never not be bitter than Python “won” the scripting language war over Ruby, more or less just because someone did a bit of AI work in it first and it took over that space by default.

Ruby has such a nice holistic consistency to it. With a few exceptions, it feels like it was conceived of by one person with a core idea in mind. Python feels like a mess.

Revanche1367 2 hours ago | parent | next [-]

Long before AI work, numerical data crunching is what Python became popular for among non-computer scientists and this led directly to the AI use cases. The reason was obviously the lower barrier to entry without having a software engineering background. I also share with you that feeling about Ruby in particular.

gucci-on-fleek an hour ago | parent | prev | next [-]

> I’ll never not be bitter than Python “won” the scripting language war over Ruby, more or less just because someone did a bit of AI work in it first and it took over that space by default.

This is just my personal opinion with no data to back it up, but I suspect that Python "won" because it has excellent Windows support, while Ruby doesn't. Even a decade ago, Python's website offered an official native Windows installer [0], while Ruby's website [1] still points you to a third-party installer, which doesn't even have native support since it uses MSYS2 [2].

Most non-developers use Windows, so if you're choosing the first language to teach a large group of people, good Windows support is fairly important. Python being the "default" introductory language gave it a huge number of users, then I suspect that everything flowed down from there.

[0]: https://web.archive.org/web/20160824235759/https://www.pytho...

[1]: https://www.ruby-lang.org/en/downloads/

[2]: https://rubyinstaller.org/

Daishiman 9 minutes ago | parent | prev | next [-]

How is a language that has different semantics for referring to lambdas vs other functions consistent?

Ruby's most important error is that it does not support namespaces. This by itself makes it a far less scalable language than Python.

frollogaston 2 hours ago | parent | prev [-]

Python's strength is that it's easy to make C libs work in it. That's also why CPython is de facto the only Python implementation and stuff like PyPy never took off.

kccqzy 2 hours ago | parent | next [-]

Yeah and I would say that another important factor is Cython, which compiles Python with minimal modifications to C extensions that can in turn be imported in Python. It really makes it easy to get started in Python and worry about performance of the computation later. (Doesn’t help with concurrency I know but that’s a different story.)

AdieuToLogic 2 hours ago | parent | prev | next [-]

> Python's strength is that it's easy to make C libs work in it.

SWIG[0] makes working with C libraries trivial for over a dozen programming languages; Perl, Python, and Ruby included.

0 - https://www.swig.org/

frollogaston 2 hours ago | parent [-]

There are reasons all those Py libraries with C code didn't just do it in SWIG.

dismalaf 2 hours ago | parent | prev [-]

Ruby can interface with C (or Odin, or anything that can export C style functions) just as easily.