2. Values, Text and bitwise

let binds a value; the type is inferred. Scalars: Int (64-bit), Float, Bool, Text (bytes, binary-safe). Text interpolates with ${...} and concatenates with ... Integer literals speak hex and binary, and the full bitwise set is here: & | ^ << >> — grouped Go-style, so a mask compare needs no parentheses.

let port = 8080;
let pi = 3.14159;
let name = "writeonce";
let msg = "listening on ${port}";

let flags = 0b1010_0001;
let high = flags & 0xF0;      -- bitwise AND, then == compares
let shifted = 1 << 12;        -- 4096
if flags & 0x80 != 0 {
  print("top bit set");       -- groups (flags & 0x80) != 0
}

Chapters