← home · github

docs (notebook)

one rule: every sentence ends with a dot. that's it. really.

Aquick start

terminal
git clone https://github.com/Shimba-crypto/shimbabomb.git
cd shimbabomb
./install.sh
sb examples/hello.sb
sb -i                  # REPL

Bsyntax — all of it

variables & math

SB
set x to 10.
set y to x plus 1.      # minus / times / divided by / mod
set z to 7 divided evenly by 2. # int div
set s to "n=${x}".      # ${} inside strings

say & input

say "hello".
ask "your name?".   # → input()

if / loops

if x is greater than 5 then
  say "big".
otherwise if x is 5 then
  say "five".
otherwise
  say "small".
end

count i from 0 to 5 then say i. end
loop it through xs then say it. end
while hp is greater than 0 then break. end

functions & lists & maps

define add with a and b as
  give back a plus b.
end.
say add with 2 and 3.      # or add(2, 3).

set xs to list with 1 and 2.
add_to with xs and 4.
say item with 0 and xs.   # → 1

set m to map("k", 1).
say m["k"].              # bracket read/write
set m["n"] to 99.

match / try

match name
with "shim" then say "hi".
with _ then say "?".
end

try
  raise "oops".
catch e
  say e.                  # short note
  say e_info["trace"].
end

Cshimgui — real GTK, not html

shimgui_window with "App" and 460 and 320.
shimgui_label with "Hello".
shimgui_button with "Click".
shimgui_run with.

Dcli

cmdwhat it does
sb file.sbrun
sb -iREPL
sb build file.sbcompile to binary
sb pack deb|rpm|exemake installers (self-contained, 35M hello vs 80M full)
sb fmt / test / doc / lspformat, test, docs, LSP

Estd

tip: every std module is just SB. open it. steal it.