Jere
You onto something.
I will give it a try.
Thanks kindly
Jere
You onto something.
I will give it a try.
Thanks kindly
Hi!
I cannot find any information on how I could implement dumb terminal infrastructure for Elixir/Erlang.
The idea is very simple. You just start a TCP server (see gen_tcp example in Erlang or Elixir), and connect to its IP:PORT from any terminal emulator. Most of them are supporting nowadays ANSI/VT100 terminal escape codes which you could send from the server side to the client side - to set a cursor position or to change text attributes on the client screen.
A shell script example (run with sh or bash)
--------------------- START -----------------------
RED=β\033[0;31mβ**
GREEN=β\033[0;32mβ**
BLUE=β\033[0;34mβ**
BRIGHT=β\033[1mβ**
BLINK=β\033[5mβ**
BG_YELLOW=β\033[103mβ**
NC=β\033[0mβ # No Color, no attributes**
echo βThis is ${RED}red${NC}. This is ${GREEN}green${NC}. This is ${BLUE}${BRIGHT}${BLINK}${BG_YELLOW}blue bright blinking on yellow${NC}.β**
--------------------- END -----------------------
Links:
This is for simple UI-screens. If UI is more complex, there is also the Ncurses library that does basically the same thing but includes also some more sophisticated UI abstractions, like menus, windows, popup lists etc.
Ingars
Thank you Ingarr.
I have a lot of experimenting to do.
Many thanks.