HNHacker News
TopNewBestAskShowJobs

diath

1,232 karma · joined November 30, 2019

Software Engineering

C++, Python, Lua, TypeScript

Video Game Development, Linux, Automation, Software Modernization, Software Optimization, Backends

Deus Vult

submissionscomments
diath··on Building my own network stack
...what kind of credentials did you have to become a hw/sw engineer at a nuclear power plant as your first job?
diath··on Splitting a Git Commit
That's good to know, I'd usually go about it in a roundabout way: soft reset the commit then git add --patch to stage the hunks to split it into multiple commits.
diath··on Semaglutide linked to lower predicted dementia risk
> Western disease and sugar heavy diets broadly speaking

No, just being sedentary. There's no such thing as acquired diabetes in physically active people.

diath··on Pizza, pasta, potatoes, protein – how Italian children became so overweight
Nutriscore is a meme because it only refers to products in the same product category. Some Nestle's ultra processed sugary cereal has scores of A-B, it does not mean it's healthy, it just means it's less bad than other sugary cereal slop. It's very misleading.
diath··on The CEO of Mullvad is the main financer of the Swedish Örebro party
> Immigrants economic contributions are net-positive, its not at the expense of anyone bc economies are no zero sum games.

It's at the expense of women and their safety, for example. Between years 2010 and 2015, 60% of rapes in Sweden were perpetuated by people of foreign origin: https://pmc.ncbi.nlm.nih.gov/articles/PMC8330751/. That was back when foreigners made up about 20% of their population, which I think is now over 30%, extrapolating, the immigrant rape problem is likely even worse. At what point do we stop putting economic growth over the well being and safety of citizens?

diath··on How to get your first customers [video]
"just know people bro"
diath··on Steam Machine launches today
Why is it surprising? This is essentially a pre-built PC in a small form factor and most PC peripherals are USB-A.
diath··on Minecraft: Java Edition 26.2, the first version with Vulkan 1.2
Minecraft has two versions, Java and Bedrock (C++), the Bedrock edition uses bgfx: https://www.minecraft.net/en-us/attribution
diath··on Russian artist and Putin critic shot dead in Poland
There's so few gun related homicides in Poland that an execution style murder is 100% either mafia affairs or assassinations: https://en.wikipedia.org/wiki/Gun_laws_in_Poland#Gun_deaths_...
diath··on Ported my C game to WASM, here's every bug that I hit
With regards to 1), do not write/read structs directly to/from files. Instead write a proper serializer/deserializer. Without it, you may encounter another breakage soon when a different compiler/compiler options insert different struct padding bytes, which will then once again make your data non-portable, and a maliciously crafted save file with no length/size field validation on the deserializer level can lead to a variety of memory bugs.
diath··on Switzerland wil have a referendum to cap population at 10M
These jobs are unpopular because the pay is shit, not because people don't want to do them, the government could simply have grants/bonus program for people employed in these positions so that the taxpayer money directly funds the bettering of the society and environment around them. Besides, Japan is a good real world example that you do not need to lean on immigrant labor to stop your country from becoming "dirty"; it's one of the most ethically homogeneous countries and also one of the cleanest places you can visit.
diath··on GTA 6 Developers Unionize
It has not lagged behind depending on how you look at it, video game development can be split into engine programming and gameplay programming. For engine programming, you only need a handful of senior engineers specializing in low level details of a video game engine, and these will get paid high appropriate wages that match industry standard salaries. For the gameplay programmers, they just seek the cheapest labor that can do "quantity over quality" type of work to pump out content and there's a large pool of juniors/interns that will accept these low wages just because they want to be a part of something popular.
diath··on Defeating Git Rigour Fatigue with Jujutsu
So... git rebase -i?
diath··on Bun.Image
I just have a rule in AGENTS.md that any additions, removals or modifications to the public facing APIs should update the corresponding API documentation, works fine for me (assuming both sit in the single workspace).
diath··on Leaving GitHub for Forgejo
If you have a VPS that's always running, you can just use it as a git remote through SSH without moving things around or any third party software, just put the Git repo on the VPS and clone it via "git clone ssh://user@host/path". You get authentication, encryption and synchronization out of the box with just ssh/git.
diath··on Metal Gear Solid 2's source code has been leaked on 4chan
> Who said anything about recreating the exact code?

The person I'm replying to? Who said you will get the same code as if it were the original source?

diath··on Metal Gear Solid 2's source code has been leaked on 4chan
Absolutely. This is just some delusions of a vibe coder at best. Not with just current generation of AI tools but essentially never. The conversion from C, C++, Rust or whatever, through post-processing (macros etc), through IR generation, through compile time optimizations, through link time optimizations, to the generated machine code is a one way street for low level languages. You can get a pretty close higher level approximation that matches the flow/logic/structure - but the code will never be anywhere near close to the original source code. I could write the same C++ program in 3 different ways and get identical assembly, how do you go back to the exact source? The answer is that you don't.

Here's the same simple program, written in 3 different ways, producing identical binary compatible code: https://godbolt.org/z/qWrc8fEnn

How does the AI know whether it should produce back the snippet #1, #2 or #3? It does not. It cannot.

diath··on "Parse, don't validate" through the years with C++
It has been available since GCC 12.1 (May 2022), Clang 19.1 (Sep 2024), and Visual Studio 17.13 (2022~): https://godbolt.org/z/on1v6qdf3

These days compiler developers implement accepted standard features pretty fast.

diath··on Copy Fail
It's an advertisement for their tool that found the exploit: https://copy.fail/#contact, https://xint.io/products/xint-code
diath··on Raylib v6.0
I have read it, if you scroll down to the API list for the new text functions, they all relate to text (string) manipulation, not text rendering. There's still no native mechanism for caching text vertexes between frames.
diath··on Raylib v6.0
The remaining issue I have with Raylib is that the library has no concept of a Text object, so for text-heavy scenes (lots of combat damage texts in fast paced games, lots of UI elements), the library spends most of the time recalculating font glyph stuff when drawing text.
diath··on To Protect and Swerve: NYPD Cop Has 547 Speeding Tickets
From the article:

> State law classifies camera-based tickets as mere violations, and they don’t add any points to a driver’s record, even though exceeding the speed limit by 11 miles per hour is worth four points on a license — but only if the offender is caught by a cop instead of a camera. Just three of those tickets suspends a driver’s license, but Giovansanti can keep on driving.

diath··on In the UK, EVs are cheaper than petrol cars, thanks to Chinese competition
> The goal is to migrate everyone to EVs

This won't happen unless they outright ban non-EV vehicles which is unlikely considering how many people are still using old cars and cannot afford new cars, how many car enthusiasts are there, and not to mention potential lobbying from big oil.

diath··on Changes to GitHub Copilot individual plans
> I didn't really want to wander outside of VSCode just yet because I was happy with VSCode/Copilot/Opus-4.5

This was my first thought too but apparently you can just use Claude Code within VSC: https://code.claude.com/docs/en/vs-code

diath··on Changes to GitHub Copilot individual plans
I guess it makes more sense for me to just get Claude Pro instead. I was using my Copilot license only because of Opus 4.6 access as all other models seemed crippled in comparison in Copilot; does not even make sense to upgrade to Pro+ which goes from $10/mo to $40/mo and only gives you access to a model that has 7x the rate - 5x the limit at 7x the rate for 4x the price does not seem appealing at all.
diath··on The creative software industry has declared war on Adobe
If you're a hobbyist needing photo editing software, just use https://www.photopea.com/
diath··on Game devs explain the tricks involved with letting you pause a game
This is why delta time accumulator is preferred over using clocks, something like this would be best:

    float accum = 0;
    while (running) {
        poll_input();
        poll_network();

        accum += delta_time;

        while (accum >= tick_time) {
            accum -= tick_time;

            update_ui(tick_time);
            update_anims(tick_time);

            if (!paused) {
                update_entities(tick_time);
            }
        }

        render();
    }
diath··on Game devs explain the tricks involved with letting you pause a game
If memory serves well, that worked by replaying network packets, which is what some other games do as well, the problem with that approach is that for live service games unlike old games that were often "set in stone", the protocol always changes, so it's a huge maintenance burden. You either need to add conversion tools, keep maintaining backwards compatibility with older protocol versions, or you accept that replays quickly become outdated.
diath··on FSF trying to contact Google about spammer sending 10k+ mails from Gmail account
This is anecdotal but here's the breakdown of top 10 e-mail providers from my database, does not look like a monopoly:

    MariaDB > SELECT SUBSTRING_INDEX(email, '@', -1) AS domain, COUNT(*) AS cnt FROM accounts GROUP BY domain HAVING domain != '' ORDER BY cnt DESC LIMIT 10;
    +-------------+-------+
    | domain      | cnt   |
    +-------------+-------+
    | hotmail.com | 38015 |
    | gmail.com   | 16280 |
    | yahoo.com   |  4080 |
    | o2.pl       |  2321 |
    | wp.pl       |  2206 |
    | live.com    |  1415 |
    | outlook.com |   814 |
    | interia.pl  |   609 |
    | hotmail.es  |   590 |
    | live.se     |   521 |
    +-------------+-------+
    10 rows in set (0.044 sec)
diath··on Servo is now available on crates.io
> System web views were available as drag and drop components in VB6 two and a half decades ago. There's nothing "new" about that as a concept

We are in a thread discussing a Rust library, logically, I was referring to the current approach in GUI rendering in the Rust space (such as Tauri and Dioxus).

> and plenty of reasons to not want to use Blink/WebKit.

Such as? Can you name a few objective reasons against Blink/WebKit (the technology) that does not involve just not liking Google/Apple?

← PreviousPage 2 of 12Next →