Live data from Hacker News

Mousefood – Build embedded terminal UIs for microcontrollers

github.com

11–20 of 48 posts

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#12
> Embedded-graphics includes bitmap fonts that have a very limited set of characters to save space (ASCII, ISO 8859 or JIS X0201). This makes it impossible to draw most of Ratatui's widgets, which heavily use box-drawing glyphs, Braille, and other special characters

You have a bitmap display, you can just draw lines and stuff without needing to rely on font-based hacks.

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#13

This is awesome! I love ratatui, having it available on embedded is very cool! I wonder if it will work with async on embedded e.g. embassy..

absolutely, it will work with any other embedded Rust application. The backend only provides a bridge between the embedded-graphics library and the Ratatui widget renderer.

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#16
post #12

> Embedded-graphics includes bitmap fonts that have a very limited set of characters to save space (ASCII, ISO 8859 or JIS X0201). This makes it impossible to draw most of Ratatui's widgets, which heavily use box-drawing glyphs, Braille, and other special characters You have a bitmap display, you can just draw lines and stuff without needing to rely on font-based hacks.

Sure, but that's beside the point.

Text based graphics with fancy or custom fonts is just crazy efficient. That is exactly how we got the amazing graphics of The Last Ninja or Turrican on machines with less than 64KiB useable RAM.

Same for more modern embedded devices. If you constrain yourself to text you increase both runtime performance and your developer productivity.

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#17
post #2

Hi Orhun, Could it be used with CYD (Cheap yellow display) ?

Most likely. I just checked and it uses embedded-graphics already which means you can plug in Mousefood directly. The touchscreen might be a bit tricky though, it might need some hacking on the event handler side. But it will most likely work if you map the coordinates to the terminal cells abstraction somehow.

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#18
post #12

> Embedded-graphics includes bitmap fonts that have a very limited set of characters to save space (ASCII, ISO 8859 or JIS X0201). This makes it impossible to draw most of Ratatui's widgets, which heavily use box-drawing glyphs, Braille, and other special characters You have a bitmap display, you can just draw lines and stuff without needing to rely on font-based hacks.

Sure, but that's beside the point. Text based graphics with fancy or custom fonts is just crazy efficient. That is exactly how we got the amazing graphics of The Last Ninja or Turrican on machines with less than 64KiB useable RAM. Same for more modern embedded devices. If you constrain yourself to text you increase both runtime performance and your developer productivity.

It was crazy efficient on character or tile-based hardware. It makes no difference on bitmap displays, or rather adds some overhead.

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#19
post #12

> Embedded-graphics includes bitmap fonts that have a very limited set of characters to save space (ASCII, ISO 8859 or JIS X0201). This makes it impossible to draw most of Ratatui's widgets, which heavily use box-drawing glyphs, Braille, and other special characters You have a bitmap display, you can just draw lines and stuff without needing to rely on font-based hacks.

Sure, but that's beside the point. Text based graphics with fancy or custom fonts is just crazy efficient. That is exactly how we got the amazing graphics of The Last Ninja or Turrican on machines with less than 64KiB useable RAM. Same for more modern embedded devices. If you constrain yourself to text you increase both runtime performance and your developer productivity.

Are you claiming that scrapping together boxes and whatnot with line drawing characters is more efficient than just drawing the lines directly?

Re: Mousefood – Build embedded terminal UIs for microcontrollers

#20

Earlier quoted context omitted.

Sure, but that's beside the point. Text based graphics with fancy or custom fonts is just crazy efficient. That is exactly how we got the amazing graphics of The Last Ninja or Turrican on machines with less than 64KiB useable RAM. Same for more modern embedded devices. If you constrain yourself to text you increase both runtime performance and your developer productivity.

It was crazy efficient on character or tile-based hardware. It makes no difference on bitmap displays, or rather adds some overhead.

At the end of the day it's always pixels - alway has been [1] - and the efficiency of storing and blitting a small number of fixed size rectangles is hard to beat if you can get away with it.

[1] Except for the early oscilloscope style vector displays maybe.

Post reply on HN