Pravilo je program.

Zapišite pravila. Orb zgradi aplikacijo ali pove, zakaj je ne more.

1 curl -fsSL https://orb.almadar.io/install.sh | sh

Checkout

on Order · states: 3 · transitions: 3
Order { total }
PAY
(> @payload.amount 0)
SHIP
NEW_ORDER
nowpending
paid
shipped

En program, več ciljev

orb isti .lolo prevede v vsakega od teh.

TypeScript + React

Python

Rust

Swift for iOS

Kotlin for Android

Neplačano naročilo ne more biti odposlano.

Iz pending ni prehoda SHIP.

Checkout

on Order · states: 3 · transitions: 4
emitsPAYemitsMOVED
INIT
PAY
(> @payload.amount 0)
SHIP
NEW_ORDER
nowpending
paid
shipped
Ista datoteka, v teku

Unpaid

checkout.lolololo
1aplikacija std-orb-sample-checkout "1.0.0" 2"std-orb-sample-checkout — the checkout program shown on orb.almadar.io's home page, running: an order that cannot ship before it is paid. The page shows this file as code beside the running trait, and each move is reported (MOVED) so its state machine can follow along." 3orbitala Orders { 4 entiteta Order [izvajanje] { 5 id : niz! 6 total : stevilo 7 } 8 9 znacilnost Checkout -> Order [interakcija, primerek] { 10 zacetno: pending 11 12 stanje pending { 13 ZACETEK -> pending 14 (izrisi-vmesnik main { type: stack, gap: sm, children: [ 15 { type: typography, content: "Unpaid", variant: h4 }, 16 { type: button, label: "Pay 40", action: PAY, actionPayload: { amount: 40 } } 17 ] }) 18 PAY -> paid ko (> ?amount 0) 19 (nastavi @entiteta.total ?amount) 20 (oddaj MOVED { event: "PAY" }) 21 (izrisi-vmesnik main { type: stack, gap: sm, children: [ 22 { type: typography, content: "Paid 40", variant: h4 }, 23 { type: button, label: "Ship", action: SHIP } 24 ] }) 25 } 26 27 stanje paid { 28 SHIP -> shipped 29 (oddaj MOVED { event: "SHIP" }) 30 (izrisi-vmesnik main { type: stack, gap: sm, children: [ 31 { type: typography, content: "Shipped", variant: h4 }, 32 { type: button, label: "New order", action: NEW_ORDER } 33 ] }) 34 } 35 36 stanje shipped { 37 NEW_ORDER -> pending 38 (oddaj MOVED { event: "NEW_ORDER" }) 39 (izrisi-vmesnik main { type: stack, gap: sm, children: [ 40 { type: typography, content: "Unpaid", variant: h4 }, 41 { type: button, label: "Pay 40", action: PAY, actionPayload: { amount: 40 } } 42 ] }) 43 } 44 45 oddaja { 46 PAY { 47 amount : stevilo! 48 } 49 MOVED -> external { 50 event : niz! 51 } 52 @opis "Each move names the event it took, so a diagram beside the order can follow it." 53 } 54 } 55 56 stran "/checkout" -> Checkout 57}

Vse je vedenje.

Vsak je ena datoteka .lolo.

Gibanje po orbiti

STEP
TOGGLE_RUN
RESET
nowidle

Planets orbit a central mass under inverse-square gravity.

Running
Step 0

ready — press Step to advance the orbits

Logično vezje

STEP
TOGGLE_RUN
RESET
nowidle

Logic gates combine inputs into outputs that follow their truth table.

Paused
Step 0

Circuit 1 — (A AND B) XOR (A OR B)

Toggle inputs, then Propagate to see the output.

Galtonova deska

STEP
TOGGLE_RUN
RESET
nowidle

Balls bounce off pegs and pile into a bell-shaped histogram.

Running
Step 0

Press Step to drop a batch of balls, or Run to auto-drop.

Vsaka napaka dobi ime in vrstico.

orb validate vas ustavi s kodo in vrstico.

orb validatebash
$ orb validate checkout.lolo ❌ [ORB_BINDING_PAYLOAD_FIELD_UNDECLARED] orbitals[0 (Orders)].traits[0 (Checkout)].stateMachine.transitions[1].guard[1]: Event 'PAY' uses @payload.amount (.lolo spelling: `?amount` or `@payload.amount`) but has no payload schema defined @ 16:27 💡 declare the field in the event's `emits` payload block: `PAY -> external { amount : <type> }` ❌ [CIRCUIT_DEAD_END_STATE] orbitals[0 (Orders)].traits[0 (Checkout)].stateMachine.states: State 'shipped' has no outgoing transitions - it may be a dead end @ 10:3 💡 Add outgoing transitions or mark as terminal state with isTerminal: true Error: Schema validation failed with 2 error(s)

Orb v številkah

5

jezikov, v katere prevaja

194

vedenj v standardni knjižnici

3

jeziki ključnih besed

0

opozoril, ki jih dovoli orb validate

Napiši pravilo. Dobi aplikacijo.

Namestite z eno vrstico. Prvi program zaženite v peskovniku.

© 2026 Almadar. Ljubljana, Slovenija.
Not reported here