Stacat

This project was firstly made together with a friend from university. We used to make it more than two years ago, but we never managed to finish it.

Back then it was made in C and I still love C/C++ in such a way that I thought it would be nice to implement this language. I decided to use C++ to make the program look way simpler.

Void

Table of contents

Why?

Because I can :^)

The operators of Stacat

Stack operators

  • >: pushes 1 onto the stack
  • ^: clones the current value onto the stack

Arithmetic operators

  • +: pops the stack twice and pushes the sum onto the stack
  • -: pops the stack twice and pushes the difference onto the stack
  • *: pops the stack twice and pushes the product onto the stack

Control flow operators

  • #: pops the stack and repeats the next operation n times
  • !: pops the stack and outputs n as an ASCII character to the standard output
  • ?: pushes the next character from the standard input onto the stack

Commenting

  • _: start line comment

Examples of Stacat

1   >
2   >^+
3   >^+>+
4   >^+^+
5   >^+^+>+
6   >^+^>+*
7   >^+^>+*>+
8   >^+^+^+
9   >^+>+^*
10  >^+>+^*>+
72  >^+>+^*>^+^+^+*

This article was updated on July 7, 2026