Well, then.

I used the weekend to make a proof-of-concept port of to the terminal, using ncursesw instead of SDL.

Yup, that's right. The custom GUI framework I've built for Lagrange is quite happy to run on a text-based canvas instead of a graphical one. 😁 Even all the UI animations are working.

There's a lot of polishing and tweaking still required, but it is already perfectly usable. I'm quite excited about this!

@jk Okay, that's pretty cool. Not a fan of curses UIs, but having it as a fallback is very useful.

@jk oh wow, I guess that makes Lagrange the second program after Emacs that could work equally well as a GUI or TUI

@jk oh my... the TUI space is becoming quite crowd... 🤭

@jk holy crap I'm excited to try this out, I've been a Lagrange user for a while and decided to try bombadillo as a TUI like last week, this is right on time.

You make a fantastic client BTW, best one I've used.
@jk Awesome! Could be a cool alternative to LibYUI (abstraction over ncurses, GTK-3, and Qt5 Widgets).

Been a while since I tried Lagrange; how's the a11y situation?

@Seirdy Libyui is definitely in the same vein, however I have no intention of making my GUI toolkit a general-purpose, standalone library. That would be an entirely different kind of project and one that I'm not interested in at the moment.

Nothing new to report on the accessibility front, i.e., no integrations with any existing assistive input or output technologies.

@jk :blobcat3c: fancy. what kinda architecture is lagrande using, something based on elm's layout or..

@icedquinn Lagrange has a simple custom GUI that renders directly to a graphics surface, e.g., via SDL's renderers. Here I switched the surface to a text buffer, and render that via curses.

The only major difference is that text is rendered as individual "pixels", each representing a character, instead of using a font. Otherwise the widget layout logic and event processing is the same, everything is just much smaller.

@jk so its a traditional retained mode scene graph :blobcatnerd:
@jk i hope to someday finish my skyblue implementation so i can use it for widget layouts :blobcatpain:

@icedquinn Yes, very traditional hierarchical widget tree == scene graph, where UI events get propagated until some widget eats them.

@jk oh man and an android version? Just saw you on the front of hn man, I'm even more excited.
@jk I've got a question for you... how do you enable/use the TUI? Do I need to compile or is it in the latest binary release? I've looked through the docs and --help and cannot find any info on it.

@mistermonster The TUI is not in the public repos yet. I just started working on it a few days ago.

It will be a separate build option. There will be a separate prebuilt binary, because the dependencies are different than the GUI version (no SDL, for one).

I'll probably add a little script in the source tarball to configure and build the TUI binary.

@jk Nice one ! I can't wait to see how that looks like on my e-ink display. THANKS!

@jk hmm, I wonder if that could be used to use NetSurf in the terminal…

@mmu_man Theoretically since there is a console framebuffer frontend for NetSurf, one could use a similar approach, i.e., replacing SDL with a terminal-based implementation.

However, in practice, it all depends on what assumptions the NetSurf code makes. Currently Lagrange relies on the SDL Render API to do its drawing, which made the porting much simpler as it deals with relatively high-level operations.

Sign in to participate in the conversation

skyjake's personal Mastodon instance