HNHacker News
TopNewBestAskShowJobs

maxlybbert

1,786 karma · joined August 23, 2013

submissionscomments
maxlybbert··on ISO C became unusable for operating systems development
The standard committee’s position is that if undefined behavior isn’t easy for the programmer to detect, why would it be easy for the compiler to detect?

I’m a little more familiar with the C++ committee than the C committee. The C++ committee prefers to declare something an error than to declare it undefined behavior. They only declare something undefined when they believe it would be unreasonably difficult for the compiler to detect the problem (e.g., using multiple, incompatible, definitions for an inline function; which can happen if you have a macro expanding differently in different parts of the code, or you have multiple definitions for the function, but only one definition is ever visible to the compiler at any moment in time).

I’m pretty sure the “signed overflow is undefined” rule is something of a special case: it should be easy to detect when source code doesn’t have a hard coded upper bound, but giving an error or warning in all cases will create too many false positives, and declaring that it wraps on overflow has been deemed unacceptable by the committee.

maxlybbert··on ISO C became unusable for operating systems development
(Duplicating an answer to a similar question):

The C standard has notes about a freestanding implementation, mainly for developing kernels. The requirements C has for freestanding environments are very limited ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf , you get float.h, iso646.h, limits.h, stdalign.h, stdarg.h, stdbool.h, stddef.h, stdint.h, and stdnoreturn.h) and the starting point for the program is implementation defined; you might get _Atomic, but that’s optional). For the record, C++ goes a little overboard and promises all sorts of things in its freestanding environment.

https://groups.google.com/g/comp.std.c/c/zzyii-DlMiU/m/RnH5i...

maxlybbert··on ISO C became unusable for operating systems development
The C standard has notes about a freestanding implementation, mainly for developing kernels. The requirements C has for freestanding environments are very limited ( http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf , you get float.h, iso646.h, limits.h, stdalign.h, stdarg.h, stdbool.h, stddef.h, stdint.h, and stdnoreturn.h) and the starting point for the program is implementation defined; you might get _Atomic, but that’s optional). For the record, C++ goes a little overboard and promises all sorts of things in its freestanding environment.

https://groups.google.com/g/comp.std.c/c/zzyii-DlMiU/m/RnH5i...

maxlybbert··on ISO C became unusable for operating systems development
It may be unusable for “modern” operating systems (you could write an early UNIX clone with just ISO C because early UNIX didn’t support much).

But that’s basically always been the case. I doubt you could stay within the first ISO C standard and write a modern operating system.

maxlybbert··on ISO C became unusable for operating systems development
I’m amused by the people who ask for optimization and then complain about it. Or the “it did what I said, not what I meant” crowd.

But, officially, undefined behavior is always undefined, not just at higher optimization levels.

maxlybbert··on The Shameful Decline of Scientific American
Every discussion about race seems to include a statement that “race” isn’t a scientific term and has no well-defined meaning. Race seems to be one group saying “those other people are different from us, and we don’t mingle with them.” I don’t consider it surprising for genetics researchers to compare distinct populations that have a long history of staying separate. I certainly don’t believe it’s evidence that the researchers think it’s right for the groups to stay separate; I assume they’re simply interested in the outcome of staying separate.

I’m not even sure that the researchers assume any differences are caused by genetics. I think that’s an important part of the research: what differences exist? what are the causes? can we show some are genetic? can we show some definitely aren’t genetic? what are the outcomes?

maxlybbert··on The Shameful Decline of Scientific American
It’s common for a media company to have a file and even a pre-written obituary for famous people. That way there’s no need to cobble together an obituary hours after getting word that, say, Steve Jobs has died.

I take it that Scientific American didn’t have a pre-written obituary for E.O. Wilson.

maxlybbert··on The Hacker's Diet
I’m certainly no expert. After reading “The Hacker’s Diet” and having some success counting calories, I started reading more about nutrition; but mostly what was in weight loss books. I stumbled across https://www.hockeytraining.com/nutrition/ , which has a lot of information I had never seen since it’s more focused on exercise.

It may not be what you’re looking for since hockey players aren’t trying to bulk up. But perhaps it can give you a good introduction to the basics.

maxlybbert··on Floating point numbers, and why they suck
I remember covering how floating point were stored, but I don’t remember going all that deep into how that affected arithmetic.
maxlybbert··on Lead contamination in hunted meat
There’s a federal ban on using lead ammunition to hunt migratory waterfowl (ducks and geese: https://www.fws.gov/birds/bird-enthusiasts/hunting/nontoxic.... ). I don’t believe there was ever any followup ban on lead for quail, pheasant, turkey, etc., though.
maxlybbert··on Searchable flight logs from Jeffrey Epstein’s plane
I would love to learn the answer to this: if some charges are arguably justified, but others aren’t, can you claim malicious prosecution for the ones that aren’t? I would think so.

Unfortunately, for this specific case, I don’t think it qualifies. The judge only dismissed the charge because he couldn’t write clear jury instructions for it ( https://apnews.com/article/why-did-judge-drop-kyle-rittenhou... ). I think that could be enough to say “we brought the charge because we honestly thought it applied; the confusion wasn’t malice, it was just difficulty understanding a convoluted law.”

I don’t know about Wisconsin, and I don’t know if Rittenhouse has some way to afford bringing a malicious prosecution lawsuit or some other lawsuit against Kenosha. I get the feeling that kind of reaction (followed by a negotiated settlement) is more common in some parts of the country than others.

maxlybbert··on Searchable flight logs from Jeffrey Epstein’s plane
Prosecutors are supposed to bring charges based on “the interests of justice.” I can’t say that they actually meet that standard. They famously bring harsh charges and try to negotiate plea deals. They also famously get creative with how to interpret different laws.

There is the concept of malicious prosecution ( https://en.wikipedia.org/wiki/Malicious_prosecution ), but that only applies when the prosecutor pursues a case without proof of even the basic elements of the crime. If they filed charges that they were incredibly unlikely to prove (which is what I heard from all the commenters on this case: “the prosecution has a hard case to make” or something similar), then they spent a lot of time and money, caused somebody to spend a lot of money for the defendant, etc., but they didn’t cross the line into malicious prosecution.

maxlybbert··on A toaster from 1949 is still smarter than any sold today
I never got the hang of it. If there’s a trick, I didn’t stumble across it.
maxlybbert··on A toaster from 1949 is still smarter than any sold today
I tried to make do without a toaster when I first lived on my own, because I didn’t care enough about toast to get one.

Except, originally, I didn’t get anything else that could make toast, so if I wanted toast, I used a dry frying pan. And, probably because I didn’t have a toaster, I wanted toast a lot more often than I expected I would.

I eventually got a toaster oven, but I almost never used it for anything other than toast. I have a toaster now, twenty years later, and while I realize it’s silly from one point of view, I know it’s not the silliest thing I own.

maxlybbert··on A patent troll backs off
Perhaps the child pressures the parent to change careers. Perhaps the parent pressures the child to “stop watching that stupid show” and Captain Planet’s audience shrinks. I know which one I’d bet on.
maxlybbert··on Open Source Tax Software
Each country has a different idea of what matters for tax purposes. The IRS doesn’t necessarily have all the information that would be relevant to calculate taxes for most people (you have to include that information when you file, so they are in a position to check). They know your income and could probably figure out other wage-earners in the household based on their addresses. They don’t necessarily know all the people you provided more than 50% of their support for the year, or how much you paid on interest for mortgage payments (assuming you pay a mortgage), or how much you spent on deductible medical expenses, or deductible business expenses, or whether a child was born (presumably you’re paying 50+% of the baby’s expenses) and which month that happened, or whether somebody moved out and you no longer pay 50+% of their support, etc.

The IRS does a terrible job with the information it does have. One year, I had a typo in my daughter’s social security number. The IRS sent me a note that her number didn’t match the previous year’s return. I assume that they believed the previous year’s number was right, but instead of saying “we’ve amended the return by using the social security number that appeared on last year’s return,” they said “we’ve amended the return by removing that dependent and recalculating taxes; if you disagree with your higher bill, you’ll need to send us the following paperwork with the correct social security number” (of course, “correct” meant “the number we already have on file” more or less, but I had to figure out what that number was by looking at my own copy of the previous year’s return). Luckily, the previous year’s number was correct; otherwise I would have had to amend the previous return and then refile the current year’s.

maxlybbert··on Pandora papers: biggest leak of offshore data exposes financial secrets of rich
The argument (with sales taxes) isn’t usually that they don’t let you soak the rich but that they’re too hard on the poor.

Almost by definition, somebody living paycheck-to-paycheck is spending all their income. So their sales tax bill is going to be basically whatever the sales tax rate is applied to their income (e.g., a 7% sales tax rate applied to all of their income). Somebody who saves some of their income isn’t spending that portion, so in a year their sales tax bill will be smaller than the sales tax rate (e.g., if they save 10% of their income, then they’re only paying sales tax on the 90% that they spent). You could say this isn’t hard enough of the rich, or it’s too hard on the poor. Usually “too hard on the poor” is an easier argument to make.

There are solutions, such as exempting food or other necessities (the poor probably spend a bigger portion of their income on food, so exempting food helps them more), or adding a luxury tax on things that the poor don’t buy, etc. Of course, then there’s an effort to define what should count as a necessity or what should count as a luxury. When I was a teenager, California sales tax did not apply to packaged food, but did apply to food bought at a restaurant. But there were exceptions to both of those cases: there was a snack tax that applied to some packaged foods (the list changed each year) so that some packaged foods were still taxed; and packaged food sold at a restaurant was exempt (I worked at Cinnabon, hot cinnamon rolls were taxed, after thirty minutes on the hot plate we let them cool down, refrosted and packaged them and they were no longer taxed; if somebody asked for packaged rolls when we were out, they got hot rolls in the box without paying sales tax).

It’s also true that “income” isn’t always the interesting number. Somebody with a million dollars in the bank and no income doesn’t pay income tax, but they do pay sales tax. Of course, if the money came from wages in a previous year, they paid income tax then. If the money was an inheritance, it might have been taxed but the US keeps changing the details of the estate tax.

maxlybbert··on Minimum wage would be $26 an hour if it had grown in line with productivity
Both my parents were raised in houses that were largely built by their parents. They both have memories of using oil lamps and outhouses for a while due to no electricity and no indoor plumbing while that building was taking place. And the final homes were tiny by modern standards.

That was 1940s and 1950s. I’m often amused by the “manual labor used to pay well enough to buy a house” argument since the houses available at the time were much different than those available now.

maxlybbert··on OSHA to require employers with 100 employees vaccinate or test workforce
It’s amusing how last year people said they couldn’t trust any vaccine approved by the FDA while Trump was president and running for re-election. Now those same people believe those same vaccines will save the world, not because the FDA released more data or that additional studies have proven the vaccines more effective than they were last year, but because there’s a new president.

If your idea of “trust the science” starts and ends with “who’s in the White House?” you have a different definition of “science” than I do.

maxlybbert··on OSHA to require employers with 100 employees vaccinate or test workforce
Side effects from vaccines are rare, but do occasionally happen. Because of the small risk, there’s a government program to pay money to anybody who suffers a serious side effect from taking a vaccine in exchange for granting legal immunity to vaccine producers ( https://www.hrsa.gov/vaccine-compensation/index.html ). So, to answer your question, schools don’t literally require legal immunity themselves, but they do benefit from legal immunity that that the government gives vaccine manufacturers: there’s no need to sue a school for requiring vaccines when there’s a special program to pay out benefits.

Last I knew, COVID-19 vaccines weren’t covered, but apparently I missed some news, since it’s the first thing listed on https://www.hrsa.gov/cicp .

maxlybbert··on It's not a labor shortage – it's a wage and workers rights shortage
One of the recommendations for lowering costs is to reduce turnover. Which you can do by paying more, assuming the higher pay costs less than training new staff.

My point is only that restaurants are famous for having tight budgets. It’s no surprise when restaurant owners say they can’t absorb even small cost increases.

maxlybbert··on It's not a labor shortage – it's a wage and workers rights shortage
Restaurants run the gamut from the dinky places not much larger than kiosks that simply microwave your food on demand to really fancy and expensive businesses. And the dinky places do have higher profit margins, assuming they don’t overstock the place. Of course, people applying for jobs in the dinky places don’t expect to get paid more than people working at fancy restaurants (with slimmer profit margins and higher labor costs).

And that’s not considering people willing to lose money so they can own a coffee shop!

maxlybbert··on It's not a labor shortage – it's a wage and workers rights shortage
> I don't understand it, that you'd either

>

> a) be willing to drive your business into the ground serving a limited menu because you won't hire a couple cooks at $20 an hour, or

>

> b) have a business so close to the brink of shutting down that an additional $20-50 an hour will shutter you.

Restaurants run on notoriously thin margins ( https://upserve.com/restaurant-insider/profit-margins/ ). There's a reason restaurants often fail even in good economic times: even small miscalculations or mistakes can put a good restaurant out of business.

maxlybbert··on I believe California is the dumping ground for America's homeless problem
I believed this when I lived in California. Now I’m not so sure: it is true that people without shelter can easily die in much of the country, but California isn’t the only place with mild winters. Why don’t Arizona, New Mexico, large parts of Texas, Georgia, Florida, Alabama, etc. have the same problem?

Assuming that California will just naturally have a larger homeless population than everywhere else means that nobody will spend much effort trying to solve the problem. Is it possible that California is just unusually bad when it comes to handling homelessness?

maxlybbert··on EASTL: An Alternative C++ Standard Library
EA and Bloomberg happened to make similar extensions to the standard library. Then, when the C++0x revision started, they both submitted proposals explaining their extensions including why they felt the extensions were necessary ( http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n227... , http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n446... ). The approach eventually made it into the standard ( https://en.cppreference.com/w/cpp/memory/memory_resource ).
maxlybbert··on EASTL: An Alternative C++ Standard Library
That is accurate. That general model eventually made it into the standard, because of EA and Bloomberg ( https://en.cppreference.com/w/cpp/memory/memory_resource ).
maxlybbert··on Dollar stores make up nearly half of all new store openings in the U.S.
As Walter Bright mentioned in another comment, they used to be “dime stores” or “five and dime stores.” The dollar store label worked well for several years, but you’re right that it’s hard to sell a lot of merchandise for $1.
maxlybbert··on Dollar stores make up nearly half of all new store openings in the U.S.
Absolutely. When I do my grocery shopping, I occasionally think about how I could get a better deal on something at Costco, but I either don’t have the space or wouldn’t eat it fast enough.

The “they’re paying more per-unit because they’re buying smaller packages” crowd seems to realize this, but they think that the size packages they buy are the correct size, and anybody buying something smaller is being exploited.

maxlybbert··on 70% of San Francisco residents say quality of life has declined: poll
The claim is that before cars, Americans (and I assume everybody else in every other country) crossed the road wherever they felt like it. But that they were slow to catch on to the dangers of doing that with cars on the road, and car companies were worried about laws in car owners, so they lobbied for laws restricting where people could legally cross ( https://www.bbc.com/news/magazine-26073797 ).
maxlybbert··on San Francisco’s Shoplifting Surge
Federal courts generally aren’t overloaded the way state courts are, and federal prisons generally aren’t overcrowded the way state prisons are. But if theft of less than $1000 in property became a federal crime that would certainly increase the number of federal cases and federal prisoners.

There’s also a question of how to shoehorn smaller theft into a federal crime. It can be done — any bank robbery is a federal crime regardless of how much money is stolen — but it isn’t straightforward.

← PreviousPage 5 of 33Next →