Live data from Hacker News

Web browser as GUI, with your preferred language in the backend

github.com

61–70 of 187 posts

Re: Web browser as GUI, with your preferred language in the backend

#61
post #49

Earlier quoted context omitted.

> You comment shows that you have no practical knowledge of the web ecosystem You're talking to a person with 20 years of frontend development experience. But sure, do go on with your assumptions. Also, no idea what "web ecosystem" has to do with the patently false claim of " the most powerful layouting system and rendering engine.", but do go on > The reality is that web is fast enough I never claimed it wasn't. But…

I have also been writing for the web for over 20 years. This doesn't really mean anything though. That is why measures are all that matters. Bad measures are still monumentally better than no measures at all. The sad reality is that most people writing for the web today cannot do so without a framework. They have no idea how the layers underneath actually work. If you want to understand performance you must measure f…

I couldn't agree with you more.

Sadly enough the supercomputers we have still let us get away with the worst of the worst of performances with little penalties

Re: Web browser as GUI, with your preferred language in the backend

#62
post #55
post #51

Earlier quoted context omitted.

Strange then that frameworks advertise how fast they are at rendering, mutating, and creating objects in the DOM, and one of the main JS benchmarks everyone likes to measure their performance by is literally a benchmark about DOM manipulation: https://github.com/krausest/js-framework-benchmark Oh wait. It's not strange. Because state manipulation is a largely solved problem, and even the least performant state manipu…

Which popular frontend framework advertise their DOM mutation speed on their frontpage exactly? Most frontend frameworks I come across nowadays advertise their developer experience and their features, not their DOM mutation speed. And when I say state manipulation I'm not talking about performance, I'm talking about the architecture and people working with the codebase. No one cares about state manipulation performan…

What do you think words like "performant framework for building web user interfaces" (Vue), "rendering is blazing fast, because Lit touches only the dynamic parts of your UI" (lit) and similar mean?

No, they don't mean "our architecture and state manipulation".

> No one cares about state manipulation performance because as you said, it's a solved problem.

Indeed. That's way in any modern all modern frameworks, without an exception, the main focus is how to touch the DOM as little as possible because it's slow as molasses.

Re: Web browser as GUI, with your preferred language in the backend

#63
post #58

Earlier quoted context omitted.

Yes. This has been the case for at least the last 5 years. https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

I only see random Java in synthetic benchmarks, without testing all variations of JIT and AOT compilers available throughout the ecosystem. OpenJDK, GraalVM, OpenJ9, Azul, PTC, Aicas, ART, JikesRVM,.... Not to mention the optimizations that a dynamic language like JavaScript will never be able to take advantage of.

?

openjdk, GraalVM, Corretto

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re: Web browser as GUI, with your preferred language in the backend

#64
post #62
post #55

Earlier quoted context omitted.

Which popular frontend framework advertise their DOM mutation speed on their frontpage exactly? Most frontend frameworks I come across nowadays advertise their developer experience and their features, not their DOM mutation speed. And when I say state manipulation I'm not talking about performance, I'm talking about the architecture and people working with the codebase. No one cares about state manipulation performan…

What do you think words like "performant framework for building web user interfaces" (Vue), "rendering is blazing fast, because Lit touches only the dynamic parts of your UI" (lit) and similar mean? No, they don't mean "our architecture and state manipulation". > No one cares about state manipulation performance because as you said, it's a solved problem. Indeed. That's way in any modern all modern frameworks, withou…

From your own example, here is the text from https://vuejs.org/ as of today:

> The Progressive JavaScript Framework

> An approachable, performant and versatile framework for building web user interfaces.

> Approachable - Builds on top of standard HTML, CSS and JavaScript with intuitive API and world-class documentation.

> Performant - Truly reactive, compiler-optimized rendering system that rarely requires manual optimization.

> Versatile - A rich, incrementally adoptable ecosystem that scales between a library and a full-featured framework.

Yes, performance is mentioned. But it's hardly the main selling point, and they don't even mention DOM manipulation, they're talking about the rendering in general.

Lit isn't even a framework, it's a "web components library".

> all modern frameworks

Yeah, "all modern frameworks" being one framework + one library?

Re: Web browser as GUI, with your preferred language in the backend

#65
post #52

Earlier quoted context omitted.

I've never worked on big enough project to hit such issues. Could you provide some examples? Not that I doubt your claims, just curious

I can provide an example. I work on spaceflight mission planning software that runs in Electron. We're using a lot of cutting edge Web APIs like WebGPU, SharedWorker, OffscreenCanvas, and Atomics. There's no way we would be able to ship something that would reliably work cross-platform if we used the OS's webview or whichever browser they prefer. There's other considerations as well. The biggest advantage Electron pr…

Fair example, although from what You are saying it looks more like its about using features that might not yet be available in os webview.

But the parent post, as well as 'other stories' I see sometimes talk about using certain, 'frozen', older version to ensure compatibility, essentially stating that new releases break some stuff. So i was more asking about such cases

Re: Web browser as GUI, with your preferred language in the backend

#66
post #52

Earlier quoted context omitted.

I've never worked on big enough project to hit such issues. Could you provide some examples? Not that I doubt your claims, just curious

I can provide an example. I work on spaceflight mission planning software that runs in Electron. We're using a lot of cutting edge Web APIs like WebGPU, SharedWorker, OffscreenCanvas, and Atomics. There's no way we would be able to ship something that would reliably work cross-platform if we used the OS's webview or whichever browser they prefer. There's other considerations as well. The biggest advantage Electron pr…

I don't think the difference between Electron and Webui is the JavaScript thing you are talking about because Electron uses a bounded Chromium browser. Webui uses any installed web browser, so both are the same.

True differences:

1 - The big difference is that the Electron backend is ONLY JavaScript, while Webui can be used with any language, C, C++, JavaScript, Zig, Nim, V, Python, Go...

2 - Electron is big, yes, +100MB, but gives you complete control of the window, while Webui is 200Kb, but all it does is run a web browser for you and sends you click events, so you have no control over the window because the browser owns it, not your application. So, Webui is suitable only for quick software development, while "big" projects should use Electron.

3 - Any suggestions?

Re: Web browser as GUI, with your preferred language in the backend

#68
post #63
post #58

Earlier quoted context omitted.

I only see random Java in synthetic benchmarks, without testing all variations of JIT and AOT compilers available throughout the ecosystem. OpenJDK, GraalVM, OpenJ9, Azul, PTC, Aicas, ART, JikesRVM,.... Not to mention the optimizations that a dynamic language like JavaScript will never be able to take advantage of.

? openjdk, GraalVM, Corretto https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Correcto is OpenJDK with Amazon branding, I left it out on purpose.

Still, a dynamic language winning out a strongly typed one, only for those that don't have a clue about how compilers work, or how to write winning micro benchmarks.

Re: Web browser as GUI, with your preferred language in the backend

#70

Zig is just one of the many backend languages this project supports. This link is a better representation of the project as a whole: https://github.com/webui-dev/webui

Ok, let's change the URL to that from https://github.com/webui-dev/zig-webui above. Thanks!
Post reply on HN