Saturday, November 29, 2014

[rpvpyviv] Period as the only symbol

Create a programming language which requires only the lowercase letters, space, and the period.  These are the only characters that seem consistently available in a single keystroke on small touchscreen keyboards.

It might look a bit like troff/nroff.

Although the enter key is also usually present, we follow the C convention of treating all whitespace the same.  This allows writing one-liners more easily.

Probably best implemented as a preprocessor into an existing programming language.  Translating the error messages back will be a challenge.

The editor app might want to grab the period as an escape character (like VI) to transition to modes for character motion and other editing like cut and paste.  Then maybe two periods inserts a period.  Or maybe the letter q is the escape character, and qq inserts q.

If the keyboard provides other characters, the editor can assign them to macros.

Need to disable automatic capitalization and autocorrect.  Or a case insensitive language with all keywords as common English words.  Perhaps avoid "if" and "of" as keywords as they are too easy to mistype because i and o keys are next to each other.

Type numbers with a keyword indicating the next token is a number using digits zabcdefghi.  Using letters as digits is common in other languages, e.g., Greek isopsephy or Hebrew gematria.  Definitely disable autocorrect for numbers encoded this way.

String literals will be interesting.  Unsure what to do.

Syntax highlighting would be nice, but avoid relying on it as it may be excessively demanding on the CPU.  Perhaps highlight only when invoked.

No comments :