Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal widget? #61

Open
ghost opened this issue Jul 19, 2021 · 2 comments
Open

Terminal widget? #61

ghost opened this issue Jul 19, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 19, 2021

Hello @magiblot ! I just became aware of this active Turbo Vision project recently over on the notcurses thread.

Besides "hello!" :-) I wanted to mention something I had done with SET's rhtvision a long time ago: qterminal . This was a port of Qodem's VT100/102/220/Linux terminal to Turbo Vision (screenshot1 screenshot2 screenshot3):

  • I discovered that rhtvision had the wrong mappings for Unicode codepoints 0x2264 and 0x2265 (≤ and ≥); they were swapped. Just wanted to mention that, I don't know if you had started from there or are added your own Unicode awareness to a fresh branch off the Borland TV sources.
  • If you don't yet have a terminal widget and are interested, I would be happy to get it running again and provide a bug-fixed public domain licensed version of it for you. Just let me know.
  • If you do have your own terminal widget, how could I test it out?

Very nice to see your project here! 💗

Also I love your Turbo editor screenshots. Very cool!

@magiblot
Copy link
Owner

Hi Autumn! Thanks for your interest and appreciation. Also thanks for sharing QTerminal.

Yes, I have experimented with a terminal widget based on Paul Evan's libvterm. So if you have ever dealt with that library before, you can already imagine how the widget works. However, I haven't published this terminal widget yet because it depends on a thread-safe timers extension to Turbo Vision which is not public either (because it's a footgun and I don't dare telling anyone to use it). libvterm has its shortcomings, so it would be interesting to try other terminal emulator implementations too. I'm all for reusing existing terminal emulator implementations rather than writing my own (which is often not the case in other projects; no wonder why there are so many diverging terminal emulators out there).

So if you'd like, I can try to make that unpublished widget production-ready in the next days (or weeks) and then we could integrate your QTerminal and see how it works, just for the fun of it.

Speaking of rhtvision, I never got to use its Unicode capabilities as a programmer. windoze/tvision#5 was probably the main reason why I ended up taking up this project, which is branched off directly from Borland's TV 2.0.

Cheers.

@magiblot
Copy link
Owner

I have at last published the terminal widget I mentioned. If you are interested in integrating QTerminal into it, that's probably the right repository where to submit QTerminal's source code. All that has to be done is to create a new implementation of the TerminalAdapter interface which uses QTerminal.

Cheers.

sarvex pushed a commit to sarvex/tvision that referenced this issue Apr 27, 2023
It turns out that the slugginess experienced when dragging the mouse quickly and showing lots of data is not caused by performance issues in the I/O functions, but because events are being received at a faster rate than they are processed.

A possible solution is to have a small queue of events and read as many events as possible in a non-blocking way before going the blocking way. This will give results when there are lots of input events, e.g. because the user is moving the mouse aggresively or text has been pasted into the terminal. If we then avoid flushing the screen or reading more events until the queue is empty, these events are processed with a considerably lower latency.

This is probably the most important performance improvement in this project up to now.

Fixes cosmos72/twin/magiblot#61.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant