RETURN
From Esolang
RETURN is an esoteric programming language made by Ben Russell (the third one by this author so far), which incorporates a new theory, in which all commands are blank functions, that call other blank functions, and the commands are called by the number of functions passed through a function. It is called RETURN because commands are executed depending on the return codes, effectively.
NOTE: If this theory resembles Unlambda, please inform me. Thanks. --Thematrixeatsyou
Contents |
[edit] Specification
The memory allocation is the same as in Brainfuck: 8-bits, planar.
The only symbols used are the two standard brackets ( and ). Everything else is a comment.
Commands are executed by the number of bracket groups in the current bracket group, e.g.
( (()()()) (()()()()()) (()()()) )
would do this:
-> subtract 1 move pointer right subtract 1 subtract 1
If someone could explain it better, then please do. --Thematrixeatsyou 05:24, 27 Jul 2006 (UTC)
[edit] Commands
- 1. Add 1
- 3. Subtract 1
- 5. Move pointer right
- 7. Move pointer left
- 9. Put character (optional)
- 11. Put number
- 13. Get character (optional)
- 15. Get number
- 17. While nonzero repeat what's in the next group of brackets
- 19. If nonzero skip next group of brackets
- 21. While zero repeat what's in the next group of brackets
- 23. If zero skip next group of brackets
- 25. Exit with return code 0
- 27. Exit with return code defined at pointer
All other numbers do nothing.
[edit] Examples
[edit] Hello World
Hello World! By thematrixeatsyou. (())(())(())(())(())(())(())(()) (()()()()()()()()()()()()()()()()()) ( (()()()()()) ((())(())(())(())(())(())(())(())(())()) (()()()()()) ((())(())(())(())) (()()()()()) ( (())(())(())(())(()) (())(())(())(())(()) (())(())(())() ) ( (()()()()()()()) (()()()()()()()) (()()()()()()()) ) ) (()()()()()) (()()()()()()()()()) ((()()()()())(()()()()())()) ( (()()()) (()()()) ()()()()()()() ) (((((((()))))))) (()()()()()()()()()) (()()()()()()()()()) (((()))) (()()()()()()()()()) (()()()()()()()) (()()()()()()()()()) (()()()()()()()) (((((((((((((((()))))))))))))))) (()()()()()()()()()) ((()()()()())(()()()()())()()()()()()()) ((((())))()()()()()()()()) ( (()()()) (()()()) (()()()) )( (()()()) (()()()) ()()()()()()() ) (( (()()()) (()()()) (()()()) )( (()()()) (()()()) (()()()) )()()()()()()()) ((()()()()()()())(())()()()()()()()) (()()()()())(()()()()())((((((((((())))))))))) (()()()()()()()()()) ((((())))()()()()()()()()) Long enough for you?
This can also be expressed without whitespace; it looks damn awful when it's taken out.

