Better HN
topnewbestaskshowjobs
Log inSign up

ben-schaaf

4,406 karma · joined Nov 11, 2015 (11y ago) · 1,267 submissions

Submissions

comment 16h ago · link · parent

It's a neat demo, but not applicable for a UI toolkit. Sure, if you render text poorly you can achieve much greater speeds. You don't need to look hard to see artifacts even at regular font sizes with this approach.

Do the same demo with proper font atlases and proper blending and you won't be seeing that same level of performance.

comment 2d ago · link · parent

This saves you some work of drawing glyphs, but you now need to blit that whole buffer. So you've gone from a single color background fill and rendering a full page of text, to a offset framebuffer copy and then a small partial render. In terms of memory bandwidth I don't think you're coming out on top here.

comment 2d ago · link · parent

Real applications don't use 8 bit grayscale font glyphs; there's colour glyphs and subpixel Antialiasing, and subpixel positioning. Commonly you're storing 3 channel alpha (or color), and 6 copies of each glyphs at different subpixel positions. You're not blitting these glyphs, you're blending them with the background. Font atlases do not fit in cache, especially at 4k. You also need to not just write the framebuffer, but also send it to the GPU. On some systems that can be done quickly, on others you're going over PCIe. And on top of all that, you have the data structures that are telling you what text to render where, which further fill the cache.

All that to say, your example of blitting a single color is very, very far away from the practical reality of rendering a GUI.

comment 2d ago · link · parent

Not really true in Python. Data is already in the form of C structs, and the runtime deals with them about as well as you can.

comment 2d ago · link · parent

Pegging the CPU while scrolling - a common action that takes a full rerender - is not good enough in this day and age. Your best case scenario still doesn't achieve the minimum for a 4k120hz display. Take into account text with subpixel-antialiasing, and that resolutions scale to ok now and you'll quickly find CPU rendering unusably slow.

Shader compilation basically doesn't matter. The number of shaders needed for a GUI toolkit is tiny, and none are particularly complex. In my experience it doesn't appreciably add to the startup time.

I do agree there should still be CPU rendering for when the GPU doesn't work. It's a particularly useful feature for old or virtualised hardware.

comment 3d ago · link · parent

This argument falls apart when you consider that any app can use JavaScriptCore to JIT arbitrary code. Any app can also include an interpreter for arbitrary code.

Apps can ship engines that can run arbitrary code, it just needs to be so slow that it can't compete with WebKit.

comment 5d ago · link · parent

And according to linguistic perscriptivism, the upper case of ß is ẞ since 2017. (SS is also allowed, but no longer preferred)

comment 1w ago · link · parent

I did a quick test on various of my rust projects. Most of them it failed to run, on one it miscompiles(?) causing a test case to fail. The only project I got it to run without issue is a basic actix-web website. It takes a whole 14 seconds to actually start the web server. A clean compile is only 24s for all dependencies, and a regular incremental debug build is 2.3s.

The hot patching is unusable. It takes 11s to compile the patch after a simple change: (Some("hi") -> None), and then relax gets a compiler error when refreshing the page.

The project where it miscompiles only has a few very basic dependencies; a clean compile takes 1.3s, incremental just 0.25s and tests take ~0.1s. Relax takes a whole 1.4s to run the tests (unsuccessfully).

comment 1w ago · link · parent

> Yes, it's something that should be pushed back on...

How do you envision that pushback if it's not people complaining about it?

comment 2w ago · link · parent

> resize retained mode ui windows and the fps drops to like 2

This just isn't true? Every desktop application I use uses a retained mode UI and most of them resize smoothly. Most of the ones that don't are electron.

I genuinely don't understand how you can make this claim right after agreeing with me that the only difference is the caching. You can't seriously be claiming that by just adding a layout cache you lose 30x performance?

comment 2w ago · link · parent

> you can cache layouts with immediate mode libraries

There's all sorts of caching you can do with immediate mode; like you said, caching the layout in a large list. The end result is the same as retained mode, with all the same complexities. Might as well skip reinventing the thing.

> try updating the entire list...

If you're comparing like-for-like, whether you're doing layout for the entire UI in immediate mode or retained mode shouldn't make a big difference. You're doing the same calculations after all.

> but i can make strong claims about the benefits of not needing to duplicate your state inside of your ui framework

I've found it's often not necessary to duplicate state in the UI framework; you can frequently make UI controls the owner of the state.

comment 2w ago · link · parent

I work on a GUI toolkit professionally. Immediate-mode libraries are cool, but they absolutely in no way shape or form scale better. Having to evaluate and layout the entire UI for every state change is fundamentally not scalable. Doubly so if you need to do this multiple times to reach a steady-state layout like you do in some cases with egui.

comment 3w ago · link · parent

Anyone making this claim just hasn't played a lot of factorio, because this just isn't true. Player feeding is fast in the early game, but it just doesn't scale. There's too many buildings to feed and it takes too long to walk between them. People have already made tool assisted speedruns, and as expected it involves building a huge automated factory as quickly as possible.

comment 3w ago · link · parent

You don't need an OLED to get poor text rendering on macOS, that came for free with Mojave when they removed subpixel antialiasing.

comment 4w ago · link · parent

I agree it's fine and good that they want to sell this and keep it accessible for individuals, but modifying a CC-NC license and then calling this "open source" is not it.

If everyone followed this model instead of open source, then Corridor Key itself would have to cover dozens of software licenses for all it's dependencies.

comment 1mo ago · link · parent

The execute stage very much modifies state; in fact it always modifies state. Any non-memory instructions modify registers, and any memory instructions either write to registers or to memory. Even a noop will increment the instruction pointer, so you're always modifying a register regardless.

comment 1mo ago · link · parent

Reading that code there's a 48-bit counter used for each millisecond, so ~281 quadrillion UUIDs per second.

comment 1mo ago · link · parent

Not sure the point you're trying to make, it sounds like you're agreeing that dumb TVs should be cheaper than equivalent smart TVs?

comment 1mo ago · link · parent

Monitors have also gotten incredibly cheap, and there's Sceptre who sell dumb TVs that are pretty cheap. So I don't really buy that they're selling TVs at a loss.

comment 1mo ago · link · parent

That's why Anthropics C compiler worked so well; because they had gcc's huge repository of tests to lean on. Oh wait...

comment 1mo ago · link · parent

Quake DOS is from a year earlier to Shadow Warrior and it would get around 60fps at 320x200 on a Pentium II 266. The Xeon from that video is from 2008, and from geekbench 2 results it's ~30 times faster than the pentium. 1600x1200 is 30 times the pixels of 320x200.

Additionally Shadow Warrior used some newer rendering techniques, so it's possible they don't scale well to higher resolutions.

Sources: * https://framebuffer.io/project/quake * https://browser.geekbench.com/geekbench2/327940 * https://browser.geekbench.com/geekbench2/529270

comment 1mo ago · link · parent

So if you compare a diesel to a petrol-hybrid, and you use the diesel's NEDC rating and compare it to the hybrid's WLTP rating, then number bigger!

Lets make a real comparison: The NEDC combined rating for the 2025 e-POWER is 5.4l/100km (FWD). The 2018 diesel version you linked uses 5.6l/100km, and the petrol 2018 version uses 6.2l/100km.

For a truly fair comparison you could have looked at the non-e-power versions from 2025, which come in at 7.4l/100km.

comment 1mo ago · link · parent

That's still (usually) the public paying for it. Parking permits are generally hilariously cheap compared to the market value of the land they reserve.

comment 1mo ago · link · parent

This doesn't ring true. Shit goes wrong all the time, and we put people in the loop to fix things when it does.

comment 2mo ago · link · parent

Plugins are a frequent culprit of issues like this. Depending on how you're tracking memory usage you may already be able to at least narrow down the culprit by looking at which process is using too much; plugins run on a separate process and may launch additional processes from there.

Unfortunately tracking individual plugin memory usage is not possible without invasive (and slow) tracing. If the plugins are causing big memory usage in the main process it can be hard to nail down due to that state being shared between all plugins.

comment 2mo ago · link · parent

Most plugins just work in Python 3.14. Python didn't break backwards compatibility that much.

comment 2mo ago · link · parent

Hard to compare the two programs over a week of uptime. ST memory usage does get larger as caches get filled over time, but I've had uptimes of months without issue. I'd expect similar results from other editors.

Do you have a specific memory issue where it keeps using more over time?

comment 2mo ago · link · parent

If you compare like for like, ie. take the process node out of the picture, then you need to compare the Ryzen 9000 series to the A16, as both use TSMC's 4NP process.

comment 2mo ago · link · parent

Thanks, we've got a fix for this in the works.

comment 2mo ago · link · parent

We put a fair amount of effort into reducing our resource footprint, so I'm curious what you find lacking in our memory management. From a quick test we use a similar amount of memory to Zed.
12345
43