Stapler

From Esolang
Jump to navigation Jump to search

'Stapler' - esoteric programming language, created in 2011 Alexander Zavgorodny.

On the official website there is documentation on the programming language [http://stapler.3dn.ru/ Stapler official site · STAPLER this language. Stapler is Turing-complete language as possible to implement the interpreter Brainfuck on the stapler's. The latest versions of the language has support Wct radix.

Stapler - an esoteric programming language developed in 2011. The purpose of the change was to achieve balance between esoteric, minimalism and functionality. In other words, the task was to make a minimum programming language to maximize opportunities.

Language is a stackable, all operations are carried out through the stack. As a data warehouse using one large numbered array of type integer (16-bit signed integer). examples of commands

$ (5) (720)

Put the cell phone number 5 number 720

$ (8) (4 ^ 17 +)

Put in the eighth cell is the sum of 4 and 17

$ (4) ($ 25)

Put in the fourth cell of the value of the 25th cell.

On stapler written many programs test, game and system. Among them, the interpreter Brainfuck, making it tyurint-complete. There is support for multiple systems notations: decimal, binary, hexadecimal and WCT. There are several interpreters and compilers.

An example of the program

Stapler uses characters as commands. Here is an example of the program "Hello world" via an ASCII code and software for finding prime numbers:

The program "Hello, world!" Is used here the output through a special memory. All data written on the screen. :

$ (1) (72) 
$ (1) (101) 
$ (1) (108) 
$ (1) (108) 
$ (1) (111) 
$ (1) (32) 
$ (1) (119) 
$ (1) (111) 
$ (1) (114) 
$ (1) (108) 
$ (1) (100) 
$ (1) (33) 

Program for finding prime numbers. Used to test the speed of emulators. Used brute force divisors.

Program 
[Prime number Founder 2.0] 
[From] 
$ (6) ($ 2 ^ 1) 
[To] 
$ (7) ($ 2) 
{next} 
$ (6) (6 $ ^ + 1) 
$ (5) (6 $ @) 
$ (4) (1) 
{nl} 
$ (4) (4 $ ^ + 1) 
# ($ 6 ^ 4 $%) <l> 
# (4 $ ^ 5 $ - |) <nl> 
$ (2) ($ 6) 
{l} 
# (6 $ ^ 7 $ - |) <next> 

The search engine factorial. Using a recursive method.

define write = '$ (2)' 
= {fac} = 
? [3] 
$ (3) (g) 
# ($ 3 ^ 1 -) <one> 
* [3 ^ 1 $ -] <fac> 
p (3 $ ^ g *) 
** 
{one} 
p (1) 
** 
Program 
* [2 $] <fac> 
write (g) 

Implementations

TOTOP3 - Stapler language interpreter written in Borland Pascal.

Links