Skip to content

Kiwi

A scripting language with a small, readable syntax and a standard library that covers files, data formats, HTTP, databases and concurrency out of the box.
# Count words in a file and print the top five.
counts = {}
for word in fio::read("README.md").lowercase().scan('[a-z]+') do
counts[word] = counts.get(word, 0) + 1
end
top = counts.keys().sort(do (a, b) => counts[a] > counts[b]).take(5)
cli::table(["word", "count"], top.map(do (w) => [w, counts[w]]))

Readable by default

Blocks close with end, strings interpolate with ${...}, and guards like return x when done keep control flow flat.

Batteries included

CSV, JSON, YAML, XML, SQLite, HTTP client and server, sockets, compression and more, with nothing to install.

Data friendly

Lists and hashmaps with map, filter and reduce, plus a table package for joins and grouping.

Concurrency built in

Spawn tasks, pass values over channels, and guard shared state with mutexes.