Skip to content

FTcode/Pushy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pushy Build Status

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.

Docs:

A basic list of Pushy syntax and commands can be found in the docs folder of this repository.

Example Programs:

Hello World:

`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.

Try it online!

Fibonacci Generator

This program takes input from the command line, and prints that many numbers of the fibonacci sequence.

1Z@2-:2d+;_

Try it online! (commented)

Quine:

(a quine is a program which outputs its own source code)

95 34
_"

Try it online!

About

A stack-based programming language, originally an implementation of postfix notation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages