Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

81–90 of 718 posts

Re: I'm switching to Python and actually liking it

#81

Earlier quoted context omitted.

Probably the system of giving special meaning to what are otherwise ordinary identifiers. __ isn't a reserved keyword in Python or anything. But there's a set of conventions you're supposed to follow when naming methods and attributes, and they're visibly artificial. It would be cleaner to make the features that are a special part of the language definition also a special part of the language syntax instead of runnin…

I'm not sure how "operator+" is supposed to be appreciably different from "__add__".

One is a sensible choice a human might pick. The other is not.

Re: I'm switching to Python and actually liking it

#82
post #9

It's funny, I'm the opposite: LLMs have made it easy to draft something in Python, then translate to a more appropriate language for the target problem-domain, for example Go.

Agree . We had training to learn how LLM applications can be developed and it was obviously in Python. Never liked Python but between dependencies issues (the demo project used uv but somehow the author forgot to declare some dependencies which she probably had installed globally) which cost hours of everyone’s time, and the persistent magic going on (pipe operators that do nothing similar to unix pipes, wtf!, puydantic shit just to declare a data type with metadata and lots of things like this) nearly everyone immediately switched to a typed language like Kotlin (they have a nice AI framework) as soon as we got the basics of how things work.

Re: I'm switching to Python and actually liking it

#83
post #79
post #71

Earlier quoted context omitted.

Can you elaborate bit what is the problem here? Is it shape of the characters or something else?

Amazing. If you need to ask this question I am guessing you have spent too long with Python . No other language uses this underscore madness for special methods or otherwise. Because it’s just , I don’t know a more appropriate word for it , stupid.

[deleted]

Re: I'm switching to Python and actually liking it

#84

Earlier quoted context omitted.

Bizarre is that you don’t consider it ugly. Kotlin: constructor is either part of class definition or keyword constructor. Ruby: initialize JS: constructor Python: ______new______, _______init_______ Literally this meme: https://knowyourmeme.com/memes/three-headed-dragon

I have found to believe that ugly and beautiful are irrelevant. As long as it's doing the job and not cause major headaches. Life is too short to worry about syntax.

Right? I'm kind of surprised that a few underscores invoke such strong emotions in people.

Re: I'm switching to Python and actually liking it

#85
post #45

From what I was told, Python was originally seen as a Swiss Army knife for sysadmins. It started gaining more traction when Canonical adopted it as the main language for Ubuntu 4.10 in 2004. Then, in 2005, Guido van Rossum was hired by Google to work on Google Cloud. That opened the door for wider adoption in academia, since Python had strong math libraries and integrated well with tools researchers were already usin…

> These days it's less about language wars and more about picking the right tool for the job You should talk to the Java advocates in my company :) The language wars are still around, it's just Java vs the rest now.

One of my colleagues, a retired programmer who spent 20 years at Microsoft, told my students that it used to be Java vs Visual Basic, until Microsoft brought in the big guns, like Anders Hejlsberg. That's when it turned into Java vs .NET, and things really started to heat up :)

Re: I'm switching to Python and actually liking it

#87
post #73
post #45

From what I was told, Python was originally seen as a Swiss Army knife for sysadmins. It started gaining more traction when Canonical adopted it as the main language for Ubuntu 4.10 in 2004. Then, in 2005, Guido van Rossum was hired by Google to work on Google Cloud. That opened the door for wider adoption in academia, since Python had strong math libraries and integrated well with tools researchers were already usin…

Python's success is entirely due to entry-level programming courses. They all switched to Python, because you have to explain less. I don't think I heard about web servers in Python before 2012. I suppose a 2005 computer wouldn't be able to serve a Python backend smoothly. PHP's popularity isn't really from 2005-2006. It was popular at the end of the 90s, and it looks like JS as much as it looks like a potato.

> Python's success is entirely due to entry-level programming courses.

Yeah, after 2008. And by 2014, it had overtaken Java in many CS programs. But I was referring to the events that led to that.

Re: I'm switching to Python and actually liking it

#88
post #29

Earlier quoted context omitted.

There’s still 20 years of projects using everything that became before uv. They didn’t upgrade the moment uv came into existence. Data science-land still uses other rubbish too.

> They didn’t upgrade the moment uv came into existence. There's also projects that can't use `uv` because it doesn't like their current `requirements.txt`[0] and I have no bandwidth to try and figure out how to work around it. [0] We have an install from `git+https` in there and it objects strongly for some reason. Internet searches have not revealed anything helpful.

Unrelated to uv but the problem with having a git ref in requirements.txt is that pip will treat it as a fixed version so it will strictly narrow the other dependencies it can resolve, which gets exceptionally difficult to reason about once that packages also loads a package from another git ref. Throwing everything into codeartifact (or equivalent on other clouds) is better longterm.

Re: I'm switching to Python and actually liking it

#89
post #45

From what I was told, Python was originally seen as a Swiss Army knife for sysadmins. It started gaining more traction when Canonical adopted it as the main language for Ubuntu 4.10 in 2004. Then, in 2005, Guido van Rossum was hired by Google to work on Google Cloud. That opened the door for wider adoption in academia, since Python had strong math libraries and integrated well with tools researchers were already usin…

The key factor imo was Travis Oliphant merging the competing numeric and numarray libraries into numpy in 2005. That quickly became the foundation of Python as the key environment for open source numeric processing.

It brought across a ton of users from R and Matlab.

Pandas, Matplotlib and ScikitLearn then consolidated Python's place as the platform of choice for both academic and commercial ML.

Re: I'm switching to Python and actually liking it

#90
post #74
post #41

Earlier quoted context omitted.

Technically macOS doesn’t come with Python pre-installed, but it does provide you with a simple path to do it. https://news.ycombinator.com/item?id=44580198 The removal was in Monterey. Catalina and its successor Big Sur very much still had it. Catalina was the one that removed 32-bit support.

I think they realised the security implications, you could just take a random person macbook, open the terminal and launch python3 -m http.server 3000 --directory ~ then on the local network you could download all his files

If you have access to their MacBook and can open a terminal, even `rsync` (which comes preinstalled) would do the job.

It seems much more likely to me they were just tired of having to manage the languages (and being constantly criticised they were behind) and simply chose to remove them.

Post reply on HN