News for hackers. Stuff that matters.
Re:Let's Remove the Global Interpreter Lock by wiremine on Monday August 14, 2017 @11:17AM (#15009232)
> We estimate a total cost of $50k...

Just looking at it from a financial perspective, having a great Python interpreter that doesn't have a GIL seems like a no brainer for $50,000, and it creates another reason why people should take a look at PyPy.

Side note: if you haven't looked at PyPy, check it out, along with RPython

https://rpython.readthedocs.io/en/latest/

Re:Let's Remove the Global Interpreter Lock by chubot on Monday August 14, 2017 @01:23PM (#15010479)
Who uses PyPy? I have been hearing about it for so long now, maybe 10 years. And I have been programming in Python almost full-time for 14 years.

But still I don't know anybody who uses it? It seems like the C extension API is still an issue, or am I mistaken?

Re:Let's Remove the Global Interpreter Lock by est on Tuesday August 15, 2017 @01:25AM (#15015735)
we run a large scale sockjs cluster.

Switched from CPython to PyPy, instant 3x performance boost.

Re:Let's Remove the Global Interpreter Lock by andruby on Monday August 14, 2017 @11:23AM (#15009284)
How can they estimate this? What about all the libraries that might not be compatible with the solution PyPy comes up with?

This feels like a number that might in the end blow up to 10x the original estimate.

Re:Let's Remove the Global Interpreter Lock by rguillebert on Monday August 14, 2017 @11:38AM (#15009432)
It's not the PyPy developers' job to make every Python library threadsafe, people writing libraries will have to make their code threadsafe, like in every other language.
Re:Let's Remove the Global Interpreter Lock by taeric on Monday August 14, 2017 @11:52AM (#15009551)
There is a clear difference here, though. Making a change that could lead to poorly written libraries now being broken is clearly the fault of the change. Userspace for these libraries is defined by how it is, not how it was intended.

(And really, was it intended to be dangerous in this way?)

Re:Let's Remove the Global Interpreter Lock by masklinn on Monday August 14, 2017 @12:01PM (#15009636)
> There is a clear difference here, though. Making a change that could lead to poorly written libraries now being broken is clearly the fault of the change.

No, these libraries are already semantically broken in the same way e.g. libraries which didn't properly close their files and assumed the CPython refcounting GC would wipe there asses were broken.

They're already broken under two non-GIL'd implementations.

Re:Let's Remove the Global Interpreter Lock by cjhanks on Monday August 14, 2017 @01:28PM (#15010530)
I agree. Even developers who are well aware of how to write thread-safe code probably don't even bother with mutex locking in Python. That code isn't poorly written... it's just code targeting the implementation.
Re:Let's Remove the Global Interpreter Lock by koolba on Monday August 14, 2017 @12:03PM (#15009668)
No the fault in that situation is a user blindly upgrading PyPy without testing the totality of their software package and its dependencies.

Expecting bad code to magically work forever is unrealistic and hinders progress.

Re:Let's Remove the Global Interpreter Lock by rguillebert on Monday August 14, 2017 @12:45PM (#15010114)
Then just use the version of PyPy with a GIL?
Re:Let's Remove the Global Interpreter Lock by anonacct37 on Monday August 14, 2017 @12:22PM (#15009863)
That's not the concern. Python already has threads and race conditions (although the GIL means that the interpreter itself probably won't get corrupted while executing a piece of bytecode).

What python doesn't have is a C api for extensions that makes sense without a GIL. So ideally a correct threadsafe C extension will continue to be correct, which probably implies that a function called "PyEval_AcquireLock" will continue to provide similar guarantees. Which means that the process for utilizing more cores with pure python code in one process will probably be a gradual upgrade process.

Re:Let's Remove the Global Interpreter Lock by rguillebert on Monday August 14, 2017 @12:43PM (#15010097)
C extensions will still run under the GIL
Re:Let's Remove the Global Interpreter Lock by int_19h on Tuesday August 15, 2017 @02:27AM (#15015984)
Given the amount of C extension code running in a typical large Python app these days, isn't this basically defeating the purpose?
Re:Let's Remove the Global Interpreter Lock by rguillebert on Tuesday August 15, 2017 @08:11AM (#15017434)
It really depends on the use case I think
Re:Let's Remove the Global Interpreter Lock by lemoncucumber on Monday August 14, 2017 @01:52PM (#15010765)
Would you say the Python ecosystem is stuffed to the GILs with incompatible libraries?
Re:Let's Remove the Global Interpreter Lock by joaodlf on Monday August 14, 2017 @11:25AM (#15009311)
This reminds me how the sales/marketing teams in my company typically sell new features: "Not having this feature costs us 50k a month!"

It might as well not be the case here, I just found it funny, 50k is our little magic number.

Re:Let's Remove the Global Interpreter Lock by heavenlyblue on Monday August 14, 2017 @02:25PM (#15011108)
Andrew Godwin had raised £17K out of £2.5K expected in order to implement (I believe excellent) Django migrations that are now part of the official repository: https://www.kickstarter.com/projects/andrewgodwin/schema-mig...

Neither do I think that raising $50K for Python interpreter would be an issue.

PS: I don't find Django an excellent ORM per se. On the other hand it's highly pragmatic, and their implementation of automatically-generated migrations have saved a good chunk of my time.