''Grayspace'' is the codename for a web-based command shell implemented on Hexarc. It is the successor to (and replacement for) AI2.

Core Concepts

Traditional command-line interfaces (CLIs) are based on ''commands'' and ''parameters''. The CLI understands a bounded (though extensible) set of commands, which accept various parameters. Roughly speaking, commands serve as verbs while parameters behave as either nouns or adverbs.

Grayspace's CLI deviates from this design in the following ways:

  • Semantics: Rather than allowing each command to interpret its own parameters, we expect Grayspace to understand both the syntax and the meaning behind each command and parameter. For example, Grayspace should understand the concept of files, URLs, people, etc. and act appropriately when it encounters each one.
  • Context: Grayspace keeps track of context. For example, if a file is mentioned in a command, we remember the file so that future commands can implicitly refer to it.
  • Ambiguity: We allow and expect for multiple words to refer to one command and a single word to refer to multiple commands (or objects). For example, the word "list" might either be a command or a file depending on the context.
  • Assumptions: If possible, Grayspace makes assumptions in order to fill in the details of a request. For example, "print it" would force Grayspace to make an assumption about what "it" refers to. If we were referring to a document, we would decide to print the document. If we cannot make an assumption safely, we ask the user to clarify.

Example

AI3 version 1.0.

Ready.
> new file
New untagged file named "Untitled".
{an edit window opens, and I type in a simple Hexe program}

> name file Game of Life
Named "Game of Life"
{It knows which file we're taking about by context; it also assumes that we
want to name the file (because it is untitled) not that we're asking for 
the name of a file.}

> run program
"Game of Life" is not tagged as a program.
{It assumes that we want to run the file, but it doesn't think it's a 
program.}

> what do you mean
{We can ask Grayspace to clarify its error messages, which requires it to 
have semantic understanding of the errors.}

You said, "run program".
"run" means the verb to execute a program.
"program" is ambiguous and could mean:

1. Untagged file "Game of Life" modified 1 minute ago by George Moromisato.
2. A file with the program tag (28 matches).

> tag as program
File "as" tagged as a program.
{It guessed wrong!}

> undo
Program tag removed from file "as".
{Fortunately, undo is context sensitive; and the command to undo changes 
the assumptions, so we won't try it again.}

> tag as program
File "Game of Life" tagged as a program.

> run
Running "Game of Life"
{a window opens up and the program runs.

See Also