Skip to content

Esoteric language where everything is a pyramid

Notifications You must be signed in to change notification settings

ethschan/Pyramidion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pyramidion

An esoteric language where everything is structured as a pyramid.

What is this language?

Pyramidion uses pyramids to structure code, evaluating expressions from the base up to the peak. Operators at higher levels share results from lower levels, requiring careful planning of the pyramid’s structure.

Inspired by Kaleidoscope and developed to explore LLVM and compiler optimization.

Example Syntax

      +
     + +
    * 0 *
   x x y y
pyramid bar(x, y)

 bar
 + +
1 1 2
  • The function bar(x, y) squares two numbers and then adds them.
  • The main pyramid calls bar(1 + 1, 1 + 2).

Commands

Name Arity Function
+ 2 a + b
- 2 a - b
* 2 a * b
/ 2 a / b
pyramid N/A Function definition

Usage

To compile Pyramidion using clang++ and LLVM, run:

cd src/
clang++ -g pyramidion.cpp `llvm-config --cxxflags --ldflags --system-libs --libs core orcjit native` -O3 -o pyramidion

To execute a Pyramidion program:

./pyramidion <input file>

About

Esoteric language where everything is a pyramid

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages