HNHacker News
TopNewBestAskShowJobs

flohofwoe

23,650 karma · joined October 15, 2013

submissionscomments
flohofwoe··on Learn OpenGL, extensive tutorial resource for learning Modern OpenGL
> as it's not possible really to debug a WASM application

...as others have said, this is a solved problem and has been for quite a while:

https://marketplace.visualstudio.com/items?itemName=ms-vscod...

I might even go that far and say that this solution is on average more robust and more responsive than debugging native code in Xcode.

flohofwoe··on The PImpl idiom and the C++26 std:indirect type
This std::indirect thingie looks more like a general helper for any data 'dangling off' an object, not limited to pimpl.

Not sure how much pimpl is used in reality, but it's a pretty ok solution to speed up build times (apart from unity builds), because it avoids having to include headers that are only needed for the private state into the public interface header.

flohofwoe··on The Visual 6502
Shameless plug: I wrote a 'remix' a couple of years ago over a Christmas break using WASM+WebGL+DearImGui with better rendering performance, integrated assembler and a couple visualization tools (using the visual6502 team's original reverse engineered netlist data, and https://github.com/mist64/perfect6502 as simulation loop):

- 6502: https://floooh.github.io/visual6502remix/

- Z80: https://floooh.github.io/visualz80remix/

- 2A03 (this was contributed): https://floooh.github.io/visual2a03remix/

- source code: https://github.com/floooh/v6502r

(the simulation generally runs throttled to 1 half-clock-cycle per frame, so don't use it as any sort of benchmark)

flohofwoe··on Learn OpenGL, extensive tutorial resource for learning Modern OpenGL
> write old OpenGL and translate it on the fly to Vulkan

Apple's OpenGL on macOS and iOS has been a shim over Metal for a very long time. The feature set is stuck somewhere between GL 3.x and 4.1 though (e.g. no compute shaders), but not for technical reasons.

flohofwoe··on Learn OpenGL, extensive tutorial resource for learning Modern OpenGL
The problem with OpenGL isn't so much that its programming model is outdated, but that it is an incredibly confusing and (in many places) just plain badly designed API (just look at VAOs, it's hard to come up with a more broken and useless feature - some of the problems have been salvaged on more recent OpenGL versions, but those are not portable to macOS or GLES3.x).

Another (related) problem is that the many sediment layers that have accumulated over nearly three decades are not clearly separated (and Vulkan is starting to suffer from the same problem btw, there's always at least five different ways to do the same thing, three of which are outdated or not recommended to be used on specific GPU architectures, and the other two have complicated relationships and interdependencies with other redundant or optional features, it's apparently some sort of Khronos curse to always create the biggest possible mess when it comes to 3D APIs).

On Windows (maybe even on Linux via Proton), starting with D3D11 makes a lot more sense, or on macOS with Metal v1. Both APIs are 'close enough' to modern 3D APIs to carry a lot of the knowledge over, but without being too low-level like Vulkan or D3D12, WebGPU running in browsers is also a good choice (even though it inherits some bad design decisions from Vulkan 1.0 when it comes to resource bindings, and is in some places actually slower than WebGL2).

flohofwoe··on Cruller: Bun's Zig Runtime, Continued on Zig 0.16
You never run a git blame or git bisect to find out when and under which circumstances a regression or bug was introduced, and why this specific change was made? That might work for a while on a personal project, but is essential in a team project. It's not uncommon that by fixing a bug you also accidentially undo an actually intended change. Doing some software archeology in the git history and tracing back the steps that led to the bug/regression usually prevents that sort of thing. You'd also want to notify the person who introduced the bug (and if this is a good and honorable chap, they'll fix the bug themselves).
flohofwoe··on Cruller: Bun's Zig Runtime, Continued on Zig 0.16
...strange, I remember the drama like it was just yesterday ;)

But anyway, GCC was already an established and popular compiler at that time.

flohofwoe··on Amiga 1000: Ten years ahead of its time
A VGA card was not in every aspect better than the Amiga custom chipset, otherwise Doom would have happened much earlier. The 256 color mode only really made sense when coupled with a powerful enough CPU which had enough oompfh to update each pixel each frame (for instance Doom's recommended spec was a 486). For some 2D graphical effects, the Amiga could do much more with much less hardware power and for a much lower price.

But where the Amiga really was ahead was in software, it took the PC until Win95 (arguably, until NT4) to implement 'proper' multithreading and to finally get a desktop UI that wasn't a complete joke, and the Mac only got preemptive multitasking with OSX in 2001. Amiga was basically the poor man's UNIX-like workstation when you couldn't afford to shell out somewhere between 10k and 100k for a NeXT, Sun or SGI workstation.

flohofwoe··on EU fines Google €890M for competition breaches over search and apps
Not of the Finnish kind ;)
flohofwoe··on Amiga 1000: Ten years ahead of its time
Back on the Amiga 3000 we had built our asset creation tools for a game that eventually ended up as Urban Assault on the PC. This was a wild mix of custom-made and standard tools wired together via AREXX and controlled with a little macOS dock like icon toolbar, and all integrated with the workbench file manager.

E.g. one such custom workflow would be to "pipe" an image file created in DPaint into some standard image processing tool (forgot the name, basically like ImageMagick, but as a UI tool) to change the pixel format, scale and filter, then piping the resulting output image into a custom tool to convert into an engine specific texture format, all the while updating some asset database files, and IIRC also creating an icon file in the process.

Most of this can also be achieved with a pure cmdline workflow today via Python or Node (by glueing together tools like ImageMagick, ffmpeg, various asset pipeline tools), but the special sauce on the Amiga was that most 'modern' UI tools adhered to standards defined by the Amiga team for cmdline usage and scripting.

The 'plugin architecture' was mostly about datatypes (globally available file format encoders/decoders), BOOPSI UI components and 'Commodities' (IIRC small background tools that could intercept and manipulate system events).

flohofwoe··on Amiga 1000: Ten years ahead of its time
Hard to argue with that tbh, what a beauty.
flohofwoe··on EU fines Google €890M for competition breaches over search and apps
Could a mega-project like Linux have originated in the US instead of a Finnish bedroom? I have my doubts tbh, it takes an absolute madman to start such an obviously doomed project without any business potential ;)
flohofwoe··on EU fines Google €890M for competition breaches over search and apps
You think all those deranged nuclear threats from Dmytry Medvedev and all those "Russki Mir from Lisbon to Vladivostok" imperial phantasies are some "good tsar, bad boyars" bullshit? Russia won't stop unless they are stopped or at least incapacitated for the next few decades.
flohofwoe··on EU fines Google €890M for competition breaches over search and apps
> It will have properly filled compliance papers

Sounds like a perfect job for AI tbh ;)

flohofwoe··on EU fines Google €890M for competition breaches over search and apps
> Trump gonna respond to this with an escalation for sure

This is basically the equivalent of the weekly nuclear annihilation threat from the Moscow direction ;)

Also see: https://en.wikipedia.org/wiki/China%27s_final_warning

flohofwoe··on Amiga 1000: Ten years ahead of its time
Ok I had to upvote you for old times sake and to honor the eternal Amiga-vs-Atari flamewars. But of course you are obviously and objectively very wrong.

Amiga 4 Ever! :D

flohofwoe··on Amiga 1000: Ten years ahead of its time
Not surprising since this is a floppy-based system. An HD-based A3000 cold booted faster than most modern systems:

https://www.youtube.com/watch?v=G-e3w7Hh9eU

Also gp talks about input responsiveness (e.g. key and mouse input), and that has indeed much less latency on those old-school home computers than on modern systems where each input event goes through layers and layers of abstraction bloat before causing a visible change on the display.

flohofwoe··on Amiga 1000: Ten years ahead of its time
> 1. The mouse is a hardware sprite and its movement stays responsive and smooth even under heavy load and even when the OS freezes

Tbf that's also how it works in modern operating systems. The mouse cursor is a hardware overlay (e.g. a more powerful 'sprite') which is rendered independently from the rest of the screen (without this the mouse cursor would have a very obvious lag, as can be observed in some games that use a 'software mouse cursor').

Also theoretically at least, Windows has a feature where it bumps the thread/process priority of the application that owns the active window to make interaction feel more responsive, but this seems to get lost in the overall complexity, e.g. with some touchpads it's not uncommon that the mouse cursor gets completely stuck under high load. AmigaOS had such a 'bump active application priority' too, but unlike on Windows this feature actually worked.

What made the Amiga mouse so extremely responsive is that the mouse movement code was (more or less) directly reading the hardware registers from inside an interrupt instead of having to go through tons of abstraction layers and an event system like on modern operating systems.

> 2. A screen can be divided into multiple resolutions

AFAIK this has also 'kinda sorta' survived as GPU hardware overlays. It's just hardly used in operating systems except for video playback (and mouse cursors). The special sauce of the Amiga was that the operating system actually made use of low-level hardware features instead of using those features only in games.

flohofwoe··on Amiga 1000: Ten years ahead of its time
For some aspects, the Amiga is still ahead of today's tech. AmigaOS 2.x layed out a vision of the desktop UI as a malleable and personalizable toolbox (or one might say "workbench" heh) like no other operating system since then.

The Amiga team envisioned a desktop environment future which focused on being a productivity tool instead of an interface for passive media consumption and doom scrolling, where graphical user interface and command line environments were tightly integrated with each other, where the philosophy of 'doing one thing right' was extended to the GUI and where highlevel operating system features could be extended via a standardized plugin architecture. The closest thing we have today is probably game modding.

This grand idea was essentially "sacrificed on the altar of commerce" on Windows and macOS. Desktop Linux could carry that flag forward if it had a consistent vision for the desktop environment, but alas it wastes those resources on irrelevant technical details like creating yet another half-assed Wayland compositor and that way increasing fragmentation instead of reducing it.

As a former Amiga user it amuses me to no end that we're now pivoting back to TUIs (see Claude Code) instead of attempting again to make those two worlds (GUI and cmdline) work together.

flohofwoe··on Cruller: Bun's Zig Runtime, Continued on Zig 0.16
Spare us the concern trolling, Zig will be fine.
flohofwoe··on Cruller: Bun's Zig Runtime, Continued on Zig 0.16
I think there are quite a few high profile examples where the fork was successful (egcs comes to mind which eventually became the official gcc, also all the BSD flavours). And even when the fork ultimately isn't successful, it sometimes at least forces the original project to adapt (e.g. ffmpeg vs libav).

E.g. "it's difficult to make predicitions, especially about the future" ;)

PS: of course for this specific project I don't quite understand the reason. The original Bun was largely a line-by-line port of esbuild from Go to Zig, so it's not like the original codebase was a marvel of engineering to begin with...

flohofwoe··on Codeberg bans vibe coded projects
I would argue that reality is what those different tribes perceive as "the truth", and from that pov there can indeed be different realities existing side by side ;) I wish that everybody could agree on the same objective truth, but that seems to a pipe dream, especially in the "information age".
flohofwoe··on Codeberg bans vibe coded projects
Not sure if a non-deterministic copy-paste is really filling a gap ;)

But yeah, there are areas in software development where AI assistence is actually useful, I just see code-generation as one of the less useful areas, since tbh this isn't a problem that needs urgent solving. IMHO LLMs are much more useful for passively analyzing/bugscanning code bases (or data in general).

flohofwoe··on Codeberg bans vibe coded projects

    > user: veeti
    > about: Just trolling.
Well, at least you're upfront about it ;)
flohofwoe··on Codeberg bans vibe coded projects
> But only one will come true.

Eh, if this would be true than we would have arrived at a single religion, a single language, a single economic system or a single political ideology. Reality is the opposite, ideas tend to diverge instead of converge.

E.g. the 'agentic engineering believers' will just be another tribe in the jungle.

flohofwoe··on Codeberg bans vibe coded projects
> I always resented having to write the same code over and over,

Those problems had been solved in the 1970s and don't need LLMs. One solution is called 'copy-paste', another 'software libraries/components' ;)

flohofwoe··on Codeberg bans vibe coded projects
I'd guess that it only matters once shit hits the fan (e.g. a copyright dispute or license violation). E.g. when the project owner claims that he wasn't aware of the violation because LLMs wrote all the code, Codeberg can simply point to the terms of use before deleting the project, which from their point of view is a quick and clean solution to the problem.
flohofwoe··on Minecraft: Java Edition now uses SDL3
Tbf, exclusive fullscreen is quite exotic nowadays (as opposed to rendering into a fullscreen window). Window managers will typically apply the same optimizations to a frontmost fullscreen window as was done in the past only for exclusive fullscreen.
flohofwoe··on Claude Code uses Bun written in Rust now
An interesting tidbit is that large parts of the original Bun source code was a line-by-line port of esbuild from Go to Zig (mentioned here: https://bun.com/blog/bun-in-rust), tbh this lowered my respect for the project a bit (a line-by-line port simply isn't as interesting as original work), and it might also explain the subpar Zig code quality (a line-by-line port from Go to Zig simply won't result in idiomatic Zig). It also might explain why porting from Zig to Rust was done 'on a whim', the actual source code (and the idea of 'original work') never seemed to be all that important to the author (and I wouldn't be surprised if the project does more language-hopping in the future heh).
flohofwoe··on Perforce charges $500 for training training videos.. and it's AI narrated
You want to have your original art files (before they enter the asset pipeline) in the VCS (photoshop images, 3d models, maybe even videos), basically *all* files associated with the game project. Those source asset files are usually in the 5..20 MByte range, and up to 100 MByte isn't all that unusual either. Git (even with the LFS crutch) completely breaks down in such a scenario because it was designed for handling mainly text (while in game dev projects at most 1..5% of all source data is text (by number of files, several orders of magnitude less by size). Even good ole SVN is much better in that scenario than git (assuming you run SVN on a big, dedicated inhouse server).
← PreviousPage 14 of 34Next →