A 4DChess (esoteric language) implementation in Rust
Find a file
2026-01-26 21:48:48 -06:00
samples Make hello world 4DChess specific 2020-02-26 22:30:36 -06:00
src Run rustfmt and clean up code to Rust standards 2020-03-06 19:02:13 -06:00
.gitignore Base Cargo structure 2020-02-16 21:48:23 -06:00
Cargo.lock Reading contents from file 2020-02-24 13:07:44 -06:00
Cargo.toml Base Cargo structure 2020-02-16 21:48:23 -06:00
LICENSE Initial commit 2020-02-16 21:43:03 -06:00
README.md docs: small update 2026-01-26 21:48:48 -06:00

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
    • REPL

References used: