3 ms·
This is almost exactly what I have dreamed with a shell. I'm building a relational language (http://tablam.org http://tablam.org) with the plan of something ali
by mamcx 7y ago
This is almost exactly what I have dreamed with a shell. I'm building a relational language (http://tablam.org http://tablam.org) with the plan of something alike.
Some extra ideas:
- Tables are amazing. But I think we need at least support for this "shapes" of data: List, Tables, Trees and maybe graphs
- I think will be nice to have an equivalent of Request/responses alike http. And then a way to introspect what a command do, like auto-swagger.
- Having widgets like table-browser, graphs, etc AS COMPONENTS.
In FoxPro you could say "browse" and it display a DataTable grid with full editing capabilities on the current table (or it ask for a table to open). In this case:
ls | ui_browse
The key here is that the widgets work stand-alone, so is not necesary to fully build a terminal app just to see nicely data. Look like https://goaccess.io https://goaccess.io and more like this idea: https://github.com/sqshq/sampler https://github.com/sqshq/sampler
This mean we could get a jupyter-like experience here!
- Some way to do curryng and maybe environment alias: You could setup an environment for the system, the user, this directory. In the environment is a .toml with vars and stuff.
The other thing where I think shells fail... is that are still old-style terminal. Having text output is cool, but having more rich widget system will unlock better the potential
- felixfbecker 7y agoLike PowerShell's different output formats (table, list, wide, ...)?
- mamcx 7y agoNo output. Declared the input/output is in the shape table, list, tree. Like when a http response say is json, text, csv, etc. This information unlock certain capabilities and will allow to provide efficient execution of queries. If psql (postgresql terminal cli) declare their data is in the "tables" shape then it could take the |where name = "" query itself and execute it instead of output all the rows...
- Per_Bothner 7y ago"The other thing where I think shells fail... is that are still old-style terminal. Having text output is cool, but having more rich widget system will unlock better the potential" You might find DomTerm (http://domterm.org http://domterm.org) interesting. It combines solid traditional-terminal support (including solid xterm compatibility) with a data model based on HTML/DOM. So you can "print" images, HTML tables, and more. DomTerm "understands" shell/repl commands as consisting of prompts, inputs, and outputs. You can add markers to group the output into logical groups, so it is automatically re-formatted on window re-size. And more.