nyuuzyou/wikis huggingface dataset:
Smallfuck/smf.rhk

smallfuck interpreter in Rhokell, by User:Pro465. the repo is more frequently updated so if you want the latest version, go there.
# smallfuck interpreter
# if you are using it directly:
# just input your smallfuck pprogram using standard input.
#
# or if you are using the REPL:
# give it an expression of the syntax (smf prog mem)
# where prog is the program mem is the initial memory
# both are cons lists consisting of (Cons a l) and (Nil).
# (memory is unbounded on the right).
#
# prog encoding | smallfuck instructions
# (Left) | `<`
# (Right) | `>`
# (Flip) | `*`
# (LBrace) | `[`
# (RBrace) | `]`
#
# memory encoding:
# (F) means 0
# (T) means 1
#
# example for the program `>*>*>*[*<]` on zero-init memory:
# (smf 
# (Cons (Right) 
# (Cons (Flip) 
# (Cons (Right) 
# (Cons (Flip) 
# (Cons (Right) 
# (Cons (Flip) 
# (Cons (LBrace) 
# (Cons (Flip) 
# (Cons (Left) 
# (Cons (RBrace) 
# (Nil)
# ))))))))))
# (Nil)
# )
# 
(main) = (encode (smf (decode (input) (Nil)) (Nil)));
(decode (Eof) res) = res;
(decode (2 (A)) res) = (decode (input) (append res (Cons (Flip) (Nil))));
(decode (3 (C)) res) = (decode (input) (append res (Cons (Left) (Nil))));
(decode (3 (E)) res) = (decode (input) (append res (Cons (Right) (Nil))));
(decode (5 (B)) res) = (decode (input) (append res (Cons (LBrace) (Nil))));
(decode (5 (D)) res) = (decode (input) (append res (Cons (RBrace) (Nil))));
(decode x res) = (decode (input) res);
(encode (Nil)) = (Nil);
(encode (Cons (F) res)) = (then (output (3 (0))) (encode res));
(encode (Cons (T) res)) = (then (output (3 (1))) (encode res));
(then a b) = b;
(smf prog mem) = (serialize_pair (eval (prep prog (Nil)) mem (Nil)));
# change .. [] .. to .. (While ) ..
(prep (Nil) x) = x;
(prep (Cons (LBrace) rem) before) = (expand before (prep rem (Nil)));
(prep (Cons (RBrace) rem) before) = (Pair before (prep rem (Nil)));
(prep (Cons x rem) before) = (prep rem (append before (Cons x (Nil))));
# before [inside_loop] after
(expand before (Pair inside_loop after)) = (append before (Cons (While inside_loop) after));
# evaluate the instructions
(eval (Nil) rmem lmem) = (Pair lmem rmem);
(eval prog (Nil) lmem) = (eval prog (Cons (F) (Nil)) lmem);
(eval (Cons (Flip) rem) (Cons (T) x) lmem) = (eval rem (Cons (F) x) lmem);
(eval (Cons (Flip) rem) (Cons (F) x) lmem) = (eval rem (Cons (T) x) lmem);
(eval (Cons (Right) rem) (Cons b x) lmem) = (eval rem x (Cons b lmem));
(eval (Cons (Left) rem) rmem (Cons b x)) = (eval rem (Cons b rmem) x);
(eval (Cons (Left) rem) rmem (Nil)) = (eval rem (Cons (F) rmem) (Nil));
(eval (Cons (While body) rem) rmem lmem) = (loop body rmem lmem rem);
## helpers
# looping behaviours
(loop b (Cons (F) mem) lmem rem) = (eval rem (Cons (F) mem) lmem);
(loop b (Cons (T) mem) lmem rem) = (destruct b (eval b (Cons (T) mem) lmem) rem);
(destruct b (Pair lmem rmem) rem) = (loop b rmem lmem rem);
(serialize_pair (Pair l r)) = (append (reverse l) r);
# adds one list to the end of the other list
(append (Nil) x) = x;
(append (Cons x y) z) = (Cons x (append y z));
# reverses a list
(reverse (Nil)) = (Nil);
(reverse (Cons x y)) = (append (reverse y) (Cons x (Nil)));
Category:Implementations
Smalllang

Smalllang is a joke esoteric programming language invented by User:A created 
in order to fullfill User:Hanzlu's definition of a usable language, 
as it tries its best to make itself as unusable as possible.
"In my opinion a programming language needs four essential parts 
in order to be a usable language. I list them in the following order 
of importance: 1. Changing values 2. Output 3. Control flow 4. 
Moving in memory"
== Instructions ==
Smalllang has a tape that only has 2 binary cells. In order to increment a cell 
in memory, use the . instruction (1. changing values). If you 
increment a value, you can not decrement it back; it is always 1 and you can 
never change it anymore. In order to move right, use the > instruction 
(4. moving in memory). If you move right, you can not move back left, and if you 
reach the right end of the tape, you are not allowed to move right anymore.
Smalllang also has an output instruction, which is * (2. output). This outputs 
the bit to the console and then deletes that bit in the memory. Smalllang also 
has control flow, the ? instruction(3. control flow). It is a while loop (containing 
an if statement), and if the current cell is nonzero, it jumps back to the start 
of the program. Similar to the * instruction, it deletes the current 
cell before it switches the code execution.
==Interpreter==
Here is an interpreter for Smalllang by User:Hanzlu (modified by User:A to avoid the possibility of an Infinite loop by typing .?, and also prevents errors by checking them):
code = ""
l = len(code)
i = 0
memory = [0, 0]
ptr = 0
while i < l:
 c = code[i]
 
 if c == ".":
 try:
 memory[ptr] = 1
 except:
 break
 
 elif c == ">":
 ptr = 1
 
 elif c == "*":
 try:
 print(memory[ptr])
 memory.remove(memory[ptr])
 except:
 break
 
 elif c == "?":
 try:
 if memory[ptr]:
 i = -1
 memory.remove(memory[ptr])
 except:
 break
 i += 1
Category:2019
Category:Languages
Category:Joke languages
Category:Implemented
Category:Unusable for programming
Category:Total
Smasnug

== smasnug ==
smasnug is created by User:Win7HE
just HQ9+ but with [o]utput and [i]nput and / division and [3] accumulators
== the new smaooong commands ==
o = outputs accumulator #2
i = puts 1 character input (in decimal) in accumulator #3
/ = divides accu. 1 by accu. 2 and puts it in accu. 3
[ = sets execution direction to right
] = sets execution direction to left
♪ = plays note [accu. 1] for 0.02 seconds
3 = swaps accumulators 1 and 3
2 = swaps accumulators 2 and 3
== samungs:edited commands ==
+ = increases accumulator 1
== samsing bye, im lazy for code ==
this is text
Category:2025
Category:Low-level
Category:Audio_Output
Category:Joke_languages
Category:Turing_tarpits
Smile

smile is inspired by brainfuck. It decomposes [] into two parts q p and < >.It merges. And, into +.
== Instruction set one ==
 Line : 00: instructions ,01：Pointer 1,02：Pointer 2......99: display screen.
 + _l1_(Line) _l2_(Line) The byte pointed to by pointer L1 plus the byte pointed to by pointer L2.
 + _l1_(Line) _x_(number) The byte pointed to by pointer L1 plus x.
 - _l1_(Line) _l2_(Line) The byte pointed by pointer L1 minus the byte pointed by pointer L2 .
 </> _l_(Line) _x_(number) Move x bits to the left or right in l.
 q:⌒⌒If the cell at the pointer is not 0, it executes normally.
 ╰╯If the cell at the pointer is 0,the next instruction will be skipped.
 p:⌒⌒If the cell at the pointer is 0,, it executes normally.
 ╰╯If the cell at the pointer is not 0,the next instruction will be skipped.
 Special：
 . = + 99 _l1_(Line) Output the byte pointed by pointer L1 to the display screen.
 , = + _l1_(Line) 99 Input from the display to the byte pointed by pointer L1.
--2021.07.12
== Instruction set two ==
It uses haver structure to store program and data separately. So there are two pointers to the memory address. The read-write head of a Turing machine is a pointer.
Read write head of Turing machine:0 , Program pointer:1 , Data pointer:2 ， number:x
 +/-/</> 0/1/2 x/0/1/2: 0/1/2 = 0/1/2 +/-/</> x/0/1/2
 0 1 2 1 = 1 0 2
 d/q 0/1/2 0/1/2 : if 0/1/2 d:!=/q:== 0 0/1/2 > 2
 0 1 2 1 0 2
 +/- 0x Add or subtract x from the byte pointed by the read-write head of Turing machine.
 +/- 00 The Turing machine read-write header to the byte plus or minus the Turing machine read-write header to the byte.
 +/- 01 Add or subtract the bytes pointed to by the program pointer from the bytes pointed to by the Turing machine read-write header.
 +/- 02 Add or subtract the byte pointed to by the data pointer from the byte pointed to by the Turing machine read-write header.
 +/- 1x Add or subtract x from the byte pointed to by the program pointer.
 +/- 10 Program pointer to the byte plus or minus the Turing machine read-write header to the byte.
 +/- 11 Add or subtract the bytes pointed to by the program pointer from the bytes pointed to by the program pointer.
 +/- 12 Program pointer to the byte plus or minus the data pointer to the byte.
 +/- 2x Add or subtract x from the byte pointed to by the data pointer.
 +/- 20 Data pointer to the byte plus or minus the Turing machine read-write header to the byte.
 +/- 21 Data pointer to the byte plus or minus the program pointer to the byte.
 +/- 22 The byte that the data pointer points to plus or minus the byte that the data pointer points to.
 +:Add,-:subtract,<:towards the left,>:towards the right,d=P,q=Q(See above)
--2021.07.21
Category:Languages Category:Brainfuck derivatives
Smilefuck

Smilefuck is an esoteric programming language similar to brainfuck. It was created on June 6th, 2014 by User:Sacchan.
== Memory layout ==
The data structure manipulated by a Smilefuck program consists of two stacks, l and r, and a working register w. Each entry on the stacks or in the working register is of a boolean type; that is, it is either 0 or 1. When the program is started, the input is loaded onto stack l, and after termination, the output is read from stack r. Input and output are encoded with the top-most bits on the stack being the last ones of the input/output.
== Syntax and Semantics ==
There are four elementary instructions that work on the data structure
* ! inverts the working register
* _ swaps the stacks 
* ^ pops the top value of stack l into w. If stack l is empty, this results in an error
* v pushes the value of w on stack l
Furthermore, there are two loop constructs:
* (...) repeats the code in the parentheses until the left stack is empty. In C-style, (P) translates to while(!empty(l)){P;}
* [...] repeats the code in the brackets while the working register is 1. In C-style, [P] translates to while(w == 1){P;}
Intertwining different kinds of loops (e.g. (..[..)..] ) is not allowed.
== Example Programs ==
=== Identity Function ===
 _
=== Reverse the input ===
 (^_v_)
=== Bitwise invert the input ===
 (^!_v_)_(^_v_)
=== Increment the input ===
 (^_v_)[!]v_(^_v_)_^[!_v_^]!_v_(^_v_)_^[v!](^_v_)
Explanation: First add a 0 as most significant bit. 
 (^_v_)[!]v_(^_v_)_
Then invert all digits, as long as they are 1s, as well as the first encountered 0, starting from the lsb
 ^[!_v_^]!_v_
Simply move the rest of the bits over
 (^_v_)_
If the msb is a 0, clear it
 ^[v!]
Reverse the bit string
 (^_v_)
== Computational Class ==
User:Sacchan believes Smilefuck to be Turing-complete, since it is easily possible to model the states of a BCT program with it, though without output. There is no formal proof on the subject as of yet.
== External resources ==
* A reference implementation of the interpreter, written in Haskell.
Category:Languages
Category:2014
Category:Unknown computational class
Smu

Smu is an esoteric programming language by User:Zzo38 based on Smurf, with some minimalization based on what is written in Talk:Smurf.
==Commands==
* () Push a string to the stack. The string is whatever is inside the parentheses, you can have nested parentheses but it must be nested correctly. Only the characters ()=|+ can be inside a string, other characters are ignored or are processed by the preprocessor.
* = Pops two strings from the stack, and sets the variable with the name specified by the first string (the top value) to the value specified by the second string. Does nothing if not enough strings on the stack.
* | Splits a string into a head and a tail and pushes them onto the stack (tail first, the head will then be at the top of the stack). If the string is empty then it will pop it from the stack without pushing anything. Does nothing if stack is empty.
* + Pops two variable names from the top of the stack and joins their values. Value at top is the name of variable which is the value at end of the string, second from top is the beginning of result string. Does nothing if not enough strings on the stack.
==Macros==
Macros can be used in the preprocessor.
* & Indicates a comment until the end of the line.
* Spaces and new-lines are removed during preprocessing.
To define macro, you put the name of macro, which is zero or more digits followed by exactly one uppercase or lowercase letter. And then the definition of macro, followed by the name of the macro again. Macros must be defined before used. To use a macro, just put the name of macro. You cannot define a macro inside of another macro.
==Program Running==
At the beginning running the program, initialize the stack with one string indicating input bit, | for 0 and + for 1 and = if no input.
At the end of the program, if there is a string on the stack, pop and output it (in order, | outputs bit 0 and + outputs bit 1 and = means to wait for more input unless EOF), and then if there is another string on the stack, pop it and use that as the program to now execute (including pushing the input at the start of running the program). Variables, and the rest of the stack, is kept across running the program multiple times.
==Conversion==
Assume definitions of x, y, z are defined as pushing a string, each one must be unique and non-empty, and becomes the name of the variable.
* q becomes (())|x=y=z=xz+z=zy+ please note that it require balance parentheses otherwise the result will not execute correctly
* h becomes |x=y=x()+
* t becomes |x=
* g becomes ()+
Or, in other words:
* h becomes ty=xg
==Examples==
Program to copy input to output:
 x(+|)xg()+gy(g)ybx=(=)y=xy+x=ba(bxggxg)aa(|=)=a(+=)=baxg
Expanded form of this program:
 ((+|)=(=)(()+)=(+|)(()+)+(+|)=(+|)()+()+(+|)()+)(|=)=((+|)=(=)(()+)=(+|)(()+)+(+|)=(+|)()+()+(+|)()+)(+=)(+|)=(=)(()+)=(+|)(()+)+(+|)=((+|)=(=)(()+)=(+|)(()+)+(+|)=(+|)()+()+(+|)()+)(+|)()+
Category:Languages
Category:Unimplemented
Category:2009
Snack

Snack is created to eat someone. It was created in 2011 by User:SmallBug
==Syntax==
Command	What
grave 	set eat value to 0
get 	get one man more(add one to var)
let 	let one guy escape(sub one from var)
slime 	they are afraid of you (display a message and not affect value)
eat 	eat them (print var and set it to 0)
sleep 	lay into the grave to sleep (joke output)
==Example==
 grave
 get
 get
 eat
 sleep
Prints:
 You have eaten as a snack right 2 people. Happy?
 SLEEP? ARE YOU CRAZY? LETS GET UP FOR MIDNIGHT DINNER
==SIMPLE Interpreter==
 #include <iostream>
 using namespace std;
 int main (int argc, char * const argv[]) {
 
 	string command;
 	int stack;
 
 
 	while (true) {
 		cin >> command;
 		
 		if (command=="grave") {
 			stack = 0;
 		} else if (command=="get") {
 			stack++;
 		} else if (command=="let") {
 			stack--;
 		} else if (command=="slime") {
 			cout << "Your victims look crazy and awful. They are afraid of you" << endl;
 			
 		} else if (command=="eat") {
 			cout << "You have eaten as a snack right " << stack << " people. Happy?" << endl;
 			stack = 0;
 			
 		} else if (command=="sleep") {
 			cout << "SLEEP? ARE YOU CRAZY? LETS GET UP FOR MIDNIGHT DINNER" << endl;
 			
 		}
 
 
 	}
 return 0;
 }
 
==Another simple interpreter==
 ' snack interpreter written in QB64 for windows by user Larryrl
 ' original intgerpretor in c written by the languages creator SmallBug
 ' it can be found at https://esolangs.org/wiki/Snack
 '
 '
 '
 dim stack as INTEGER
 filename$=COMMAND$
 if command$="" then filename$="\snack\test.snack" 
 open filename$ for input as #1
 x=0
 while not eof(1)
 x=x+1
 line input #1,p$(x)
 wend
 close #1
 tlns=x
 lnctr=1
 while lnctr<tlns+1 
 if p$(lnctr)="grave" then stack = 0
 if p$(lnctr)="get" then stack=stack+1
 if p$(lnctr)="let" then stack=stack-1
 if p$(lnctr)="slime" then print "Your victims look crazy and awful. They are afraid of you"
 if p$(lnctr)="eat" then print "You have eaten as a snack right ";stack;" people. Happy?":stack = 0
 if p$(lnctr)="sleep" then print "SLEEP? ARE YOU CRAZY? LETS GET UP FOR MIDNIGHT DINNER"
 lnctr=lnctr+1	
 wend		
Category:2011
Category:Languages
Category:Implemented
Category:Unusable for programming
Category:Thematic
Snack+

Snack+ is SNACBIT based and a derivative of HQ9+
==Command==
Command	Description
S 	Output the current snack
n 	Output the current snack
a 	Output the current snack
c 	Output the current snack
k 	Output the current snack
+ 	Increment the current snack, wrapping around at the upper edge
==Examples==
===Sequential Printing===
This program prints all states returns to the first one, which is again printed for endeictic purposes:
 S+S+S+S+S+S+S+S+S+S+S+S+
==Interpreter==
An attempt of providing an interpreter in Common Lisp is offered:
 (declaim (type (simple-array simple-string (11)) +SNACBIT-STATES+))
 
 (defparameter +SNACBIT-STATES+
 (make-array 11
 :element-type 'string
 :initial-contents
 '("Peanut butter cracker"
 "Cosmic brownie"
 "Cheezit"
 "Cheeto"
 "Dorito"
 "Tortilla chip"
 "Cheese cracker"
 "Potato chip"
 "Applesauce"
 "Peanut butter cup"
 "Pickle")))
 
 (defun interpret-Snack+ (code)
 (declare (type string code))
 (loop
 with state-number of-type (integer 0 10) = 0
 for token of-type character across code
 if (find token "Snack" :test #'char=) do
 (print (aref +SNACBIT-STATES+ state-number))
 else if (char= token #\+) do
 (setf state-number
 (mod (1+ state-number) 11))
 else do
 (error "Unrecognized character: ~s." token)))
Here is also an interpreter in Python, by User:None1:
snacklist=['Peanut butter cracker', 'Cosmic brownie', 'Cheezit', 'Cheeto', 'Dorito', 'Tortilla chip', 'Cheese cracker', 'Potato chip', 'Applesauce', 'Peanut butter cup', 'Pickle']
code=input()
x=0
for i in code:
 if i in "Snack":
 print(snacklist[x])
 if i=="+":
 x=(x+1)%11
And an interpreter in C++:
#include<string>
#include<iostream>
using namespace std;
string snacklist[]={"Peanut butter cracker", "Cosmic brownie", "Cheezit", "Cheeto", "Dorito", "Tortilla chip", "Cheese cracker", "Potato chip", "Applesauce", "Peanut butter cup", "Pickle"};
int main(){
	string code;
	getline(cin,code);
	int x=0;
	for(int i=0;i
Category:LanguagesCategory:Joke languagesCategory:2023Category:Implemented
Snackfish

Snackfish is SNACBIT based, and uses commands in Deadfish.
==Commands==
Command	Description
i 	Increment the current snack, wrapping around at the edges
d 	Decrement the current snack, wrapping around at the edges
s 	Square the number associated with the current snack, wrapping around at the edges
o 	Output the current snack
==Interpreter==
An implementation of Snackfish in Common Lisp shall be produced:
 (declaim (type (simple-array simple-string (11)) +SNACBIT-STATES+))
 
 (defparameter +SNACBIT-STATES+
 (make-array 11
 :element-type 'string
 :initial-contents
 '("Peanut butter cracker"
 "Cosmic brownie"
 "Cheezit"
 "Cheeto"
 "Dorito"
 "Tortilla chip"
 "Cheese cracker"
 "Potato chip"
 "Applesauce"
 "Peanut butter cup"
 "Pickle")))
 
 (defun normalize-state-number (state-number)
 (declare (type integer state-number))
 (the (integer 1 11)
 (+ 1 (mod (- state-number 1) 11))))
 
 (defun interpret-Snackfish (&optional (initial-code "" initial-code-supplied-p))
 "Launches the Snackfish interpreter, contingently processing the INITIAL-CODE, if supplied, and repeatedly querying the user for a command sequence until a completely empty line is issued, consequently returning NIL."
 (declare (type string initial-code))
 (declare (type T initial-code-supplied-p))
 (loop
 with state-number of-type (integer 1 11) = 1
 for first-cycle-p of-type boolean = T then NIL
 for commands of-type string
 = (if (and first-cycle-p initial-code-supplied-p)
 initial-code
 (progn
 (format T "~&>> ")
 (read-line *standard-input* NIL "")))
 while (plusp (length commands))
 do
 (loop for token of-type character across commands do
 (case token
 (#\i (setf state-number (normalize-state-number (1+ state-number))))
 (#\d (setf state-number (normalize-state-number (1- state-number))))
 (#\s (setf state-number (normalize-state-number (* state-number state-number))))
 (#\o (print (aref +SNACBIT-STATES+ (1- state-number))))
 (otherwise (terpri))))))
Here is also an interpreter in Python by User:None1:
snacklist=['Peanut butter cracker', 'Cosmic brownie', 'Cheezit', 'Cheeto', 'Dorito', 'Tortilla chip', 'Cheese cracker', 'Potato chip', 'Applesauce', 'Peanut butter cup', 'Pickle']
import sys
code=sys.stdin.read()
x=0
for i in code:
 if i=='i':
 x=(x+1)%11
 if i=='d':
 x=(x-1)%11
 if i=='s':
 x=(x*x)%11
 if i=='o':
 print(snacklist[x])
Category:LanguagesCategory:2023Category:TotalCategory:ImplementedCategory:Unusable for programmingCategory:Output only
Snackfish/Constants

==Peanut butter cracker==
Peanut butter cracker is what you originally are on, and it corresponds to 1.
==Cosmic brownie==
 i
==Cheezit==
 ii
==Cheeto==
 is
==Dorito==
 isi
==Tortilla chip==
 isii
==Cheese cracker==
 iisdd
==Potato chip==
 iisd
==Applesauce==
 iis
==Peanut butter cup==
 dd
Heck yeah it wraps!
==Pickle==
 d
SnailTrail

==_🐌==
Heres a number guessing game
 |@> lG0t9 > > > > ?s > > > > G=1s(>,v) v
 | v P(
 | v C
 | d1s o
 | ^ O1 O1 < r
 | r 
 | e 
 | c
 | t
 | !
 | )
 | (@)
==Commands== 
“@‘arrow’”~start at @ go in direction ‘arrow’ 
“l’var’’num’” let ‘var’ be ‘num’
“‘arrow’” go in direction ‘arrow’
“?’var’” let ‘var’ be user input
“‘n1’’operation’’n2’(‘c1’,’c2’)” if ‘n1’ ‘operation’ ‘n2’ then ‘c1’ else ‘c2’
“P(‘txt’)” print ‘txt’
“d’num’s” delete ‘num’ of stack
“das” delete all of stack
“+’var’s” add ‘var’ to stack
“O’num’” pass trough portal 
“|” go up or down
“_” go left or right
“|:” and “_:” duplicate snail and snails go in other directions (The first snail is gonna move first , 1. snail is up or left)
“(@)” end all
Snails look like this:
(cmd)^snail’s number
(>)^1
===Examples===
Here is The smallest version of this
 |@> lG0t9 > ?s G=1s(>,v) P(Correct!) (@)
 | ^ d1s <
==Grid==
Grid looks like this 
 |@> | > | v |
 | > |(@)| |
 | ^ | | < |
 SnailTrailSnail | ilSnailTrailSnail
 T | T
 railSnailTrailS | r
 n | a
 ailTrailSnailTra | il!
===Examples===
 @ > v 
 > (@) 
 ^ <
Category:Languages Category:Stack-based Category:Two-dimensional languages