-
Notifications
You must be signed in to change notification settings - Fork 36
/
ideas
103 lines (81 loc) · 3.83 KB
/
ideas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
A way to add methods to existing types:
$file_extra := struct mkdir={|| cmd mkdir -p $this}
implicit
Graphs:
Graphs consist of two data types: nodes and edges.
Crush nodes are simply rows in a single normal table. (Not a TableInputStream, it has to be a table)
Crush edges are a new type that connect rows in the same table to each other. Every
edge contains two index references. Edges can be directed or undirected, and they can
have a single arbitrary value associated with them.
Edges can point to the same row or other rows in the same table, but allowing
them to point to rows in other tables would lead to reference cycles and memory
leaks. One-to-one relationships are simply edge fields. One-to-many, and many-to-many
relationships are modeled using fields of lists.
# Find leaf nodes
crush> ps | where { (children:len) == 0 }
A new operator, '::', is used to access a member in each element of a list.
# Find processes who are running as a different user than their parent
ps | where { parent::user != global:user:me:name }
When using '::' on a list/set of edges, it fetches that member in each element in returns them in a new list.
In order to display a graph as a tree, simply return an edge as the root object, and the pretty-printer will
do the rest:
crush> (ps | where {pid == 1}):parent
...
grpc command:
# Create new grpc instance:
crush> srv := (grpc "localhost:443")
# List all services on a server
crush> dir srv
[my.service other.service]
# List all methods of a service
crush> dir srv:my.service
[method1 method2]
# Call method without parameters
srv:my.service:method1
["some" "output"]
# Call method with parameters
srv:my.service:method2 id=1234 tags=(list:of "foo" "bar")
["other" "output"]
Validation:
All commands declare valid input and output types.
Input types can be partial, e.g. any iterator or any iterator with some restrictions.
Checks are performed to validate consistency.
Syntax for not having to duplicate output type.
Track location of arguments through signature macro parsing
Commands:
A simple command for replacing a regex in every line of a file. Implement it in crush, using built in commands.
Extra columns for ps: tty, current CPU usage.
A grep-command.
read equivalent
Allow simpler column renaming via select, e.g. 'ps|select time=cpu'
xml:from/to using html5ever under the hood
html:from/to using html5ever under the hood
Add hex and base64 en/decoding methods to the binary/string types
Add utf-8 and other character encoding methods to the binary/string types
Maybe unset should be an operator, so that we don't have to quote the variable name, which feels inconsistent
Maybe unset should only be able to delete members of the current scope
sticky bits support for chmod
recursive chmod
recursive chown
watch command
Either stop copying Command instances, or make them pointers to static data.
Syntax highlighting (with more accurate parenthesis matching)
Every command should have a command id withing that job, e.g. 5:2
Every thread should have a thread id within that command, e.g. 5:2:3
Make command closing work on file literals
Add unicode escape sequence support
Add hex escape sequence support
Make suggestions use completion engine instead of history
Handle ^Z to put jobs into background. How?
Handle ^C to cancel jobs. How?
Tab completion missing feature list:
* Support for enabling and disabling completion error printing
* fall back to "stupid" completion if parsing the AST fails
* Completions for wildcards
* Complete with prior arguments from same command from history
* Add command specific completions for dbus
* Add command specific completions for cd to filter only directories
* Add previous output type of previous command in pipeline if known to parsed state
* Add command specific completions for methods
* GetItem and SetItem completions
toml:from ./Cargo.toml | semver:bump ^package:version --minor | toml:to ./cargo.toml