HNHacker News
TopNewBestAskShowJobs

masklinn

68,929 karma · joined April 25, 2009

submissionscomments
masklinn··on Hitachi launches CO2 heat pump water heaters with solar-friendly tariff controls
> you kinda can't even do it Japanese style nicely.

I mean you can as long as you make the bathroom a wet room and shower outside the tub, which is exactly how the Japanese do it.

masklinn··on There's a new "Google Jail" for independent wikis
Makes sense. Whatever generates those site maps should use the classic Unix trick of writing a separate file then renaming. Also maybe don’t update lastmods on each individual update, it’s a waste of resources since the granularity of lastmod is usually the day (though you can make it the second if you want).
masklinn··on A mysterious kidney disease has arrived in Texas
They do, but it does not take much for economic pressure to make one seemingly small change with wide ramifications e.g. a plant or two which are not economically viable, get substituted, and turn out to be critical, then leading to chronic deficiencies (iirc the British navy got scurvy back after they switched from lemons to cheaper limes, or maybe between two kinds of limes and one had significantly lower levels of vit c).

It could also be interactions between the cultural diets and new products historically unavailable to that culture, which are either improperly processed (maize caused a lot of pellagra in europe) or has problematic interactions with components of the cultural diet (I don’t have an example for that, but grapefruit is famous for its medical interactions so nutritional interactions don’t seem impossible).

I don’t think it should be the first thread of investigation but it certainly should not be dismissed out of hand if nothing else bears fruit. That is how you get scurvy.

masklinn··on Is it safe to call print in a Python signal handler?
And that is pretty much what Python does for you, the Python-level signal handlers are not C signal handlers. Python sets a C signal handler to set an interpreter variable then exit, then it calls the Python level signal handler on the main thread (and on the main thread only, which can be a concern in sone cases).
masklinn··on Is it safe to call print in a Python signal handler?
And this is explained in more details in the first article of the series.
masklinn··on Don't use musl if you care about performance
I would hazard the guess that that’s perfectly fine. Desirable even. People who run scratch or alpine images and link against musl aren’t usually looking to write desktop applications or video games.
masklinn··on Don't use musl if you care about performance
> it would be possible to add support for alloc and std without libc on Linux specifically (since it has a stable syscall ABI).

Well yes that’s a Linux specific target so that’s kinda the point.

Technically you could do libcless on a few other platforms which are not actively hostile to it (yet) like freebsd, but that would have no chance of getting to tier 2 if it was even accepted.

masklinn··on Don't use musl if you care about performance
It's not really disputed since musl without mimalloc has a 144% overhead, so most of the performance issues do indeed come from the allocator, by a pretty large margin (~85% of it). Not only that, but some of the "other code" performance hit might still come from the allocator: when you set a global allocator on the Rust side, musl still uses its own allocator internally (as demonstrated by https://github.com/BurntSushi/ripgrep/issues/3494).

And the compounding issue is that the allocator issues get significantly worse as parallelism increases, as the allocator is serial, so as concurrency increases so does the impact of the allocator, which is not the case for most of the "regular slow" code (of musl), those have a relatively constant overhead per thread.

masklinn··on Don't use musl if you care about performance
The best option would be the x86_64-unknown-linux-none target (https://doc.rust-lang.org/nightly/rustc/platform-support/x86...) however it currently a tier 3 with a single maintainer (so it is technically available but unsupported).

If this specific use case is of high interest to you and you have some available bandwidth, contributing to it, maybe becoming a maintainer, and eventually organising a tier 2 MCP would definitely be a good idea.

masklinn··on Don't use musl if you care about performance
Musl's allocator being awful is pretty well known, though mostly in that it's absolutely awful in multithreaded context. TFA points out that musl has a bunch of other noticeably slower functions, which is less well known (though they're also slower by a smaller factor, and they don't worsen as your parallelism increases).
masklinn··on Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache
It is not very hard, but it is additional complexity, and it then requires the language to have a way to opt out so you can handle things like FFI or explicit ordering (usually for padding to avoid false sharing and friends).

So most languages opt to follow what their predecessors did: do nothing and task developers with reordering the structure if they want to minimise its size.

masklinn··on Saving 100 terabytes of memory by optimizing 1.1.1.1's DNS cache
Rust does that automatically unless you switch to the C layout.

In langages that don’t there’s a tension between memory use and human readability / consistency of the layout.

There are also other domains which can be affected e.g. databases, it’s a concern / issue when using postgres for instance as it uses aligned columns and stores them in schema order.

masklinn··on Engineered yeast for converting plastic and biomass compounds into food
Timescale is the important bit. If organisms degrade plastics in a few hundred years then what plastics are uniquely valuable for will be quite fine indeed.
masklinn··on When str.lower() is a security vulnerability in Python
You could have a CO which emits overridable warnings or requires additional / specific reviewers.

Of course that can then lead to warnings fatigue so it’s not necessarily a big improvement, or an improvement at all, in the long run, depends a lot on the org philosophy and habits.

masklinn··on Show HN: Make your logo extra bright on HDR screens
On mac the OS remaps the brightness range when HDR content appears. The rest of the content literally and materially dims.
masklinn··on Show HN: Make your logo extra bright on HDR screens
I’d assume it’s the display manager dimming sdr content to have sufficient brightness range for hdr content.
masklinn··on Show HN: Make your logo extra bright on HDR screens
On the other hand it’s a great signal that whoever uses that is an obnoxious twat and should be plonked.
masklinn··on Generic Methods in Go 1.27
I never used most of these at all, and the rest I never worked with in an enterprisey context, so I can not talk about those confluences from personal experience.
masklinn··on Generic Methods in Go 1.27
Having had the displeasure of working with struts, enterprise definitely never needed generics to enterprise.
masklinn··on Generic Methods in Go 1.27
The problem is that your vtable would have to have a monomorphised copy of the generic method for each possible instance, this requires whole program analysis just to generate the interface — and even then I would not be surprised if you could generate calls which the compiler was not able to relate to the interface — and then you get to the potential size explosion of your vtable as it has to hold an unbounded number of methods.

Note that despite having much stronger static semantics and much weaker reflection than Go Rust has the exact same limitation: a trait method with a non-lifetime generic parameter is not dyn-compatible. C++ is the same, a template member function (generic method) can’t be virtual (dynamically dispatched).

masklinn··on Generic Methods in Go 1.27
The construction of interface values is a very shallow mean and essentially irrelevant to the need for interfaces.

Whereas the runtime resolution of operations performed through an interface (dynamic dispatch) is the primary purpose of and use care for interfaces, with the dynamic resolution of wrapped types (type erasure / downcasts / type switches) is the secondary one.

masklinn··on Generic Methods in Go 1.27
That dynamic dispatch and type erasure are literally the purpose of interfaces?
masklinn··on A faster way to calculate the day of the week
For 4 billion values?
masklinn··on A faster way to calculate the day of the week
It is in fact covered in the page, as the heading for that formula specifically calls out “languages with signed "%", eg. C/C++”.

That is why there is a formula without that adjustment with a “posmod” aka any modulo where a positive divisor yields a positive value (Euclidean division as in rust’s `rem_euclid`, but also floored division as in Python or Ruby, langages with both mod and rem functions / operators generally have a floored division on mod and a truncated division on rem but that’s not a guarantee so check).

masklinn··on Scientists stunned by children's lung recovery in ultra low emission zone
I was thinking open-air yes, tunnels do indeed have major issue. With pollutant concentrations, road tunnels are the same (https://www.sciencedirect.com/science/article/abs/pii/S13619...).

For all that I did not care for them originally this is probably something full-height platform screen doors help with, assuming the trains themselves are also filtered that would keep the pollutants clear of drivers and users, although it does not exactly resolve the question of managing their presence in the tunnels themselves (and track / tunnel maintenance personnel should probably already be wearing respirators if not full breathing apparatus), and I could see things get pretty dire in case of breakdowns.

masklinn··on Scientists stunned by children's lung recovery in ultra low emission zone
> That doesn’t solve brake and tire particles.

Regen braking means significantly less brake dust, especially at city speeds and with blended braking.

> Although…rail might solve those?

Trains still have brakes. Some can regen brake but because they usually don’t have batteries they need the rail or overhead gantry to support inputs.

But on a passenger-mile basis, I expect an electric train produces essentially no particulates compared to a car, even a light rail on tyres. I do not however have numbers.

masklinn··on Children's stunted lungs show recovery in ultra low emission zone
Plus the US literally built highways in the middle of poor neighbourhoods.
masklinn··on How do functions like alloca allocate memory from the stack?
> formerly known as OS-X

It was never OS-X, it was OS X, and originally Mac OS X, as in the one after Mac OS 9. The Mac prefix was dropped with Lion (10.7). The Mac OS lingo having itself been introduced with 7.6, before that the OS core was called System.

masklinn··on The Life and Death of Direct File [pdf]
> Crazy environmental and labor regulations is what happened.

Mainland Europe has “crazy environmental and labour regulations” and manages to build cheaper and faster. So no, your pet hate is not the reason.

masklinn··on 2026 Eclipse Webcams
Higher magnitude (coverage) at maximum, and because it'll be late morning the totality will last much longer. Also almost entirely over land, where this one was mostly over the ocean.
← PreviousPage 2 of 34Next →