16 ms·
Notty – a new kind of terminal written in Rust
- mikekchar 11y agoThis looks quite interesting. I wonder, though, if it might be a good idea to cut back the scope of the project (at least initially). Replacing the ANSI escape sequences with something sane is a hard enough problem, I think, even if you were just going for feature parity. Fixing the colour palette problems would be amazing.
- tatterdemalion 11y agoIndeed! The first step of this project was implementing an ANSI terminal, but with an eye toward abstracting ANSI commands into more fundamental building blocks, so that the analogous set of notty commands are already more powerful than ANSI commands (in the sense that actions that would require multiple ANSI commands can be performed in 1 notty command). This is done, excepting for bugs (there are many). I narrowed down the immediate term goals for radical new features to three: images, a minimal internal line discipline, and dividing the screen into multiple grids. I chose these because the first is a clear differentiator and the other two are very fundamental. Simultaneously, we're working on getting a reasonable terminal off the ground for dogfooding. Once we have that, the next step is writing a curses-like library that takes advantage of notty's features, as well as a shim to run programs written against that library in non-notty terminals. Then we'll have a solid base for adding more features. As of right now, it is already an ANSI terminal which accepts a cleaner escape sequence and supports 24-bit color, barring bugs.
- pmoriarty 11y agoThe big question is whether you can run vim and emacs under this terminal. Anyone know?
- deleted 11y ago[deleted]
- creshal 11y agoSince it aims to be backwards compatible, you should be able to.
- tatterdemalion 11y agoYes. Currently, with many bugs of course. :-) But the notty library is an ANSI terminal which implements more escape codes, not some fundamental change to the nature of the terminal.
- mchahn 11y ago> Dropdown menus, tooltips, and other features which do not strictly reside in the character grid If it does this then it is heading into GUI application territory. I wonder if an existing GUI application could be extended to add command-line features to end up at the same place. Or does such a thing already exist? This might even be a faster way to get to this goal.
- tatterdemalion 11y agoAn important distinction the README doesn't really express is that any features like this are tied to the position of the text cursor inside the character grid, not to the position of the mouse (though of course they may accept mouse commands similar to how xterm does). They are GUI-like, but they are the sort of GUI-like things that programs like vim and emacs already emulate all the time.
- openfuture 11y agoTerminals are such a mess. All the options on linux are lacking in some way or have legacy problems...... I hope someone actually finishes one of these 'next gen' terminals that keep getting abandoned.
- mixedCase 11y agoI've found Termite to provide everything I could ever need without adding unnecessary stuff.
- tatterdemalion 11y ago> I hope someone actually finishes one of these 'next gen' terminals that keep getting abandoned. I think one thing that hurts other next gen terminals (and indeed, there have been many!) is that they've tended to change the nature of the terminal in totally backward incompatible way. They end up being totally new platforms that are 'terminal inspired,' which means they also need totally new ecosystems. notty is a much less ambitious pivot. Its just an escape protocol that, in theory, any terminal could be extended to accept.
- antiquark 11y agoNice idea! Might I suggest using HTML for the escape codes? The terminal would be basically unlimited if there was a built-in HTML renderer. Maybe you would need some high level "EnterHtml" and "ExitHtml" functions to simplify your scripting. But if it was HTML5 compatible, then you could generate canvases and draw on them, change your font colors, etc.
- tatterdemalion 11y agoHey, author of notty here. :-) This suggestion has been made many times, but unfortunately I think its not very viable. HTML/CSS simply weren't designed for the attributes which I think are fundamental to what makes a terminal a terminal: a character grid with a cursor, controlled over a streaming protocol. There is one narrow sense in which its viable - you could have a terminal with a browser engine and javascript VM embedded inside it, and a command to open up a browser window and perform HTTP exchanges (either over the tty or through a TCP connection). This isn't really a new terminal, though, this is just a new way to open a web browser.
- tatterdemalion 11y agoHey, I am the author of notty. :-) I didn't see this post until I noticed the project's star count had jumped up again, but if anyone sees it now and has any questions please feel free to hit me up.
- routerl 11y agoNice work so far, tatterdemalion! I'll just mention that, given the HN bump, this might be a good time to write a more thorough contributor guide.
- vmorgulis 11y agoimg = Base64.strict_encode64(IO.binread('guernica.jpg')) mime = Base64.strict_encode64('image/jpeg') puts "\x1b_[14;80;16;4##{mime}##{img}\u{9c}" https://github.com/withoutboats/notty/blob/master/scaffolding/imagetest.rb https://github.com/withoutboats/notty/blob/master/scaffoldin... base64 is a very cool idea! I hope notty will succeed to define a new text protocol for terminals. We need that a lot!
- ReedJessen 11y agoWhat is loseless keyboard input?
- tatterdemalion 11y agoCurrent terminals do not transmit key releases or presses of modifier keys to the controlling process.
- deleted 11y ago[deleted]