Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grimoire

Grimoire is a statically-typed, magic-themed programming language designed to let you cast spells and weave logic through incantations. It replaces mundane programming constructs with arcane terminology, making every script feel like a page from a wizard's tome.

🔮 Features

  • Magic Syntax: cast your output, look for conditions, and sustain your loops.
  • Spells: Define reusable blocks of logic as spells and seal your results.
  • Chants: Iterate through your data with chant.
  • File Extension: Save your arcane scripts with the .hex extension.

📦 Installation

Pre-built Binaries

Download the latest release for your platform from the Releases page:

Platform Download
Windows grimoire-windows-x64.zip
Linux grimoire-linux-x64.tar.gz
macOS grimoire-macos-x64.tar.gz

Extract the archive and add the grimoire executable to your PATH.

Build from Source

🛠️ Build Instructions

Grimoire uses CMake for building. Ensure you have CMake and a C++ compiler installed.

mkdir build
cd build
cmake ..
cmake --build .

⚡ Usage

Once built, you can run Grimoire scripts using the generated executable:

# Windows
.\Release\grimoire.exe ..\examples\hello.hex

# Linux / macOS
./grimoire ../examples/hello.hex

📜 Example

Here is a simple Fibonacci spell in Grimoire:

# Fibonacci spell
spell fib(n) {
    look (n <= 1) {
        seal n;
    }
    seal fib(n - 1) + fib(n - 2);
}

cast fib(10);

For more details on syntax, check out docs/syntax.md and docs/design.md.

About

A magic-themed programming language where code becomes spellcraft. Cast spells, sustain loops, and seal your results with arcane syntax.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages