Live data from Hacker News

Python 3.12

python.org

61–70 of 344 posts

Re: Python 3.12

#61
post #5

Everything aside, I enjoyed the "And now for something completely different" part.

I don't think political advocacy belongs in an announcement of a Python version.

We should leave it all to monied interests spending billions on propaganda?

Re: Python 3.12

#62

Holy shit, actual multithreading. Never thought I'd see the day, good on the Python team for making such great improvements.

Ergonomic multi-core multithreading is already solved, for me at least, with ProcessPoolExecutor.map(). I wonder what advantages this direction brings to the table.

You will now be able to, in 3.12 run multiple CPython VMs inside the same process w/o having them share state. Previously CPython VM state was spread over a bunch of global variables so you had one GIL per process embedding Python.

For your usecase, eventually that ProcessPoolExecutor.map will be GillFreeThreadPoolExecutor.map and all the cross process serialization shenanigans will go away.

Re: Python 3.12

#63

Earlier quoted context omitted.

For people who downvote Bostonian for his comment, how would you like it if that announcement, say, contained an abortion-related proclamation that you don't agree with? "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context (e.g. the Muslim gang war that flared up in Sweden).

> "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context Neither are a lot of the people who initially advocated for the policies, ie NYC, as we're finding out. Immigration is great. Unfettered illegal immigration is not. It puts pressure on social infrastructure and causes social strife. Look at…

There certainly is an equivalent of NIMBY in Western asylum politics.

A lot of Green/Progressive voters in Western Europe live in affluent neighbourhoods where practical effects of current migration waves are very limited, and often positive (e.g. cheap workforce for your household, but your kids' school does not suffer from any gang activity).

Voting patterns across income groups tend to reflect that discrepancy.

Re: Python 3.12

#64
:) Oh, this is neat! Python 3.12.0 has brought some cool features to the table. I'm particularly keen on the flexible f-string parsing and the performance improvements. The new type annotation syntax for generic classes is a nice touch too. It's always good to see Python getting refined with each release. Looking forward to exploring these new additions...

Re: Python 3.12

#65
post #55

Earlier quoted context omitted.

For people who downvote Bostonian for his comment, how would you like it if that announcement, say, contained an abortion-related proclamation that you don't agree with? "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context (e.g. the Muslim gang war that flared up in Sweden).

Sad, I guess in 2023 sharing isn't caring. It's a statement about immigrants being people, that the hateful stories we tell about them are false that we have responsibility to them as fellow humans. It advocates for no specific political action, you can hold these beliefs and still be against immigration for whatever reason.

There is 8 billion people in the world, with the number increasing still. You will always have to choose whom you feel responsibility towards, because all 8 billion are beyond anyone's capability.

Re: Python 3.12

#66
post #49
post #4

I think the support for isolated sub-interpreters with separate Global Interpreter Locks is the most interesting new feature in python. It is doubtful not the best way to offer some sort of concurrency but still a step closer to maybe one day get rid of GILs.

Since it currently lacks any way to transfer objects between interpreters other than pickling, does it offer any advantage over the multiprocessing module?

Not for pure python code; but there's massive advantages for mixed C(++) and Python: I can now have multiple sub interpreters running concurrently and accessing the same shared state in a thread-safe C++ library.

Previously this required rewriting the whole C++ library to support either pickling (multiplying the total memory consumption by the number of cores), or support allocating everything in shared memory (which means normal C++ types like `std::string` are unusable, need to switch e.g. to boost::interprocess).

Now is sufficient to pickle a pointer to a C++ object as an integer, and it'll still be a valid pointer in the other subinterpreter.

Re: Python 3.12

#67
What are the best ways to utilize PEP 669? I’m always looking for two things: a good “time-travel” debugging experience (PyCrunch-Trace seems to be broken for me) and for a way to generate and view large traces (Firefox Performance Profiler can’t open traces that lasted 2-5 minutes because they're too large)

PEP 669: Low impact monitoring for CPython

PEP 669 defines a new API for profilers, debuggers, and other tools to monitor events in CPython. It covers a wide range of events, including calls, returns, lines, exceptions, jumps, and more. This means that you only pay for what you use, providing support for near-zero overhead debuggers and coverage tools. See sys.monitoring for details.

Re: Python 3.12

#68

Holy shit, actual multithreading. Never thought I'd see the day, good on the Python team for making such great improvements.

Ergonomic multi-core multithreading is already solved, for me at least, with ProcessPoolExecutor.map(). I wonder what advantages this direction brings to the table.

Not needing multiple processes and not having to use slow IPC with serialization for them to talk to one another.

Re: Python 3.12

#69

Earlier quoted context omitted.

For people who downvote Bostonian for his comment, how would you like it if that announcement, say, contained an abortion-related proclamation that you don't agree with? "Share our food, Share our homes and Share our countries" is quite a big demand on everyone else. I am certainly not willing to do so without limit and without regard to context (e.g. the Muslim gang war that flared up in Sweden).

I think the idea is you are welcome to read it top to bottom or bottom to top. Whichever fits your needs.

In context of Python 3.12, neither fits my needs. Wouldn't it be nice if culture wars didn't infect every single attribute of our everyday lives? What this guy did was to spread useless political flamewar from the hell that calls itself social networks to a random professional webpage. Why exactly? Isn't there enough of flamewar out there?

It is positively totalitarian to drag politics into everything. The very meaning of "totalitarian" is that nothing is allowed to remain non-political.

Re: Python 3.12

#70

Earlier quoted context omitted.

Would you feel the same way if it were a cutesy poem supporting an opposing view?

Well it already is. You get to pick which direction you agree with.

If you think both directions are comparable to actual perspectives people have, then it's already clear which perspective is yours.
Post reply on HN