Vibecoded Scheme Implementation

baijum1 pts0 comments

Kaappi — R7RS Scheme in Zig - Kaappi

Initializing search

kaappi/kaappi

Language

Tooling

Extending

In Production

Procedures

SRFI Libraries

Extensions

Cookbook

Ecosystem

Data Formats

Databases

Math

Developer Tools

Examples

About

R7RS Scheme, brewed in Zig

Write the lambda.<br>Run on the metal.

A complete R7RS-small Scheme implemented in Zig .<br>Compile to native binaries via LLVM on AArch64 and x86_64 — so<br>the source stays elegant and the machine stays busy.

you write<br>(map (lambda (x) (* x x))<br>'(1 2 3 4 5))

it returns<br>(1 4 9 16 25)

Get started<br>Try in browser<br>Discussions

curl -fsSL https://kaappi-lang.org/install.sh | bash

600+ procedures<br>72 SRFIs<br>first-class call/cc<br>C FFI<br>OS threads<br>web · databases · email · crypto

The full pour

Everything R7RS asks for, and the parts that make it fun.

Every identifier from Appendix A is implemented — then continuations, a native compiler, and an FFI on top.

conformance

Complete R7RS-small

600+ built-in procedures, 33 syntax forms, all 14 standard libraries — every identifier from Appendix A.

control

First-class continuations

Multi-shot call/cc via stack copying, plus dynamic-wind and call/ec for escapes.

speed

Compile to native code

Compile Scheme to native binaries via LLVM on AArch64 and x86_64 — closures, tail calls, and fixnum arithmetic run at full speed.

batteries

78 SRFIs

Lists, strings, hash tables, vectors, threads, formatting, char-sets — 9 built in, 68 portable.

interop

C FFI with callbacks

Call shared libraries from Scheme, and pass Scheme procedures where C expects a function pointer.

concurrency

OS threads & fibers

Real OS threads via SRFI-18, plus green fibers with channels. Pre-fork and threaded HTTP servers.

Taste it

Small forms, full language.

Run these yourself in the browser playground — no install needed.

recursion

(define (fib n)<br>(if (2) n<br>(+ (fib (- n 1))<br>(fib (- n 2)))))

(fib 30) ;=> 832040

hygienic macros

(define-syntax my-when<br>(syntax-rules ()<br>((_ test body ...)<br>(if test<br>(begin body ...)))))

(my-when #t<br>(display "hello"))

libraries

(define-library (math)<br>(export square cube)<br>(import (scheme base))<br>(begin<br>(define (square x)<br>(* x x))<br>(define (cube x)<br>(* x x x))))

Read on

Documentation

guide/

User Guide

Installation, REPL features, the language tutorial, and the command-line reference.

Start here &rarr;

playground/

Browser Playground

Edit and run Scheme in the browser. WASM-powered, no install required.

Open &rarr;

tour/

Interactive Tour

12 guided lessons from expressions to macros, with live code and challenges.

Start &rarr;

procedures/

Procedure Reference

All 600+ built-in procedures with examples, organized by domain.

Browse &rarr;

srfi/

SRFI Support

All 78 SRFIs, the standard libraries, and how to write your own.

Browse &rarr;

ecosystem/

Ecosystem

Web framework, Redis, PostgreSQL, HTTP/HTTPS, JSON — and the thottam package manager.

Explore &rarr;

cookbook/

Cookbook

Build a REST API, serve HTML, process JSON, write tests — practical recipes for real programs.

Cook &rarr;

faq/

FAQ

Production readiness, platform support, comparisons to other Schemes, and deployment.

Read &rarr;

Brew a REPL and start evaluating.

Install Kaappi<br>Join the discussion &rarr;

Or try it in the browser first.

Back to top

scheme rarr kaappi procedures r7rs libraries

Related Articles