← home · docs · spec · std

guide — build your first thing

20 minutes, no source diving. Pick a track — they share the same one rule: every sentence ends with .

1hello + REPL

hello.sb
SB
say "Hello, ShimbaBomb!".
ask "your name?".
say "hi ${input()}".
$ sb hello.sb
$ sb -i          # try lines live
$ sb build hello.sb && ./hello

2variables, lists, maps

SB
set score to list with 0.          # mutable scalar = single-element list
set xs to list with 1 and 2.
add_to with xs and 3.
say item with 1 and xs.             # → 2
set m to map("hp", 100).
say m["hp"].
set m["hp"] to 99.
why list with 0?
define add with n as
  set cur to item with 0 and score.
  set score[0] to cur plus n.  # write-through ✓
  set score to 5.            # ← local only, bug!
end.

3your first GTK app

A
Real window, not HTML:
counter.sb
SB
pls bring shimgui.
shimgui_window with "Counter" and 400 and 200.
shimgui_label with "0".
shimgui_button with "+ 1".
shimgui_button with "Quit".
shimgui_run with.
say shimgui_last_click with.
B
Swap to pixel UI (ketiwe) for games — see ketiwe page.

4your first game loop

SB
pls bring game.
set dt to 0.016.
while 1 is 1 then
  set dt to game_tick with dt.
  # move, collide, draw
end

Need sprites, wireframe, solid 3D? pls bring ketiwe + pls bring ketiwe3d — all SB, copy-paste friendly.

5what next