Recent submissions

Comment · 16 days ago
I discovered this algorithm a month ago or so, and have been telling everyone I can about it. I think it’s so damn cool.

My present Rust implementation can keep a sliding window sum of f32 at 300M/s.

Comment · 1 month ago
I assert that onions and potatoes have roughly the same durability and ease of transport.
Comment · 1 month ago
Lettuce and Tomatoes don't keep well, which adds more seasonal variability and reduces the ability of a futures market to smooth prices.

Compare with potatoes, which keep about as well an onions, and are farmed in the same areas. Look at onions and potatoes over a 5-year time span (because the default all-data time span is silly for this). It doesn't give enough control of the Y axis to make the comparison easy - for potatoes it shows me Y=40-320, for a range of 280; for onions it shows me Y=120-440, for a range of 320. This means that potatoes are more "zoomed in" and it's graph will exaggerate volatility relative to onions, but qualitatively, I'd say the potato graph looks smother just the same. This is exactly what economic theory says a futures market should do to the price.

Comment · 1 month ago
No, the problem really is the prefetch itself when there are undesirable side-effects if the bus sees that memory read.
Comment · 1 month ago
Speculative instruction fetches fetch code from "a location that you never asked it to execute code at" by design. If it already knew you asked it to execute code there, it wouldn't be speculative.

The Armv8/9-A architecture reference manual is clear that speculative instruction fetches are permitted in Device memory unless that memory is also marked NX. So if your hardware has side-effects from a certain address, but it maps it as Device non-NX memory, then your code is not "perfectly good and correct". Assigning correct memory attributes is one of the many things needed for correct code.

Comment · 1 month ago
"Speculative instruction fetch to device memory crashes device" is in my list of favorite bugs ever found. I had ran into it on a Cortex-M4 without an MPU, so I couldn't even fix the memory attributes, the only solution was to gerrymander the compiled code to prevent the speculative fetch.

It's crazy that Armv8/9-A permits speculative instruction fetches to device memory. Crazy enough that I had to look it up to believe it:

"Hardware does not prevent speculative instruction fetches from a memory location with any of the Device memory attributes unless the memory location is also marked as execute-never for all Exception levels." - ARM DDI 0487K.a § B2.15.2

The Armv7-M spec is less clear. It does say: "The architecture does not permit speculative accesses to memory marked as Device," in contrast to Armv8/9-A which qualifies a similar statement with "data accesses". But then it later says "To ensure correctness, read-sensitive locations must be marked as non-executable". (This is all from ARM DDI 0403E.e § A3.5.7)

I don't have v7-A older handy to compare what they say.

Comment · 2 months ago
I configure Mutt to run the HTML part through w3m and show me that instead of the text part, because of this exact misuse of multipart/alternative.
Comment · 3 months ago
Most transport category aircraft have a better glide ratio than most single engine GA planes when configured for best glide. But they don’t cruise descend at best glide speeds or at idle thrust.

I’m talking about turbo props because the article’s hybrid technology is specifically for turbo props.

My challenge stands: find me a turbo prop that would be happy at idle thrust for either approach or cruise descent.

Comment · 3 months ago
A car going down a slight hill on the freeway still needs a bit of gas to maintain speed.

My assertion is that there are no turboprop plans that can maintain a 3° glideslope at normal approach speed without thrust from the engines. If you think there is such a plane, name the type, and show me a citation from it's POH to support the claim.

Comment · 3 months ago
Not really much room. Unlike a car going down a hill, an airplane descending still wants thrust from the engines, just not as much as in cruise.
Comment · 3 months ago
Don’t conflate airplanes with rockets.

On an airplane, most of the energy in cruise is spent overcoming parasitic drag, not induced drag. It’s spent pushing the airmass out of the way as it moves forward, not creating lift to stay aloft.

For that reason, a change in weight does not significantly change cruise fuel usage.

Weight is still precious, but that’s because airplanes’ load are more often weight constrained than volume constrained, and capital and operating costs are such that you want to maximize the load.

Comment · 3 months ago
strlen for netstring is O(log n).
Comment · 3 months ago
It's mathematically impossible to describe an arbitrary length in a fixed length.
Comment · 3 months ago
Because then the caller needs to treat it differently from non-empty buffers.
Comment · 4 months ago
I live in the United States. I write software for a living. My wife is a physician.

If I had a need to spend $2k, I could do so easily, but I still think it’s a lot of money to burn. I wouldn’t spend it on a whim; I would not spend it without carefully, considering the value of what I get.

I would not even spend that much money in the businesses that I own, or recommended that my well capitalized employer spend that much money without being reasonably confident that the business would get good value for its money.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton