site banner

Small-Scale Question Sunday for June 15, 2025

Do you have a dumb question that you're kind of embarrassed to ask in the main thread? Is there something you're just not sure about?

This is your opportunity to ask questions. No question too simple or too silly.

Culture war topics are accepted, and proposals for a better intro post are appreciated.

1
Jump in the discussion.

No email address required.

Anyone have particularly strong feelings about best (or worst) UI libraries? I spent a good part of the weekend trying to take a more serious attempt at familiarizing myself with Avalonia, but I'll admit user interface work is always something I've dabbled with rather than gotten a great understanding of, and at the dabbler's level a lot of great or terrible code gets completely buried by the strength (Visual Studio) or weakness (oh boy, QT!) of IDE-focused tooling, or the difficulty of entry (ia ia OpenGL fhtagn).

I wonder if anyone has tried gpui?

https://www.gpui.rs/

It powers https://zed.dev/ which I likewise have never used, but seems interesting and more performant than electronslop.

I have strong feelings that GUI toolkits have never been done well. All existing solutions are bad, and they’re mostly all bad in the exact same ways.

The root of the problem is smart people want to work on things where they can deliver formal results—and in many areas of software engineering, you can! Databases, type systems, even graphics to a large extent are all backed by substantial formal theory (even if the users of these technologies are largely unaware).

UI, on the other hand, has no backing in formal theory whatsoever. It’s like knot theory in mathematics, or the Collatz conjecture—nobody even knows where to start to make progress in a direction anyone would care about.

The OG Macintosh GUI toolkit was absolutely excellent -- a real revelation to a young programmer, and an intro to O-O done right in my case.

A port/replication of the application side of that would be an interesting OS project -- I doubt the codebase is available, but the IP issues (which led Windows down its monstrous path) should be gone by now, and it was extremely well documented.

UI, on the other hand, has no backing in formal theory whatsoever. It’s like knot theory in mathematics, or the Collatz conjecture—nobody even knows where to start to make progress in a direction anyone would care about.

This isn't remotely true. If you care to look at the literature, particularly slightly older, you'll find there are plenty of commonalities backed by usability research. The fact that (particularly modern) UIs so often ignore them doesn't mean the data and "theory" doesn't exist.

"Usability research" is not formal theory. It’s psychology, applied to human-computer interaction. And psychology has one of the worst track records of any field ever.

By formal theory, I mean math you can put into a theorem prover like Coq/Agda/Lean.

At work I use C++ Builder / RAD Studio which makes for ridiculously quick & easy creation of native Windows apps for most any level of UI sophistication, using the VCL windows-wrapper library. Or they have a different library which supports cross-platform native from one codebase. And other than c++, their other language for the same product is Delphi, which I think may be more popular particularly among hobbyists. I'm not a fan of software getting more bloated and laggy in general, so I definitely appreciate the native snappiness.

Most people don't even know these still exist from back in the 90s, when they were Borland turbo pascal & c++ builder, after microsoft poached all those borland engineers to go on to make c# and .net. So it's not exactly the best career choice, if that's your angle. But they are still keeping up with the times, and made a free community version of the otherwise expensive IDE.

In practice, if I just want to get something of simple-moderate complexity done, the best UI library is react. It works, the functional style is nice, there are whatever libraries you need. Web browser APIs have problems, but I'd much rather interact with them than deal with native stuff. UI latency is fine if you don't do anything complicated, a lot of optimization work's gone into the browser, and you get cross platform + mobile easily. Javascript kinda sucks but it's fine. And you probably don't need electron, just make a website.

I love SwiftUI. There are a few other languages that do this as well, but SwiftUI is the one I know best.

I have a lot of trouble with XML-based layout strategies- there are way too many options to actually get right (WPF/UWP/Avalonia), layouts are fiddly and require specific boxes to be checked so your elements don't launch themselves across the screen as soon as you resize the window, and you have to move out of the layout editor to actually code anything.

With these new frameworks, you can just write and call functions directly from UI code, and the code that generates the UI (and calls the other functions you've attached to buttons, etc.) is itself just a function. Spacing/stacking is automatic (compared to XAML where you have to be explicit about literally everything).

It's an absolute joy to use, or it would be if Apple's implementations of certain things weren't so buggy. There's an Ada 2.0 a Rust implementation of this idea, but the downside to that is then you'd have to use Rust.

I’ll just note that anything Electron based is a crime against humanity and should be grounds for immediate execution without a trial.

VSCode is just the spiritual successor to emacs: it's an operating system in search of a good text editor.

I'd rather cut my arm off than touch VSCode.

I dunno, am I the only person who hasn’t noticed performance issues with VSCode? I keep myself to a pretty tidy set of plugins, and the thing lets me edit files just fine. I’m not running an overpowered rig or anything.

This is an open request for horror stories if anyone has them; they’re always good fun.

Most of the common complaints are about minimum memory and CPU footprint; VSCode takes comparable resources to run as far more fully-featured IDEs. But if you've got the specs these are unlikely to actually feel bad, it's just kinda goofy.

The biggest problems are pretty hardware-specific, but they've been pretty bad when they pop up. I've had VSCode pull 16+GB memory (especially bad on an 8GB-RAM system) or peg multiple threads at 100% core utilization just idling, all with the default configuration, no extensions. A lot of it seems very dependent on renderer, especially since it started defaulting to a hardware renderer even on Intel integrated GPUs, but sometimes 'normal' developer workstations with multimonitor configurations have gone really wonky. While a less common use case, I've seen bigger problems with massive files in VSCode than in VisualStudio, Intellij, Android Studio (which isn't great itself!), or NotePad++, sometimes to the point where I had to shutdown the computer because VSCode was capping out CPU utilization so high that I couldn't use the mouse or keyboard.

((I've also had problems with deployments of VSCode, rather than VSCode itself. Which, tbf, usually aren't even the Electron developers faults, but since it includes things like a 40+ GB electron update, it's still worth keeping in mind before committing to VSCode as a day-to-day dev environment.))

VSCode defends itself in many cases by pointing to issues with extensions, and to some extent that's fair: just as it's not the Electron devs fault that a distro screwed up once, it's not VSCoders fault that a random html/css extension can peg a cpu. You can't build a framework that can contain every sufficiently dedicated forkbomb without making it useless. But you're almost certainly going to need some extensions just handle basic compiling and debug functionality. And some of them are pretty bad! My worst experience have been with the Java variants, with high idle CPU utilization across the board, but that's mostly because VSCode is the 'officially supported' tool for FIRST FRC so I see it on a lot of different non-optimized hardware. I don't do much webdev, but the few times I've run into ESLint, even with a minimal ruleset and properly configured (why is apply-rules-on-typing even an option?!) it's been pretty painful.

I actually use it and am pretty happy with it, but it is really heavy. That said, I'm not really trying to run other heavy applications at the same time other than compile jobs, so it's not really inconveniencing on any reasonably-modern hardware ("I have 1-2GB of RAM available for this").

Install Sublime Text, and open the same set of files you have open in VS Code. Note the vast difference in memory usage between the two. When I tried this it was something like 300 MB for Sublime and over 1 GB for VS Code, with like two files open. Just absolutely ridiculous to use that much memory. You can't get away from this no matter what plugins you use either, because Electron is just a resource hog.

That's pretty fair, if not a little lenient.

Well, I just didn't want to be the first to mention eternal torture here...

If I didn't see it for myself, I wouldn't imagine that men are capable of such evil.