Skip to content

Sprout v0.0.29 — examples gallery + sort_by

Choose a tag to compare

@fizzexual fizzexual released this 12 Jun 20:23
· 25 commits to main since this release

A deliberate change of gear: proving the language, not growing it.

After five straight feature releases, a founder-style review gave the most important advice in the project: "You have enough language. Start proving it by building things. Every awkward pattern found building real projects is worth more than ten new language features."

So v0.0.29 adds no new syntax. It proves Sprout by building real programs with it — and fixes the one thing that genuinely got in the way.

🌱 An examples gallery — real, runnable programs

A new examples/ folder, each file self-contained and commented:

Example Builds
fizzbuzz the classic
leaderboard rank records by score
wordcount most-common words in text
units temperature / distance converter
bank account ledger with overdraft errors
roman number → Roman numerals
rpn reverse-Polish calculator (3 4 + 5 *)
todo a to-do list saved to disk

All eight are now wired into CI, so they can't silently break.

The one earned fix: sort_by(list, task)

Building the leaderboard and word-counter immediately hit a wall — sort only handles a flat list of numbers/text, so "rank these records by a field" was impossible. sort_by orders a list by the value a task returns for each item (stable, in place; reverse() for descending):

make ranked = reverse(sort_by(players, task(p): p["score"]))

That's the whole code change. The other friction found (column padding, fixed-decimal formatting) was deliberately left out — it's workaround-able, and resisting it is the point.

Full suite + all examples green on Linux, macOS, and Windows. Windows installer attached.