Repository navigation
Releases
Jamo 0.8.0
Jamo 0.8.0 is a big one: enums that carry values, a package list, tasks that run side by side, a smarter debugger, rename-everywhere in VS Code, and loops that now beat C at one benchmark.
Get started
- Download jamo-0.8.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.8.0. - Try a package:
jamo packages, thenjamo get tween.
Already have an older Jamo? Just run the new install.cmd. Your own programs stay as they are.
For 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
Enums that carry values
A member can carry values of its own, and match takes them out again:
enum Shape
CIRCLE(radius: float)
RECT(width: float, height: float)
EMPTY
end
func area(shape: Shape): float
match shape
case Shape.CIRCLE(r)
return 3.14 * r * r
case Shape.RECT(w, h)
return w * h
case Shape.EMPTY
return 0.0
end
end
_ skips a value you don't need, and a member can carry the enum it's in, so trees are easy: NODE(left: Tree, right: Tree). They print as Shape.CIRCLE(2.0), can have their own functions like structs, and the debugger opens them up.
Tasks: several jobs at once
use "tasks.jamo"
func main()
spawn(func() => count("cat", 3))
spawn(func() => count("dog", 2))
wait_all()
end
next_turn(), wait_seconds(0.5), wait_until(...) and wait_all() let other tasks run. They take turns on one processor core, so there's nothing to lock, and while every task waits the program sleeps without using the processor. Great for games, timers and downloads.
A package list
> jamo packages
tween Easing curves and tweens for smooth movement in games (jamolang/tween)
> jamo get tween
Got 1 file from jamolang/tween into packages/tween
Use it with: use "packages/tween/tween.jamo"
The list lives on GitHub at jamolang/packages, so there's no server. Made a library? Add it with a pull request.
A smarter debugger
- Open structs and arrays as deep as you like. In VS Code, click the arrow by one in the Variables panel. In the console,
p hero.pos.xandp items[2]. - It stops on a crash, on the crashing line, with every variable as it was. VS Code shows it as an exception.
- Inside a function written in place, it shows the variables it uses from around it, and functions stored in variables show by their name instead of
(lambda 1).
VS Code: find and rename
Shift+F12 finds every use of a function, struct, field, method, enum member, constant or variable, across every file of a program. F2 renames it everywhere at once, leaving text in quotes and comments alone.
Faster
if n % 3 == 0 now checks with one multiply instead of working out the remainder. The 100-million-step loop benchmark went from 0.066 s to 0.046 s, ahead of C compiled with gcc -O2 (0.056 s).
Built carefully
- Both of Jamo's compilers make byte-for-byte the same
.exe, and the Jamo-written one still builds itself the same every time. - Tasks were stress-tested in all six memory-cleaner modes, and a version with the cleaner's new stack check switched off crashed the test, so the check is proven to matter.
- The divisibility shortcut was checked against plain math for every divisor up to 400 and the biggest and smallest ints.
- The whole test suite passed after each change, and every code sample in the guide is built and run by the tests.
Good to know
- A struct or enum from a file used with
asnow prints without the file's name, likeBox{size: 2}. jamo get,jamo packagesandjamo debugwork injamo.exe, not in the C++ backup compiler.- 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.
Jamo 0.7.0
Jamo 0.7.0 brings a real debugger. Stop your program on any line, step through it, and see exactly what every variable holds, in the console or right inside VS Code. And files used with as now keep their own structs too, so big programs stay tidy.
Get started
- Download jamo-0.7.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.7.0. - Try the debugger:
jamo debug examples\star_guard.jamofrom inside the unzipped folder.
Already have an older Jamo? Just run the new install.cmd. Your own programs stay as they are.
For the debugger in VS Code, plus colors, red underlines, hover help and go to definition, 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
A debugger
When a program does something strange, stop it and look inside. In the console:
> jamo debug game.jamo
Debugging game.jamo. It stops at its first line. Type help for the commands.
Stopped at game.jamo line 20
20 | var count = 3
(jamo) b 14
Breakpoint at game.jamo line 14.
(jamo) c
Stopped at game.jamo line 14 (breakpoint)
14 | var left = e.hp - amount
(jamo) v
amount: int = 4
e: Enemy = Enemy{name: "orc", hp: 10, speed: 1.5, mood: Mood.ANGRY}
Set breakpoints, step over a line (n), into a call (s) or out of one (o), see the calls the program is in (w), and every variable, including what's inside structs, arrays and enums.
In VS Code it's one click: click left of a line number to drop a red breakpoint dot, then press F5. The program stops there, the variables show on the left, you can hover over a name to see its value, and the buttons at the top step and continue. No setup needed.
It's fast, too: a loop of ten million lines runs in under a third of a second with the debugger attached. Normal jamo build and jamo run don't change at all.
Files with their own structs
A file used with as now owns its structs and enums too, so two files can each have their own Enemy:
use "enemies.jamo" as foes
use "items.jamo" as loot
func main()
var orc = foes.Enemy{hp: 5, mood: foes.Mood.CALM}
var slime = loot.spawn()
end
Interfaces are still shared by the whole program.
One change to old code: a struct from a file used with as now needs the file's name in front, like foes.Enemy{hp: 7}. Leave it off and Jamo tells you exactly what to write: Did you mean foes.Enemy?
Built carefully
- The debugger was checked from both ends: the console debugger with a script of typed commands, and the VS Code side by a test that plays VS Code's part, message by message.
- Both of Jamo's compilers make byte-for-byte the same
.exe, debug builds included, and the Jamo-written one still builds itself the same every time. - The whole test suite passed after each change, and every code sample in the guide is built and run by the tests.
Good to know
jamo debugworks injamo.exe, not in the C++ backup compiler.- A function stored in a variable shows as
(lambda 1)in the list of calls. Variables a function written in place picks up from around it don't show in its variable list yet. - 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.
Jamo 0.6.0
Jamo 0.6.0 is the big-projects release. Tests, private helpers, files with their own names, interfaces and a docs page: the things that keep a program easy to work on as it grows from one file to twenty. Programs still build in a blink (Jamo's own 16,000-line compiler builds in about 0.2 seconds) and still come out as small .exe files with nothing to install.
Get started
- Download jamo-0.6.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.6.0. - Try a game:
jamo run examples\star_guard.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. It now knows private and interface too.
What's new
Interfaces: different structs in one list
An interface lists the functions some structs share. Any struct that has them fits, with nothing extra to write:
interface Animal
func name(): string
func sound(): string
end
func main()
var pets: [Animal] = [Dog{tricks: 3}, Cat{lives: 9}]
for pet in pets
print(pet.name() + " says " + pet.sound())
end
end
That's how one list can hold every enemy, coin and bullet in a game. If a struct is missing something, Jamo says exactly what: Square can't be a Shape, because it has no grow function.
jamo test
Put tests in a file whose name ends in _test.jamo, as functions whose names start with test_:
use "test.jamo"
func test_points()
expect_equal(points_for(3), 300)
end
Then type jamo test. Every test runs as its own little program, so one that crashes can't stop the rest, and a failing one shows what went wrong and on which line.
Files with their own names: use ... as
Two files can both have a make_noise and a SPEED:
use "goblins.jamo" as goblins
use "ghosts.jamo" as ghosts
func main()
print(goblins.make_noise())
print(ghosts.make_noise())
end
Forget the goblins. and Jamo asks: Did you mean goblins.SPEED?
private
Put private in front of a file's helpers, and no other file can use them:
private var balance = 0
Another file trying balance = 1000000 gets: balance is private to bank.jamo, so only that file can use it.
jamo doc
jamo doc game.jamo writes a web page of every function, struct and interface in your program, with your # comments and a search box. It works on the built-in libraries too: jamo doc gfx.jamo shows everything you can draw with.
Smaller things
- A function written inside another one shows by its own name in
jamo run --traceand in a crash's list of calls.
Built carefully
- Every new feature is in both of Jamo's compilers, the C++ one and the one written in Jamo itself. They make byte-for-byte the same
.exe, and the Jamo one still builds itself the same every time. - The whole test suite passed after each feature, run by run. Each error message was written out by hand first and checked against what Jamo says.
- Every code sample in the guide is built and run as part of the tests, so the guide can't go out of date.
Good to know
- A file used with
askeeps its functions, constants and variables to itself. Its structs and enums are still shared by the whole program. jamo docandjamo fmtwork injamo.exe, not in the C++ backup compiler.- 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.
Jamo 0.5.0
Jamo 0.5.0 is the game-maker's release. Sprites, particles, controllers, tidy code and a way to watch your program run: the things you reach for when you make a real game. Jamo still makes small, fast .exe files with nothing to install.
Get started
- Download jamo-0.5.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.5.0. - Try the new game:
jamo run examples\star_guard.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
Star Guard, a new example game
An arena shooter against waves of three kinds of alien drone. Play with keyboard and mouse, or with a controller. It's one file of about 350 lines, and it uses almost everything below. A bot played it 32 times to make sure the difficulty climbs fairly.
Functions with whole blocks inside
Functions written in place can now hold as many lines as you like, and you can put a named function inside another one:
func main()
var bonus = 10
func score_for(hits: int): int
var base = hits * 100
return base + bonus
end
print(score_for(3)) # 310
end
Sprites and animation (sprite.jamo)
Draw pixel art straight in your code, one row of text per line of pixels, then cut it into frames and animate it:
var ship = sheet(screen.image_from_text([
"...00...",
"..0110..",
".011110.",
"00111100"
], [white, blue]), 8, 4)
Frames can be scaled, turned and mirrored, and animations loop or play once.
Particles (particles.jamo)
Explosions, sparks, smoke and trails in one line: sparks.burst(x, y, 30, orange, 260.0, 0.7). Particles fall with gravity, slow down with drag, and fade as they age.
Controllers (gamepad.jamo)
Xbox-style controllers for up to 4 players: buttons, both sticks, triggers and rumble. A controller that isn't plugged in just reads as nothing pressed, so your game works either way.
Maybe, Pair and Triple (maybe.jamo)
Maybe<T> holds a value that might not be there, so "not found" is clear instead of a made-up -1. Pair and Triple let a function hand back more than one thing.
Numbers that look right
fixed(3.14159, 2) gives 3.14, and commas(1234567) gives 1,234,567. Perfect for scores and money.
jamo fmt: tidy code in one command
jamo fmt game.jamo fixes the indentation of the whole file. It never changes what the program does: the tidied program builds to the exact same .exe.
jamo run --trace: watch your program think
Shows each of your functions as it starts, indented by how deep the calls go. Great for finding out why something happens:
main
greet
shout
greet
shout
Built carefully
- 690 tests pass, including pixel checks of sprites in a real window and hand-worked numbers for particles and rounding.
- Every new feature is in both of Jamo's compilers, the C++ one and the one written in Jamo itself. They give byte-for-byte the same
.exe, and the Jamo one still builds itself the same every time. jamo fmtwas run on every example, library and test, and each tidied file builds to the same program.- Thousands of random programs were checked against Python, with no problems.
Good to know
- A function written in place gets a copy of the variables around it. To share a value that changes, keep it in a list or a struct. Jamo tells you so if you try to change one.
- 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.
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.
Jamo 0.3.0
Jamo 0.3.0 is the biggest update yet. Programs can now recover from mistakes instead of crashing, functions can be passed around like any other value, and you can download libraries other people share.
Get started
- Download jamo-0.3.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. It should sayJamo 0.3.0. - Try a game:
jamo run examples\beat_run.jamofrom inside the unzipped folder.
Already have 0.2.0? Just run the new install.cmd. It replaces the old jamo.exe, and your own programs stay as they are.
For colors, red underlines and the new hover help 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
Catch mistakes instead of crashing
Before, one bad number or missing file stopped the whole program. Now you can say what to do instead:
try
var age = int(typed)
print(f"Next year you'll be {age + 1}")
catch problem
print("That wasn't a number: " + problem)
end
It works even when the mistake happens deep inside other functions. Guide section 28 explains it.
Pass functions around
A function's name, without ( ), can now be stored, put in a list, or handed to another function:
func by_score(a: Player, b: Player): bool
return a.score > b.score
end
sort_with(players, by_score) # highest score first
list.jamo has three new helpers that take a function of your own: sort_with (sort by your own rule), filtered (keep the items you choose) and mapped (change every item). A struct can hold a function too, which is handy for buttons: button.on_click(3). Guide section 29.
Download libraries other people share
jamo get someone/project
downloads a shared library from GitHub into a packages folder and tells you the use line to write. To share your own, see guide section 24.
Two new games to play and learn from
- Sky Hopper: a three-level platformer with springs, spikes and coins (
examples\platformer.jamo). - Beat Run: a one-button rhythm game whose whole song is made in code (
examples\beat_run.jamo).
Smaller things
- Sort any list:
sort_by(items, keys)sorts by numbers or text you give each item. - Letters beyond English:
upperandlowernow handle accented, Greek and Cyrillic letters, andletter_countcounts real letters instead of bytes. - Make music in code:
silence(seconds)andclip.mix(...)build whole songs from notes, which is how Beat Run's song is made. - VS Code: hover over a name to see what it is, and Ctrl+click to jump to where it's made.
- Clearer errors, like "which has 1 item" instead of "1 items".
Good to know
tryandcatchare new keywords, so a variable can't be calledtryorcatchany more.- Function values can't remember the variables around them (there are no closures yet). Pass what they need as inputs.
- Windows may warn about new programs it hasn't seen before. Click More info, then Run anyway.
The full list is in CHANGELOG.md.
Jamo 0.2.0
Jamo 0.2.0 makes everyday programming smoother.
Get started
- Download jamo-0.2.0-windows.zip below, unzip it anywhere, and double-click install.cmd.
- Open a new terminal and type
jamo version. - For colors and red underlines 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.
New in 0.2.0
jamo watch game.jamoruns your program, then builds and runs it again every time you save. A mistake shows straight away, and the last version that worked keeps running until you fix it.- No more crashes from a missing file or a typo in a number:
read_file_or,try_write_file,int_orandfloat_orgive a fallback instead of stopping the program. - Array tools for every type:
has_item,find_item,count_item,reversed,swap_itemsandlast_item, pluspickandshufflefor random ones. - A Snake game in the examples, built with the
gridandtimerlibraries. - The VS Code extension is now a one-file download.
Everything from 0.1.0 is still here: generics, Map, variables shared by every function, game helpers (vec, grid, timer), windows, 2D and 3D drawing, sound, buttons and the internet.
Windows may warn about new programs it hasn't seen before. Click More info, then Run anyway.
Jamo 0.1.0
The first release of Jamo: a small, friendly programming language that turns your code into real Windows .exe programs, all by itself.
Get started
- Download jamo-0.1.0-windows.zip below.
- Unzip it anywhere, then double-click install.cmd (no administrator needed).
- Open a new terminal and type
jamo version.
Then jamo new --game my_game and jamo run my_game\main.jamo start you off with a small game that already works. The guide in the zip teaches the whole language from zero.
What's in it
- The language: ints, floats, text, arrays, structs with methods, enums,
match, generics likefirst<T>andPair<A, B>, variables shared by every function, modules, and clear error messages that point at the exact spot. - Real programs: Jamo writes the machine code and the
.exeitself, with no other compiler underneath. Programs run on any 64-bit Windows PC with nothing else installed, and are about 20 to 75 times faster than the same code in Python. - Built-in libraries: windows and 2D drawing, sound, buttons and sliders, 3D, web requests and multiplayer links, math and random numbers, time,
Map, grids, 2D vectors, timers and cooldowns, text tools, JSON, files, logs and tests. - Twelve examples, from a guessing game and a text adventure to Breakout and a spinning 3D scene.
Good to know
- Jamo only runs on Windows for now.
- Windows may warn about new programs it hasn't seen before. Click More info, then Run anyway.
uninstall.cmdtakes Jamo away again.
