Commands of the console
The 34 commands that the console has before any module is loaded, as help() prints them. A module that the console loads adds its exports: see the modules.
| Command | What it does |
|---|---|
help() | list the commands |
programs() | list the programs that run |
memory() | memory and kernel counters |
modules() | list the modules of the boot image |
load(Text) | load a module here: direct calls |
isolate(Text) | load a module in a sandboxed program |
unload(Text) | remove a module that load or isolate added |
connect(Text) | call the exports of a service that runs |
start(Text) | start a program, by module name |
stop(Text) | stop a program, by name |
grants(Text) | what a program has from the root service |
revoke(Text, Text) | end a grant of a program that runs |
replace(Text, Text) | give the second module where a module imports the first |
replacements() | list the replacement table of the machine |
time() -> Integer | milliseconds since boot |
hash(Text) -> Text | the BLAKE3 hash of a text |
length(Text) -> Integer | the number of bytes of a text |
text(Integer) -> Text | the decimal text of an integer |
repeat(Text, Integer) -> Text | a text, several times |
buffer(Integer) -> Handle | a new memory object, in pages |
byte(Handle, Integer) -> Integer | one byte of a memory object |
release(Handle) | close a handle |
variables() | list the variables |
clear() | clear the console |
shutdown() | stop the machine |
history_clear() | forget the line history, in memory and in its store |
measure_completion() | measure one key of the completion list |
where(Table, Text, Value) -> Table | the rows of a table whose field has a value |
sort(Table, Text) -> Table | the rows of a table in the order of a field |
join(Table, Table, Text) -> Table | each pair of rows of two tables with one value of a field |
columns(Table, Text) -> Table | the rows with the fields that a text names: "a b c" |
first(Table, Integer) -> Table | the first rows of a table |
rows(Table) -> Integer | the count of rows of a table |
row(Table, Integer) -> Record | one row of a table, from 1 |
Read from programs/console/commands.odin and programs/console/tables.odin.
