Because every Python object also contains a reference count (which needs to be modified whenever the object is passed around), a `const PyObject*` is effectively useless.
This special casing just had not been implemented yet. But as it is an interesting optimization, more so with multi-interpreter or no-GIL Python, the developers will actually introduce immortal objects in Python 3.12 to avoid counting references on some objects (PEP 683 has been accepted):
Anyone who does any basic algorithmic CS stuff would have been exposed to sorting algorithms, their variations, sorting networks and so on.
There are already superoptimizers who use genetic algorithms to find the most optimal code sequence for small easily verifiable tasks. That is also a form of reinforcement learning in a way
We lived on only solar power for 7 years. For the last 2 years if I hadn't had my precious Honda GK200 petrol/kerosene generator, it would have made it quite impossible to use a desktop computer effectively. My whole successful career of 20 years as a software dev might have got upset,
Betting on solar is a silly idea. Its just a way for oil companies to keep shipping baseload
But climate change measures are all hypocritical and unscientific
1) The Carbon credits system
2) Forcing developing countries to reduce their energy usage, while still maintaining the Petrodollar. Sucking up to oil states and keeping the dollar strong at all costs
3) Controlling nuclear tech and restricting it from those who need it most
4) Blaming India and China for overall energy use while using 2x to 10x per capita energy
5) Pushing the foolish adoption of wind and solar which are just going to help oil companies always sell you base load
6) Shutting down existing nuclear reactors, not building new ones (looking at Germany here especially and the US)
7) Making stupid laws like rationing power
8) Blaming cryptocurrency as a bogeyman
So IMHO - if you're worried about climate change, it's legit, but whatever the US and EUs reactions to this has been a complete farce. So if you want to be heard as a scientist, maybe some criticism of the way in which its being handled is due
One viable alternative, that would not require extra building, is to change how hydro power is used. Instead of running it semi-continuously, run it as the counterpart to solar and wind instead of fossil fuels. So in the day it does nothing, while at night it runs at higher capacity that usual.
That I will agree with. Much of the problem is that most of the people who support doing something (voters, not scientists) have bought into the small-is-good hysteria. Nuke is inherently big. Politicians unfortunately respond to voters over science.
I asked ChatGPT about a very subtle python bug - it had to do with how python default params are actually mutable and will retain their mutated values across invocations.
I'd forgotten about this weirdness, but ChatGPT explained it.
I also managed to get ChatGPT to write two pieces of fairly complex C++ boilerplate - one was a std:vector that used mmap() and mremap() to grow linearly rather than by a fixed factor (also avoiding memory copy on resize)
Then I made it write a vector whose iterator was an integer index rather than a pointer.
I made it write all the unit tests and benchmarks for these and it did everything correctly except not knowing that munmap() needs the size parameter rounded to the nearest page.
Obviously I hardly managed to get everything correct on a single prompt. It took an iterative conversation and successive refinement