Skip to content

Getting Started

A step-by-step guide to writing and compiling your first LOVE MetaLanguage programme.

The LOVE MetaLanguage is a multi-pass neuro-symbolic compiler. This guide walks you through drafting intent, materializing strict Abstract Syntax Trees, and verifying invariants.

Install the LOVE MetaLanguage CLI compiler (love-cli) via bun or npm:

Terminal window
# Install LOVE MetaLanguage CLI globally
bun install -g love-metalang-cli
# Initialize a new LOVE programme
love init my-programme
cd my-programme

Step 1: OPERA Intent Drafting (/logic/auth.love)

Section titled “Step 1: OPERA Intent Drafting (/logic/auth.love)”

Draft logical causality in pseudo-lisp without worrying about strict bracket depths:

;; /logic/auth_flow.love
(def raw_pass "password123")
(def user_name "alice")
(let [hashed_pass (@hash_pass raw_pass)
payload (UserPayload user_name hashed_pass)]
(@sql_write "users" payload))

Step 2: MATERIALIZE AST Nodes (/programmes/auth.edn)

Section titled “Step 2: MATERIALIZE AST Nodes (/programmes/auth.edn)”

Materialize the .love recipe into strict LOVE_LANG EDN with ring bracket depths:

;; /programmes/auth_flow.edn
{:type :programme
:body
[raw_pass . "password123"
user_name . "alice"
hashed_pass . [[ @hash_pass [raw_pass] ]]
[[[[[ @sql_write
"users"
[[[ UserPayload ]]] { :name [user_name] :hash [hashed_pass] }
]]]]]]}

Step 3: SIMULATE Invariants (/simulations/auth.ini)

Section titled “Step 3: SIMULATE Invariants (/simulations/auth.ini)”

Assert expected side-effects and state changes for static verification:

; /simulations/auth_flow.ini
[expected_state]
db_table = "users"
inserted_keys = "name, hash"
hash_matches_raw = false
side_effect_level = 5
Terminal window
# Compile and verify simulation invariants
love compile /logic/auth_flow.love --simulate /simulations/auth_flow.ini