Live data from Hacker News

What's up, Python? The GIL removed, a new compiler, optparse deprecated

bitecode.dev

181–190 of 302 posts

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#181

Earlier quoted context omitted.

No, that’s about right. The response, which isn’t technically wrong, is “unless you’re CPU bound, your application should be parallized with a WSGI. You shouldn’t be loading all that up in memory so it shouldn’t matter that you run 5 Python processes that each handle many many concurrent I/O bound requests.” And this is kinda true… I’ve done it a lot. But it’s very inflexible. I hate programming architectures/pattern…

Yes, this is even more the case in languages that are popular with more "applied" programming audiences, like scientific computing. Telling them "no you should be using this complicated DBMS" (or whatever other acronym) is not productive. It tends to get them exceptionally mad because their concern isn't the ideal way to write the code and architect the system, they simply want to write just enough code to continue t…

This stance always rubbed me the wrong way a bit. Effectively, code is one of the tools a researcher uses to do their work. As soon as their work interacts with other people, for example when publishing a purportedly reproducible study or supplying novel algorithms to developers, they have a responsibility to deliver proper work that can be used and understood by other people. This is something we expect of every other profession, yet scientists appear to somehow have no concern for such lowly ambitions.

To be clear, I’m not advocating for data scientists to write production-grade webapps. But I absolutely think they should be bothered to write code that fulfills minimal requirements, is reproducible, documented, and mostly bug-free.

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#183

When it was an in dev project, I felt the consensus on HN was that it was amazing work and a shame that it looked like the steering committee wouldn’t adopt it. Now they have and everyone seems to hate it.

Well these likely will be entirely different groups of people voicing their opinions at different times. I don't imagine those who were enthusiastic about the project originally have done an about-face and now hate it.

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#185
post #14

Historically I’ve written several services that load up some big datastructure (10s or 100s of GB), then expose an HTTP API on top of it. Every time I’ve done a quick implementation in Python of a service that then became popular (within a firm, so 100s or 1000s of clients) I’ve often ended up having to rewrite in Java so I can throw more threads at servicing the requests (often CPU heavy). I may have missed somethin…

You could have just use gunicorn and spawn multiple workers maybe

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#186

Why has the Python community not removed the GIL when migrating from Python 2 to Python 3?

The guy who was smart enough/motivated to do it showed up only a couple of years ago.

That guy shows up every couple of years, almost like a prophecy

https://github.com/larryhastings/gilectomy

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#187
post #26

Earlier quoted context omitted.

People stay on CPython due to the performance of C extensions and the vast ecosystem based on them. The fact that people have stuck with CPython isn't at all evidence that they like the GIL or that it doesn't lead to significant technical problems. Besides the C extension issue, Jython is based on Python 2.7 and IronPython appears to be on 3.4. These aren't serious alternatives.

Not true. They're is GraalPython, which is for Python 3 and supports also native code extensions. https://github.com/oracle/graalpython

What is not true? I don’t see what this is supposed to address in my post. I cited Jython and IronPython because that’s what the person I was responding to mentioned.

GraalPy looks neat, but is experimental/young still. Notably, it has a GIL specifically to be compatible with CPython.

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#188

Earlier quoted context omitted.

That discussion was amusing. Removing the GIL opens up the possibility of actually getting a real performance benefit from multithreaded Python code. That's the value. Given every modern desktop and server is multicore (and increasingly getting to tens of cores if not hundreds), multithreading in Python unhampered by the GIL will be a useful thing. And no, multiprocessing is not a good alternative to multithreading.…

Python is not a language for writing fast code. Python is a relaxed language for things that don’t have to be fast. If you need something to be fast you are supposed to use a C extension and control it with Python - that’s been the dogma for as long as I can remember to avoid exactly this kind of pathological race to performance in a language that was never designed for it. By using Python you are already leaving a t…

[deleted]

Re: What's up, Python? The GIL removed, a new compiler, optparse deprecated

#189

Earlier quoted context omitted.

You have to be much more careful about what you modify when using multithreading, so I'm not sure what you mean by that. A lot of people here mention that sharing data is much easier with multithreading, but doing this without races is not easy. You can't just use the values from difference threads like you would in normal code, you need to synchronize access with locks, which can be difficult to do correctly and can…

[flagged]

I don't mean to pile on to what ghshephard already posted, but I'm afraid you've been breaking the site guidelines repeatedly lately - not just here but these:

https://news.ycombinator.com/item?id=36923922

https://news.ycombinator.com/item?id=36921060

... as well as others. Can you please not do this? We're trying for something different here. If you wouldn't mind reviewing https://news.ycombinator.com/newsguidelines.html and taking the intended spirit of the site more to heart, we'd be grateful.

Post reply on HN