HackerLangs
TopNewTrendsCommentsPastAskShowJobs

wpollock

338 karmajoined 3 года назад

comments

wpollock
·5 часов назад·discuss
The title of this post reminds me of a favorite quote "Write code as if the next person to maintain it is a homicidal maniac who knows where you live!"
wpollock
·3 дня назад·discuss
Car: You look tired. There's a motel in 3 miles.

Car: You appear to be suffering from acne. Try Zit-away, available at the convenience store in 2.4 kilometers.

Car: Facial recognition failed. Car is now disabled. Contact your car dealer to reenable vehicle.
wpollock
·11 дней назад·discuss
> Should be using strcpy_s or strncpy_s

These functions are optional in the C standard and not always present. AFAIK, they are not included in glibc as of 2025.
wpollock
·11 дней назад·discuss
TIL! Thanks!
wpollock
·12 дней назад·discuss
Stéphane (not "M") Chazelas is a genius. I have written him several times over the past 30 years, encouraging him to write a book about shell, POSIX, and other topics that he is an expert in. He writes very well too. I fear we will all be the poorer if/when he retires.
wpollock
·12 дней назад·discuss
This article is a bit misleading. Linux kernel programming uses C, but not the C standard library and never has. The string functions discussed here are "helper" functions included in the kernel and are not part of the standard library.

The C standard library doesn't have strscpy or the others; it still has strncpy.
wpollock
·23 дня назад·discuss
One point of clarification: with git, "global" means per-user, not "machine-wide. (I never understood why "--global" wasn't better named, maybe "--user".) That's why these pathnames are in a user's home (the "~" means the current user's home directory).

Machine-wide configuration is called "system" in git, and generally lives under "/etc".
wpollock
·27 дней назад·discuss
> There are laws in place forbidding government agencies from merging together datasets.

This is an excellent point. In my opinion, such laws are a good idea. Most of the time, policy decisions should not require IRS data. (Or other personal data.)

But to get around such laws, the government asks citizens to provide that data a second time (in the census). And sometimes it's asked yet again on other forms. This seems to defeat the purpose of those laws.

I can see that federal disaster aid might need to know if some area needs more or less aid, depending on the wealth of the area receiving aid. If aid is given to individuals, the have a need to know the individuals' income.

When there is a reasonable need to know, I would prefer the government use the much more accurate IRS data, rather than ask for people's income multiple times. The laws preventing merging federal datasets could be rethought, given what is now known about preserving privacy mathematically. I would like to see specific exemptions made, with the provided data properly anonymized to preserve privacy while serving the legitimate purpose for which the data was requested. The use of such data should require a request to congress for it.
wpollock
·28 дней назад·discuss
> Are you saying the census shouldn't collect any data that people wouldn't be comfortable publishing? Because that's a recipe for a census that is far less useful for helping the country make useful decisions.

I'll say that. The state representatives should provide congress and the president any data needed to inform policy decisions about the people they represent. And as others have pointed out, other departments and agencies (such as the IRS) have most of the rest of the data required to make policy decisions.

Except for gerrymandering purposes, I fail to see why income, party affiliations, etc., is useful for the purpose the census was created for.
wpollock
·в прошлом месяце·discuss
The Sahara desert. It's not only repetitive but it repeats itself too as well.

These gems are brought to you by the department of redundancy department.
wpollock
·в прошлом месяце·discuss
One of several reasons to partition a large volume into smaller ones. At least, back then.
wpollock
·в прошлом месяце·discuss
For what it's worth, in the U.S. at least you can connect to your local library with an app named "libby". I used this frequently on my Android phone to download books and magazines, and you can connect with the InterLibrary Loan system too. My use of the public library is much, much higher than before, when I had to travel to the physical library branch to check out books or read magazines.
wpollock
·в прошлом месяце·discuss
I wonder how many readers realized your joke here. For the ones who didn't, the 4-byte "magic number" that identifies Java .class files, in hex, spell "CAFEBABE".
wpollock
·в прошлом месяце·discuss
This. Today, well-meaning doctors cannot spend more than 5-10 minutes between seeing patients. Medical shows on TV show teams of physicians working on one or two patients per week. The reality in my part of the world is that each doctor sees 10 or so patients each day, and are not available for phone calls. (Even in 2026 my parents can reach their doctors by phone, and they spend the time to chat. But they are in New York and I live in Florida. )

I have seen my current PC doctor for 25 years now and he knows me well enough to spot significant changes. But he's retiring in a few months and I have no idea how to find a new doctor. My current doctor has no recommendations for me. (I'm not asking here for any if that's what this sounds like.)
wpollock
·2 месяца назад·discuss
> Do you know how to operate a punch card?

I remember! You created a control card, with tab stops and other controls, wrapped it around a control drum, and then had an easy time punching your source FORTRAN!

I just looked and found my old control drum, in the back of my junk drawer. But I can't find an old punch card machine in there, most have lost it somehow.
wpollock
·2 месяца назад·discuss
Very nice write up! I am a fan of Rust and have little exposure to Go. That said, a couple of very minor points:

cargo audit is not built-in, it is 3rd party. (The comparison table near the top isn't clear about that, and the following text stating more is built-in for Rust than for Go might be confusing. I would suggest adding an asterisk to mark built-ins in that table.)

cargo watch has been in "maintenance mode" for some time. The author of that suggests cargo bacon instead.
wpollock
·2 месяца назад·discuss
> Typescript is only a linter...

I never thought of Typescript (TS) that way. I believe TS is a language addition that enabled smarter JavaScript linters; TS is not a linter program per se.

However, TS is more than that now. The extra annotations enable optimizing transpilers and even compilers (to WASM, for instance). This makes TS much more than just a better linter; I think of TS as a better language.
wpollock
·2 месяца назад·discuss
> Theres no reason to ship TS to an end user browser.

As things are now, developers write code in TypeScript, then debug and update code in Javascript. It might not be much of a reason, but a single language throughout is surely easier on developers and maintainers.
wpollock
·2 месяца назад·discuss
> Because "it doesn't exist". It's just a layer on top of js, ...

C++ was originally a layer on top of C. The first C++ compiler, "cfront" was actually a transpiler to C.

There is nothing preventing TypeScript from becoming "native" in a similar way.
wpollock
·2 месяца назад·discuss
Long ago, I had the insight that not all users are equally technically proficient. Some had the chops to fix some problems if given sufficient information. Other users would be confused with too much detail.

I was writing code for AT&T (in the 1980s), and we were our own customer. So I wrote the error routines to check an environment variable and provide different error messages for different types of users: developers, testers, and a few power users got very detailed error messages, ordinary users got friendly, simplified messages (and weren't told about the environment variable).