Novice

Quote here later.

Overview

Novice is an esoteric programming language, designed by Keymaker in December of 2007. It's based on string-rewriting and jumping to matching labels, and both things happen extensively, as one can't happen without the other.

Language definition

Novice programs consist of lines, separated from each other by new-lines.

There is an unbound memory string. The program lines have no limits, either.

The very first line of a program is the initial state of the memory string. It may not feature characters '=' or '-', and it has to be at least one character long.

The line pointer begins on the very first program line (that is, line two, as the very first line is the initial memory state). The pointer moves downwards, and the execution of program is finished once the pointer goes past the last line.

The program lines are either labels or functional lines. Every label line has to be unique, but there may be many identical functional lines.

Labels are targets for jumps, and they are NOPs if encountered. Line pointer may encounter labels without jumping to them, and they still have no effect.

No program line may feature more than one '=' or '-', and never both of them on the same line. Labels have neither.

The functional lines will replace data in memory string and jump to a label. If for example the memory string is 'abc', and line 'b=d' is being executed, there also has to be label 'd' for anything to happen. Let's say there is, in this example. 'b' in the memory string 'abc' would be replaced with 'd', resulting the memory string to be 'adc', and line pointer would jump to label 'd'. So, the left part of the functional string has to be found in the memory string, and the right part has to be found as a label in the program, and only then the string-rewriting and jump may happen -- and only then.

Both functional lines, the types with '=' and the types with '-' work exactly the same way, but the latter also prints out its right part, in case a matching label is found in the program. For example, if the memory was 'edede', and line 'de-fine' would be encountered, 'fine' would be printed if label 'fine' were found. And a jump to that label would follow, just as in functional lines with '='. In order to print new-line characters, '=', '-', and '_', there exists special characters (or rather two-character strings) that when output print out those characters. They are, in the same order, '_*', '_a', '_b', '__'. So, if one wanted to print out 'a_b=c', he'd have to use 'a__b_ac'. The new-line is ASCII character 10.

Computational class

Novice is a Turing-complete language. A formal proof of this is the program bbf.nvc, see below.

Programs

Here's some programs written in Novice, by me.

hello.nvc - A hello world.
exp.nvc - Expands the memory infinitely and keeps printing it (also works as a lister of natural numbers in unary).
quine.nvc - Quine in Novice.
bbf.nvc - A binary brainfuck interpreter in Novice.

Interpreter

An interpreter written in Python can be found here. Unlike my interpreters usually, this one handles some error cases, but you still should run only valid programs, to make sure nothing strange happens.

-- Keymaker, 21.12.2007