Lagrange v1.18: TUI and Misfin
Development of version 1.18 has been a slow burn. Over the past year, I've been putting finishing touches on the Curses-based TUI variant and adding support for new Gemini-adjacent protocols. A number of bugs were fixed as well, and I've made several minor improvements in the user interface.
clagrange (80x25) on macOS, showing BBS front page
What's new?
- Curses-based TUI (clagrange) as an alternative to the graphical interface.
- Support for Misfin: mail identities, sending messages, "misfin://" links.
- Support for Guppy: UDP-based light-weight protocol by Dima Krasner.
- Support for Titan edit links.
- Support for Opus audio playback using libopusfile (optional dependency).
- UI navigation with the keyboard (TAB and arrow keys).
- Bookmarks updated on permanent redirections.
- Page width extends to long content lines, if the window has space.
- Manually entering uploaded file path, not just drag-and-drop.
- Pressing the Return key focuses the URL field.
- Updated fonts and UI icons.
- Bug fixes: spurious Titan requests on navigation/restore; default Titan identity; Gophermap formatting; various minor issues.
#release
2024-09-20 · 2 years ago · 👍 johano, cthulhu · ❤ 1
13 Comments ↓
🌆 skyjake [OP/mod...] · 2024-09-20 at 10:15:
Let me know if you have trouble running the clagrange binaries. They seem to work for me but there are so many different terminals and possible platforms out there. Weird things may always happen!
One unexplained issue I'm having is that, with certain compilers, clagrange does not display proper output unless the compilation flags use -O1 (or sometimes -O2). It is perhaps due to undefined behavior _somewhere_ that is messing up the compiler optimizations when it comes to the Curses rendering. It might be related to statically linking Curses to the executable.
🍀 meidam · 2024-09-20 at 12:28:
Good work as always! The curses based terminal version sure is impressive! It seems to work well in alacritty on linux
This is sent with clagrange
💎 istvan · 2024-09-20 at 14:27:
I will see if I can build clagrange on OSX 10.4 Tiger. I was never able to build the GUI one due to problems with SDL and some of the libraries for rendering fonts.
Would be wonderful to have another client on the OS. So far the only client anyone has gotten working was (ugh) AV-98.
☯️ johano · 2024-09-20 at 16:05:
awesome, thanks!
🌆 skyjake [OP/mod...] · 2024-09-20 at 16:24:
@istvan Curious to hear how that goes!
💎 istvan · 2024-09-20 at 17:11:
Well, I wrote an strnlen() function to fix that breaking. Now I'm running into trouble with the_Foundation library because it insists on threading that isn't available.
From Apple's pthread:
/*SPI to set and get pthread name*/
__API_AVAILABLE(macos(10.6), ios(3.2))
int pthread_getname_np(pthread_t,char*,size_> t);
__API_AVAILABLE(macos(10.6), ios(3.2))
int pthread_setname_np(const char*);
None of those come along until Intel Macs. Probably going to be stopping here because it probably takes significant work to get any further.
🌆 skyjake [OP/mod...] · 2024-09-20 at 17:15:
The thread names are not used for anything important by Lagrange, so you might resolve that with some dummy functions...
💎 istvan · 2024-09-20 at 17:47:
Made a fake function to just return(1) and it continued with the compile. Now it's crying about clock_gettime().
You've probably noticed all the problems so far are things that should be solved by defining a POSIX version explicitly in the header. Unfortunately, that just introuces a few thousand much worse errors.
Maybe I need to look at some of the TigerBrew patches and see how other people solved this. It can't be a unique problem.
💎 istvan · 2024-09-20 at 20:43:
Nulled out the clock. Made it along the chain to process.c, which blows up because there is no spawn.h in the system.
Seems to be a known problem on 10.4. A number of MacPorts are broke because of no spawn.h.
Commented out the include, then made start_process return iFalse (good enough for Android)….
Then it built harfbuzz even though I told it not to. And then it started building SDL even though I told it to build TUI.
Nuked the mouse wheel controls but hit a wall at SDL_CreateRGBSurfaceWithFormatFrom(). The needs SDL 2.0.5+ and I’m capped at 2.0.3.
Did I screw up my cmake line? Why is it even trying to build this when I wanted to try ncurses.
💎 istvan · 2024-09-20 at 23:32:
Fixed it. Cmake decided to not respect a single variable set from the command line. Edited the options in the cache file and rebuilt. Finally got onto the TUI path.
Had to patch most of the files to remove all middle scroll wheel functionality because that’s not available in SDL 2.0.3. Finally compiled everything.
… And then linking failed with every single symbol missing. Guessing pkg-config isn’t playing nicely with cmake to add all the linking paths.
I’ve had enough pain for one day. May give it another shot next week. Guessing Unicode is going to ah e some serious problems even if I get it going since I’m missing ncursesw.
🌆 skyjake [OP/mod...] · 2024-09-21 at 10:59:
clagrange does not display proper output unless the compilation flags use -O1 (or sometimes -O2). It is perhaps due to undefined behavior _somewhere_
I managed to track this down pretty easily. Turns out, there was an ill-advised cast and dereferencing of a value in the function that copies the text canvas to the screen.
🌆 skyjake [OP/mod...] · 2024-09-25 at 04:06:
☯️ johano · 2024-10-09 at 00:12:
I probably missed it somewhere, but how can I make the new misfin features work with my gembox at hashnix.club?