Live data from Hacker News

Ask HN: Why did Python win?

news.ycombinator.com

771–780 of 856 posts

Re: Ask HN: Why did Python win?

#771

Earlier quoted context omitted.

For me, the Ruby community's comfort with monkey patching was a big turn off If it helps, the Ruby community really soured on monkeypatching in general quite a while back. You don't see it much these days and every decent book or guide warns against it. It was definitely a crazier place 10+ years ago in the early Rails days.

>It was definitely a crazier place 10+ years ago in the early Rails days. Yeah! It sure was. I was around, was an early Ruby and Rails adopter, and worked on a few commercial Rails projects at that time. That's how I know about the monkey patching issues. Faced them in real life.

I certainly wouldn't blame a person for experiencing those crazier days and thinking the community didn't have the greatest technical vision.

I played around with Rails and Ruby when Rails first blew up. But I didn't start doing it fulltime professionally until 2014. By the time it seemed to me that the community was maturing. I think it's in a good place now.

Re: Ask HN: Why did Python win?

#772
post #750
post #602

Earlier quoted context omitted.

Yeah for sure, the PERL influence is why I dislike Ruby. Makes it really hard to read if you haven't been doing it constantly.

God forbid we should have to familiarise ourselves with a language before using it.

God forbid things be intuitive.

Re: Ask HN: Why did Python win?

#773

Earlier quoted context omitted.

Double underscores are ugly, but not surprising or frustrating. I say they are not frustrating because the language doesn't force beginners to be aware of how they work right away. Double-underscore methods are there for people to seek out when they're ready, but the language and the surrounding community doesn't push people into comprehending them. Intuition is good enough for a long time. Ruby has more focus on met…

I prefer to say that underscores mean that designers failed

Failed to design a beautiful language, yes. But they didn't fail to design a usable workhorse language.

Re: Ask HN: Why did Python win?

#775

Earlier quoted context omitted.

All this may be true (I'm not the strongest C++ developer in the world, relatively limited exposure), however the Rust memory management via the type system feels natural once you wrap your head around it. That idea is really good. I always hated dealing with `delete`, `free` and `malloc`. Being able to offload all that busy work to the type system is just nice. There are definitely ergonomic improvements that could…

> however the Rust memory management via the type system feels natural once you wrap your head around it It disallows many valid patterns. That is why I recommend to take a look at Hylo programming language (before called Val lang) to see what I think it is a very good example of how to make a language safe without making the learning curve so steep and without a need for a GC.

The way Rust does it may disallow valid patterns, but it is not inherent to the idea

Re: Ask HN: Why did Python win?

#776
post #76

Python ended up 'specializing' in data contexts, thanks to Numpy / Pandas, and as a result, ended up becoming the first exposure to programming than anyone doing data stuff had. That was millions of people. In that space, it had no competitors. Ruby ended up 'specializing' in web dev, because of Rails. But when Node and React came out, Ruby on Rails had to compete with Nodejs + React / MERN as a way of building a web…

Numpy is certainly amazing, but there are tons of competitors in the data/scientific space, which pure "A-type" data scientists tend to prefer: R, SSPS, Matlab... The difference is that Python doesn't entirely suck as a general-purpose language. Sure, you might have better options, but it's still reasonable to write almost anything in Python. Other scripting languages like Ruby, JS and Lua are probably a little bit b…

> which pure "A-type" data scientists tend to prefer: R, SSPS, Matlab

I very much disagree and I would say it's the opposite. The only competitor for data-scientists is R, especially if you're doing stats-heavy analysis (opposed to an ML-heavy analysis). SSPS is in my experience used mainly by someone without a data-scientist background, e.g. psychology, similarly to matlab, where the only users I know are engineers.

I would bet that the overwhelming amount of data-scientists use python, even if it's just to set up the data-pipeline. It's just the better general programming language and data-scientist are not analysing all the time but have to get the data in shape and available first.

Re: Ask HN: Why did Python win?

#778
post #766

Earlier quoted context omitted.

By what standard? Yours? Java developers? Rust developers? The fact that Python has typing now, tools to check those, and has plenty of tooling around “make it faster”, I think your world view might be stuck in 2010. Python has gone from a slow obscure scripting language to a powerhouse. Conda, NumPy, Scikit, PyTorch, GPU programming, Games, Analytics, web apps, API’s, I think it’s safe to say this ain’t your grandpa…

I have seen Python in action since 2010 plenty of times, including the present. It's been a mess every time. My worldview is driven by F# and Elixir, namely the `dotnet` and `mix` tooling, respectively. So no, Python's tooling does not impress me in the slightest. The first thing you need to do is get agreement on all the different checkers, linters, formatters. For Elixir, there's one tool for each task. My worldvie…

You see tooling in a different view than typical Python users. Python users see things like iPython, notebooks, the ability to quickly do statistics and plot results, as tooling - to do their jobs. Data Science. Machine learning. Things that perplex and confound static-typing OOP purists. So yes, by your world view - Python is a mess. There's no one way to do things, there's no one tool, no one linter, no one formatter. I praise the fact that there isn't. What a boring world. What choice would you have if that tool didn't satisfy your needs? Find another language?

I began in that world view. The C/C++/Java/DotNet everything must have a standard, a fixation on a singular consensus. That's not how things work in the open source world of Python, javascript, rust, etc. Will there be gravitation towards a paradigm? sure, until such time that a new one emerges.

If you looked at Python in the 2.5 days and looked at Python today - You cannot argue the tooling has gotten better.

Re: Ask HN: Why did Python win?

#779

Earlier quoted context omitted.

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…

> 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.

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?

#780
post #349

The way I (somewhat hazily) remember it, Python was mainly competing with Perl as a scripting language, not Ruby as an application/web language. I started hearing about Ruby years later when Ruby on Rails drove the Web 2.0 movement, but that feels like a different era to me. Eric S. Raymond wrote an article[1] in 2000 about his experience trying Python after spending a lot of time with Perl. I'll quote some of it her…

I think it's kinda nonsense. No programming language is intuitive. It's arcane by nature. Having slightly more concise syntax saves you maybe a week of learning time. I used to write Perl about as fast as I could think because I had a lot of practice with it. I mostly do Python now, but do a lot less coding in general and I have to google syntax constantly. Python is less noisy, but it's not really more intuitive for…

this resonates with me.. I fell in love with python because it made it really easy to write 100 to 1000 like I scripts that I could whip out in no time and make something happen. I still love it for that. But I fell out of love with it working on a large codebase -- mostly someone else's code -- where I felt imprisoned by not knowing the types of most function parameters, what I could do with those types, and what code I could change without breaking other code. The lack of ability to navigate in the way that I can navigate C# or Java killed python for me

I still have to use python though. I make an effort to type-annotate everything I see, and python's type annotation features keep improving, but it still often feels like an awkward uphill battle

Post reply on HN