NFOS
NFOS is a language created by User:Yayimhere, based on the idea of, if you have the current program, memory state, and new piece of data you want to add, there exists only one unique program, that when appended has the wanted effect. It is quite the "useless" language, alike Cabra, though unlike Cabra, it doesnt really look like a subset of a larger language. All its keywords are in danish. It is very messy(because it was defined quite "lazily". It will most likely have a successor language. It was named after a danish translation of COBOL(as Yayimhere originally was told it was "Cobol but worse and danish")
Memory
NFOS has three places to store memory. w, and nonnegative integer starting at 0, i an ordered list of nonnegative integer's given as input at the start of the program with a fixed length, and another list o, which starts empty, that is the eventual output of the program. There's also a register s.
Line's
The first line of the program is the fixed width of the input, which s is set to. All other lines are of the format of:
GAMMEL O: VIS N OG M GØR COM1 OG COM2 . E
This does the following conditionals:
- Iff
O == s:
- True:
- check iff
N == w:
- True:
- run
COM1.
- check iff
M == w:
- True:
- run
COM1. s = E.
- run
- False:
- Halt
- check iff
- run
- False:
- Halt
- check iff
- False:
- Halt
Commands
NFOS has the following commands:
TILBAGE:o = i , w += 1.FREM N:o += N , w += 2.IKKE:o = o , w += 3.GÅ:o += o , w += len(o) + 5.IGEN: loop forever.
Extension
NFOS_Længde is an extension which can take unlimited input. It does this by having a register LÆNDGE which can be used in place of any number, with the syntax (LÆNGDE + n)(which is equal to the equation presented). NFOS_Længde is more powerful than normal NFOS.
Examples
Cat(finite length):
5 GAMMEL 5: VIS 0 OG 1 GØR TILBAGE OG IKKE . 0
In NFOS_Længde:
LÆNGDE GAMMEL LÆNGDE: VIS 0 OG 1 GØR TILBAGE OG IKKE . 0