News for hackers. Stuff that matters.
Re:Zig 0.9.0 by coldtea on Tuesday December 21, 2021 @03:33AM (#29635257)
It seems like every language must have some dumb decisions made because the authors don't care/think they know better/are stubborn/etc or because it painted itself into a hole from the start, without which it would be close to perfect for its use cases.

Python has the GIL.

Go itself has a few such cases (usually revolving around "NIH" and misguided simplicity).

Zig has the prejudice about proper string handling.

Re:Zig 0.9.0 by bvrmn on Tuesday December 21, 2021 @03:54AM (#29635415)
> Python has the GIL.

You are welcome to show fast single-core python interpreter without GIL. Coreteam will gladly accept your patches.

Re:Zig 0.9.0 by kzemek on Tuesday December 21, 2021 @07:17AM (#29636632)
That's how I understand "painted itself into a hole from the start" from the GP - removing GIL at this point is very hard because virtually all of Python language and code has been created in a world with the GIL.
Re:Zig 0.9.0 by bvrmn on Tuesday December 21, 2021 @07:41AM (#29636805)
It's nice to have atomic guarantees of GILed implementation. For me current CPython semantic is a golden middle: you have pretty fast interpreter without race conditions (for huge part of user code). Due to GIL.

I always like to ask for what kind of task one needs GILless python?

CPU bound? If you are using native python code for CPU bound tasks you are already in a bad place. C extensions can release GIL. For example numpy.

What else?

Re:Zig 0.9.0 by kzemek on Tuesday December 21, 2021 @08:00AM (#29636926)
> I always like to ask for what kind of task one needs GILless python?

> CPU bound? If you are using native python code for CPU bound tasks you are already in a bad place.

While I think you may have misread my comment for a value judgement on Python's GIL, I don't see as particularly useful dismissing major potential (multithreaded) performance gains for a slow language just because there's faster languages. Languages that are better in some way - like speed - should stand as a benchmark and a goal, not a reason to give up improvements.

Re:Zig 0.9.0 by bvrmn on Tuesday December 21, 2021 @08:06AM (#29636977)
I'm not against faster interpreter also. It's history now, but IMHO super slow GILless python with Java-esk data races in 199x would not gain such broad community and ecosystem.
Re:Zig 0.9.0 by duped on Tuesday December 21, 2021 @09:37AM (#29637716)
Anything with a hard or soft real-time constraint (audio, video, industrial automation, etc). You'd be shocked how many algorithmic prototypes are written in numpy then hand converted to C++ for realization.
Re:Zig 0.9.0 by bvrmn on Tuesday December 21, 2021 @12:47PM (#29639952)
NumPy releases GIL. I love NumPy myself and created complex interactive realtime synths. It always was more convenient to slap Cython or C code to achieve desired 100x performance instead of getting potentially 10x (4x on my laptop) with multithreading.