Micro

This language was created by user:Raddish0 as an attempt to make a code golfing language that is easier to understand than Golfscript.

It is currently under development, so expect some changes.

keywords
These are not allowed as variable, or function names. Remember: This language is case-sensitive
 * I
 * s
 * r
 * R
 * c
 * C
 * l
 * m
 * if
 * SB
 * BS
 * NS
 * SN
 * AS
 * SA

Types

 * string (basically an array that is treated differently on the iostream)
 * number (arbitrary precision - depends on the implementation)
 * array (list of numbers)
 * block (code block)

Built-in functions
note that a Micro has implicit evaluation, so program will always pop the value at the top of the stack, and evaluate it at the end of execution

IMPROTAND: Micro's implicit evaluation is weird, because the evaluated variable may generate new items on the stack, in which case the program's execution will continue as if it hadn't ended. This means that implicit evaluation can occur many times in just one execution of the program. This makes the example quine possible

(A,B,C)... are the elements of the stack, with rightmost on top.

Some example programs
Hello world program:

"Hello, World!"

Quine:

{_BS}

(Very) Simple Calculator:

{\\\~++SB:C C:\c}:c c

A BF interpreter, proving this language to be turing-complete:

 {bval 1 -}:jumpbackl {bval 1 +}:jumpbackr 1:tapepos 1:i [0]:tape 29999:tapelen {i 1 - prg i m :jmpchar jmpchar "[" = if(jmpbackl,) p p "]" = if(jmpbackr,) bval 0 = if(,jumpback)}:jumpback {tape [0] + :tape tapelen 1 - if(tapesetup,)}:tapesetup {}:null {char "+" = if(plus,) p p "-" = if(minus,) p p "<" = if(left,) p p ">" = if(right,) p p "." = if(print,) p p "," = if(in,) p p "[" = if(leftb,) p p "]" = if(rightb,)}:command {prg i m :char prg l :len command i>len i 1 + if(null,main)}:main "BF interpreter":\ \:prg tapesetup main {tapepos 1 -}:left {tapepos 1 +}:right {tape tapepos m 1 + (tape,tapepos)}:plus {tape tapepos m 1 - (tape,tapepos)}:minus {tape tapepos m :\}:print {\: (tape,tapepos)}:in {}:leftb {1:bval tape tapepos m 0 > if(jumpback,)}:rightb

ROT13 (warning, this is a bit golfed):


 * i\:n{i1+:i n i m C13+ 64 26+ > if(:26-,) c n ~ i r:n}.n.

Truth machine:  {1:/o}:o {0:/}:z /: SN 0= if(z,o)

see http://txt.do/d0tyb for a RPN-based 4-function calculator (better than the 'simple calculator')

There is extensive commenting, so please take a look ↑