News for hackers. Stuff that matters.
Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @04:52AM (#34243834)
Python gained traction because of Google (Google used it initially then Guido worked for them for a decade+, vs. Matz at Heroku/salesforce) and then because it's the easiest way to use ML libs. That's it.

It's slower than Ruby, has worse package management and less consistent syntax but if you want to use Tensorflow, PyTorch, etc..., it's the default.

Re:Ruby 3.2.0 Is from Another Dimension by samwillis on Wednesday January 04, 2023 @05:09AM (#34243932)
That's a fairly Silicone Valley focused argument. I don't subscribe to the theory at all that Google closed internal use of Python was instrumental in its adoption.

Django was released in 2005 and RoR in 2004. I suspect my journey was similar around then (late 2005), I had used PHP, classic ASP and a little Perl. I was looking for something better, read the tutorials for both Django and RoR. Had a look at what desktop GUI toolkits were available for both Ruby and Python (I wanted to lean one new language), Python had a few more options and so went with Python and Django.

At the same time Python was gaining significant traction in the scientific community with NumPy (2006/1995) and SciPy (2001). Ruby I don't believe had an answer to that back then. I was vaguely aware of that and it somewhat influenced my decision.

Ultimately it was the two pronged (web + scientific) development of the ecosystem that pushed Python ahead of Ruby.

Re:Ruby 3.2.0 Is from Another Dimension by piva00 on Wednesday January 04, 2023 @06:31AM (#34244395)
Had a similar journey, started with ASP in the 2000s, then PHP around 2003, then worked with both RoR and Django professionally for a few years.

As much as I liked RoR for its scaffolding and easiness of bootstrapping new CRUD projects, over time with larger codebases and teams it just starts to be a mess. Ruby programmers love the terseness of the language and write some of the most ungrokable code I've encountered (second only to some Scala codebases I worked with). That and the magic of autoloading modules which then could introduce a DSL, the usage of mixins that are hard to trace where they are loaded from, and a lot of other magic features that are extremely opaque to parse through and debug is, ultimately, what made me abandon Ruby and RoR.

It has its uses but I've yet to see a decent legacy RoR codebase without these pitfalls of magic, after so many years professionally working with code I prefer any language environment that is explicit, Ruby is not explicit.

Re:Ruby 3.2.0 Is from Another Dimension by nuker on Wednesday January 04, 2023 @07:24AM (#34244728)
> most ungrokable code I've encountered (second only to some Scala

Perl!

Re:Ruby 3.2.0 Is from Another Dimension by satvikpendem on Wednesday January 04, 2023 @10:31AM (#34246705)
> Silicone Valley

I think Silicone Valley is, uh, another type of valley.

Re:Ruby 3.2.0 Is from Another Dimension by yla92 on Wednesday January 04, 2023 @05:33AM (#34244070)
> It's slower than Ruby.

Any reference/numbers to back this up ? Just genuinely curious about this.

Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @05:57AM (#34244199)
Basically any benchmark that uses just the language. Throw some loops and maths in there.

It doesn't really matter though, both languages are used typically for scripting. But just shows it's not really about the "language", it's about the ecosystem.

Re:Ruby 3.2.0 Is from Another Dimension by j_mo on Wednesday January 04, 2023 @06:15AM (#34244298)
In all the language comparisons I've found over the years, Python consistently comes out slightly slower, for example:

https://github.com/kostya/benchmarks

Bearing in mind these are probably not even using YJIT, which makes Ruby considerably faster in some scenarios.

Re:Ruby 3.2.0 Is from Another Dimension by yxhuvud on Wednesday January 04, 2023 @09:13AM (#34245671)
Ruby used to be slower though, during the 1.8.7 times. But that was a long time ago now.
Re:Ruby 3.2.0 Is from Another Dimension by berkut on Wednesday January 04, 2023 @06:21AM (#34244331)
Here's some randomish ones (fibionacci recursive, leibniz pi, amicable numbers, sieve of eratosthenes, class methods) I performed two years ago for my improved (dictionaries, much faster stack operations and extra opcodes for loops) version of Lox (Crafting Interpreters):

https://i.imgur.com/joi2FMc.png

Re:Ruby 3.2.0 Is from Another Dimension by pjmlp on Wednesday January 04, 2023 @05:17AM (#34243978)
Python was already in the gold path years before Rails, thanks to Zope, being an alternative to Perl, and research labs like CERN and Fermilab starting to adopt it, this is back in 2000 - 2004.

When Ruby and Rails started to make an appearance in European circles, around 2007, it hardly mattered when Python was already around.

Re:Ruby 3.2.0 Is from Another Dimension by mypalmike on Wednesday January 04, 2023 @05:04AM (#34243912)
Revisionist history. Python was huge before Google even existed.
Re:Ruby 3.2.0 Is from Another Dimension by mtrower on Wednesday January 04, 2023 @05:11AM (#34243936)
...for some value of "huge" that others might take issue with.

From my perspective, python was just starting to gain real popularity in the mid 2000s, more than half a decade after Google was founded...

Re:Ruby 3.2.0 Is from Another Dimension by dagw on Wednesday January 04, 2023 @05:26AM (#34244029)
Python was huge before Google even existed.

I first started using Python slightly after that time and for years it was a pretty niche language that relatively few people used, especially compared to the other 'P' languages, Perl and PHP. I'd estimate 2001-2002 as when it would say it started to become a 'normal' language and I wouldn't say it really started taking off until around 2005ish.

Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @05:51AM (#34244157)
??? Python was huge in the 90's? News to me. No one I knew knew about it until like 2010.
Re:Ruby 3.2.0 Is from Another Dimension by programmer_dude on Wednesday January 04, 2023 @06:02AM (#34244221)
LOL, you and your friends have been living under a rock. I have been using Python since (at most) 2002.
Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @07:05AM (#34244585)
> I have been using Python since (at most) 2002.

So 4 years after Google.

Which made my point to the parent.

And apparently everyone's been living under a rock because Python didn't become truly huge until maybe 10 years ago.

Re:Ruby 3.2.0 Is from Another Dimension by programmer_dude on Wednesday January 04, 2023 @07:15AM (#34244648)
I did not start using python because it was adopted by Google. It was / is useful with or without Google.
Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @07:30AM (#34244773)
You may not have, but let's not pretend it didn't become mainstream in the 2005-2020 time period...

When people decided what language to use, it was very much a "X uses this, maybe we should" kind of decision. Still is for the most part.

Re:Ruby 3.2.0 Is from Another Dimension by KptMarchewa on Wednesday January 04, 2023 @08:19AM (#34245192)
I've been learning Python in university ("webdev" class) in 2008 already...
Re:Ruby 3.2.0 Is from Another Dimension by mgkimsal on Wednesday January 04, 2023 @08:48AM (#34245454)
Can I assume the '85' in your username indicates a birth year?

Zope was a Python project from the late 90s, and had quite a bit of attention and traction in the early cms/publishing days. That brought Python attention, and certainly gave it some mindshare in the late 90s.

Re:Ruby 3.2.0 Is from Another Dimension by ilyt on Wednesday January 04, 2023 @10:50AM (#34246980)
I remember it existing back then and near-nobody caring
Re:Ruby 3.2.0 Is from Another Dimension by ofrzeta on Wednesday January 04, 2023 @02:03PM (#34249868)
Zope is still alive, it seems, although I haven't touched it in 20 years: https://zope.readthedocs.io/en/latest/news.html#what-s-new-i...
Re:Ruby 3.2.0 Is from Another Dimension by michaelteter on Wednesday January 04, 2023 @02:17PM (#34250052)
I don't think Zope/Plone had hardly anything to do with Python's rise. While a number of significant sites were built on Zope or Plone, the relative ease with setting up such a site meant that little or no code-level modification or extension was necessary.
Re:Ruby 3.2.0 Is from Another Dimension by Ancapistani on Wednesday January 04, 2023 @01:16PM (#34249255)
My first real professional programming project was written in Python, using Django 0.96, in 2007. It was at a large shipping company, and "under the radar" - i.e., the "business side" did it, as IT wouldn't support it.

Two years later the project had become an integral part of some critical business processes, and IT had to take it on. They decided to rewrite it in C#. I left the company at that point, and almost a decade later I got a call from a former coworker asking for help to fix the system. It turns out it was basically unchanged from when I left, and the address of the Exchange server that it relied on for auth had changed.

Re:Ruby 3.2.0 Is from Another Dimension by lifthrasiir on Wednesday January 04, 2023 @08:32AM (#34245314)
In fact, Google---back then BackRub---was originally implemented in Java and Python, long before Guido briefly joined Google. "Huge" is obviously a subjective word but if it means "not small" then Python was already not a small language even at that time.
Re:Ruby 3.2.0 Is from Another Dimension by wiseowise on Wednesday January 04, 2023 @08:18AM (#34245179)
> It's slower than Ruby

That’s like saying that Dodge Neon is Slower than Mazda Miata.

Both are bottom of the barrel compared to any compiled language.

Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @08:22AM (#34245222)
> Both are bottom of the barrel compared to any compiled language.

Scripting languages and compiled languages are used for different things.

And you're right, both are slow as hell and speed doesn't really matter for scripting, but when all else is equal, it matters, a lil...

Re:Ruby 3.2.0 Is from Another Dimension by FpUser on Wednesday January 04, 2023 @10:12AM (#34246398)
JavaScript is a scripting language but wipes the floor with either (like 25 and more times faster) and can be used to actually do something other than being a glue.
Re:Ruby 3.2.0 Is from Another Dimension by Mikeb85 on Wednesday January 04, 2023 @10:42AM (#34246864)
JS was slow before V8. Also TruffleRuby brings Ruby very close to V8 speeds. I just didn't consider that because it's not really a drop-in CRuby replacement.

Also JS is still too slow for most things compiled languages are used for.

Re:Ruby 3.2.0 Is from Another Dimension by cpursley on Wednesday January 04, 2023 @09:20AM (#34245750)
A Miata will smoke a Neon in the corners and is just more pleasant to drive. Miatas are the number one hobby motorsport (racing) vehicles of choice for a reason.

Which is actually a great analogy for Ruby vs Python!

Re:Ruby 3.2.0 Is from Another Dimension by wiseowise on Thursday January 05, 2023 @03:22AM (#34257323)
> Which is actually a great analogy for Ruby vs Python!

I know. :^)

Both are shit compared to better cars, though.