Repository navigation
Jamo 0.4.0
Jamo 0.4.0 is a big step: functions you can write right where you need them, text in every language, and programs Windows trusts. Jamo now has the tools of a modern language, and it still makes tiny, fast .exe files with nothing to install.
Get started
- Download jamo-0.4.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.4.0. - Try a game:
jamo run examples\beat_run.jamofrom inside the unzipped folder.
Already have an older Jamo? Just run the new install.cmd. Your own programs stay as they are.
For colors, red underlines, hover help and go to definition in VS Code, download jamo.vsix below. In VS Code, open the Extensions panel, click the ... menu at its top, and choose Install from VSIX.
What's new
Write a function right where you need it
Short functions can now be written in place, and they remember the variables around them:
var limit = 50
var cheap = filtered(prices, func(p: int): bool => p < limit)
sort_with(players, func(a: Player, b: Player): bool => a.score > b.score)
Functions can even make other functions:
func make_adder(k: int): func(int): int
return func(x: int): int => x + k
end
var add5 = make_adder(5)
print(add5(1)) # 6
Guide section 29 shows it all.
Call any function value straight away
A function stored in a list or handed back by another function can be called on the spot, like steps[1](2) or make_adder(5)(1).
Text in every language
Printing héllo, привет or 日本語 in a console window now shows exactly that, where it used to come out garbled. Typing those letters into input() works too.
Programs Windows trusts
Every .exe Jamo makes now has the header checksum that normal Windows programs have. Without it, Windows Defender could mistake brand-new Jamo programs for malware. Now they scan clean.
Clearer errors
Calling something that isn't a function tells you what it is: n is an int, not a function, so it can't be called.
Built carefully
- 671 tests pass, including a real console window read back letter by letter, and Windows' own checksum check on every kind of
.exe. - Bugs were planted on purpose in a copy of the compiler to prove the tests catch mistakes.
- Thousands of random programs were checked against Python, with no problems.
- Jamo's compiler is written in Jamo itself, and it builds itself byte for byte the same every time.
Good to know
- A function written in place holds one expression after
=>. For more steps, write a named function and pass its name. - Windows may still warn about a program it has never seen before. Click More info, then Run anyway.
The full list is in CHANGELOG.md.