Build

Your first app.

Satisfaction apps are two small files. This is a complete, working counter.

Beta. The Developer app and Satisfaction are part of the W-OS beta channel. Turn on Beta updates in Settings → Updates, then open Beta features → Developer.
  1. Create a projectOpen the Developer app and choose a name. It makes app.json, main.satif and main.satUI for you.
  2. Write the logicVariables, functions and a call to render() to redraw the screen.
  3. Describe the screenA declarative view tree that is re-evaluated against your program's live state.
  4. Run, then installRun shows it in a window. Install puts it in your own home folder, never touching the OS itself.
// main.satif
var count = 0

func increment() {
  count = count + 1
  render()
}

func decrement() {
  count = count - 1
  render()
}
// main.satUI
View {
  Text("Satisfaction Counter")
  Text("Count: \(count)")
  HStack {
    Button("-") { decrement() }
    Button("+") { increment() }
  }
  Spacer
}

The language in one table

ThingHow it looks
Valuesnumbers, strings, booleans, nil, lists [1, 2], maps ["a": 1], functions
Variableslet (fixed) and var (changeable). No type annotations.
Control flowif/else, while, for x in list, break, continue, return, cond ? a : b
StringsInterpolation: "Count: \(count)"
Several filesimport "name" pulls in another .satif from the same project
ErrorsAlways Line N: what went wrong, in plain English

One screen file per app for now (main.satUI); extra logic files are supported.