News for hackers. Stuff that matters.
Re:Friendship ended with the garbage collector by chronial on Friday August 27, 2021 @03:03AM (#28325107)
Which real life experience are you referring to? Go has an extremely fast GC that has minimal pauses. Python still doesn't have "proper" multithreading because RC is too slow.

The problem with rc is not memory access but synchronization.

Re:Friendship ended with the garbage collector by coldtea on Friday August 27, 2021 @05:17AM (#28325742)
>Python still doesn't have "proper" multithreading because RC is too slow.

RC speed is not even close to the reason Python doesn't have proper multithreading.

(The GIL, and API/ABI guarantees to third party C-based extensions making it difficult to remove it, is more like it. The GIL was added to aid in RC atomicity - but it's not the speed of RC that's the issue).

Re:Friendship ended with the garbage collector by loup-vaillant on Friday August 27, 2021 @05:29AM (#28325795)
> Go has an extremely fast GC that has minimal pauses.

Actually, I've heard that Go sacrificed speed big time to minimise its pauses. Garbage collectors generally face a latency/throughput tradeoff, and I believe Go is no exception.

That said, fast GC with reasonable pauses existed long before Go. I personally know of OCaml and its generational, incremental GC. I expect Go built on that knowledge to find its own sweet spot.

Re:Friendship ended with the garbage collector by jlouis on Friday August 27, 2021 @06:05AM (#28325986)
Any memory allocation scheme faces that trade-off, more or less; especially so in a concurrent environment that also employs parallelism.
Re:Friendship ended with the garbage collector by loup-vaillant on Friday August 27, 2021 @12:37PM (#28329888)
Precisely. That’s why I was suspicious of this claim that there is a GC out there that is both "extremely fast" and has "minimal pauses". Something’s got to give.
Re:Friendship ended with the garbage collector by amelius on Friday August 27, 2021 @03:18AM (#28325186)
Has anyone tried to build a transpiler from Python to Go?
Re:Friendship ended with the garbage collector by chronial on Friday August 27, 2021 @03:39AM (#28325290)
There are versions of Python without RC: https://www.python.org/download/alternatives/. There is no doubt that Python would be better off without RC, the problem is that Python extensions rely on RC. So CPython (the main python implemenation) can't just do the switch.

If you want more information about this topic, there is a nice talk by Larry Hastings: https://www.youtube.com/watch?v=pLqv11ScGsQ

Re:Friendship ended with the garbage collector by amelius on Friday August 27, 2021 @04:19AM (#28325485)
Thanks. It seems that the JyNI project is trying to make a bridge between CPython and Jython, so from that I take that it is somehow possible to have extensions which more or less rely on RC (or at least the C API) while you can use a GC (Java's GC in this case) at the same time.

https://www.jyni.org/

Re:Friendship ended with the garbage collector by p_l on Friday August 27, 2021 @03:26AM (#28325223)
Unfortunately, the real test of "is this language proper python" is "it behaves exactly as the horrible bytecode interpreter in PyEvalFrameEx C function".

So it's hard to make alternative implementations that don't die.

Re:Friendship ended with the garbage collector by habibur on Friday August 27, 2021 @05:10AM (#28325708)
Which one would you say is a relatively better bytecode interpreter? I was looking for one.
Re:Friendship ended with the garbage collector by p_l on Friday August 27, 2021 @07:22AM (#28326384)
One that has a spec and test suite for the implemented VM, for starters.