-
Notifications
You must be signed in to change notification settings - Fork 0
STANK is a programming language that I built for fun. STANK follows the concatenative paradigm, and provides both an interpreter and compiler for STANK programs. Checkout bubblesort.stanky to see a sorting algorithm written in STANK!
fvolcic/STANK
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Implementation of the STANK programming language. Why STANK? (ST)ack based L(AN)guage that suc(K)s What is STANK? ---------------- STANK is a turing complete stack-based programming language. STANK programs can be both interpreted and compiled. To interpret stank, use python3 stank.py <inputfile> To compile stank, use python3 stank_compiler.py <inputfile> -o <outputfile> -ps <stacksize> Compiling STANK seems to make the programs about 10x as fast. More: I do not recommend torturing yourself by trying to use STANK. Unless you want to write a STANK compiler in STANK to make the language self-hosted. That would be nice. If you would like to try to use the STANK language, you can read the documentation first by running $python3 stank.py Docs.stanky You need python 3 and the click library for the program to run properly TODO: elif - implement the else if token else - implement the else token OTHER: language kinda trash. It is turing complete (turing.stanky), but that is not technically useful. If you need to use a stack based language for whatever reason, just use C and make a statically allocated array and an index. Or C++. The python interpreter is incredibly slow as of now. (If you are just messing around, it will seem super fast), but anything that requires actual computation will be incredibly slow. This is because I made negative effort in actually making the inerpreter actually good. It works, just uses a lot of string comparisons. You can see how much faster C or Python is than STANK. Do this by compiling fib.c, and then running this, fib.py, and fib.stanky
About
STANK is a programming language that I built for fun. STANK follows the concatenative paradigm, and provides both an interpreter and compiler for STANK programs. Checkout bubblesort.stanky to see a sorting algorithm written in STANK!
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published