Skip to content

A 4DChess (esoteric language) implementation in Rust

License

Notifications You must be signed in to change notification settings

taxborn/hyperchessrs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A 4DChess interpreter in Rust.

As described from it's esolangs wiki page:

4DChess is an esoteric programming language designed by User: Zemeckis on 18th November, 2019. It is directly inspired from Brainfuck. Instead of brainfuck's usual one-dimensional memory cell array, 4DChess uses a four-dimensional hypercube-like memory cell array of 8 cells per dimension.

What I wanted to do

Here is what I wanted to achieve:

  • Learn interpreters and how they work
  • Use Rust to create an interpreter
  • Create an interpreter for an esoteric language
  • Create sample programs in esoteric languages

My explination

I created a YouTube video explaining my thought process.

How to compile and run:

Note: You need to have Rust installed on your system to build. I will include released binaries later.

$ git clone https://github.com/taxborn/hyperchessrs && cd hyperchessrs

$ cargo build # You can use --release flag here to generate optimized binary

Now that the binary has been compiled, you can access it by running:

$ ./target/debug/hyperchessrs <name of 4D Chess file>.4dc # If --release was used, the path is ./target/release/hyperchessrs

What I want to add in the future:

  • Optimize it (Optmization blog)
  • Add more sample programs
  • Clean up the runner file
  • Add to the esolangs page
  • Add debug options (--debug?)
    • Add command line argument parsing
    • Ability to show memory cells
    • Print out OpCode & Instruction Vector
    • Step through program?

References used: