HNHacker News
TopNewBestAskShowJobs

stkdump

1,077 karma · joined April 15, 2018

submissionscomments
stkdump··on C's Flexible Integer Sizes Were Not a Design Mistake
I think you missed the little word "relevant" on top. I am of course aware that there are exceptions. And yes, if you write C++ for embedded or other minor or outdated platforms you will know and understand that these things don't apply to you. But there are tons of developers around writing code that will never touch any of these specialized systems that spend way too much effort trying to be clever, because of "the standard", and "that platform over there".
stkdump··on C's Flexible Integer Sizes Were Not a Design Mistake
The problem begins when you start mixing the traditional types and (u)intN_t, because the latter are merely aliases for the internal types, and it messes up overload resolution. All relevant platforms have pretty much agreed the size of char, short (int), int and long long (int). They have different opinions about long (int) and thus an int64_t might use either long (int) or long long (int).

So the best solution for nowadays is to use just char, short, int and long long (and make strong assumptions that these are exactly 8, 16, 32 and 64 bits wide respectively), never use long or long double. Never use (u)intNN_t. Then you are good.

Those caveats of the past (but int might be 16 or 36 bits), are exactly that. An artifact of the past. A historical curiosity. Not relevant for today or the future. No, I don't believe for a second that any future platform will change their size.

Platforms also still disagree on the signedness of char, so when an 8 bit numeric type (as opposed to an ascii character type) is needed, one should always explicitly specify signed char or unsigned char, both of which are separate types from char.

Further things of note: platforms also have agreed on little endian (so called "network byte order" is dead and should never be used in new protocols, because it forces everyone to convert) and on IEEE memory representation of float and double. Contrary to popular belief the main floating point operations (+,-,*,/,==,<,>,<=,>=) are also precisely defined and always behave exactly the same (leaving out strange edge cases such as denormals). And yes, of course platforms have very long agreed on twos-complement for negative integers. This even made it into the standard at some point, I believe. Same happened with the memory layout of a vector<>, which in the past wasn't standardized, but because everyone of course did the obvious (and made it the same as a normal C array), it was added to the standard later.

What I am saying, what the C++ standard guarantees isn't everything. There are much more guarantees modern C++ code can (and should) rely on.

stkdump··on Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint
10% smaller is 3*0.1=0.3 smaller than 3, which is 3-0.3=2.7

So 200% smaller is 3*2=6 smaller than 3, which is 3-6=-3

Which is why these kinds of statements usually don't make any sense at all. Usually something can't be more than 100% smaller, at which point it is completely gone.

stkdump··on Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint
Also, X is 9 times larger than Y and X is 9 times as large as Y are two different statements.
stkdump··on Nvidia dismisses "circular financing", says every $1 it invests brings back $100
They also said that theur hardware scales faster than Moore's law, when in reality it is way slower than Moore's law. Which I guess at least is a good thing for hyperscalars because it helps with their decision to write off their GPUs over a much longer period.

But still, it seems that billionaires are lying left and right. It isn't just Elon.

stkdump··on Growing proof that autonomous cars save lives
An autonomous car in front of me can still act in a way that I or my car can't predict, as long as we haven't eliminated humans and animals completely from being anywhere near roads.
stkdump··on The UN challenges five centuries of cartography
Seems I got terms confused. Thanks for clearing that up.
stkdump··on The UN challenges five centuries of cartography
A line of constant bearing will always be a great circle. A straight line on a mercator projection of the earth does not constitute a great circle (in fact only the equator line is a great circle and each vertical line is half of a great circle).
stkdump··on Python sets and dictionaries can have quadratic-time performance
Once a hash table has outgrown all caches, it should have linear performance. It's just that caches accelerate it at sufficiently small sizes.
stkdump··on Growing proof that autonomous cars save lives
Arguments I heard that make no sense to me:

- Autonomous cars will improve traffic because stopped cars can start going at the same time at an intersection -> Then you have no safety distance. And while theoretical improved reaction times mean you might need a bit less distance, the quadratic term comes from the needed breaking deceleration, not the reaction time.

- Autonomous cars will reduce congestion: they can't if they are supposed to drive around empty either to park somewhere else or to get to the next person to transport. On the contrary, they will increase congestion.

Note also that I don't buy the "work" inside "very small cars". It's not just that having to drive prevents you from working. Also the overall comfort while traveling isn't good enough outside of trains or planes for anything but some tiny amount of work.

I am on board with the benefits for old, disabled, tired and drunk people though. Also, I do accept that they will prevent a lot of accidents and deaths.

stkdump··on How Fairphone built the Fairphone Gen 6+
Well said. I would say in general there isn't "the best" OS for everyone and never will be, because each OS makes different trade-offs. I for one want primarily what is understood to be "general purpose computer". Other people rightly don't care about that and want a maximum security device, one that even protects users from their own mistakes (of course putting more trust in the makers of the OS). What we should care about is that people have a choice and can get whatever they prefer.

To answer GPs point, I think Fairphone doesn't primarily target either of the two audiences. I think they primarily target the people that care about the ethics of the creation of the hardware. Basically people who would like to minimize the invisible human cost that their phone creates.

stkdump··on Chrome again exempts Google from user site data settings
It would still be a (albeit convenient for google) bug, as the setting indicates closing all windows as the trigger for deletion.
stkdump··on “I just chose words carefully”
The misspelling seems to be consistent (>200 times), though it seems like a quite common one. A 1982 DOS game was even titled "Missle Strike", long before Metroid was released.
stkdump··on DFlash 2: Keep Drafting Parallel
It will contain the same or different syntax with or without it. Also multiple runs without DFlash2 will contain the same or different syntax. And multiple runs with DFlash2 will have the same or different syntax with the same probability. DFlash2 literally has no influence (unless buggy). The difference is purely caused by the randomness.
stkdump··on Casio F-B100W-1A
It is usually 10-15s per month. And the annoying thing is you have to notice it and I prefer a watch that I don't have to double check.
stkdump··on DFlash 2: Keep Drafting Parallel
If you assume that the RNG generates true randomness, then the two are identical. Only if you care about the determinism of the RNG (for example you want to use identical seeds and get the exact same generation between the two) it makes a real difference.
stkdump··on Why Microsoft Entertainment Pack had a sticker announcing that it had Tetris?
> Just like how World War I was initially called “The Great War”. If you had called it “World War I” from the outset, people would look at you funny, like “Do you know something I don’t?”

This is why I didn't, at the time.

Jokes aside, some people knew and so it was also called (though not very commonly) World War starting 1914 and First World War from 1918. Because of course it wouldn't be the last. World War 3 was first talked about in 1941. And the famous idea that World War 4 would be fought with sticks and stones was first mentioned in 1946.

So the correct answer to "Do you know something I don’t?" is "I know human nature"

stkdump··on Casio F-B100W-1A
I recently thought I could probably go back to a not-smart watch to not have to charge the watch all the time, but I don't want to deal with setting the time regularly either due to quartz drift and dst. So a bluetooth watch with two years of battery life doesn't sound like a bad idea really.
stkdump··on DFlash 2: Keep Drafting Parallel
Not OP, but you can influence how deterministic your LLM behaves using the temperature setting. The neural network doesn't directly output tokens, but logits which are then converted to probabilities and then a token is chosen at random, unless the temperature is 0 (i.e. greedy, we just always pick the most probable token without any randomness). All speculative decoding methods have to "commit" to a token though even when they don't know the actual logits of the full size NN yet. The question then is (and I don't know the answer): how do the common inference engines behave when the speculation landed on the most probable token, but the random choice still doesn't land on it? You can imagine that in the interest of performance as long as we stay reasonably inside the probability we just go ahead with the speculation. Not sure if thats implemented like that though.

Edit: I just looked up the math, and actually the idea of speculative decoding is done in a clever way that fully preserves the probability distribution while still maximizing the acceptance rate of draft tokens. So I would have to disagree with OP and say that no, non-greedy sampling doesn't influence the trajectories.

stkdump··on Unsloth Dynamic 3.0 GGUFs
There is a native reasoning effort setting. It defaults to xhigh, I guess to get the best benchmark results, but you can just run it on medium or low instead, or for simple things even disable thinking outright.
stkdump··on How do functions like alloca allocate memory from the stack?
Makes sense. The only exception - tail call optimization where no (new) return address is pushed - relies on cleaning up the stack before executing the tail call.
stkdump··on How do functions like alloca allocate memory from the stack?
So what if several functions that use less than 4KB each call each other before using the stack variables in a way that the first access skips over one page?
stkdump··on Branchless Rust: Making a Filter 4x Faster by Removing an If
I don't know if an optimization is allowed to "invent" a write, but I would be surprised if an optimizer goes that far because I have to believe that the number of cases where more writes improve performance are pretty slim.
stkdump··on We finally learned to center a div, then browsers added sidebars
Funnily I can't reproduce the effect at all. I am using Firefox and with sidebar the content of the page centers on the remaining viewport width, like any other site does. I have also tested with Edge, same result. With Edge's auto collapse (i.e. non sticky vertical tabs), I get the described effect, but again this is like any other site. I was actually expecting quite bad results in Edge because it has some sidebars on the right and I thought this page compensates in the wrong direction then. Don't have Chrome installed to see if that does anything differently.

Note I like the default behavior of browsers to center on the viewport as opposed to the window treating sidebars as overlays over the page. Whenever pages do that with their own gadgets I hate it, because they often don't move their content out of the way and it makes it unreadable unless scrolled out of the range of these gadgets, which often isn't possible at all. And even when it is, it effectively reduces the total usable screen to a fraction.

Whenever I'm bothered enough (happens mostly on mobile), I use a kill sticky bookmarklet to fix that.

stkdump··on Germany Records Historic 12B KWh Solar Feed-In in July 2026
817 kWh here. Though june last year was the record at 904 kWh. Maybe the effect is that solar panels lose efficiency when too hot.
stkdump··on A big win for Android interoperability
No, I don't know if they do and honestly this isn't why I wrote what I wrote. But what if I don't want to buy anything from them? I want to de-google and my only choice seems to be to have a device with a google logo on it that puts even more money in their pocket than if I just use normal Android with minimal google interaction on a Samsung or OnePlus device.
stkdump··on A big win for Android interoperability
The whole GrapheneOS thing is a bit of a joke. So you either have to buy google hardware or you run google software.

Anyway, looking forward to the widespread introduction of Wero. Maybe there will be some options for third party roms in the name of digital soveranity. Seems like they want to make the EUDI wallet for digital documents no-google capable for that reason at least.

stkdump··on A missing underscore sent innocent man to prison for 18 months
One of the rare cases where a vpn actually does help. Though of course only if they don't also turn over records.
stkdump··on Our position on open-weights models
China will likely gain the capability to produce leading edge chips within a decade domestically. From then, occupying Taiwan will be about controlling the wests the access to that. Same with AI models, though I would say we are already about there. Dario is either lying to us or to himself that distillation plays a major role.
stkdump··on Show HN: Echo – Fable-level results at 1/3 the cost using open-weight models
I think you were able to buy VS Pro perpetual licenses for one time 500-1000 at all times. Of course they had higher tiers and a subscription model which were more expensive but in reality for most people there was little to no added value.
Page 1 of 21Next →