Can we update this thread with rants too? ;)
I guess you are aware of them, just to let you know someone tested it.
If not I can post issues
1) I miss the >>>
As the shell develops to be a bit more like nush, you'll find that you tend to use
the little, built-in command system for a
lot of things, and there'll be the option to attach your own little parsers too, so you end up using commands more than you'd expect. The rest of the time, you're writing substantial blocks of code, often commands, but also classes and so on, so you don't really miss the prompt in practice. Note that the commands are always one liners and auto execute on a newline [so you can just hit Enter].
It all feels more like a cross between an text editor and a CLI. It's ACE, so you can toggle line numbers, scroll lines/blocks of text, fold blocks etc. in the slate, but it's also a lot like a REPL.
2) If the expression doesn't return None, maybe you should print the
returned value.
Yep. It's just early days. It should.
Thanks. I hadn't seen the top one, but had seen the other. Nice one.
WARNING: The rest of this post is all big ideas...
The thing I'm looking to do differently is to kind of embrace the browser, not just run inside it.
There've been quite a few efforts to build clientside terminal emulators, and other stuff like that. Fair play to them, I'm not knocking it, but vim and all those old school apps are dead to me. REPLs are still awesome, so I want them, but have no reason then to obey the constraints of old school terminals.
I personally love HTML5. JavaScript's becoming an excellent language for event oriented, GUI hacking, but it needs something like Python too. JS is good for functional stuff, hooking up the UI, handling events and so on. Python can handle complexity and scale easily. The recipe is HTML5 and Python3.
One thing nush has, which I'll be adding to this shell's globals by default, is a put function to complement print. The idea is printed stuff is escaped to look exactly like regular stdout, where put stuff is not escaped, so you can put HTML unescaped [literally anything your browser can render]. You can also update this HTML, so an object could have a graphical repr that updates over time or whatever you need.
HTML5 is the graphics layer Python sorely needs.
You can also open new tabs and push stuff to them, and share local storage between them; it doesn't have to be in the shell. nush uses tabs to allow you to open a fuller looking instance of ACE in its own tab, letting you use your browser a bit like a tabbed text editor, but still allows you to open a smaller one in the shell [internally by simply pointing an iframe at the same URL as the editor tabs use].
It all starts to fall together after a while. You get to use the full awesomeness of HTML5, instead of rows of monospaced strings, to build anything from little scripts to massive extensions, and a lot of it is very simple to do [no Web to abstract]. The shell still uses monospace strings a lot, but only because they're still the best way for a lot of stuff.
4) About the links at the top right « docs | repo | chat », I was
surprised that you link to
Brython sites. I thought «docs» were about this REPL, «repo» the repo
of your REPL
and «chat» a multi user REPL (note the idea!).
You're right, they probably will confuse. nush has pretty tooltips. I'll keep it in mind [idea noted - it'd be sweet to do live stuff - that'd be an extension].
Congrats so far, the visuals are really nice.
Cheers.
If anyone is still reading this, you're obviously interested enough to read the whole post, so I may as well explain what the point is.
My thing on this is to totally integrate the three main interfaces we use everyday, APIs, CLIs and GUIs, into a fat user interface, a FUI :) The way nush kind of works, but it hasn't been made explicit yet, is with these FUI style objects. They're not special; they're just objects that are designed take advantage of the three interfaces the shell provides.
By having methods and attributes that are well suited to interactive use, objects provide an API. It's also not difficult to make some of those methods work as nush style commands, so now the object also has a CLI. It can render mini GUIs in the shell, or pop open one or more tabs to get crazy, so it has a GUI.
These FUI style objects typically live in the global namespace and act as interfaces. You may have a docs one that can render it's stuff in the GUI, but where user's tend to control it with the CLI.
Some will provide services to others, a filesystem one may be useful to the user, but then other objects can also call to it to do work for them too.
These objects can [often will] define a __getattr__ method, so they can take a call to an arbitrary method, pass the call to a server, and return the response [or raise the correct exception].
The big idea is that you can use a shell as your primary interface to the rest of your world again, like a proper hacker, but this time with HD fucking graphics ;)
Thanks again -- cs