Readit News logoReadit News
_pmf_ commented on Fq: Jq for Binary Formats   github.com/wader/fq... · Posted by u/ingve
_pmf_ · 2 years ago
I'd also like to throw https://github.com/WerWolv/ImHex in the mix here.
_pmf_ commented on Do McKinsey and other consultants do anything useful?   economist.com/leaders/202... · Posted by u/pseudolus
_pmf_ · 3 years ago
Responsibility sink.
_pmf_ commented on Tech bubbles are bursting all over the place   economist.com/business/20... · Posted by u/vadertemp
paulpauper · 3 years ago
tesla does not need to advertise, does not need dealerships

this also why Elon wants to buy twitter, besides the issue of free speech. it means PR for his companies.

_pmf_ · 3 years ago
> tesla does not need to advertise

What do you think Elon's shenanigans are exactly?

_pmf_ commented on NotepadNext: A cross-platform reimplementation of Notepad++   github.com/dail8859/Notep... · Posted by u/Acrobatic_Road
john_moscow · 3 years ago
Efficiently handling large text files requires extra special care.

~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.

_pmf_ · 3 years ago
> 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.

Looks more line Qt's internal UTF-16 encoding in this case.

_pmf_ commented on Sweden sends just 1% of its trash to landfills   reasonstobecheerful.world... · Posted by u/imartin2k
simonsarris · 3 years ago
"Sweden burns nearly all its trash, much of it in lieu of recycling" is an equally true but very different sounding headline.

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.

_pmf_ · 3 years ago
"Recycling" means "the landfill is on the other half of the globe".

Dead Comment

_pmf_ commented on Gas pumps happen to be about as insecure as your typical router   myfox8.com/news/north-car... · Posted by u/homarp
myself248 · 3 years ago
Lack of sanitizing inputs. Barcode scanners are hilariously bad, look up "scan tags" for why.

Q: This barcode scanner has a million options, how do we configure them?

A: By showing configuration barcodes to it!

_pmf_ · 3 years ago
> Barcode scanners are hilariously bad

Aren't they just USB HID (previously: serial) devices that literally just output key codes for the numbers detected?

_pmf_ commented on How I learned to stop worrying and structure all writing as a list   dynomight.net/lists/... · Posted by u/Naac
yodon · 3 years ago
If you're leaning towards stripping all your writing down to list form, you may want to read Tufte's analysis on the role PowerPoint (aka writing everything in the form of bulleted lists) played in the Space Shuttle Challenger disaster [0]. I used to write exclusively in bulleted list/outline format until spending time with Tufte's analysis. Now I get that the connective tissue of the document is vitally important to the reader even if it's not important to the writer. If you don't put in the connective tissue, your reader has to do it for you and they'll probably do it incorrectly (leading to, for example, the failure to prevent the Challenger disaster).

[0]https://www.inf.ed.ac.uk/teaching/courses/pi/2016_2017/phil/...

_pmf_ · 3 years ago
In the Challenger case, the bad information has been deliberately hidden within the structure. They could just as well have pulled it up in the structure.

It's like saying variable font sizes are inherently bad because due to them, contracts can have small print sections.

_pmf_ commented on Buffet – An All-inclusive Buffer for C   github.com/alcover/buffet... · Posted by u/Nakili
_pmf_ · 3 years ago
A small set standardized data structures (vectors, maps) would do so much good for C.
_pmf_ commented on What made World of Warcraft's environments so compelling?   erichgrunewald.com/posts/... · Posted by u/erwald
_pmf_ · 4 years ago
For me, The Witcher 3 and Red Dead Redemption had the most compelling environments. I spent probably half of my play time just walking-riding around.

u/_pmf_

KarmaCake day2981January 21, 2013View Original