Nice start, Dustin ;-D #526
Replies: 1 comment
-
Very cool that you've been working on something that long. I hope to keep going with my project for the rest of my life ideally. It sounds like you are taking the terminal quite serious which is good, Puter is doing something similar with the POSIX goal. My Terminal can do some piping I wish I had some feedback but I am not sure what I can add as you seem to be in a good place on your project. Good luck! If you want to discuss specific things I am up to chat more about our projects. |
Beta Was this translation helpful? Give feedback.
-
Greetings,
I see you been working on your project for ~4 years. Since I've been working on mine roughly 3 times as long, I can divide the development process into 4 year chunks of beginning, middle and end phases.
The first 4 years were concerned with the "wow" factor of making things that seemed to be an "actual" system, i.e. doing a lot of things with the DOM and associated event listeners to enable stuff like draggable icons, windows and a fancy MacOS-like magnifiable toolbar.
In the middle phase, I began to get rid of all the unnecessary visuals in order to start the process of building a reliable underlying system. There was also plenty of time spent on fairly trivial "eye candy" demo applications involving the likes of THREE.js and ammo.js (port of Bullet physics). And there was quite a bit of time wasted on trying to integrate with Google App Engine's free python backend, to enable various (frivolous) P2P-type things.
So I began my final phase about the time you started on your project. I started reintroducing the desktop elements that you can now see in the online version (mainly just a boring "Begin" button sitting on a boring taskbar), and I got rid of all back-end Google dependencies. The last couple of years, though, have really been spent doing nothing but getting the command-line interface up-to-par with the "true" *nix (Unix/Linux/POSIX) experience. Early last year, I got the machinery of my implementation of vim pretty close to the "real" vim that you get in "real" *nix distros (here's a blog entry about it from 2+ years ago). But the albatross hanging around my neck for god-only-knows-how-long had been the fact that my implementation of the Shell Command Language (aka bash, zsh, ksh, etc.) had always been terribly hacky, brittle and downright ugly. So the last four months of my life have been spent in the depths of my own personal hackathon for the purpose of getting it (nearly) 100% up-to-par with the published spec (IEEE Std 1003.1, Chapter 2).
I find that the best motivation for demonstrating what my system is capable of is to give a demonstration for a kind of command that is very simple, but also seems somehow "wrong" (logically speaking), or at least very strange.
Take, for example, the command:
$ cat | less
Now, when "cat" is supplied with an argument, it is very easy to understand what is going on: simply output the contents of the given file in order to pipe it into the system's bi-directional pager, less.
Without any arguments, however, the cat command defaults to reading standard input from the physical console via the shell's interactive readline functionality. But hold on! With the "screen grabbing" less command in the pipeline, readline is going blind here. That is, whereas readline is meant to be used much like we use typewriters -- when you press a character's key, you immediately see the associated character (usually ASCII 0x20-0x7E) "printed" in front of your eyes -- in the present case involving a "screen grabber", the characters are rather buffered offscreen until they "magically" appear on the pager's screen upon the pressing of the Enter key.
So I began working on the case of
cat | less
within this past week, and I think I've come to a fairly good implementation. But there's something I'm leaving out here: how to terminate cat's inner readline loop, and then cleanly exit the pager's "screen grab", to return back to the normal command line loop. I'll leave that as an exercise for the reader! (Hint: it requires the use of the Control key)Thanks for any feedback you might want to give!
Beta Was this translation helpful? Give feedback.
All reactions