Live data from Hacker News

Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

github.com

141–150 of 281 posts

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#141
post #87

Earlier quoted context omitted.

Even putting that aside, just showing text on a screen is much slower on modern PCs then older ones, since you have a far more complicated graphics stack and latency at several added steps. I remember an article a couple of years ago where someone rigged up a camera to measure key press to screen update on different machines and the results were eye opening. edit: found it http://danluu.com/input-lag/ . The Apple ][…

Related, my favourite thread to come out of the queer tech circles: "Almost everything on computers is perceptually slower than it was in 1983" https://threadreaderapp.com/thread/927593460642615296.html

One thing that's illuminating is go to chrome://settings/content/all and sort by "data stored" to see how much local storage websites use. Stuff like vice.com needing 100mb of space on your hard drive for who knows what purpose.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#142
post #37

Earlier quoted context omitted.

I saw Qt and immediately understood what you were trying to say, but for the record: That’s not what native means. Native means “uses the platform widgets and drawing/theming api” and Qt is not native: it actually draws its own widgets (for the most part with certain exceptions on certain platforms) that are drawn to mimic the system UI with subtle differences. If the system UI implementation suddenly changes (say wi…

Yeah but Qt does it well enough that I consider it de facto native. It's not like Swing Java where they totally went their own way with the widgets.

Nativeness lies more in behavior than in looks. E.g. an input (an edit for old folks) has a very specific popup menu on every system, text selection works in a specific way (think what happens when you double/triple click, move with ctrl or lose or gain focus). Tab order and focusability is important as well. If they get that correctly, by e.g. using borderless system text areas or grabbing a menu from common control internals, it’s not a big deal if they draw some borders or animations by themselves. It’s just pixels in the end, sometimes better than native (which is just crap too often, like windows tables, lists, popdown controls).

But really, native look and feel only left on macOS. Windows lost its traditions around vista, linux never ever had one true way to do UI, and browsers almost exterminated everything else.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#143
post #44
post #24

Earlier quoted context omitted.

That blog post does speak to me, but 20MB for a program with a truly functional, modern UI doesn't outrage me that much. IMO there's a tradeoff: we could be writing all our programs in C, still. But it would be enormously difficult and there'd be way more bugs. On the other end of the spectrum we can be lazy, use web tech everywhere and never optimise our ballooning JS codebases. This feels like it's at least somewhe…

However, most of that should be done in the background — it shouldn’t affect your actual text input speed. Auto-format is more along the lines of something that could be blocking, but we’re not dealing with latex problems as to be significant

I’m pretty sure that none of these latency benchmarks are showing that text input speed is affected. You can definitely input more than 1 character every 40ms in modern “slow” text editors.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#144
post #24
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

That blog post does speak to me, but 20MB for a program with a truly functional, modern UI doesn't outrage me that much. IMO there's a tradeoff: we could be writing all our programs in C, still. But it would be enormously difficult and there'd be way more bugs. On the other end of the spectrum we can be lazy, use web tech everywhere and never optimise our ballooning JS codebases. This feels like it's at least somewhe…

I wrote 3D visualization apps in 1998 using FLTK and OpenGL and the (statically linked) binary was less than 20 MB. I think my desktop had all of 64MB of RAM. It was snappier than a modern TODO app on Electron and far, far easier to write.

What on earth have we done to ourselves?

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#145

Earlier quoted context omitted.

> RAM is cheap and plentiful. If you don't use it, its value is almost zero (the "almost" comes from OS-level caching of files and CPU-level cache misses of code). I have fond memories of my DOS days and the simplicity inherent in a single tasking environment, however nowadays operating systems allow for more than a single application to run at the same time and each application should play nice with the system resou…

>and each application should play nice with the system resources, so even if RAM is cheap and plentiful it doesn't automatically mean that every application should feel entitled to it. Yes, you shouldn't be a bad neighbor, but the OS will generally move things around to accommodate you as necessary. RAM is an afterthought for most of these applications for a reason. This attitude is like buying a sports car and never…

> Yes, you shouldn't be a bad neighbor, but the OS will generally move things around to accommodate you as necessary.

I'm not sure what you mean with that. The OS will not "move things around" to the point where the resource abuse wont be noticeable, all it can do is swap stuff to the disk, perhaps compress some RAM and maybe unload any cold code (though code doesn't that that much RAM) and all that take time, slowing down the system.

> RAM is an afterthought for most of these applications for a reason.

Yes and that reason is disinterest from the application developers for RAM usage.

> This attitude is like buying a sports car and never redlining it.

Sports cars have nothing to do with this, i do not see the relevance.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#146
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

The trick is really whether 20MB is the short end of bad graph, or a constant offset on the end of a good trend.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#147
post #37

Earlier quoted context omitted.

I saw Qt and immediately understood what you were trying to say, but for the record: That’s not what native means. Native means “uses the platform widgets and drawing/theming api” and Qt is not native: it actually draws its own widgets (for the most part with certain exceptions on certain platforms) that are drawn to mimic the system UI with subtle differences. If the system UI implementation suddenly changes (say wi…

Yeah but Qt does it well enough that I consider it de facto native. It's not like Swing Java where they totally went their own way with the widgets.

Swings Platform LaF was still much closer than current browsers ever get.

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#148
post #27
post #14

This looks nice ! However... "Low CPU and memory footprint (...) memory usage is under 20 MB for a Hello World program" : I am the only one who still thinks this is huge ? (-> https://tonsky.me/blog/disenchantment )

Help me build Cosmopolitan Libc. We're using modern compilers to build programs that are tinier and more portable than anything developers even as far back as the 70's or 80's were able to produce. https://justine.lol/cosmopolitan/howfat.html I built a LISP interpreter too, which makes Altair BASIC look bloated by comparison. https://github.com/jart/sectorlisp I will say that 20mb isn't too shabby if we judge the OP'…

Off topic but what did you use for emulating and visualizing your bootsector (blinkenlights.com) in here [0]. Looks much more convenient then QEMU which is what I used last time when doing ring 0 stuff in x86.

[0] - https://www.youtube.com/watch?v=hvTHZ6E0Abo

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#149
post #94

Earlier quoted context omitted.

20 MB is less than 0.25% of my desktop machine's memory, and 2% of a 2010-era netbook. 20 MB, while much larger than what it has to be, is tiny even by the standards of decade-old computers. RAM is cheap and plentiful. If you don't use it, its value is almost zero (the "almost" comes from OS-level caching of files and CPU-level cache misses of code).

> If you don't use it, its value is almost zero Yet if you use all of it, its value is also zero - to every other program on the same computer. Don't be a dick; Use what you need, not all you can.

Conversely, to the end user, if they could pick a bit more resources usage (knowing they can close your app, or heaven forbid uninstall it) versus an extra feature what should the dev team prioritise?

Re: Show HN: Svelte NodeGUI, a lightweight Electron alternative with native UI

#150
Same demo in VanilaJS and Sciter.JS : https://github.com/c-smile/sciter-js-sdk (see screenshots there).

Binary is ~5MB, and that is HTML/CSS + QuickJS + NodeJS runtime.

Versus 50MB+ of NodeGUI that is Node.JS + QT.

And SvelteJS works in Sciter.JS out of the box too.

Post reply on HN