-
Notifications
You must be signed in to change notification settings - Fork 1
irskep/rum
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
RUM User Manual v0.1 RUM (bRainfUck iMproved) is a Brainfuck interpreter with Extra Features! It supports 0, -1, and 'ignore' EOF types, as well as an arbitrarily bounded (or unbounded) tape length. It also supports strings, numbered repetitions, and comments. =========== = Strings = =========== The following program converts the string "helloworld" to uppercase: "helloworld",[--------------------------------.,] Strings are null-terminated. =============== = Repetitions = =============== You can repeat a command n times by preceding that command with a number. Using this feature, we can significantly shorten the 'helloworld' program: "helloworld",[32-.,] ============== = Procedures = ============== Procedures are defined by parentheses, pbrain-style. For example, +([-]) puts a procedure that resets the current cell to zero in slot 1. Use : to call the procedure denoted by the value of the current cell. For example, to print out HELLOWORLD twice: +(,[32-.,])"helloworld":+: In this example, we store the function "helloworld",[32-.,] in slot 1 and call it immediately. Since strings are null-terminated, we need to increment the cell once more to call the procedure again. Since the uppercase function will not work on punctuation, we can use procedures to uppercase individual words: +(,[.,])+(,[32-.,])"hello":[-]+", ":[-]++"world": In this example, procedure 1 is essentially a print function, and procedure 2 is the uppercase function from earlier. With comments: +(,[.,]) #procedure 1 is print +(,[32-.,]) #procedure 2 is print-uppercase "hello": #print 'HELLO' ", "[-]+: #print ', ' "world"[-]++: #print 'WORLD' =============== = Breakpoints = =============== To set a breakpoint for RumBottle to handle, use !. ============ = Comments = ============ Comment out lines until the next LF with #. Please use discretion when putting punctuation in comments, as I have not tested it at all. RUM is in the public domain.
About
Enhanced brainf*ck interpreter in Python with string support and more
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published