6 ms·
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'
by Mikeb85 4y ago
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.
- yla92 4y ago> It's slower than Ruby. Any reference/numbers to back this up ? Just genuinely curious about this.
- Mikeb85 4y agoBasically 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.
- j_mo 4y agoIn all the language comparisons I've found over the years, Python consistently comes out slightly slower, for example: https://github.com/kostya/benchmarks https://github.com/kostya/benchmarks Bearing in mind these are probably not even using YJIT, which makes Ruby considerably faster in some scenarios.
- yxhuvud 4y agoRuby used to be slower though, during the 1.8.7 times. But that was a long time ago now.
- deleted 4y ago[deleted]
- mypalmike 4y agoRevisionist history. Python was huge before Google even existed.
- mtrower 4y ago...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...
- dagw 4y agoPython 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.
- Mikeb85 4y ago??? Python was huge in the 90's? News to me. No one I knew knew about it until like 2010.
- programmer_dude 4y agoLOL, you and your friends have been living under a rock. I have been using Python since (at most) 2002.
- Mikeb85 4y ago> 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.
- programmer_dude 4y agoI did not start using python because it was adopted by Google. It was / is useful with or without Google.
- samwillis 4y agoThat'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.
- piva00 4y agoHad 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.
- nuker 4y ago> most ungrokable code I've encountered (second only to some Scala Perl!
- satvikpendem 4y ago> Silicone Valley I think Silicone Valley is, uh, another type of valley.
- pjmlp 4y agoPython 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.
- wiseowise 4y ago> 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.
- Mikeb85 4y ago> 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...
- FpUser 4y agoJavaScript 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.
- Mikeb85 4y agoJS 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.
- cpursley 4y agoA 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!
- wiseowise 4y ago> Which is actually a great analogy for Ruby vs Python! I know. :^) Both are shit compared to better cars, though.