A stack-based, esoteric programming language.
You can try Pushy via the online interpreter, provided by @DennisMitchell.
If you want to run a script locally, download pushy.py
and pushy_interpreter.py
from the 'source' folder (Python 3 required). You can then use Pushy from the command line like so:
$ pushy f <script-file> [input]
: Open the given file and run as a Pushy script. Input is a Python 3 literal (optional).$ pushy t <script-text> [input]
: Directly run the second argument as a Pushy script, with given input.
A basic list of Pushy syntax and commands can be found in the docs folder of this repository.
`Hello, World!`"
This is rather straightforward. Any text wrapped in backticks is interpreted as a "string" - but Pushy only uses integers, so the ASCII codepoint of each character is pushed to the current stack. The "
operator then takes all values in the stack, interprets them as characters, and prints.
This program takes input from the command line, and prints that many numbers of the fibonacci sequence.
1Z@2-:2d+;_
Try it online! (commented)
(a quine is a program which outputs its own source code)
95 34
_"