Skip to content

Syntax of .me โ€‹ โ€‹

.me syntax is algebraic, not tied to any human language.

Core idea:

  • A path is a symbolic address.
  • A call is an operation over that address.
  • Meaning comes from structure, not from English/Spanish/Japanese words.

1. Algebra First โ€‹ โ€‹

Minimal form:

ts
me.path.to.node(value)   // write
me("path.to.node")       // read

You can replace path.to.node with any valid symbols:

ts
me.alpha.beta.gamma(10);
me("alpha.beta.gamma"); // 10
ts
me.ventas.clientes.total(10);
me("ventas.clientes.total"); // 10
ts
me.ๅฃฒไธŠ.้กงๅฎข.ๅˆ่จˆ(10);
me("ๅฃฒไธŠ.้กงๅฎข.ๅˆ่จˆ"); // 10

Same algebra, different vocabulary.

2. Path Construction Rules โ€‹ โ€‹

  • Dot . creates hierarchy.
  • [] addresses indexed or selected members.
  • () executes read/write/operator logic.

Examples:

ts
me.user.name("Ana");
me.user.age(22);
me("user.name"); // "Ana"
me("user.age");  // 22
ts
me.products[1].name("Keyboard");
me.products[1].price(80);
me("products[1].name");  // "Keyboard"
me("products[1].price"); // 80

3. Human-Language Agnostic Namespaces โ€‹ โ€‹

English โ€‹ โ€‹

ts
me.shop.items[1].price(100);
me.shop.tax_rate(0.16);
me.shop.items[1]["="]("total", "price + (price * shop.tax_rate)");
me("shop.items[1].total");

Expected output:

txt
116

Spanish โ€‹ โ€‹

ts
me.tienda.articulos[1].precio(100);
me.tienda.impuesto(0.16);
me.tienda.articulos[1]["="]("total", "precio + (precio * tienda.impuesto)");
me("tienda.articulos[1].total");

Expected output:

txt
116

Japanese โ€‹ โ€‹

ts
me.ๅบ—่ˆ—.ๅ•†ๅ“[1].ไพกๆ ผ(100);
me.ๅบ—่ˆ—.็จŽ็އ(0.16);
me.ๅบ—่ˆ—.ๅ•†ๅ“[1]["="]("ๅˆ่จˆ", "ไพกๆ ผ + (ไพกๆ ผ * ๅบ—่ˆ—.็จŽ็އ)");
me("ๅบ—่ˆ—.ๅ•†ๅ“[1].ๅˆ่จˆ");

Expected output:

txt
116

4. [] Selector Syntax โ€‹ โ€‹

[] addresses members that already exist below. What kind of plural a space is โ€” bounded, ordered, evicting โ€” is a separate concern from addressing it; see Plurality Is Grammar.

Fixed index โ€‹ โ€‹

ts
me.fleet.trucks[2].km(1200);
me("fleet.trucks[2].km");

Expected output:

txt
1200

Broadcast [i] โ€‹ โ€‹

ts
me.fleet.trucks[1].fuel(100);
me.fleet.trucks[2].fuel(200);
me.fleet.trucks[3].fuel(400);
me.price_per_liter(2);
me.fleet["trucks[i]"]["="]("cost", "fuel * price_per_liter");
me("fleet.trucks[2].cost");

Expected output:

txt
400

Logical filter โ€‹ โ€‹

ts
me("fleet.trucks[fuel >= 200].fuel");

Expected output:

txt
{ "2": 200, "3": 400 }

Range โ€‹ โ€‹

ts
me("fleet.trucks[1..2].fuel");

Expected output:

txt
{ "1": 100, "2": 200 }

Multi-select โ€‹ โ€‹

ts
me("fleet.trucks[[1,3]].fuel");

Expected output:

txt
{ "1": 100, "3": 400 }

Transform โ€‹ โ€‹

ts
me("fleet.trucks[x => x.fuel * 0.5]");

Expected output:

txt
{ "1": 50, "2": 100, "3": 200 }

Collection aggregates: count x[] and sum x[].f (4.2) โ€‹

An empty [] (no selector) reads an aggregate over the members of a collection: x[] is the count, x[].f the exact sum of field f. Both work in me(), explain() and formula text.

ts
me("fleet.trucks[]");        // 3
me("fleet.trucks[].fuel");   // 700
me.fleet["="]("fuelX2", "fleet.trucks[].fuel * 2"); // collection path from the root
me("fleet.fuelX2");

Expected output:

txt
3
700
1400
  • Computed over the public view (what me.as(null) sees), for every caller including the owner; protected members never count. Scalar path reads are unchanged.
  • A member without the field (or with a non-numeric value) makes the sum undefined (status incomplete, never a partial sum). An empty collection is undefined, not 0.
  • |x[]|, x[] <= 128, x[][], a[]b are not valid: the read is undefined (evaluation-failed) and nothing is written.
  • The collection is bound from the root, even inside a scoped formula: write fleet.trucks[].fuel, not trucks[].fuel (no relative fallback, unlike scalar refs). Per member, use [i]: me.robots["[i]"]["="]("battery", "robots[i].batteries[].charge").
  • The literal key [] is written with a quoted selector: z["[]"].w.
  • Changes from 4.1.0 (I1โ€“I10) and known limits: see the CHANGELOG.

5. Operator Syntax Examples โ€‹ โ€‹

@ identity โ€‹ โ€‹

ts
me["@"]("Abella");
me.inspect({ last: 1 }).memories[0].operator;

Expected output:

txt
"@"

_ secret scope โ€‹ โ€‹

ts
me.wallet["_"]("vault-key");
me.wallet.balance(500);
me("wallet");
me("wallet.balance");

Expected output:

txt
undefined
500

~ noise reset โ€‹ โ€‹

ts
me.wallet["_"]("alpha");
me.wallet.secretA("A");
me.wallet["~"]("beta-seed");
me.wallet.secretB("B");
me("wallet.secretA");
me("wallet.secretB");

Expected output:

txt
"A"
"B"

__ / -> pointer โ€‹ โ€‹

ts
me.inventory.stock(900);
me.dashboard.card["->"]("inventory");
me("dashboard.card");
me("dashboard.card.stock");

Expected output:

txt
{ "__ptr": "inventory" }
900

= derivation โ€‹ โ€‹

ts
me.order.subtotal(100);
me.order.tax(16);
me.order["="]("total", "subtotal + tax");
me("order.total");

Expected output:

txt
116

? collect โ€‹ โ€‹

ts
me.user.name("Ana");
me.user.age(22);
me.report["?"](["user.name", "user.age"], (name, age) => \`\${name}:\${age}\`);
me("report");

Expected output:

txt
"Ana:22"

- remove โ€‹ โ€‹

ts
me.temp.value("to-delete");
me("temp.value");    // before
me.temp["-"]("value");
me("temp.value");    // after

Expected output:

txt
"to-delete"
undefined

6. Real-World Mini Scenarios โ€‹ โ€‹

E-commerce โ€‹ โ€‹

ts
me.products[1].name("Laptop");
me.products[1].price(1000);
me.products[1].discount(100);
me.products[1]["="]("final", "price - discount");
me("products[1].final");

Expected output:

txt
900

Logistics โ€‹ โ€‹

ts
me.routes[1].distance_km(120);
me.routes[1].fuel_l(12);
me.routes[1]["="]("efficiency", "distance_km / fuel_l");
me("routes[1].efficiency");

Expected output:

txt
10

Education โ€‹ โ€‹

ts
me.students[1].name("Lia");
me.students[1].math(90);
me.students[1].science(80);
me.students[1]["="]("avg", "(math + science) / 2");
me("students[1].avg");

Expected output:

txt
85

IoT โ€‹ โ€‹

ts
me.sensors[1].temp(21);
me.sensors[2].temp(30);
me("sensors[temp >= 25].temp");

Expected output:

txt
{ "2": 30 }

7. Summary โ€‹ โ€‹

  • .me syntax is path algebra.
  • Human words are labels only; structure and operators define behavior.
  • The same logic works across English, Spanish, Japanese, or domain-specific symbols.

Human owns meaning. Everything else asks.