Earlier quoted context omitted.
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…
Wouldn't you also gain some overhead reduction too? Multiprocessing will have more overhead for spawning new processes vs signle process that will contain the sup-interprets? or I am missing something? At least in theory this what would happen.
Python 3.12
81–90 of 344 posts
Re: Python 3.12
#82Ooh, seems there is a new syntax for declaring the types of kwargs [1]: from typing import TypedDict, Unpack class Movie(TypedDict): name: str year: int def foo(*kwargs: Unpack[Movie]): ... Maybe now I'll be able to actually figure out what data to send libraries without actually reading their source code. 1. https://docs.python.org/3.12/whatsnew/3.12.html#pep-692-usin...
Re: Python 3.12
#83Earlier quoted context omitted.
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
#84Earlier 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).
Fortunately you can read it either forwards or backwards to support your views.
Re: Python 3.12
#85Earlier quoted context omitted.
I don't think this is a political advocacy. It's just a personal expression about a social issue. I found the way it was written quite thoughtful, actually, which I respect (though I don't like in its entirety). But I upvoted your comment because I don't think there's a reason for people to downvote your comment. It's absolutely acceptable that someone dislikes the poem and wants to express it here. People confuse th…
If an upvote is for agreement, does downvoting for disagreement not make sense? Or are upvotes meant for something else?
Re: Python 3.12
#86Earlier quoted context omitted.
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.
There is support in the newest pickle protocol for using a shared buffer to transfer data more efficiently, but that would work in multiprocessing [0] just as well as in subinterpreters (and currently isn't implemented in either one).
Re: Python 3.12
#87Earlier quoted context omitted.
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.
I don't know about you but my answer is "the ones standing next to me that I have the means and ability to help sustainably."
Re: Python 3.12
#88Re: Python 3.12
#89Earlier quoted context omitted.
I don't think this is a political advocacy. It's just a personal expression about a social issue. I found the way it was written quite thoughtful, actually, which I respect (though I don't like in its entirety). But I upvoted your comment because I don't think there's a reason for people to downvote your comment. It's absolutely acceptable that someone dislikes the poem and wants to express it here. People confuse th…
If an upvote is for agreement, does downvoting for disagreement not make sense? Or are upvotes meant for something else?
Users should vote and comment when they run across something they personally find interesting
Also: Please don't comment about the voting on comments. It never does any good, and it makes boring reading.
Well... sorry then :-)And final:
Please don't use Hacker News for political or ideological battle. That tramples curiosity.Re: Python 3.12
#90As now f-strings can contain any valid Python expression inside expression components, it is now possible to nest f-strings arbitrarily: >>> f"{f"{f"{f"{f"{f"{1+1}"}"}"}"}"}" '2' Is anyone aware of the change to the interpreter that allows for this?
Why answer your question when I could just brag about how my personal favorite language has supported this for awhile?
/s