this also why Elon wants to buy twitter, besides the issue of free speech. it means PR for his companies.
What do you think Elon's shenanigans are exactly?
~2x memory looks like a naive implementation of just allocating an std::string from heap for each line. Due to heap fragmentation and various overhead it would quickly blow up.
~1x memory looks like just reading the entire file into RAM (that would still be slow).
A truly efficient implementation would never need to load the entire original file in RAM. It would just need to remember the binary offset of each line in a way that combines random access and reasonably fast insertion/deletion (e.g. K-fold trees). You can even keep everything beyond the top-level directory in an temporary on-disk file, so your RAM usage could be less than 1MB with nearly instant performance.
The efficient implementation is tricky, error-prone, and involves handling a solid amount of corner cases, which is beyond the amount of hassle a typical hobbyist developer is willing to go through.
Looks more line Qt's internal UTF-16 encoding in this case.
Halfway down, some controversy is mentioned:
> “Waste-to-energy prevents proper recycling and makes climate change worse.” Vahk is also skeptical about the plants’ safety. “Our recent report found high levels of persistent organic pollutants like dioxins or furans around waste incinerators in three countries.”
And Sweden imports trash to burn, raking in $100m/year in doing so.
I'm not at all against trash incineration, especially if they are capturing the energy, but there a many incentives (financial and feel-good) to paint it one way or another. It's simply a series of tradeoffs that we should be cognizant of.
I'm also not particularly against landfills, which are in a sense merely a form of carbon and pollutant sequestration. Not mentioned in the article is that many landfills also trap that methane gas and then burn it to do more or less the same energy reclamation process, and that this is potentially less energy intensive and less pollutant intensive, since they are not burning plastics etc. It would be nice if they had a comparison.
Tradeoffs everywhere.
Dead Comment
Q: This barcode scanner has a million options, how do we configure them?
A: By showing configuration barcodes to it!
Aren't they just USB HID (previously: serial) devices that literally just output key codes for the numbers detected?
[0]https://www.inf.ed.ac.uk/teaching/courses/pi/2016_2017/phil/...
It's like saying variable font sizes are inherently bad because due to them, contracts can have small print sections.