HNHacker News
TopNewBestAskShowJobs

DarkUranium

228 karma · joined March 18, 2015

submissionscomments
DarkUranium··on Swiss parliament lifts ban on new nuclear power plants
Coal in the US alone kills one Chernobyl of people each year.

(using estimates for Chernobyl --- so, in coal's advantage, as Chernobyl's confirmed deaths are actually very low)

DarkUranium··on Swiss parliament lifts ban on new nuclear power plants
Solar isn't exactly squeaky clean either.

Look into things like lithium mining (for batteries; yes, I am aware that other options exist, but lithium is still a very common one). That one is straight up nasty.

DarkUranium··on I told them forced consent was unlawful. 5 years later it cost Elkjop €1.8M
The cookie consent dialogs were never required in this form.

That was literally just malicious compliance in order to get people mad at the law instead of the companies (at least at first, there's also a huge amount of cargo-culting nowadays). Congrats, you've been psy-opped.

DarkUranium··on OpenAI Losses Increased Nearly 8X in 2025, with Spending Hitting $34B
"Historically" is doing a lot of work here. It's a well-known fact that while productivity kept increasing, wages have stagnated since the 70s.

So you're right in an academic sense, but not for any practical purpose whatsoever, in terms of how it'll affect economy now.

DarkUranium··on But yak shaving is fun (2019)
I'd say it's also a great strategy for throwaway prototypes (which I'd count as a kind of learning anyway: learning about your future product, its requirements, obstacles, etc).

The problem/trap in that case is, a lot of throwaway code ends up not being thrown away in the end, up to and including the prototype becoming the product (even if it was never meant to be).

DarkUranium··on GrapheneOS has been ported to Android 17
Organic Maps is amazing.

I actually find that it blows Google Maps out of the water for cycling (which is why/how I discovered it). I haven't really used it for driving much because my own car has a builtin nav, so can't really comment on that.

YMMV of course.

DarkUranium··on The only scalable delete in Postgres is DROP TABLE
Right, I must've forgotten. I know I had it working, but I don't have code at hand right now. I probably worked around it with a CTE or subquery then?

Something like:

    WITH ids AS (
        SELECT id FROM foo
        WHERE ...
        LIMIT 10
    )
    DELETE FROM foo
    USING ids
    WHERE foo.id=ids.id;
Or:

    DELETE FROM foo
    WHERE id IN (SELECT id FROM foo WHERE ... LIMIT 10);
DarkUranium··on Balkan Sworn Virgins
Same thing for "oh, but HRT is experimental" (and similar things). It actually predates many well-accepted medical therapies & processes, some by decades.

Fun fact, I did a cursory look on Wikipedia to remind myself, and it looks like it came about in the exact same year as chemotherapy. Which I find a rather amusing coincidence, considering one of the two is definitely well-accepted --- and yet, very damaging with its side-effects (though alas, very necessary ... cancer sucks).

(small nitpick, because my brain just won't let it slide: it's "I'm on a roll", not "role")

DarkUranium··on The time the x86 emulator team found code so bad they fixed it during emulation
I'm curious, what's the ratio of:

- deciding to inform the game developer & wait for reply vs not waiting for reply vs just fixing it yourself without informing the developer; and

- if informed: developer actually fixing it vs only saying they would fix it vs no reply whatsoever (not counting automated "thank you for your inquiry" replies, in cases where you don't already have more direct channels to the dev than email)

I've always kind of wondered this because in a way, it's kind of weird that it's fixed for them, at least for new releases / games actively being developed.

(Full disclosure: I'm a game developer myself, with a very high interest in engine plumbing & dev [including graphics], though finding a job for the latter is easier said than done.)

DarkUranium··on The time the x86 emulator team found code so bad they fixed it during emulation
He didn't write it.

The C runtime authors did (presumably Microsoft, if it's MSVCRT).

He's hooking into ReadFile, a layer below the stdlib. By the time it reaches the hook, it's already split.

DarkUranium··on Hetzner Price Adjustment
There's a (IMO) great, if a bit long, article making exactly your argument. I found it on HN a few days ago: (lost the HN link, sorry)

https://matthewbutterick.com/extinction-level-capitalism.htm...

DarkUranium··on The only scalable delete in Postgres is DROP TABLE
One thing I did a while ago was to make deletes part of inserts, to amortize the cost.

The main reason was to avoid a separate cron job, but it had other benefits (and downsides) too. Something like:

    DELETE FROM foo WHERE expires_at < now() LIMIT 10;
    INSERT INTO foo .....;
Note the LIMIT: it ensures the latency stays under control even if we've suddenly hit 50k rows that need deleting.

And by deleting (up to) 10 each time we insert one, it ensures obsolete things will eventually get deleted.

Obviously, this isn't viable when the deletions must happen due to strict policy (e.g. legal compliance) since it can't ensure when things get deleted, just that they eventually do. IIRC, in my case, I used it for a password reset tokens table. There's no legal issue there and keeping expired ones around is fine as long as the code also checks `expires_at` to make sure it's still valid (which would be a good practice regardless, for defense in depth).

DarkUranium··on The only scalable delete in Postgres is DROP TABLE
Because of the guarantees they provide.

Storing some data in a binary file isn't very hard. Making it so that you can do quick lookups on it (indexes) and implementing joins in a sane way is kinda hard, but easy compared to the real problem:

Ensuring ACID (in the case of "traditional" databases). I.e. Atomicity, Consistency, Isolation, Durability.

You need to protect against data corruption in the event of failure, all while guaranteeing atomic operations at the user level concurrently (in most production DBs; SQLite is a notable exception in that it fully serializes writes --- but it can get away with this because it's an embedded database with the primary use case of a single-process writer). And the entire thing must land on a known good state at the end of all of those concurrent transactions.

... and they must do it all while maintaining good performance, and sometimes on a combination of filesystem + hardware that's actively hostile towards the idea of data integrity (e.g. hidden RAM caches in disk or RAID controllers that don't flush on power loss --- thankfully, those are getting rarer, or so I've come to understand).

DarkUranium··on Orthodox C++ (2016)
Fancy running into you here.

Anyway, as it turns out, while the STL container situation is better than it was, it's still really terrible performance-wise.

So even nowadays, you're better off writing your own containers for performance-critical tasks; the benefits can be in orders of magnitude (depending on the task at hand, of course).

DarkUranium··on Orthodox C++ (2016)
Addendum: I, for one, have used software that would constantly show exception-related error message dialogs.

Hell, I'm forced to use such software at work because we're (at least for now) stuck with a horrible legacy vendor.

It is not fun. So, no, "just show it to the userand let them decide" doesn't actuality resolve anything either.

DarkUranium··on Pyodide 314.0: Python packages can now publish WebAssembly wheels to PyPI
I think one of the issues is that WASM is notoriously hard to generate code for because they decided to use an IR that's fundamentally incompatible with literally any existing native compiler backend's IR (not counting very specialized ones or toy direct-ast-to-machine-code compilers).

It feels like nobody actually consulted actual compiler writers when designing this. I'm sure that isn't true, but it definitely feels that way. (I suspect the truth is that they were consulted, but ignored.)

It means codegen needs to resort to all sorts of hacks (like the relooper) in order to target WASM, a property not shared by any other target.

And apparently, the way they handle variables also results in deoptimization, though I don't recall the details of that.

Add the fact that interacting with the browser on the web still has to go via JavaScript to this day (for the most part, at least), and, well.

---

TL;DR a combination of poor IR design that has a massive impedance mismatch with pre-existing compilers (and most new ones, because it turns out there's a reason the WASM approach isn't standard) plus WASM still being a second-class citizen in its supposed primary environment (the 'W' in WASM) --- the former ensures targeting it consumes a lot of resources/time, the latter ensures the bar for that to be worth it is much higher.

You can target most architectures with little trouble (at least a a baseline --- optimization's a hard problem regardless of target, except maybe SPIR-V due to the recommendation that pre-optimization is limited in scope). But WASM is completely out there, it's closer to trying to target e.g. Java (not JVM!) at the backend instead of machine code or some other IR.

You don't make an IR intended to be targeted by existing/native compilers by making it completely different to anything they had to target before and completely different to their own IRs and representations ... unless you're the guys behind WASM.

DarkUranium··on Tectonic: A modernized, complete, self-contained TeX/LaTeX engine
LyX is specifically advertised not as WYSIWYG, but WYSIWYM ('M' = "Mean"). Note how the exported/final document looks very little like the in-UI one.

Typora & Obsidian apply the same ideas to Markdown.

I do think WYSIWYG is an absolutely broken paradigm for anything outside of literally just desktop publishing --- but WYSIWYM has a lot of merit.

Enough that I've been working on a stand-alone Markdown editor component that takes ideas from Typora et al.

DarkUranium··on Faking keyword arguments to functions in C++
Addendum: I've been wanting to make my own shading language (for a number of reasons), and this feature is one I'd definitely include.

Think (for example) using a pluggable PBR module in this way, where you give it a config/options struct instead of a weird combination of `#if`, runtime arguments, and predefined uniforms and/or function names.

DarkUranium··on Faking keyword arguments to functions in C++
I use this all the time in C (specifically, C99 or later). I first saw it used in anger in `sokol_gfx`, and loved it. `FLECS` does something similar.

C makes it much better than C++ in that the designated initializes can be set in any order --- so I don't need to remember the often-arbitrary order of struct fields for the options struct.

I find it weird that C++ took this great C feature and kneecapped it ...

DarkUranium··on Lies we tell ourselves about email addresses
How did you manage to get Hotmail/Outlook to accept your email?

I got everything setup correctly, but Microsoft seems insistent on silently dropping my email.

DarkUranium··on Google is finally killing uBlock Origin in Chrome for good
My favorite browser by far, especially since Mozilla/Firefox pissed me off one time too many.

Keep up the good work!

DarkUranium··on CSS: Unavoidable Bad Parts
I feel like CSS would be in a much better place if they went with the Cassowary proposal for layout.

It would avoid the whole mess of block vs table vs float vs flexbox vs grid (and also absolute vs relative vs fixed) positioning.

Basically, it feels like 90% of CSS is it trying to fix its past layout mistakes & limitations.

DarkUranium··on Google Declaring War on the Web
Voting with one's wallet pretty much never worked (with few exceptions). The conspiracy theorist in me suspects pushing this is astroturfing by the very aristocracy, to shift blame onto people (same with environment and such, but that one's been proven time and time again).
DarkUranium··on Jira Is Turing-Complete
Leantime, Plane, Wekan come to mind.

Jira is absolutely huge, so it's hard to tell what parts of it you're interested in.

DarkUranium··on Memory has grown to nearly two-thirds of AI chip component costs
Someone was selling an Epyc machine with 512GB RAM @ 500 EUR last year. I regret not buying it now ...
DarkUranium··on Converting an Integer to a Decimal String in Under Two Nanoseconds
Because maybe the choice of serialization format isn't under your control?
DarkUranium··on Sales and Dungeons: Thermal printer TTRPG utility
It's actually the reason as to why I wanted to get a thermal printer a few years ago. To be honest, I'm surprised someone else had this idea, too.

Alas, that never materialized as the in-person campaign I was DMing fizzled out.

DarkUranium··on Saying goodbye to asm.js
To be honest, with how bad a target WASM is for any existing compiler, I feel like what killed that possibility was WASM itself.

Its IR design is horrendeous.

DarkUranium··on Iran starts Bitcoin-backed ship insurance for Hormuz strait
You don't need a truthful reason to have an excuse. Remember the whole Iraq WMD debacle?

Or, for that matter, Ukraine giving up its nuclear capabilities.

DarkUranium··on Show HN: Files.md – Open-source alternative to Obsidian
Considering Microsoft's been making more and more of VSCode non-FOSS, I'm pretty sure using it as your base is at odds with your goals.
← PreviousPage 2 of 5Next →