Wow this is the coolest thing I've seen in the terminal since I discovered a sparkline bash script. I've embarrassingly used gnuplot's ascii output to realtime chart Cisco network interfaces in a shell I'm writing, this looks 1000x better than gnuplot's output. Thanks for sharing.
How much time you spent to do this project. And for what reason you did it? To solve some personal problem?
I really enjoyed it, mostly the world map. Once I was thinking in something similar, I was thinking in create a terminal software to monitor my small portfolio of stocks, and tell me about opportunities on the market. The reason to be on terminal was because I was looking for a more discreet interface running locally.
It took me a few weeks, one of them was fully on this project. Most of the time was spent on investigating and improving the different canvas implementations (map and charts work on an html5 canvas abstraction). A lot of the time was spent on false directions but this is expected. One particular direction was reusing Web js libs to do the charting logic but it turned that it is easy enough to implement on my own.
In my day job I author web dashboards (working in HP on performance testing tools) so I thought it would be cool to have those dashboards directly in the terminal. But I would have done it even without this incentive. I do a lot of projects just because they inspire me, check out GifW00t! https://github.com/yaronn/GifW00t
The provided example is a great illustration of how to build various layouts and use the various widgets. I find it lacks any examples of real-world data gathering. For us Node newbies, how would one, for example, graph system load of a remote server over time? I think examples like that would help get some people going.
I considered something like this but it felt like cheating. The beauty of standard ascii/ansi is that it is available in any terminal without any installation and it also has the same aesthetics / resolution as the text you type. Of course I will watch after iTerm2 progress.
> I think it's telling that after 50 years, and all the work on GUI's, this is still a good idea.
While definitely neat, I'm not that sure that this is actually a good idea.
I agree that it is telling that this project exists and excites, but I'm not sure what about. Maybe about the poor state of remote GUIs. Generally I consider ncurses (and other non-line oriented terminal stuff) to be an ugly hack. For example a better solution might be if you could easily run an adhoc webapp on a server (or other remote host) and have it tunneled (over ssh) straight to your local browser without needing to manually fidget with tunneling and ports and urls and whatnot. But that would require some scaffolding to make it happen and I don't really see the community moving to that direction.
This is really nice! Just built something quick with it and I find it way easier to work with than something like ncurses, though that might just be because I work with javascript alot. Sorta feels like a terminal based d3 in a way, though not as atomic. Not a huge fan of Node for terminal applications (I'd sooner use Go or Ruby), but this alone might make me use it for things people other than me will use.
Do you plan on accepting pull requests? I'd love to contribute to something like this.
How difficult would it be to split the widgets off into their own independent/standalone terminal applications? I like the idea, but I'd rather lay things out myself with tmux (thus incorporating it into my existing workflow) rather than using the included layout system.
Sorry if this seems like a dumb question; I'm not particularly familiar with Node.js, let alone this particular codebase, so the answer isn't particularly obvious to me.
It's easy to do. The grid layout is optional. You can give relative and absolute positions. The first code sample in the readme shows something like this (though position is implicit there). You can also read about blessed (=ncurses for node) which this project is implemented as an extention of.
As a side note, there is also OhUI (https://github.com/arcanis/ohui, i'm the author) which has the same goal than blessed, but a different api (dom-based) and codebase.
Blessed is great, but I had some performance issues with really fast updates, so I made OhUI, which tries to minimize as much as possible the repaint zones. I think it is pretty efficient at this regard.
That's both adorable and oddly soothing to watch. Moreso than "nice" graphics, actually. It may be that I'm old enough to remember when text terminals were the way we interfaced with the world on bulletin boards...and animated ASCII art like this was common. I want to set it up just to watch it, not because I need it (we have web-based charts already, and I'm in the midst of making them realtime).
At first I thought this was just an awful idea, but after hearing what you're using it for I want to use it myself :P
Did you look into the possibility of "adapting" something like d3 to draw on the terminal? Or does it just lack the abstractions necessary to do that cleanly?
Initially I used chart.js to paint the charts but I had to introduce it so many flags (no label Transformation, sensitive spacing etc) that I reverted to do it myself (even though I also have a working version with an altered chart.js).
I am using node-drawville which provides an Html5 canvas Api abstraction over the terminal. D3 uses svg so it is not adequate. However I did saw a port of d3 to canvas which I didn't had time to check.
This is great. I want to find a reason to use this. I have been doing some retro looking visualizations on an oscilloscope lately. I need to learn more about programming vectors to sound frequencies.
This is really cool! Seems like it would be easy to extend and link to simple projects, that way I can run this on my second monitor and feel like a real hacker ;)
I don't think you understand, clojurescript interfaces with javascript, it wouldn't be a rewrite. Nodejs has many debated problems, I can shit on it if I want. This project rocks though.