HNHacker News
TopNewBestAskShowJobs

flohofwoe

23,650 karma · joined October 15, 2013

submissionscomments
flohofwoe··on If-then-else had to be invented (2020)
It's often used for more immediate 'consequences', like "Ich muß los, sonst verpass ich meinen Zug" (I need to leave, otherwise I'll miss my train).
flohofwoe··on The 'else' keyword is probably a literal translation from German (2020)
Yeah, but "wenn-dann-sonst" rolls better off the tongue ;)
flohofwoe··on The 'else' keyword is probably a literal translation from German (2020)
Hmm, to me as native speaker, 'sonst' has pretty much only one meaning which is pretty much exactly 'or else'. There's a longer and 'more archaic' version 'ansonsten'.
flohofwoe··on If-then-else had to be invented (2020)
The most likely German candidate would be 'sonst', which would be both in common use and short enough for a programming language keyword. E.g. the most likely option for 'if-then-else' is 'wenn-dann-sonst', assuming that German-origin theory is right of course.

One thing that's mostly forgotten today is that German had a very rich 'corpus' of wonderful nerdy computer science words up until the 1990s which unfortunately has fallen out of fashion. Nowadays it's a pretty terrible 'pidgin dialect' when Germans talk about programming and computers to each other (to a point where it's much less awkward to just speak English in the first place lol).

flohofwoe··on MacBook Pro with PROLED XDR Display and Touch
Maybe it comes and goes like the Touch Bar (yeah I know, quite unlikely, but one can dream) ;)
flohofwoe··on Four Months of Zig
> Completely destroying any forward compatibility!

Microsoft breaking the ntdll.dll function interface is extremely unlikely, there's too much popular software in the wild depending on it.

flohofwoe··on Four Months of Zig
> This is what RAII semantics in C++ are for.

...which typically has more overhead than a good GC though and much more overhead than using arenas for lifetime management.

flohofwoe··on Four Months of Zig
That just means you haven't run into the problems yet that a global allocator brings with it. Other people have and welcome the better control over allocation provided by the Zig std library. The challenge is of course to balance convenience and flexibility. Also if you write code that prefers to not allocate in the first place (which should be the default), you're not affected anyway.
flohofwoe··on Ghostty 1.4
For me it's simply that iTerm2 got really fat over the years, and Ghostty was a nice and slim alternative - plus it has one of the better Kitty Graphics Protocol implementations which is fun to tinker with. e.g.: https://github.com/floooh/chipz-kitty (needs zig-0.17.0).
flohofwoe··on New 14‑inch MacBook Pro with M6
Why would you want greasy fingerprints all over your display and gorilla arm syndrome when there's a perfectly fine keyboard and touchpad attached to the display for free?
flohofwoe··on New 14‑inch MacBook Pro with M6
Hmm, still no OLED displays? I wonder what's the holdup? (I have a fairly mainstream PC laptop with OLED display, and the display is the one thing where my MBP looks pretty poor in direct comparison).
flohofwoe··on Software may be getting worse, but it used to be horrible
Yeah PC was a horrible platform before Win2k, but there was a beautiful short time period when we had alternatives like Amiga, Atari, NeXT and SGI (NeXT and SGI too expensive for the average nerd of course, but those machines played the same role as Ferrari or Lamborghini for the Opel Manta and Ford Escort garage tinkerers ;)
flohofwoe··on I still teach OpenGL ES 3.0
Fortunately "beauty lies in the eye of the beholder" ;) I definitely prefer the D3D model instead of the extension soup of GL or Vulkan.
flohofwoe··on I still teach OpenGL ES 3.0
Very interesting. Thanks for the insights! ...and yeah, Larrabee is an interesting case, I actually wonder whether it's time for another attempt :)
flohofwoe··on I still teach OpenGL ES 3.0
> don't forget that the drivers for GPUs would until recently get updates to patch specific video games for performance issues (not sure if they still do that ?)

I bet it's all the same if not worse, and that's why GPU drivers are closing in on the gigabyte "sound barrier" (and I guess on Linux that part is played by Proton... e.g. I bet there's a ton of game-specific 'workarounds' in Proton, if not for performance, then at least to fix 3D API misuse).

flohofwoe··on I still teach OpenGL ES 3.0
The rigid resource binding model via BindGroup objects in WebGPU is already outdated (and funny enough, an area where WebGPU is actually slower than WebGL2, at least when assuming that bindings need to change frequently and unpredictably).

This was a restriction of the Vulkan 1.0 API and modelling the WebGPU resource binding model around that was a quite predictable problem. It would have been better to come up with a slim abstraction that might cost some performance on Vulkan (which is only really relevant on Android phones and Linux desktops), but at least would not slow down WebGPU across all platforms.

And now even the Vulkan maintainers have realized the problem and are introducing the much more flexible descriptor-heap extension (about a decade late, but better late than never).

WebGPU is essentially the frozen cross-section of 3D APIs from about a decade ago, and the state of GPU hardware from about 15 to 20 years ago (but tbf, apart from the broken binding model there wasn't much that could be done, because most restrictions are coming from mobile GPUs which a browser 3D API simply must support).

flohofwoe··on I still teach OpenGL ES 3.0
> If they can’t program in C/C++ and debug the error messages how are they going to survive in the wild?

The problem is that you don't get *any* error messages from native GL in the first place (unless you wire up a debug-message callback via the optional KHR_debug extension which isn't available everywhere), and the builtin error system via glGetError() is pretty much completely useless.

Other APIs don't suffer from this problem, D3D, Vulkan and Metal all have excellent validation layers which give very helpful messages, and WebGL or WebGPU running in browsers basically implement such a validation layer out of the box.

flohofwoe··on I still teach OpenGL ES 3.0
Tbf, it all depends on how deep you look into the fractal ;) The main differences between the modern APIs are in how resource binding is done, but many other concept overlap quite well between Vulkan, D3D12 and Metal (especially in more recent Vulkan revisions).

> Of all of these, only Metal has a reasonable on-ramp for newcomers to 3D graphics.

...unless you start with Metal 4, which is bringing in a lot of Vulkan/D3D12 concepts (for better or worse, it's definitely not great for 'convenience' but may help with porting Vulkan or D3D12 code over).

flohofwoe··on I still teach OpenGL ES 3.0
> writing a good constant buffer manager is witchcraft

Tbh, I think the main lesson is simply to not try to work around the specific 3D API conventions too much, e.g. don't try to shoehorn mechanisms into the D3D11 layer that would be straightforward in Vulkan or D3D12 but would disable the special fast-paths in D3D11.

E.g. for a traditional "one uniform update per draw call" loop with one small constant buffer per shader updated via plain old UpdateSubresource(), D3D11 is incredibly fast (you can easily do hundreds-of-thousands update+drawcall pairs like this per 60Hz frame on a somewhat recent - e.g. post-2016 or so - mid-level gaming PC.

Of course trying to emulate D3D11 on Vulkan or D3D12 might have all sorts of issues that don't exist on a good "native" D3D11 driver.

Also somewhat related: in a GL shim it's typically still faster to update uniform data via the old glUniform*v calls instead of using uniform buffers, apparently most GL drivers lack the special fast-path optimizations of small D3D11 constant buffers, and the more abstract glUniform calls seems to give the driver more 'wiggle room' to implement an optimal upload path.

flohofwoe··on I still teach OpenGL ES 3.0
> they also contain a whole lot of fixed function hardware that is specialized for real-time computer graphics. This hardware isn't exposed as "fancy instructions", it is set up in other ways, which is achieved through a device driver.

Those hardwired fixed-function parts are getting fewer and less important though (ok, and then raytracing units entered the scene...). Also AFAIK something like a texture sampling operation is indeed a 'fancy instruction'(?), even though the actual texture sampling is done by a 'fixed function' hardware unit.

> This also necessitates a device driver to manage scheduling, synchronization, etc. with the main OS.

I bet this type of GPU/CPU handshaking work could also be baked into the hardware (similar to CPU mirocode) and exposed via a standardized memory mapped IO interface (or whatever the current mechanism is for letting the CPU control the GPU). E.g. a CPU also implements similar protocols to talk to the rest of the computer system (e.g. memory and other CPUs), but this is mainly implemented as "hardware protocols" - drivers "just" offer more flexibility for hardware vendors because they can delegate the standardization into software.

...also a lot of the "CPU / GPU software ecosystem" was probably shaped by CPU and GPU vendors historically being different companies, and once the big consolidation started, the conventions were already set in stone.

flohofwoe··on I still teach OpenGL ES 3.0
I think most of it comes down to 'historical accidents' tbh.

E.g. if CPUs would have closed ISAs and heavily guarded IPs, you'd also need a 'driver' and an 'OpenCPU API' to make any use of them (of course the public ISA of a CPU is essentially the driver interface baked into the hardware).

The other big difference is focus on decent single-thread performance for CPUs versus performing thousands of small tasks in parallel on GPUs, but each one slowly. This difference causes a different programming model (e.g. running an entire application in a single 'main' function from start to finish, versus spawning small specialized tasks which are running across hundreds of threads).

And the specific problem with Vulkan is that it tried to solve two conflicting requirements: on one hand being an explicit low-level API without 'magic abstractions', on the other hand supporting very different GPU architectures (especially the mobile GPU zoo). The resulting mess was quite predictable to be honest...

flohofwoe··on I still teach OpenGL ES 3.0
I mostly agree regarding GL's programming model, but tbf some problems have been fixed by WebGL2 (much better validation and error reporting - e.g. very helpful error messages right on the browser console - and it's probably the least buggy and most portable 3D API implementation of them all, including the current state of WebGPU.

For teaching I would generally use the web browser via WebGL2 or WebGPU, just because those APIs require much less boilerplate in the browser environment to get to your first triangle and the edit-test-loop is pretty much instant.

flohofwoe··on I still teach OpenGL ES 3.0
> but I wish there was a middle ground between it and VK

There's WebGPU (probably the best option for teaching), D3D11 and Metal.

And (shameless plug): sokol-gfx tries to find a balance between simplicity and modern 3D APIs:

https://github.com/floooh/sokol

Demos with links to C source and shader code:

WebGL2 backend: https://floooh.github.io/sokol-html5/

WebGPU backend (has a couple more demos which use features not available on GLES3.0/WebGL2, like compute shaders): https://floooh.github.io/sokol-webgpu/

flohofwoe··on Lula wins election after final votes tallied
I wouldn't mix countries and software projects though. When the "benevolent leader" of a software project goes crazy there will be a bit of social media drama and that's it. When the same thing happens in a country, people are massacred (and in essence this is also the reason why countries shouldn't be governed like a company, a country can't simply shut down like a company when things go south).
flohofwoe··on Where the Romans Fought (interactive map)
I would guess because the whole region is surrounded by mountain ranges which must have been impassable "jungle". E.g. the Ore Mountains in the north were only settled after 1000 AD and mostly because of various "silver rushes". I guess the Bohemian forest to the west was similar harsh, no large rivers like the Rhine to transport troops on, and the whole area probably a scary, dark and "barbarian" wilderness like Germania north-east of the Rhine. Just speculating though :)
flohofwoe··on Iron Age salt-mining complex found beneath Hallstatt in Austria
> German is a language where in the written form you look at the letters and you immediately see how it is spoken.

Lol, written vs spoken German is just as ambigious as any other language with too few letters in the alphabet. Just look at "ich" vs "ach" (and then of course there's dozens of local dialects that don't even have spelling rules and would need even bigger alphabets if "done right").

flohofwoe··on Lula wins election after final votes tallied
> you will never have a truly excellent leader

Democracies shouldn't have a "leader", they should have functional governments and strong oppositions. Focusing on a single person never ends well.

flohofwoe··on Lula wins election after final votes tallied
Tbh, a single politician should never have enough power to move the needle significantly to either side. And even in companies, the "bus factor" is a thing (eg everybody must be replaceable).
flohofwoe··on German court calls Google aerial imagery 'spying'
Google Maps is by far the most popular (in Germany).
flohofwoe··on German court calls Google aerial imagery 'spying'
Probably short for https://www.immobilienscout24.de/ the popular digital marketplace for real estate in Germany.
← PreviousPage 2 of 34Next →