HNHacker News
TopNewBestAskShowJobs

AlotOfReading

15,118 karma · joined June 8, 2017

submissionscomments
AlotOfReading··on Adding Floating-Point Decimals for Fun and Profit
Decimals can bite you in the ass too. Try dividing by 3, or using transcendental functions.

Changing representations isn't a substitute for the numerical analysis you should be doing for financial calcs.

AlotOfReading··on EDG C++ front-end goes public
I'm surprised it was using EDG. My memory of green hills is that it would regularly crash on valid C++, to the point where I assumed it could only be a shitty homegrown implementation.
AlotOfReading··on U.S. postal inspectors shut down website selling counterfeit postage labels
Rhetorical question aside, federal elections use voter rolls that identify each potentially eligible voter and actively monitor for issues like double voting. There's no "forever stamp-holder" roll for the USPS to check.
AlotOfReading··on 12,000-year-old Göbeklitepe burials explain scattered bones
We know of many, many cultures that have buried remains under house floors as ritual practice. Sometimes our "common sense" isn't a reliable guide to distant cultures.
AlotOfReading··on Writing Efficient C++ Code (2013)
To summarize, the grandparent comment lamented how it's sad that the modern language has diverged from the code in the article. Someone else pointed out that the code still works. I suggested that the complaint remains valid in spite of that because the language committee's core guidelines prohibit it. Notice I haven't mentioned my opinion at all.

You've responded to that suggestion with seemingly irrelevant comments. Do you see why I'm confused?

For what it's worth, my actual opinion is that the committee is usually wrong/misguided.

AlotOfReading··on Writing Efficient C++ Code (2013)
Okay? The point of the guidelines is to document principles the committee's thinks "good" C++ should follow, within the much larger universe of possible C++ code.
AlotOfReading··on Writing Efficient C++ Code (2013)
Shot in the dark, but maybe the OP is referring to the fact that these code conventions are explicitly discouraged by the C++ core guidelines. The SoA example falls afoul of the rule requiring T* to be used only for singular object pointers, for example.
AlotOfReading··on We Should Be Able to Change Our Languages
An example DSL I wrote implements a prolog subset inside an imperative language (C++). Can you imagine the confusion a poor junior would have the first time they look at a file and it's all logic programming? It's hilarious, but definitely not a sledgehammer to be used lightly.
AlotOfReading··on What is the size of Yemen? (2024)
These kinds of issues have existed since the first human started recording what they owned, and will probably continue plaguing us until the last one dies.
AlotOfReading··on Japan moves to tighten rules for foreigners
Essential services disappear all the time. Look at the increasing rarity of teachers and the effect that has on student/teacher ratios or quality. Same with medical staff, farm labor, and dozens of other industries.

I'm not saying that exploiting immigrants for labor is necessarily good, but the free hand of the labor market doesn't usually achieve policy goals.

AlotOfReading··on Understanding the Impact of LLM Watermarking on AI Agent Behavior
Accepting your analogy at face value, it's still not obvious to me that fixing a specific seed doesn't change things.

Take a recurrent PRNG for example. A randomly seeded recurrent function usually has degenerate cycles in its state space. For some functions, this might even describe the majority of the state space. This is why so many non-cryptographic PRNGs are max-cycle, so a different starting point is just further along the same trajectory.

I don't think LLMs have quite the same failure mode here, but recurrence + high dimensional spaces triggers my "here be dragons" sense.

AlotOfReading··on Federal judge orders Texas to air condition all prisons by the end of 2029
You can scarcely throw a stone in Phoenix without hitting an old pueblo. I don't see why continent-wide demographics have any relevance.
AlotOfReading··on Federal judge orders Texas to air condition all prisons by the end of 2029
Bits of Mesa that are now extremely low density suburban development were at one point large Hohokam pueblos. It's not an entirely fair comparison because it's essentially comparing high density midrise apartments to some of the least dense suburban sprawl in the US, but it's not wrong.

At a more regional level, the area around Cortez, CO is less densely populated than it was simply because virtually no one lives there now. Kayenta, much of the Navajo nation, the upper Gila region, etc are similar.

AlotOfReading··on Federal judge orders Texas to air condition all prisons by the end of 2029
Not really. The precolonial southwest was fairly densely populated, with some areas exceeding their modern density. Population density grew sparser for various reasons after the mid-14th century until Spanish colonialism created some dramatic demographic changes. The southwest remained a pretty lawless place on the frontiers of empires where armed conflict was commonplace for the next few hundred years, until after the turn of the 20th century. Would you want to move into a civil war even if it had AC?

AC was coincidentally invented as all of this was clearing up, but it wouldn't become ubiquitous until decades later after the major cities had been established with large populations. And even then, I'd blame cheap accessibility of long distance transportation more than AC for the modern state.

AlotOfReading··on Google’s Project Suncatcher to put ML infrastructure in space
Imagine you have two blackbody radiators with the same bulk properties, except one has surface area shenanigans like aerogels. In the far field as a whole, it seems like both should radiate essentially the same regardless of the internal details. You can shape emissive direction, or improve efficiency of non-ideal materials, but even ideal materials don't fix the issues pointed out by the parent.
AlotOfReading··on White House Says Access Is a 'Privilege' in Court Filing Defending Media Ban
There's perfectly legitimate ways to argue against the existence of natural rights (see Bentham), but this strawman ain't it.
AlotOfReading··on Comma's hands-off driving tech under investigation after 2 fatal crashes
You can do whatever you want to your car in the US as long as it remains roadworthy, which is basically compliance with FMVSS and state laws. Want to guess what rules don't have much to say about driver assistive technologies?
AlotOfReading··on Comma's hands-off driving tech under investigation after 2 fatal crashes

    Otherwise they would have the appropriate insurance, like any company that trades in any dangerous business.
What is "appropriate insurance"?

As far as I'm aware, virtually every state with an AV pilot program requires insurance (either commercial or self-insured, as typical for commercial vehicles) in order to be permitted. Several major markets (e.g. California) also require an additional bond to cover issues and have a gradual expansion process to better understand unknown risks.

AlotOfReading··on Comma's hands-off driving tech under investigation after 2 fatal crashes
Humans have a remarkable ability to be apparently cognizant and engaged with tasks, without actually using higher level awareness. One example of this is distracted driving while talking handsfree or lost in thought.

Driver monitoring is better than nothing, but it's not the same thing as an engaged driver.

AlotOfReading··on 'We hacked the FBI:' Hackers say they have data on all FBI employees
I've yet to see any form of certification or paid code review I'd be willing to bet critical infrastructure on. And working in safety critical software, that's not for lack of trying. Good review is usually harder than building a working system and the asymmetry of offense and defense applies to anything you miss.
AlotOfReading··on More floating point alternatives

    floating point arithmetic, as used today, foregoes determinism, and this results from the very ethos of the foundational IEEE754 data type
This was somewhat true in the past, but the situation has been improving dramatically in recent years to the point where FP determinism is completely feasible. The remaining hurdles are primarily on the toolchains/kernel side. I have a library called rfloat that you can drop into most C/C++ code for practical determinism without thought (subject to documented caveats), for example. You can do the same thing manually with some more careful attention.

I'm in a very remote corner of the world on bad Wi-Fi though, so you'll have to forgive omitted links.

AlotOfReading··on More floating point alternatives
A neat trick many people aren't aware of is that you can treat binary floats as saturating fixed point, subject to some qualifications (generally the next larger float type can represent any given fixed). Float operations internally are "just" fixed point ops with some normalization steps and rounding bits on each side, so if we use a float type with enough mantissa bits to hold the fixed point value all we have to do is mask off the extra precision to get back to fixed point. This similarity to fixed point is exploited in some modern NPU hardware by storing only one exponent for an entire block of floats, with a wide fixed point unit doing the actual work, a.k.a block floating point.

This hack has some interesting advantages. Float to integer is still only a few cycles, the masking is one line of libm functions, you get better (and dynamically selectable!) precision, it has gradual underflow and overflow, you can write numeric code like usual, and normalization is automatic.

AlotOfReading··on More floating point alternatives
Floats are deterministic, but I get what you mean. Let's discuss what's meant by the result of a complex calculation. 0.1+0.2, or sqrt(2), or whatever.

1. Do you want your result to exactly encode the answer without rounding error? No fixed precision type can provide this in general, so you're stuck with symbolic approaches. If you can bound things (usually difficult), maybe you can get away with non-symbolic approaches.

2. Do you want a sensible numeric answer? This is what floats (and many other systems) give you. The definition of "sensible" is inherently tricky here and there's not a definition universally appropriate to every possible computation.

So let's return to 0.1+0.2=0.3000...1 specifically. There's two common ways to think of an encoded float. One is as the directly encoded value, as you're doing. Another way is to think of it as an interval of real numbers between the next lowest and highest intervals. Under this latter interpretation, it makes sense to discuss shortest decimal string within the interval, 0.3 in this case. There's no ambiguity because each real lives in exactly one interval. This is what algorithms like dragon box do for float to decimal string conversion.

What decimal floats give you is an encoding that tracks significant digits, where every decimal string exactly corresponds to a midpoint of an interval of reals. They do this at the cost of space, speed, and complexity. You don't get an escape from the fundamental issues of fixed precision types like rounding error, numerical sensitivity, precision loss, etc. I don't think that tradeoff makes sense for most algorithms in most contexts.

The benefit of sticking with floats is that lots of smart people have spent countless hours trying to give non-experts a "good enough" path through the untamed wilds of numerical analysis, tooling to help them when they get lost, tribal knowledge to point out the edge cases, and it's almost universally supported in hardware. By all means you should go wandering off the trail, but fully understand what you're doing and why beforehand.

AlotOfReading··on More floating point alternatives
Usually, if you know enough about your algorithms to select an appropriate float alternative, you also know enough to fix your float code and that's what you should actually do.

That said, some of these aren't alternatives. Symbolic computation is a different thing entirely. Interval arithmetic can be built atop floats (e.g. IEEE-1788) and has its own zoo of unintuitive behaviors. BCD is better called a historical artifact than an alternative these days.

It's really just rationals and decimal floats in this list, which probably don't solve the issues you have if you're considering float alternatives.

AlotOfReading··on MiMo v2.6
This is a thinly disguised broken window parable.

If everyone goes around mowing lawns for each other, the economy is richer in lawn mowing at the expense of all the other things that would have been funded had everyone mowed their own lawns and purchased different services instead.

AlotOfReading··on Adversarial examples for fast hash functions
Most non-CS hashes should have two parts:

1. A permutation that does as much as possible of the actual bit-mixing and

2. The simplest compression rule possible, though combining can be tricky.

Good permutations are much easier to design than good hashes, and one of the main ways hash functions are used is consuming integers smaller than the state space. May as well take advantage of provably ideal behavior.

AlotOfReading··on Singapore’s National Library Board offers micropayments to build reading habits
My middle school had a reading program where the monthly winner would get a book of their choice from the scholastic catalog. This was a very enticing prize to a poor, voracious reader like me.

After winning my way through the Hobbit/LOTR series, they changed the rules specifically for me to require oral exams on each of the books I was reading, and later book reports. I was eventually banned completely so there could be an actual competition.

AlotOfReading··on Microsoft, OpenAI lose fight to hide internal docs admitting scraping is theft
You only have to assume that some instances of piracy would have led to an actual sale and adjust the lost present value to p*price on average.
AlotOfReading··on Why I didn’t sign the Fields medallists’ letter
Reminds me of Michelson's (of Michelson-Morley) famous statement in 1900 that all of physics had essentially already been discovered, so the only remaining work was to apply what was known to new experiments. Similar statements were made about chemistry after Mendeleev and history after the cold war.
AlotOfReading··on Microsoft, OpenAI lose fight to hide internal docs admitting scraping is theft
There's deprivation of future value and deprivation of present value. The owner can continue to sell a digital apple, but it's not clear to me that "theft" inherently deprives the owner of future value. For example, I could steal your car for a night of joyriding and return it unharmed the next day. You might reasonably say that a theft occurred even though you retain the car afterwards. Note that I'm aware this example isn't perfectly analogous to digital goods.
Page 1 of 34Next →