Home / Documentation

Documentation

Welcome to the Vlaams Codex documentation! Here you'll find everything you need to get started with Platskript, from installation to advanced features.

Getting Started

Vlaams Codex is a transpiler toolchain for Platskript (.plats), a parody programming language that uses Flemish dialect keywords. It compiles Platskript source code to Python and executes it.

Quick Install

pip install vlaamscodex

That's it! You're ready to write your first Platskript program.

Your First Program

Create a file called hello.plats:

# coding: vlaamsplats
plan doe
  klap tekst gdag aan weeireld amen
gedaan

Run it:

plats run hello.plats

Output:

gdag aan weeireld

Installation

There are several ways to install Vlaams Codex depending on your needs:

Option A: pip (Recommended)

pip install vlaamscodex

Standard installation that works with your existing Python environment.

Option B: pipx (Isolated)

pipx install vlaamscodex

Perfect for end users. Keeps dependencies isolated from your system Python.

Option C: Development Mode

git clone https://github.com/brentishere41848/Vlaamse-Codex.git
cd Vlaamse-Codex
pip install -e ".[dev]"

For contributors. Includes test suite and development tools.

Option D: npm

npm install vlaamscodex

Install for JavaScript/Node.js projects. Available now on npm!

VS Code Extension

For the best development experience, install the Vlaams Codex VS Code extension:

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Vlaams Codex"
  4. Click Install

Language Specification

Platskript is a simple, dialect-based programming language. Here's a quick overview:

Program Structure

Programs are wrapped in plan doe ... gedaan. Statements terminate with amen.

Statements

Syntax Description
zet <var> op <expr> amen Variable assignment
klap <expr> amen Print expression
maak funksie <name> met <params...> doe ... gedaan Function definition
roep <name> met <args...> amen Function call
geeftterug <expr> amen Return statement

Expressions

  • tekst <words...> - String literal (words joined by spaces)
  • getal <digits> - Numeric literal
  • da <name> - Variable reference
  • spatie - Space character literal
  • plakt - String concatenation operator

CLI Reference

Vlaams Codex provides a command-line interface called plats with support for multiple Flemish dialects.

Available Commands

plats run <file.plats>      # Run a Platskript program
plats show-python <file>   # Display generated Python code
plats build <file.plats>     # Compile to a Python file
plats repl                      # Interactive REPL
plats examples                  # Browse built-in examples
plats check <file.plats>     # Check syntax
plats init <name>            # Create a new project
plats fortune                   # Random Flemish proverb

Dialect Aliases

Every command works in 7 Flemish dialects! For example, to run a program:

plats run script.plats        # Standard
plats voertuut script.plats    # West-Vlaams
plats doet script.plats        # Antwerps
plats gaon script.plats        # Limburgs
plats doeda script.plats       # Brussels

See the Multi-Vlaams Dialects page for a complete list of aliases.

Multi-Vlaams Dialects

Vlaams Codex v0.2.0 introduces full support for 7 Flemish dialects with 80+ command aliases. Use whichever dialect feels most natural to you!

Supported Dialects

  • Standard - The base dialect
  • West-Vlaams - The classic West Flemish dialect
  • Antwerps - Antwerp dialect
  • Limburgs - Limburg dialect
  • Brussels - Brussels dialect
  • Genks - Genk dialect
  • Standard + - Extended standard dialect

Error Messages

Error messages also come in your dialect:

Manneke, gij zijt 'amen' vergeten op lijn 5!  (Antwerps)
Jansen, ge zijt 'amen' vergeten op lijn 5!    (West-Vlaams)

For a complete list of dialect commands, see the Multi-Vlaams Dialects documentation.

Magic Mode

Magic Mode allows you to run .plats files directly with Python using custom source encoding. No compilation step needed!

How It Works

  1. Python detects # coding: vlaamsplats (PEP 263) and requests the corresponding codec
  2. During normal startup, Python's site module processes .pth files in site-packages
  3. VlaamsCodex installs vlaamscodex_autoload.pth containing the codec registration
  4. The codec decodes UTF-8 bytes, strips the encoding declaration, transpiles Platskript to Python
  5. Python executes the generated code transparently

Usage

Create a file with the encoding header:

# coding: vlaamsplats
plan doe
  klap tekst hallo amen
gedaan

Run it directly with Python:

python hello.plats

Limitations

  • python -S: Disables site module, preventing .pth hook execution
  • python -I: Isolated mode restricts site-packages access
  • Fallback: Use plats run script.plats when magic mode is unavailable

Need Help?

If you encounter any issues or have questions: