
LTUI – A cross platform terminal UI library based on Lua - todsacerdoti
https://github.com/tboox/ltui
======
hannofcart
Great work.

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](https://github.com/jtdaugherty/brick)

~~~
drran
TekUI does that, see
[http://tekui.neoscientists.org/tutorials.html](http://tekui.neoscientists.org/tutorials.html)

    
    
      ui = require "tek.ui"
      ui.Application:new
      {
      Children =
      {
        ui.Window:new
        {
          Title = "Hello",
          Children =
          {
            ui.Text:new
            {
              Text = "Hello, World!",
              Class = "button",
              Mode = "button",
              Width = "auto"
            }
          }
        }
      }
      }:run()

------
as-j
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>

~~~
waruqi
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.

------
srott
My favorite:

[https://github.com/Yomguithereal/react-
blessed](https://github.com/Yomguithereal/react-blessed)

~~~
nathancahill
Yeah, truly impressive.

------
waruqi
The visual configuration menu used in xmake is ltui.

    
    
        xmake f --menu
    

[https://github.com/tboox/xmake](https://github.com/tboox/xmake)

------
th0ma5
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?

~~~
microcolonel
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.

------
airstrike
This looks incredibly useful. Looked for something like it a couple years ago
and ultimately gave up.

Thanks for sharing.

------
danny0z
Oh, it seems to be a great terminal ui library.

------
tistoon
Great work!

