Skip to content

ZulfaNurhuda/GATE.project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

180 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀・GATE - Ganesha Algorithmic Transpiler Engine

Ever Dreamed of Making Your NOTAL Algorithms Run? ✨

Welcome to GATE! This awesome project is your magical bridge, transforming your brilliant algorithms written in the Bandung Institute of Technology's Algorithmic Notation (NOTAL) into super-functional, executable Pascal code! Think of it as giving your NOTAL ideas a voice that computers can understand and run. No more just writing algorithms – let's make them do things!


📋・Table of Contents


✨・What is GATE?

GATE (Ganesha Algorithmic Transpiler Engine) is a super cool "translation compiler" designed to take your algorithms, written in the unique Algorithmic Notation of Bandung Institute of Technology (NOTAL), and turn them into ready-to-run Pascal programming language scripts! 🚀 Our main goal is to create a seamless, fun bridge between your awesome algorithmic designs and their practical, executable life in Pascal. Get ready to see your algorithms in action! For a comprehensive understanding of NOTAL syntax and its Pascal equivalents, refer to the Whitepaper Transpiler NOTAL to Pascal.


🛠️・Getting Started (Let's Get This Party Started! 🎉)

Ready to bring your NOTAL creations to life? Here's how to get GATE up and running in a flash:

  1. Clone the magic!

    git clone https://github.com/your-username/GATE.project.git
    cd GATE.project
    git submodule update --init --recursive
  2. Install a C++ Toolchain ⚙️

    To build GATE, you'll need a C++ compiler. You can choose between traditional Makefiles or modern CMake. Below are the setup instructions for different platforms.

    Windows

    • For MinGW-w64 (for Makefile or CMake):

      1. Download MSYS2: Visit https://www.msys2.org/ and download the installer.
      2. Install & Update: Follow the installer and then run pacman -Syu in the MSYS2 terminal, repeating as necessary.
      3. Install Toolchain: Run pacman -S --needed base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake. This installs GCC, Make, and CMake.
      4. Add to PATH: Add C:\msys64\mingw64\bin to your system's PATH for easy access.
    • For MSVC (for CMake):

      1. Install Visual Studio: Download Visual Studio Community or another version.
      2. Select Workload: During installation, choose the "Desktop development with C++" workload. This includes the MSVC compiler, CMake, and NMake.

    Linux

    • Debian/Ubuntu-based:

      sudo apt update
      sudo apt install build-essential cmake
    • Fedora/RHEL-based:

      sudo dnf groupinstall "Development Tools"
      sudo dnf install cmake
    • Arch Linux:

      sudo pacman -S base-devel cmake

    macOS

    xcode-select --install
    brew install cmake

⚙️・Build the Engine (Choose Your Adventure!)

GATE supports two build systems: Makefile (for simplicity on Unix-like systems) and CMake (for flexibility across all platforms).

Option 1: Makefile (The Classic Way 📜)

Perfect for Linux, macOS, or Windows with MSYS2.

  • On Linux, macOS, or MSYS2 (MinGW-w64):

    Simply run make in the root directory:

    make

This command compiles the project and places the gate executable in the bin/ directory.

Option 2: CMake (The Modern Way ✨)

CMake is recommended for its flexibility, especially on Windows with different compilers.

  • A. Unix-like (Linux/macOS):

    # Create and configure the build directory
    cmake -B build
    
    # Compile the project
    cmake --build build
  • B. Windows with MSYS2 (MinGW-w64):

    # Create and configure using the MSYS Makefiles generator
    cmake -B build -G "MSYS Makefiles"
    
    # Compile the project
    cmake --build build
  • C. Windows with Visual Studio (MSVC):

    Open a Developer Command Prompt for VS or ensure cl.exe and cmake.exe are in your PATH.

    # Create a build directory (CMake auto-detects MSVC)
    cmake -B build
    
    # Compile the project
    cmake --build build

After a successful build (with either method), the gate executable will be waiting for you in the bin/ directory! 🎉


🗺️・How to Use (Your NOTAL to Pascal Journey! 🚀)

Once GATE is built, you're just one command away from seeing your NOTAL algorithms transformed into Pascal code that you can compile and run! It's like magic, but with code:

./bin/transpiler -i <your_notal_file.notal> -o <your_pascal_output.pas>

Simply replace <your_notal_file.notal> with the path to your NOTAL source file, and <your_pascal_output.pas> with the name you want for your shiny new Pascal file. This Pascal file will contain the fully translated, executable version of your algorithm, ready to be compiled and run by any Pascal compiler!


💻・Installing Free Pascal Compiler (FPC) (Get Ready to Run! 🏃‍♀️)

To truly bring your transpiled Pascal code to life, you'll need a Pascal compiler! We recommend using Free Pascal Compiler (FPC), a fantastic, open-source compiler that's super easy to get started with. Here's how to install it on your favorite operating system:

Windows

  1. Download the Installer: Head over to the official Free Pascal website's download page: https://www.freepascal.org/download.html

  2. Find the Windows Installer: Look for the "Windows" section and download the appropriate installer (usually a .exe file). Choose the version that matches your system architecture (32-bit or 64-bit).

  3. Run the Installer: Once downloaded, double-click the .exe file to start the installation wizard. Follow the on-screen prompts.

Important

During installation, make sure to select the option to "Add Free Pascal to the system PATH" or similar. This will allow you to run fpc commands directly from your command prompt! If you miss this, you might need to add it manually later.

Linux

For most Linux distributions, you can install FPC using your package manager. Here are some common commands:

  • Debian/Ubuntu-based:

    sudo apt update
    sudo apt install fpc
  • Fedora/RHEL-based:

    sudo dnf install fpc
  • Arch Linux:

    sudo pacman -S fpc

macOS

On macOS, the easiest way to install FPC is using Homebrew:

  1. Install Homebrew (if you haven't already):

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  2. Install FPC:

    brew install fpc

Verify Installation (for all OS)

After installation, open a new terminal (Command Prompt/PowerShell on Windows, Terminal on Linux/macOS) and type:

fpc -i

If you see information about the FPC version, congratulations! You're all set to compile your Pascal masterpieces! 🎉


✨・Compiling Your Pascal Code (Time to See it Run! 🚀)

Once you have your shiny new Pascal file (like my_program.pas from the previous step) and Free Pascal Compiler (FPC) installed, it's super easy to turn it into an executable program! Here's how to make your code zoom! 💨

fpc <your_pascal_output.pas>

For example, if your transpiled file is named example.pas:

fpc example.pas
  • On Windows: This will magically generate an executable file named example.exe in the same directory. ✨

  • On Linux/macOS: This will create an executable file named example (or example.out depending on your FPC version/configuration) in the same spot. 🐧🍎

Now, for the grand finale! You can run your Pascal program directly from your terminal! Just type the name of the executable and watch it go! 🤩

  • On Windows:

    .\example.exe
  • On Linux/macOS:

    ./example

And voilà! Your NOTAL algorithm, now a Pascal executable, is running and ready to impress! 🎉🥳


💖・Contributing (Join the Fun! 🎉)

Got cool ideas? Found a pesky bug? Want to add an awesome new feature? We'd absolutely love your help! GATE is a community effort, and every contribution, big or small, makes a difference. Check out our CONTRIBUTING.md for all the details on how you can jump in and make GATE even better. Let's build something amazing together!


📜・License (The Legal Bits, but Still Friendly! 🤝)

This project is open-source and proudly distributed under the MIT License. This means you're free to explore, use, modify, and share GATE! You can find all the nitty-gritty details in the LICENSE file. Happy coding!


👋・About Me!

Muhammad Zulfa Fauzan Nurhuda (18224064)
Just a regular human being who happens to be studying STI at ITB! 😄 Always excited to learn and build cool stuff! 🚀

Logo ITB

About

GATE - Ganesha Algorithmic Transpiler Engine - Is a "Translation Compiler" that will convert the Algorithmic Notation of Bandung Institute of Technology into a Pascal programming language script.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Contributors