HNHacker News
TopNewBestAskShowJobs

flohofwoe

23,650 karma · joined October 15, 2013

submissionscomments
flohofwoe··on Perforce charges $500 for training training videos.. and it's AI narrated
There was also PlasticSCM, which was acquired by Unity a while back. I'm hearing differing opinions about whether it's good or bad though.

https://www.plasticscm.com/

https://unity.com/features/version-control

flohofwoe··on Young adults are poor despite every metric which suggests otherwise
German, of course ;)

The German equivalent is that everybody is complaining about rising rents in city centers because everybody wants to live in city centers. Home ownership in Germany basically means that you'll have to pay it off for the rest of your life anyway (and that's not a new phenomenon) so in the end there isn't all that much difference to renting finance-wise, except that renting is usually much less hassle.

flohofwoe··on Young adults are poor despite every metric which suggests otherwise
China is arguably currently also in an exceptional situation though. The question is how long that lasts. The next generation or the one after will most likely also complain that their parents were much better off when they were young ;)
flohofwoe··on Young adults are poor despite every metric which suggests otherwise
> It’s why FIRE is so appealing to some, you get to get out early.

Isn't this exactly "spend the youthful years struggling and get to enjoy the fruits when you are older"? ;)

flohofwoe··on Young adults are poor despite every metric which suggests otherwise
Buying a house in their 20s... are you serious? If true and not just an urban myth, that must have been a US specific thing, maybe caused by the exceptional situation of the US coming out as the biggest winner of WW2. Anywhere else in the world you could be lucky to even move out of your parent's rented flat in your 20s ;)

PS: also, what's the obsession of young people with home ownership

flohofwoe··on $100 AI Music Video: Claude Fable 5 vs. GPT-5.6 Sol
> but I'm not buying that rappers driving luxury cars while rapping and having women in stripper heels tells the same musical artistic story in a different way

Lol ok that's where you're coming from. Reducing music videos to gangster rap shite is basically the equivalent of "all movies suck because I've ever only seen Hollywood superhero movies".

flohofwoe··on $100 AI Music Video: Claude Fable 5 vs. GPT-5.6 Sol
I'm not sure if AI slop will make a bad situation much worse tbh. The pop stars of the 60's to 90's always depended on a distribution platform/network (record labels, radio stations, MTV, ...). Those distribution platforms either don't exist anymore, or changed their 'business model' to f*ck the artists at least two decades ago. To find the really good stuff you already have to look elsewhere, and popular music was already 90% mass produced "slop" before AI entered the scene.

E.g. this ancient Frank Zappa interview about the decline of the music industry is still as relevant as ever:

https://www.youtube.com/watch?v=KZazEM8cgt0

flohofwoe··on $100 AI Music Video: Claude Fable 5 vs. GPT-5.6 Sol
CGI effects actually got worse once they were used en-masse to make movie production cheaper. Good CGI still takes care, skill and taste.
flohofwoe··on How Our Rust-to-Zig Rewrite Is Going
The DebugAllocator catches use-after-free (at least on page-level), but at the cost of never recycling memory addresses (e.g. it eats through the virtual address space).

https://ziglang.org/documentation/master/std/#src/std/heap/d...

For higher level code, "generation-counted index handles" might be the better solution to provide temporal runtime memory safety, not part of Zig the stdlib though.

Or even better: never use dynamic memory allocation and make all lifetimes 'static' :)

flohofwoe··on British Steel taken into public ownership to protect 'vital' UK supply
Tangent: disturbing to see many North American news sites thinking they're going to get far by region-blocking European visitors because they don't want to be GDPR compliant ;)
flohofwoe··on Germany set to restrict its Freedom of Information Act
Lol, do you seriously think the 'alternative' would be any more progressive when it comes to freedom of information (or government transparency in general) once they'd be in power?
flohofwoe··on Tiny Emulators
See bottom of help page:

https://floooh.github.io/tiny8bit/help.html

TL;DR: first press F1, then Space.

flohofwoe··on Tiny Emulators
The actual emulator code lives here (all in STB-style headers):

https://github.com/floooh/chips

The chips-test repo has the 'integration' code which assembles the headers into executables:

https://github.com/floooh/chips-test

There's also a similar project in Zig (but less complete, it's more like an experiment what the same implementation ideas would look like in Zig) that might be a bit more readable and with everything in one place:

https://github.com/floooh/chipz

E.g. start reading the top-level emulator executables:

https://github.com/floooh/chipz/tree/main/emus

...and then move your way down to the system implementations:

https://github.com/floooh/chipz/tree/main/src/systems

...and finally to the chip emulators:

https://github.com/floooh/chipz/tree/main/src/chips

flohofwoe··on Tiny Emulators
> modular components with explicit conformance requirements would allow people to not care what happens inside the black box

That's the whole idea of software libraries, no AI needed for that ;)

It just takes some disciplines and not listening to the DRY crowd too much to create actually self-contained libraries.

flohofwoe··on Tiny Emulators
FYI this is a heavily outdated URL (the one with '-preview' in it, last updated in 2021) which I had created at some point to test some things.

The proper and uptodate URL is:

https://floooh.github.io/tiny8bit/

Apart from the 'pin-emulation' the other interesting feature is that the CPUs are 'cycle stepped', e.g. the CPU no longer has a special 'controller role' in the system but is just 'ticked along' with all the other chips. This blog post describes how that works for the Z80 emulation (the instruction decoder is still a big switch-case, but with one case-prong per instruction cycle instead one prong per whole instruction: https://floooh.github.io/2021/12/17/cycle-stepped-z80.html)

I didn't really get around to work on the project since 2023 though (and before that I worked on it mainly as a 'vacation project' over the Christmas breaks), I mostly just updated the sokol and Dear ImGui dependencies since then, and sometimes added new scene demos appearing on https://www.pouet.net/ and https://csdb.dk/.

flohofwoe··on Almost Always Unsigned
Yeah ok got me, but AFAIK at least multiplication is sign-agnostic when the result is clamped to the width of the inputs (e.g. the result of multiplying two 64-bit values being clamped to 64-bits). Not sure about division though.

But in any case: with 'sign-agnostic' integer types high level languages would simply need separate signed vs unsigned mul/div operators. Not a big thing when modern languages already have different operators for wraparound vs overflow-checked arithmetic (for instance + vs +% in Zig).

flohofwoe··on Almost Always Unsigned
I would rather do away with signed vs unsigned integer types completely, and instead have sign-agnostic integers like down on the assembly level (the world has settled on two's-complement anyway). Signed-vs-unsigned only matters in one situation: when extending a narrow integer type to a wider integer type (e.g. "sign-extension"), and this could be an explicit operation.

Beyond that, the decision whether a number is signed or unsigned is only needed for string formatting (e.g. it's like Schroedingers integers: whether a number is signed or unsigned only matters when you actually look at the number).

flohofwoe··on Rewriting Bun in Rust
'Industry standards' is where programming languages go to die ;)

As for PRs: well yeah of course, when in Rome...

flohofwoe··on Almost Always Unsigned
Loop counters really are not the problem. The problem is that even when using unsigned integers you often want to do 'signed math' on them (e.g. adding a negative amount, or you could have an expression made entirely of unsigned integers (like ((x - y) + z) where an intermediate result may become negative even when the end result is positive - and in languages with overflow check that may result in a panic).

A better rule of thumb is to always use signed integers, except for bit twiddling and modulo-math.

Especially with 64-bit integers it's really no longer an issue to lose one bit for the sign (63 bits ought to be enough for anybody heh).

flohofwoe··on Interview with Mitchell Hashimoto about Ghostty and Zig
In computing this is almost a tradition (Commodore vs Atari vs PC, Windows vs UNIX vs MacOS). It hasn't exactly hindered progress, I'd rather call it healthy competition ;)

Still though: Amiga 4 ever! :D

flohofwoe··on Interview with Mitchell Hashimoto about Ghostty and Zig
Meh... I dabbled a bit with D in context of the sokol-d language bindings, and IMHO it's an even bigger kitchen sink than C++.
flohofwoe··on Interview with Mitchell Hashimoto about Ghostty and Zig
> I find it to be way buggier than iterm with a fraction of the features.

Hmm... I'm using ghostty (on macOS) since it was released and have yet to encounter a single bug. Iterm2 simply got too fat and slow over time, which was the point where I went terminal-shopping (first wezterm, which is also fine, now sticking with ghostty).

flohofwoe··on Interview with Mitchell Hashimoto about Ghostty and Zig
Different tastes are aguable the only reason why different programming languages exist. They're all Turing complete after all.
flohofwoe··on Interview with Mitchell Hashimoto about Ghostty and Zig
By that definition, Javascript is by far the bestest language in the world ;)
flohofwoe··on No leap second will be introduced at the end of December 2026
Since I was checking the Wikipedia article anyway (for when the last leap second was inserted), it also has an answer for this:

"Because the Earth's rotational speed varies in response to climatic and geological events, UTC leap seconds are irregularly spaced and not precisely predictable."

https://en.wikipedia.org/wiki/Leap_second

flohofwoe··on No leap second will be introduced at the end of December 2026
Apparently December 2016 was the last time a leap second was inserted, at least that's what Wikipedia says:

https://en.wikipedia.org/wiki/Leap_second

flohofwoe··on Rewriting Bun in Rust
In general I agree, but this topic is IMHO exactly what separates the Rust lovers from the Rust haters ;) E.g. how strong is too strong when it comes to type systems. Rust afficionados generally seem to tend towards 'the stronger the better', and accepting the downside of a fairly rigid code base.

I prefer a middle ground between strong and weak typing (but yeah, C is arguably too weakly typed, but the exact sweet spot is different for every programmer).

A reasonably smart C compiler that has visibility on all code in a project could theoretically infer a lot of the same semantic details that must be manually provided in Rust by looking at how the pointer is used in the wider codebase (basically what static analyzers are doing by reconstructing control flows). Of course such an extensive analysis would result in even worse compile times than Rust ;)

flohofwoe··on Rewriting Bun in Rust
Rust-the-language may be medium-sized. Rust-the-stdlib though?

The Rust stdlib has a lot of essential low-level types needed for adding a 'semantic layer' on top of the language so that the language user can exactly 'express intent' (types that arguably should be language features instead). Just look at all those detailed methods needed to make RefCell work, and what does 'into_inner' or 'undo_leak' even mean?

https://doc.rust-lang.org/std/cell/struct.RefCell.html

E.g. what's a single concept in C (e.g. "the pointer") easily has a dozen specialized equivalents in Rust, just because Rust needs the additional information to do its memory safety magic correctly.

The entirety of Rust and its stdlib has a huge 'semantic surface' compared to most other languages (even C++), and I think this difference in the semantic surface size to other languages is exactly the one thing that either attracts or repels people to/from Rust ;)

flohofwoe··on Rewriting Bun in Rust
It depends a lot on the coding style. The sort of Rust code that's heavy on Rc, Arc, Box, RefCell etc... (e.g. the typical band-aids to work around borrow checker restrictions) will be slower than typical C++ code (it's also possible to kill performance in C++ of course, just use std::shared_ptr for everything). E.g. I'd wager that performant Rust code is trickier to write than performant C++ code because you'll have to design your entire Rust codebase around borrow checker restrictions, while C++ lets you 'cheat' without having to fall back to helper types that incur runtime overhead.
flohofwoe··on Rewriting Bun in Rust
> and you decide to drop to down to C++

Going from Rust to C++ seems a strange choice, since you get most of the same problems just without memory safety. Zig, Odin, C3 or even plain old C though? At least those languages have things to offer that neither Rust nor C++ provide (and if it's just compilation speed).

← PreviousPage 15 of 34Next →