Live data from Hacker News

I'm switching to Python and actually liking it

cesarsotovalero.net

151–160 of 718 posts

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

#151
post #47

Earlier quoted context omitted.

This hasn't really been true for a while now. `uv` has radically improved the experience.

For the last 20 years that has been the mantra. Some X "solves" all the problems. Except it doesn't. It just creates another X that is popular for a while, and doesn't somehow retroactively "fix" all the chaotic projects that are a nightmare to install and upgrade. Yes, I understand people like Python. Yes, I understand the LLM bros love it. But in a real production environment, for real applications, you still want…

I think that's true until it isn't, and people are really rallying around uv.

Here's to hoping it manages to actually solve the Python packagig issue (and lots of people are saying it already has for their use cases)!

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

#152
post #46

I'm glad someone else discovered they can like python. I got forced to learn it for a project where I was proposing Ruby and the customer insisted on Python. This was years ago when Ruby was much slower. I was annoyed but I got used to it and here I am enjoying it many years later. I take issue with the description and use of make though! :-D What is the point of it if you're not going to use dependencies? One might…

> One might as well just write a script with a case statement.....

I started with this and evolved into simple flat Makefiles, because they're basically the same but Make feels more standard (there's a Makefile here vs. there's a random bash script here).

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

#153

I love writing Python. However, there are caveats: 1: I don't like dealing with language crossing boundaries with it - it's painful, especially if to/from a compiled language - there's just too much friction. It's easy to write but hard to maintain . 2: Debugging python can be...painful. If you have a pure perfect environment dedicated to pure python and all the tooling set up, it can be breezy. But if you have somet…

I've long lusted after a smooth debugging workflow writing Cython that would let you seamlessly debug between Python and C/C++. I think there are some hacks to do it, but nothing really well integrated.

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

#154

Earlier quoted context omitted.

How do you know that it is not the reason or not ONE of the reasons? Seems pretty reasonable to me to use ChatGPT, Claude, or whichever one supports it. I am pretty sure some people (maybe this individual, too) may be using Python because their scripts can be executed in a sandbox on one of these websites. Heck, if it was as good at Factor or Forth as it is at Python, I would be writing more of them, too. In any case…

I read your initial message, now edited, as this is THE reason. Of course it can be one of the reasons for which the author chose Python. Also the vibe coding part gave me the impression that you were implying that people that use/chose Python for AI are all vibe coders which is again false. Sorry if I misunderstood you, but this is what I got from your initial message.

No worries. I think there was a misunderstanding because even with my original message, I did not intend to suggest that people who use or choose Python for AI are all vibe coders, or at least I didn't think I did hint at that.

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

#156
post #80

Just a small note on the code in the linked script: API_KEY = os.environ.get("YOUTUBE_API_KEY") CHANNEL_ID = os.environ.get("YOUTUBE_CHANNEL_ID") if not API_KEY or not CHANNEL_ID: print("Missing YOUTUBE_API_KEY or YOUTUBE_CHANNEL_ID.") exit(1) Presenting the user with "Missing X OR Y" when there's no reason that OR has to be there massively frustrates the user for the near zero benefit of having one fewer if statemen…

Even better is to try to fetch all the env variables and then report on all of the missing ones.

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

#157

"And guess what's the de facto programming language for AI? Yep, that sneaky one." Is this referring at all to to PyTorch. If not, any guesses what the author has in mind "Not only because the syntax is more human-friendly, but also because the Python interpreter is natively integrated in all Unix distros." Is this referring to GNU/Linux. UNIX (UNIX-like) includes more than Linux; some UNIX distributions do not inclu…

[deleted]

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

#158
post #68

Earlier quoted context omitted.

wheels, conda, docker, firecracker, unikernel, flatpak

flatpak, docker ? i.e. include an almost complete distribution just to make one package work? but what if you want that package to work in the distribution you have now? What if you need 2 different packages that are in different flatpacks or different docker images?

Set them up, each in its own container, and use GRPC to communicate between them...

(Not even kidding, I've seen people do this)

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

#159
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 3 Ps made history. According to programmers from 20 years ago, they were like religions. Each had its own philosophy and a loyal group of followers crusading online, getting into heated debates, all trying to win over more adopters. The new generation of devs is more pragmatic. These days it's less about language wars and more about picking the right tool for the job.

I feel like the religious wars aspects of this is completely overblown. The conversations around languages really hasn't changed all that much in the last 20 years. Look at the way you see things happening in HN, heck even in the comment thread right here. It's the exact same kinds of discussions as happened back 20 years ago, with exactly the same kind of pragmatism.

I think the gulf comes about from the fact that the primary sources are conversations occurring between people that are largely anonymous behind an online handle, interacting with people that aren't face to face. There's always been an element of exaggeration in the interactions. What might be a "Umm, no" with a maybe a shake of the head, becomes "Your mother was a hamster and your father smells of elderberries". Almost every party involved comes to recognise the particular cultural quirks (which varied from forum to forum) and how to translate what was said, to what was actually meant.

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

#160
When did Python go out of fashion? This is the second article I've seen talking about it as if it's some kind abomination.

I get that it's not the shiny new thing, but I don't understand people hating on it. Is this just junior devs who never learned it, or is there some new language out that I missed? (And please don't tell me Javascript....)

Post reply on HN