ThePrimeagen / ts-rust-zig-deez

605 stars 160 forks source link

Degens Interpreter Competition (DIC)

Based on the awesome book "Writing An Interpreter In Go" by Thorsten Ball
Use the code THEPRIMEAGEN for 30% off
ThePrimeagen receives no financial incentive for this work. Its for you
![Work In Progress](https://img.shields.io/badge/Work%20In%20Progress-orange?style=for-the-badge)

Contributing

Code Owners

We most certainly need more code owners. If you wish to give the green check to code of a certain language, please add yourself as owner. If approved, i'll merge. I cannot possibly review all of these. :)

Participation

Implementations in TypeScript, Rust or Zig are reserved and maintained by ThePrimeagen himself.

For other languages, remember: first come, first serve. If there exists an implementation in your language of choice, contribute to it!

If not, start by copying LANG_TEMPLATE folder:

cp -r .github/LANG_TEMPLATE/ <your_folder_name>

It comes with:

├── .gitignore  # ignores all editor-specific or os-specific files, add additional stuff for your language
├── Dockerfile  # for Docker builds
└── Makefile    # convenient commands runner (make <cmd>) under *NIX systems

Now, the convenient commands runner (.\make.cmd <cmd>) under Windows is completely optional and resides in the root of .github/

Running

Command names

General:

Without Docker:

Docker:

*NIX (Linux, macOS, etc.)

This assumes there is a Makefile in the root of the language directory.

# without docker
make clean
make fmt
make lint
make test
make ready  # runs fmt, lint and test

# docker, assuming there's a Dockerfile
make docker-build  # makes the build
make docker-ready  # runs fmt, lint and test in the built image

Windows

This assumes there is a make.cmd in the root of the language directory.

@rem without docker
.\make.cmd clean
.\make.cmd fmt
.\make.cmd lint
.\make.cmd test
.\make.cmd ready  @rem runs fmt, lint and test

@rem docker, assuming there's a Dockerfile
.\make.cmd docker-build  @rem makes the build
.\make.cmd docker-ready  @rem runs fmt, lint and test in the built image