Re:LTUI – A cross platform terminal UI library based on Lua
by renke1 on Thursday May 07, 2020 @04:00AM
(#23100802)
A few years ago I build a small application [1] using react-blessed [0] which is a React renderer for blessed which is similar to ncurses. I think it was pretty easy to create an terminal-based application with it.
Re:LTUI – A cross platform terminal UI library based on Lua
by pests on Thursday May 07, 2020 @02:44AM
(#23100368)
I've been a fan of https://github.com/vadimdemedes/ink for awhile. Its based off React with a custom renderer. I like it a lot and find it pretty easy to use.
Re:LTUI – A cross platform terminal UI library based on Lua
by as-j on Thursday May 07, 2020 @09:23AM
(#23102679)
This is really cool, and great to see Lua project on HN, I think it's a woefully undervalued language. If someone knows LTUI 2 questions:
1. I tried to find api docs, but it didn't leap out at me. Is there one?
2. i wonder how you can include LTUI with an existing event loop. (hence why I was looking for #1) app:run() is great if the UI is the standalone app, but if I'm doing async io or any other more complex lua app, I have to combined the two event loops.
If only my system was big enough to have ncurses this would be super cool and I'd use it right away. <shigh>
Re:LTUI – A cross platform terminal UI library based on Lua
by waruqi on Thursday May 07, 2020 @09:38AM
(#23102804)
1. No docs now, you need see source codes. e.g. tests/*.lua
2. Perhaps you need call coroutine.yield or other coroutine/wait methods to program:loop() to support two event loops.
Re:LTUI – A cross platform terminal UI library based on Lua
by th0ma5 on Thursday May 07, 2020 @03:43AM
(#23100699)
I was getting ready to complain about accessibility which is always an afterthought in new GUI libs, but it seems like this would actually be natively fairly accessible being a terminal driven GUI, correct?
Re:LTUI – A cross platform terminal UI library based on Lua
by microcolonel on Thursday May 07, 2020 @07:58AM
(#23101992)
Depends on who you expect it to be accessible to; but for the visually impaired, it's probably better to try the other interfaces to something. GUIs and TUIs are generally not good value for time in this case, and TUIs have no existing technology for interfacing with screen readers as far as I can tell.
Re:LTUI – A cross platform terminal UI library based on Lua
by rainingmonkey on Thursday May 07, 2020 @07:21AM
(#23101754)
Lua - the language JavaScript should have been.
It's really nice to see projects like this, as IMO the only thing keeping Lua from seeing wider use is that it lacks JS and Python's userbase and libraries.
Based on your experience, how difficult do you think it would be to create a library that does does terminal UI rendering, but declaratively?
Something like this for eg: https://github.com/jtdaugherty/brick
[0]: https://github.com/Yomguithereal/react-blessed [1]: https://github.com/renke/overviewer
1. I tried to find api docs, but it didn't leap out at me. Is there one?
2. i wonder how you can include LTUI with an existing event loop. (hence why I was looking for #1) app:run() is great if the UI is the standalone app, but if I'm doing async io or any other more complex lua app, I have to combined the two event loops.
If only my system was big enough to have ncurses this would be super cool and I'd use it right away. <shigh>
https://github.com/Yomguithereal/react-blessed
It's really nice to see projects like this, as IMO the only thing keeping Lua from seeing wider use is that it lacks JS and Python's userbase and libraries.
Thanks for sharing.