TB

A tiny, friendly programming language.

Write a few lines in plain words. TB runs them one at a time, and explains any mistake in a sentence you can actually read.

Version 1.0.0 for Windows, macOS and Linux. Release notes

let name = "Tanisha"
let favourites = ["tea", "books", "rain"]

say("Hello, " + name + "!")
for thing in favourites {
  say("I like " + thing + ".")
}
say(len(favourites) + " favourite things")
Output
$ tb hello.tb
Hello, Tanisha!
I like tea.
I like books.
I like rain.
3 favourite things

Small on purpose

Eight built-in instructions and a handful of keywords. Enough to write real programs, little enough to hold in your head.

Friendly errors

Every mistake names the line and says what went wrong, in plain English. Typos get a suggestion.

let name = "Tanisha"
let greeting = "Hello"
say(greeting + ", " + nmae)
Oops! On line 3: I don't know what 'nmae' is. Did you mean 'name'?

No setup

TB is one file. Nothing to install, no accounts. On Windows, drag a .tb file onto tb.exe and it runs.

> tb hello.tb
Hello, Tanisha!
Press Enter to close

Runs everywhere

The same program runs on a Windows laptop, a Mac, Linux, or right here in the browser.

  • Windowstb-windows-x64.exe
  • macOSApple silicon
  • Linuxx64
  • BrowserPlayground

Reads like a note

Instructions are plain words: let, say, ask. No semicolons, no types to declare.

let name = ask("Your name? ")
say("Hi, " + name + "!")

Closures and recursion

Small, but a real language: functions are values, remember their surroundings, and can call themselves.

fn stars(n) {
  if n <= 0 { return "" }
  return "*" + stars(n - 1)
}
say(stars(5))
*****

Built-in kindness

care() prints a kind message, chosen at random. Give it a name to make it personal.

care("Tanisha")
♥ Tanisha, you make the world softer just by being in it.

A quick tour

Six short programs cover most of the language. Press Run on any of them.

Text goes in quotes. + adds numbers and joins text; if either side is text, TB joins.

let cups = 2
let drink = "tea"
say("Cups of " + drink + ": " + cups)
say(cups * 3, true, nil)

Read the full guide, eleven short lessons from your first say to closures.

Install

Download one file for your computer and run your first program. The download page walks through every click, including the security prompts.

# Put tb.exe and hello.tb in one folder, then:
> tb hello.tb
Hello, Tanisha!

# Or just drag hello.tb onto tb.exe.

Why TB?

TB was made as a gift, for one person. Its name is her initials.

It is small on purpose, so all of it fits in your head, and gentle on purpose, so learning it never feels like being told off. If you are not Tanisha, you are still very welcome here.

Dear Tanisha,

I made you something a little unusual. It isn't flowers and it isn't a card. It's a whole language, small enough to fit in your pocket, and it carries your initials.

I know code can look like a wall of strange symbols. TB is my attempt to make it feel more like writing a note: you say something, and the computer says something kind back. You can't break anything, and every mistake comes with a gentle hint.

There's no rush to learn any of it. Open it on a quiet evening, run the first program, and know that every line was written thinking of you.

With love, always.

Write your first program tonight

It takes about five minutes, and the guide starts from zero.