Merlin

A simple programming language for real web applications.

Stack-based. RPN. Templates. Modules. Pipelines. A small set of concepts designed to compose naturally.

Real sites running Merlin

Merlin is not only demonstrated with isolated examples. Complete applications are running with it today.

Merlin Dinner

A complete restaurant SITE-MODEL with menus, categories, photos, events and administration.

Open Restaurant Site

Finance

A complete financial SITE-MODEL with simulations, retirement planning and financial tools written using Merlin.

Open Finance Site

PlayMerlin

Start with a complete site instead of an empty project.

Choose a SITE-MODEL, give your site a name and start from a complete working application. Access the source and change anything you want.


Open PlayMerlin

Simple by design

Three core values

Numbers, Strings and Dictionaries, together with their vectors.

Typed stacks

Operators consume and produce values through typed stacks instead of conventional parameters and return values.

RPN

Reverse Polish Notation makes expressions and pipelines naturally composable.

Recursive evaluation

The same evaluator is reused through modules, pipelines, filters, templates and expressions.

Templates are programs

Merlin code can execute directly inside templates without a separate template language.

Written in Rust

Merlin's current runtime is implemented in Rust.

@TOTAL = @PRODUTOS.PRECO | SUM

$TITULOS[] =
    PRODUTOS.TITULO
    | UPPER
    | SORT
    | RETURN(@TITULO)

Explore the source

Merlin is available on GitHub with examples, runtime source and language documentation.