Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

GLaDOS Logo

Welcome to the GLaDOS programming language documentation!

What is GLaDOS?

GLaDOS (Generic Language and Data Operand Syntax) is a statically-typed, compiled programming language that emphasizes safety and performance. It features:

  • Static type checking - Catch errors before runtime
  • C-like syntax - Familiar and easy to learn
  • Bytecode compilation - Efficient execution
  • Stack-based VM - Fast and predictable

Quick Example

int factorial(int n) {
    if (n <= 1) {
        return 1;
    }
    return n * factorial(n - 1);
}

int main() {
    int result = factorial(5);
    return result;
}

Project Goals

GLaDOS aims to recreate HolyC (the programming language created by Terry A. Davis for TempleOS) with our own fun twists. While maintaining the spirit of a simple, powerful systems language, we've added modern safety features and improvements.

Technologies Used

TechnologyVersionPurpose
HaskellGHC 9.6.3Implementation language
StackLTS 22.6Build system
MegaparsecLatestParser library
Hspec≥ 2.7.0Testing framework
BinaryLatestBytecode serialization

Why Haskell?

Haskell's strong type system and functional programming paradigms make it an excellent choice for building compilers and type checkers. The language naturally lends itself to writing correct, maintainable compiler infrastructure. That said, the choice of Haskell was also imposed by our school, EPITECH, as part of the curriculum requirements for this project.