I came up with a kind of clever data type for storing short strings in a fixed size struct so they can be stored on the stack or inline without any allocations.
C++ already does that for short strings while seamlessly switching to allocation for long strings.
It's always null-terminated so it can be passed directly as a C-style string, but it also stores the string length without using any additional data
(Getting the length would normally have to iterate to find the end).
Also the case in the standard library
The trick is to store the number of unused bytes in the last character of the buffer. When the string is full, there are 0 unused bytes and the size byte overlaps the null terminator.
Iirc, that trick was used in one implementation but discontinued because it was against the standard.
(Only works for strings < 256 chars excluding null byte)
If you need a niche for allocated string you can get to 254 but the typical choice seem to be around 16.
While bandwidth will increase, latency won't.
Data centers would be constrained by an unchanging constant of physics, the speed of light. A modern consumer ssd taking 20us to load a page can't be outperformed by a server more than 3km away for swapping (random access, latency sensitive) workloads.
If you want to outsource your stuff to a server, either just do persistent storage or go all the way and send your keystrokes and receive back video.
We need someone strong of character and values, experienced but able to change, willing but not eager to take up the mantle of leadership, someone who knows that their duty is not to build the future themselves, but to empower others to do so and bring together their successes in one coherent vision.
What I'm saying is: Linus Torvalds for world governor!
In my opinion bicycles should not have a high beam, but here goes:
Look inside, do any components look fried?
Can you get the led to light by applying the a low voltage with a current limiting resistor directly to it? If I don't know what to do with the circuit I would probably go outwards from the desired results.
More scientists and inventors, more philosophers and artists, more people that share your niche hobby...
The only people who have a problem with that, are hipsters or just like dieing a preventable death.
I don't know many, so I would go with The preacher and the slave. It's an old but good piece on the intersection of religion and capitalist oppression.
I don't believe you could save the emissions from animal agriculture.
The easiest is to stop converting more land to animals use.
Most animal ag is on land that isn't suitable for growing crops,
But 6% of global emissions are from feeding crops to animals.
if it was ended, the land would become useless
Aside from reducing our emissions by 16%, meaning it would be about as useful as removing all emissions from the transport sector.
and left to go wild where it would support just as many just as polluting animals,
Laughable, but if if it where true it could easily be solved with reintroducing predators and rewilding the artificial grass lands.
but with no possibility of treating the pollution problem as no one would be managing the wild animals
What is more polluting? Animals shiting in the forrest every day at a different place or month worth of stored manure deposited on one field in a day, with barely any plant at the moment? Which of those will naturally break down and which will be washed into the ground water?
Where are the huge amounts of biomass fermenting into methane? Some swamps and every farm.
Menschen haben laut internationalem Völkerrecht das Recht auf Asyl!
Dass heißt, solange hier Recht und Ordnung gilt, dürfen wir sie nicht zurück weisen, sondern müssen sie aufnehmen und ihren Anspruch rechtlich prüfen.
Rust doesn't have a scheduler.
The issue is the false assumption, that the remove operation can safely be done without taking a lock. This can be done in some specific data structures using atomic operations, but here the solution was to just take the lock. The same thing could have happened in a C code base but without the unsafe block indicating where to look for the bug.
So sieht es in Berlin aus: