Webraku demos

Each page below is one Raku program. Raku++ runs it on this server to answer the request with finished HTML, and rakupp --target=js compiled the same file into the script your browser runs, which picks the page up where the server left it.

A sub marked is server keeps its body here, and the browser calls it over HTTP without anyone writing a request. Everything else runs in both places. Each demo puts the line somewhere else, for a different reason.

Sudoku

The rules in your browser, the answer on the server.

A repeated digit turns red on the keystroke, because the rules are compiled into the page. The solver is not: hints and checks are questions the server answers, and the solution is never sent.

Open
sudoku.raku368 lines, both halves
Rules.rakumod40 lines, both halves
Solver.rakumod131 lines, the server only
Tally.rakumod24 lines, the server only
is servernew-puzzle, hint, check, solved

Unicode explorer

Unicode's tables on the server, the arithmetic in the browser.

Search 172,808 character names held by the server; UTF-8 bytes, UTF-16 units and the counting of a string are worked out in your browser as you type.

Open
unicode.raku298 lines, both halves
Codes.rakumod66 lines, both halves
Names.rakumod134 lines, the server only
is serverfind, about, name-codes, index-facts

Pixels

One picture for everyone who has the page open.

Painting is instant and local; every second the browser sends its strokes and gets back everyone else's in the same round trip. The server keeps the picture and the pace.

Open
pixels.raku207 lines, both halves
Board.rakumod125 lines, the server only
is serversnapshot, sync

Wavelet shrinkage

Math::Wavelet on both sides.

A discrete transform redraws on every slider step in the browser, compiled from the module with the page; the continuous transform is computed on the server and sent as a picture.

Open
wavelet.raku463 lines, both halves
Analysis.rakumod343 lines, both halves
is serverscales

Primes

A computation the browser never sees.

The sieve is a server sub. Its answer is written into the page; its code is not in the script.

Open
primes.raku110 lines, both halves
is serversieve, prime-facts

Counter

The other extreme: nothing but the browser.

After the page loads there is no network traffic at all.

Open
counter.raku45 lines, both halves
is servernone: the page needs nothing from the server after it loads

This server is Raku++ 2026.09 on linux, up 36 min. Each demo is its own process behind one proxy. The split above is read from each demo's source by Webraku's bundler as this page renders. Webraku on GitHub ยท raku.online