maksimKorzh / tapelang

Tapelang is a successor of brainfuck programming language which involves extra command set.
1 stars 1 forks source link

Discussion on the ncurses dependency #4

Open phunanon opened 5 years ago

phunanon commented 5 years ago

When first using the program, I was surprised by the use of ncurses. Creating such a 'clinical' environment for the user to interact with this Tapelang interpreter seems unnecessary to me.

The issues ncurses use to solve, like remote terminal optimisation, are outdated.

Can anybody comment on its use?

maksimKorzh commented 5 years ago

@phunanon, there were two reasons to use ncurses. The first one is to enable noecho() mode for getch() function, the other is to have an ability of implementing commands for moving the cursor around the screen in future. This can be used for writing text editors in tapelang. Please note similarity between brainfuck's pointer movement and cursor movement. Another idea of usage cursor movements is to write simple text-based games in tapelang - like snake or tetris. Another way to implement this is to use ANSI escape sequences which are also supported by windows 10 if memory serves me correctly. Well, if you have any better ideas compare to ncurses which would also lead to cross-platform code - please share your thoughts.

phunanon commented 5 years ago

If you want to take that route, I suggest cutting down the current codebase into a reusable model - only logic to parse Tapelang and pump out data/request input.
That way, one can take the Tapelang engine and plug it into any project.
Don't just think of text - it could go towards graphical programs, audio, anything really.

maksimKorzh commented 5 years ago

That's really fantastic idea, @phunanon, I love it. Thank you!