Show HN: GuiLite – Tiny UI framework, runs on MCU without OS
github.com
github.com
And I can understand this. Most programmers aren't designers.
But if you know why it looks outdated and messy it can help to create better looking products.
The reasons are: lack of alignment and padding / font sizes all over the place.
To make your product look good there are simple tricks you can use:
* Only use one size of padding (and multiplications of it).
* Align your items horizontal and vertical.
* Try to use one font family and maybe only 3 font sizes.
The above is why frameworks like Bootstrap work. They are all about alignment and consistent use of space.As we all know, Electron is really bad in this department but it's not limited to Electron.
I recently installed native Linux and the problem exists there too. Gnome terminal has a MASSIVE amount of input latency compared to xterm. Even worse than the difference between Electron and any non-Electron app in Windows.
I wish more people embraced and went all-in with UI frameworks that were optimized for reduced latency. IMO reduced / low latency input is the most important feature for a terminal or code editor.
It's still very noticeably delayed compared to something like the default WSL terminal or xterm but VSCode has much lower key press latency than Hyper and a few other Electron terminals like Terminus.
[1] https://code.visualstudio.com/blogs/2018/03/23/text-buffer-r...
However I use mate terminal every day and it feels like it responds instantaneously, even over a USB keyboard connected to a dock connected to a laptop.
Maybe as long as the latency is below a certain threshold it is no longer noticeable.
A lot of LCD monitors have 50-75ms of input lag. That means you don't even see what you type until 75ms afterwards so you might not even have a chance to see how a low latency application behaves. Then on top of that, there's the human factor. Some people are just more sensitive to this sort of thing.
The monitor I use happens to have about 13ms of input lag (verified with camera tests) which is pretty much as good as you can ask for with an IPS panel. I wrote all about picking monitors for programming at https://nickjanetakis.com/blog/how-to-pick-a-good-monitor-fo....
The difference is night and day when typing in an application that's not efficient vs one that is. Even typing in this comment box on HN feels like I'm typing in mud because Chrome's input lag is horrendous compared to xterm, WSL Ubuntu terminal or any other application that doesn't have a million layers of UI framework abstractions piled on.
If you're curious, one of the developers from the WSL Ubuntu terminal went into great detail on why their terminal is so fast. It's at https://github.com/Microsoft/console/issues/327.
The sad thing is, I've opened high input latency issues to a number of other terminals and the author of those terminals often come back saying "nah, your computer must be broken, otherwise everyone would be complaining" even after I supply them video proof. I guess that's what happens when you live in a world where everyone has low end monitors and are used to using Electron apps all day.
The only time latency is noticeable to me is if I can type faster than displayed on screen. I type around 50 wpm so the computer doesn't have to respond that quickly to keep up. Online I found that equals 250 cpm, or ~4.2 cps, lets say it has 240ms per keypress to not fall behind. Plenty of time.
one recommendation was to test your reaction time [1] on a known low-latency display. mine old one was a 1080p 21.5" Dell IPS LCD. I was worried that a 2k or 4k display would introduce lag, though at 60hz anything within 16ms g2g will feel the same and the 1440p Viewsonic i got advertised 15ms.
Best reaction time (~190ms) over multiple trials did not change after switching to new display. Not scientific, but certainly enough to catch something as large as 20ms+.
g2g typically measures the response time of the monitor which is a different thing than input lag. Most manufacturers won't even list input lag on their specs even though it's one of the most important attributes of a monitor since it affects everything.
I could see the reaction time being a fun way to get an average with enough samples. I did 3 sets of 5 and it was 201, 194 and 196 as the average. But I think reaction time and being able to perceive input delay are different skill sets. I'm almost 40 so my reaction time sucks, but I can still notice a delay difference in apps when pressing a key.
[1] https://www.amazon.com/ideas/amzn1.account.AGSZP5AWBGH7772O3...
It goes into a lot of depth on input lag and how to measure it accurately. The site also happens to have recorded input lag numbers for hundreds of monitors.
In the article it mentions using photo sensors and oscilloscopes as the best way to get a reading but they settle on using a special type of stopwatch test that gets results that are nearly the same.
BTW, it is written right there in the title "runs on MCU ..." (MCU = microcontroller)
For MCU: It call LCD driver for rendering pixel -- you can check the code GuiLiteSamples/HelloParticle/BuildSTM32F103/main.c
For Qt, MFC, iOS, Mac: It build UI as a memory bitmap, and map it on picture Widget of Qt/MFC/iOS/MacCocoa
Proper rendering: ความสูง
However, this framework looks promising so for instances where multiscript is not needed I’ll be interested in seeing how this one checks out.
I've worked on text rendering in the past, and the amount of subtleties in how each language is rendered and the exceptions/code paths that must be implemented to properly support said languages is not insignificant. Mind you, I say this as a native speaker of these languages. I don't want to imagine the amount of effort and work that would be required to support a language I don't speak. Doubly so if I'm not being payed for it.
If you need support for a language you speak, help the developer by implementing and contributing the support yourself.
PS: This isn't aimed at you specifically, but to those who criticize projects for lack of language support without understanding the effort required.
We don't disagree here. This is the reason why rendering support for non-Latin scripts is usually abysmal on most software like op. It's why authors need help and usually won't do it themself.
> Thus, it's a major architectural decision to support complex scripts at all, and to figure out how to do it.
That's all the more reason to contribute to the project.
> It's not useful advice.
Perhaps it isn't very practical, but someone has to do it. It's also better than the alternative of just complaining without contributing towards a useful result.
I did some research a few years ago on defining shaping by composing several simple finite state machines together, and am confident it could be made to work. The problem is, it doesn't work with existing fonts, the rules for shaping would have to be redone. But for fonts shipping in an embedded device, this would be entirely practical, and would be a lot faster and a lot less code than a solution based on HarfBuzz.
I'd need some incentive to complete this research. If someone wants to pay for it, please get in touch.
You will find the UI be displayed in your browser.