A creative C++ interpreter that converts "Jaksel slang" into valid C++ code. This project takes custom .jaksel files written in a playful, slang-inspired language and translates them into standard C++ code. It then automatically compiles and runs the generated code, allowing for a seamless and hidden-in-plain-sight coding experience.
- Jaksel Slang Interpreter: Translates custom slang (e.g., "which is", "spill", "begitulah") into valid C++ tokens.
- File Conversion: Reads from a
.jakselfile, converts each line into C++ code, and writes the result to a standard.cppfile. - Automated Compilation: Automatically compiles the generated C++ code using g++.
- Creative Syntax: Designed with fun, non-standard keywords to give a fresh twist on traditional programming.
- Docker Support: The project has been successfully built and tested using Docker for a reproducible build environment.
- C++ Compiler: Make sure you have g++ installed and added to your system's PATH (if building locally).
- Git: For cloning the repository and version control.
- Docker: To build and run the interpreter in a containerized environment.
- C++ Standard: This project is built using C++17.
- Clone the repository:
git clone https://github.com/Schryzon/jaksel-cpp.git cd jaksel-cpp - Build the project by following the instructions in the usage section below.
-
Install Docker:
- Docker Desktop for Windows/Mac
- For Linux, follow your distribution’s Docker installation guide.
-
Build the Docker Image:
docker build -t jaksel-cpp . -
Run the Docker Container:
docker run -it --rm jaksel-cpp
This command starts the interpreter in an isolated environment.
-
Prepare your
.jakselfile:Create a file named
main.jakselin the repository root and add your Jaksel slang code. For example:# Example Jaksel Code gimme <iostream> yang std; int a is 12 which is spill "The value of a is: " then a enter begitulah 0 which is -
Convert and Compile (Locally):
Run the main interpreter program to convert your
.jakselfile to standard C++ and compile it automatically:./JakselInterpreter
This command will:
- Read the
main.jakselfile. - Generate an
output.cppfile with the converted code. - Compile
output.cppinto an executable (output.exeon Windows oroutputon Linux/macOS). - Run the generated executable and display the program output.
- Read the
-
Run the Executable Manually (Optional):
If needed, you can run the generated executable manually:
- On Windows:
output.exe
- On Linux/macOS:
./output
- On Windows:
-
Convert and Compile (Docker):
If using Docker (recommended for a reproducible build):
- Follow the Docker build instructions above.
- Running the container will automatically execute your interpreter, which reads
main.jaksel, converts it, compiles it, and runs the resulting executable.
The interpreter uses a predefined mapping of Jaksel slang to standard C++ tokens. Here are some examples:
| Jaksel Slang | C++ Translation |
|---|---|
| "which is" | ; |
| "spill" | std::cout << |
| "begitulah" | return |
| "kalo" | if |
| "gitu" | else |
| "nomer" | int |
| "nonbinary" | bool |
| "selama" | while |
| "plus" | + |
| "mines" | - |
| "is" | = |
| "enter" | std::endl |
| "start oi" | { |
| "thats literally it" | } |
| "mana woi" | std::cin >> |
| "coba" | for |
| "gimme" | #include |
| "yang" | using namespace |
| "letter" | char |
| "sama" | == |
| "ga ada"/"gak ada" | nullptr |
| "gak" | ! |
| "floaty boi" | float |
| "desimal" | double |
| "then" | << |
You can expand or modify these mappings in the source code file JakselMappings.cpp as needed.
Contributions are welcome! If you have ideas for more Jaksel slang keywords or improvements to the interpreter, feel free to fork the repository and submit a pull request.
This project is licensed under the Creative Commons v1.0 License.
- Inspired by creative approaches to language design and code transformation.
- Although creative, the hilarious syntax rules are utterly diabolical 🤣.
- Thanks to all contributors who help keep this project innovative and fun.