HNHacker News
TopNewBestAskShowJobs

planede

2,063 karma · joined April 21, 2022

submissionscomments
planede··on Notes on debugging HotSpot's JIT compilation (2023)
The bug is real, but it isn't the compiler's.
planede··on Improving cursor rendering on Wayland
Uh, if gtk apps draw the cursor client side, what happens if such an app freezes?
planede··on Programs written in Golang have no secrets
Reducing the time a secret lingers in memory is at best a mitigation. Linux has MADV_DONTDUMP for the madvise system call to exclude certain pages from core dumps. I'm not sure if something like this could be available in golang, preferably wrapped in some platform-agnostic way.
planede··on Class Action Against General Motors LLC, OnStar LLC, LexisNexis Risk Solutions [pdf]
You probably have better luck by finding some standard antenna connection and attaching a proper 50 Ohm terminator to it.
planede··on Why are most sofas so bad?
FYI you don't necessarily have to throw away an otherwise good office chair if the gas spring is leaking. You can replace just the gas spring.
planede··on CEO of data privacy company Onerep.com founded dozens of people-search firms
Ah, the evil bit.
planede··on A formula for responsive font-size
I think a table can be alright, there is only so much you can do. It could be fine tuned though to only require horizontal scrolling on the table and not the whole web page. Maybe anchor the first row and column if you want to be fancy.
planede··on Brits left baffled by Brexit's 'not for EU' food labels
Isn't there a blanket ban on the UK exporting meat and dairy products to the EU now? Or is there any legal path to certify UK dairy products to be sold in the EU?
planede··on Brits left baffled by Brexit's 'not for EU' food labels
Did food standards desync between the UK and EU considerably since Brexit? I doubt that loosening food standards happen in general, but I can imagine newer EU food standards that are not copied over to the UK.
planede··on Brits left baffled by Brexit's 'not for EU' food labels
I assume the UK does export some of these products outside the EU, so that would be even worse.
planede··on Maybe Functions
What seems that the fundamental problem is that the functions depend on global state that is not explicitly passed in (is the user logged in?). Maybe an explicit session parameter could work better here. You only have a session when the user is logged in, so you can't even pass anything to the functions otherwise. It can of course be passed further recursively.
planede··on Maybe Functions
> Also, you have to deal with developer mistakes and what happens when they call incorrectly.

There is only one safe(ish) way to deal with programmer errors: crash. Hopefully loudly and early enough so it gets discovered in testing.

planede··on The No Symbol: The History of the Red Circle-Slash
That's an interesting example, as white arrow/arrows on blue in circle also exists, which limits (or otherwise indicates) the directions you can continue.

The one-way traffic sign does fit in, but most commonly you see it in situations where it's actually just informational, like the entrance of a road. In this case it doesn't limit you in any way, it's not like you have to enter that road. You will see a no entry sign on the other side of the intersection anyway, which does limit you. But it does inform you that you shouldn't expect oncoming traffic.

The horizontal one-way road sign is less common, and is often used in T-junctions. There it arguably does double duty.

planede··on The No Symbol: The History of the Red Circle-Slash
And then there is this no entry symbol, which makes no sense:

https://imgur.com/a/oSV1Aen

Reading the symbol it looks like a person prohibiting entry, crossed out. A double negative.

planede··on The No Symbol: The History of the Red Circle-Slash
Just to nitpick further, white on blue does not mean "allowed". It means "mandated".
planede··on How do computers calculate sine?
You need around 26 terms for x=10 if you do it without reduction and you want an accuratish result for double precision.

You wouldn't evaluate the terms naively from left-to-right.

x - x^3/3! + x^5/5! - ... = x * (1 - x^2/(2*3) * (1 - x^2/(4*5) * ... ) )

I just checked in python and you get a result that is around 1000*machine epsilon off. Not great, not terrible.

planede··on How do computers calculate sine?
Ah, I always referred to the musl implmenetation, but I just now realized that they copied the Freebsd one.
planede··on How do computers calculate sine?
I would have expected to be a bug in the documentation? Why would they turn FMA off for standard compliant C mode, but not for standard compliant C++ mode?

But the documentation does appear to be correct: https://godbolt.org/z/3bvP136oc

Crazy.

planede··on Pikachu Volleyball
Yeah, I can defeat it. It doesn't defend long shots very well. It's also generally better to try to return its shots immediately instead of juggling, so it can't position well for the return. If the opponent is close to the net then you can try hitting the ball up for it to quickly bounce back down behind him. You can also try kill shots near the net, but those can be risky.
planede··on Fonts are still a Helvetica of a Problem
Turing-completeness has nothing to do with safety. XML parsing isn't Turing complete, AFAIK, yet external entity resolution is a problem. Postscript is Turing complete, but I think it can be properly sandboxed, it's a VM with no IO other than "pages" that it can draw on.
planede··on Pikachu Volleyball
I randomly remembered this game that we played in high school on school computers a lot. I thought that it would be nice to find it, reverse engineer it and port it to some modern target, but it seems someone beat me to it already for a web version.

There is even p2p multiplayer implemented.

planede··on The hunt for the missing data type
I think graph data structures are generally missing because they are not something that you would explicitly use most of the time. Sometimes graphs just emerge from existing data structures in an application.

You might want to run generic graph algorithms on such emergent graph data structures, but usually they don't have a uniform graph interface that you can make use of. So you either would need to copy the graph over to some normalized graph data structure, or implement a uniform graph interface facade over the existing objects. The latter is usually more efficient.

Anyway, there are libraries that tend to do this decently, I think Boost does it well[1]. But there are a lot of inherent complexities and so much open design space that you can't really serve with one or even a handful of data structures.

[1] https://www.boost.org/doc/libs/1_84_0/libs/graph/doc/index.h...

planede··on AI Is Bad/Good Actually
I'm probably on the opposite end. I think the capabilities are overhyped, but the technology is still useful. The copyright and labor issues might be real, but I don't see them as AI issues.
planede··on Why it's so challenging to land upright on the moon
Well, it's an example of a convex homogeneous body that does this. It's much easier if these are not requirements, just have a sphere with an off-center mass.
planede··on Why it's so challenging to land upright on the moon
AFAIK the required precision for it to work is quite high.
planede··on Motion blur all the way down (2022)
You can with a strobed backlight.
planede··on Why do we need for an Undefined Behavior Annex to C++
x86_64 macOS has tier 1 rust platform support, which I believe means that it's guaranteed that you get a crash on stack overflow and you can't evade stack protection in safe rust.

It's not possible on all platforms, hence the tiers.

Apparently ARM64 macOS has tier 2 rust platform support, which might mean that that this is not true there, but maybe safe rust has some different unrelated soundness issue on this platform.

I only have very surface knowledge about the tier stuff, so maybe someone can correct me.

planede··on You've just inherited a legacy C++ codebase, now what?
> What would make you agree to that?

Money. Charging the higher end of typical consulting rates. That's your competition.

It's OK to want to help the young engineers, it doesn't mean that you shouldn't charge the company while you are at it. It would be foolish to do it for free, you effectively wouldn't do it for free even if you still worked there.

planede··on Why do we need for an Undefined Behavior Annex to C++
Implementation defined is not much better than undefined. It only requires documenting the behavior, so compilers could just go like "here are all the optimizations that we apply on each target platform for each set of compiler flags". It's not very helpful, you might as well look at the source code of the compiler.
planede··on Why do we need for an Undefined Behavior Annex to C++
Great stuff. It looks like a ton of upfront work, but will greatly improve the standard, and shouldn't be too hard to maintain once it's complete.
← PreviousPage 4 of 24Next →