kserrec/attalambda

1

stars

159

commits

Racket

primary language

Sep 9, 2026

updated

README

AttaLambda

AttaLambda is a small programming language built around a big question:

How much of a practical language can be made from pure lambda calculus?

Programs use familiar Lisp-shaped syntax, but ordinary computation expands to only variables, one-argument lambdas, and function application. Racket supplies lazy evaluation and module machinery; effects cross one explicit host boundary.

This is a complete AttaLambda program:

#lang attalambda

(stdout "Hello from AttaLambda.\n")

Try it on Linux

AttaLambda 0.7.0 is available as a self-contained Linux x86-64 archive. It includes its own runtime, so you do not need to install Racket.

Release page: https://github.com/kserrec/attalambda/releases/tag/v0.7.0

Version 0.7.0 adds list, multi-parameter lambda, sequential multi-binding let, and cond with a required final else. These four conveniences expand to existing unary-lambda terms. Pure value rendering and print, exact rational arithmetic, the complete List API, and the pure rec rules remain available. The public API reference describes the complete surface, and the acceptance record records source and published-archive verification.

See the 0.7.0 release notes for syntax examples and compatibility.

Download, verify, extract, and run it:

curl -LO https://github.com/kserrec/attalambda/releases/download/v0.7.0/attalambda-0.7.0-linux-x86_64.tar.gz
curl -LO https://github.com/kserrec/attalambda/releases/download/v0.7.0/SHA256SUMS
sha256sum -c SHA256SUMS
tar -xzf attalambda-0.7.0-linux-x86_64.tar.gz
cd attalambda-0.7.0-linux-x86_64
./bin/attalambda --version
./bin/attalambda examples/hello.attl

You should see:

AttaLambda 0.7.0
Hello from AttaLambda.

Linux x86-64 is the only supported binary target. Users should not have to bypass operating-system security protections to try the language, so macOS builds without Apple signing and notarization and Windows builds without Authenticode signing are not distributed.

Run it from source

You need Racket. The install command registers the checkout in your user-level Racket package registry and does not require administrator access:

git clone https://github.com/kserrec/attalambda.git
cd attalambda
raco pkg install --auto --name attalambda .
racket runner/attalambda.rkt examples/hello.attl

AttaLambda has no third-party package dependencies. Its runtime dependencies are Racket's base and lazy packages; tests also use rackunit-lib and net-lib.

To run the complete test and structural-purity suite:

./run-all-tests.sh

What makes AttaLambda unusual?

  • Every ordinary function is built from nested one-argument lambdas. Partial application follows naturally from that representation.
  • Bool, List, Rat, Unit, Byte, Option, Map, Error, Result, Char, and String are all lambda-encoded values. Operations check their type tags at runtime.
  • The one public number type is Rat: exact rationals stored as a reduced signed numerator over a positive denominator, with normalized binary digit Lists underneath instead of Church numerals. Arithmetic is exact, never grows with a unary encoding, and fractions like -7/3 are ordinary literals.
  • Errors are ordinary structured values. Expected computational failures use Result; contract and representation failures use Error.
  • Output, files, blocking TCP, and explicit process exit are available through one host boundary. Pure HTTP framing, parsing, response rendering, and routing sit above that boundary as ordinary language computation.
  • Automated structural checks reject host computation, hidden privileged imports, non-unary lambdas, and unknown source locations in production paths.

The goal is not to hide Racket behind a new syntax. It is to make the boundary between lambda-calculus computation and host authority small, visible, and testable.

On this branch, (exit 0) reports successful completion and (exit 1) reports unsuccessful completion. Only Rat 0 or 1 is accepted: another type returns TypeMismatch Error; another Rat returns InvalidCount Error, without calling the host. Pure AttaLambda chooses and validates the status; only the host terminates the process. Exit prints nothing automatically and prevents later effects. Without an exit call, normal completion remains status 0, even when the program produces an Error or Result Err. Launcher failures keep their separate statuses.

Examples

The repository includes five programs written entirely through the public #lang attalambda surface:

ExampleWhat it does
hello.attlPrints a greeting.
stdout.attlExercises explicit standard output.
foundations.attlExercises exact rational arithmetic, Unit, Byte, Option, and Map end to end.
file-round-trip.attlWrites and reads back a file.
http-server.attlServes one request on an ephemeral loopback port, then exits.

Run any example from a registered source checkout with:

racket runner/attalambda.rkt examples/hello.attl

AttaLambda does not sandbox programs. A program can use the same relevant standard-output, filesystem, and network permissions as the Racket or AttaLambda process that launched it, and can terminate its own process with status 0 or 1. Inspect unfamiliar .attl files before running them. In particular, file-round-trip.attl creates or truncates attalambda-round-trip.txt in its current directory.

Project status

Version 0.7.0 is the sixth public release. It adds four syntax sugars over the existing pure lambda calculus. It includes pure value renderers and generic print through the existing stdout boundary. See Value Rendering and Printing. The purity rule against recursive module bindings continues to apply. Rat remains the only public number type; Unit, Byte, Option, Map, and byte-based file/TCP payloads retain their existing representations. PLAN.md holds the current roadmap and PLAN-ARCHIVE.md the completed phase history; this README intentionally repeats neither.

Repository guide

PathPurpose
core/Pure representations, raw algorithms, and strict typed operations.
effects/Pure requests and wrappers for output, files, TCP, exit, and HTTP.
runtime/codec.rktDeterministic conversion between lambda values and private host data.
runtime/host.rktThe sole privileged host; start at dispatch-request.
lang/expander.rktPublic exports, literal expansion, currying, and one-time host injection.
runner/attalambda.rktCommand, source validation, sanitized diagnostics, and one source load.
macros/The two trusted mechanical-expansion modules every production file compiles through.
readers/One-way human-readable observation used outside production computation.
tests/Behavioral, representation, error, laziness, and boundary tests.
tooling/Purity, boundary, and distribution checks.

For more detail:

License

Copyright 2026 Kyle Serrecchia.

AttaLambda is available under the Apache License 2.0. Self-contained release archives include the applicable Racket runtime notices and license texts.

Contributors

kserrec

159 commits

kserrec/attalambda

1

stars

159

commits

Racket

primary language

Sep 9, 2026

updated

README

AttaLambda

AttaLambda is a small programming language built around a big question:

How much of a practical language can be made from pure lambda calculus?

Programs use familiar Lisp-shaped syntax, but ordinary computation expands to only variables, one-argument lambdas, and function application. Racket supplies lazy evaluation and module machinery; effects cross one explicit host boundary.

This is a complete AttaLambda program:

#lang attalambda

(stdout "Hello from AttaLambda.\n")

Try it on Linux

AttaLambda 0.7.0 is available as a self-contained Linux x86-64 archive. It includes its own runtime, so you do not need to install Racket.

Release page: https://github.com/kserrec/attalambda/releases/tag/v0.7.0

Version 0.7.0 adds list, multi-parameter lambda, sequential multi-binding let, and cond with a required final else. These four conveniences expand to existing unary-lambda terms. Pure value rendering and print, exact rational arithmetic, the complete List API, and the pure rec rules remain available. The public API reference describes the complete surface, and the acceptance record records source and published-archive verification.

See the 0.7.0 release notes for syntax examples and compatibility.

Download, verify, extract, and run it:

curl -LO https://github.com/kserrec/attalambda/releases/download/v0.7.0/attalambda-0.7.0-linux-x86_64.tar.gz
curl -LO https://github.com/kserrec/attalambda/releases/download/v0.7.0/SHA256SUMS
sha256sum -c SHA256SUMS
tar -xzf attalambda-0.7.0-linux-x86_64.tar.gz
cd attalambda-0.7.0-linux-x86_64
./bin/attalambda --version
./bin/attalambda examples/hello.attl

You should see:

AttaLambda 0.7.0
Hello from AttaLambda.

Linux x86-64 is the only supported binary target. Users should not have to bypass operating-system security protections to try the language, so macOS builds without Apple signing and notarization and Windows builds without Authenticode signing are not distributed.

Run it from source

You need Racket. The install command registers the checkout in your user-level Racket package registry and does not require administrator access:

git clone https://github.com/kserrec/attalambda.git
cd attalambda
raco pkg install --auto --name attalambda .
racket runner/attalambda.rkt examples/hello.attl

AttaLambda has no third-party package dependencies. Its runtime dependencies are Racket's base and lazy packages; tests also use rackunit-lib and net-lib.

To run the complete test and structural-purity suite:

./run-all-tests.sh

What makes AttaLambda unusual?

  • Every ordinary function is built from nested one-argument lambdas. Partial application follows naturally from that representation.
  • Bool, List, Rat, Unit, Byte, Option, Map, Error, Result, Char, and String are all lambda-encoded values. Operations check their type tags at runtime.
  • The one public number type is Rat: exact rationals stored as a reduced signed numerator over a positive denominator, with normalized binary digit Lists underneath instead of Church numerals. Arithmetic is exact, never grows with a unary encoding, and fractions like -7/3 are ordinary literals.
  • Errors are ordinary structured values. Expected computational failures use Result; contract and representation failures use Error.
  • Output, files, blocking TCP, and explicit process exit are available through one host boundary. Pure HTTP framing, parsing, response rendering, and routing sit above that boundary as ordinary language computation.
  • Automated structural checks reject host computation, hidden privileged imports, non-unary lambdas, and unknown source locations in production paths.

The goal is not to hide Racket behind a new syntax. It is to make the boundary between lambda-calculus computation and host authority small, visible, and testable.

On this branch, (exit 0) reports successful completion and (exit 1) reports unsuccessful completion. Only Rat 0 or 1 is accepted: another type returns TypeMismatch Error; another Rat returns InvalidCount Error, without calling the host. Pure AttaLambda chooses and validates the status; only the host terminates the process. Exit prints nothing automatically and prevents later effects. Without an exit call, normal completion remains status 0, even when the program produces an Error or Result Err. Launcher failures keep their separate statuses.

Examples

The repository includes five programs written entirely through the public #lang attalambda surface:

ExampleWhat it does
hello.attlPrints a greeting.
stdout.attlExercises explicit standard output.
foundations.attlExercises exact rational arithmetic, Unit, Byte, Option, and Map end to end.
file-round-trip.attlWrites and reads back a file.
http-server.attlServes one request on an ephemeral loopback port, then exits.

Run any example from a registered source checkout with:

racket runner/attalambda.rkt examples/hello.attl

AttaLambda does not sandbox programs. A program can use the same relevant standard-output, filesystem, and network permissions as the Racket or AttaLambda process that launched it, and can terminate its own process with status 0 or 1. Inspect unfamiliar .attl files before running them. In particular, file-round-trip.attl creates or truncates attalambda-round-trip.txt in its current directory.

Project status

Version 0.7.0 is the sixth public release. It adds four syntax sugars over the existing pure lambda calculus. It includes pure value renderers and generic print through the existing stdout boundary. See Value Rendering and Printing. The purity rule against recursive module bindings continues to apply. Rat remains the only public number type; Unit, Byte, Option, Map, and byte-based file/TCP payloads retain their existing representations. PLAN.md holds the current roadmap and PLAN-ARCHIVE.md the completed phase history; this README intentionally repeats neither.

Repository guide

PathPurpose
core/Pure representations, raw algorithms, and strict typed operations.
effects/Pure requests and wrappers for output, files, TCP, exit, and HTTP.
runtime/codec.rktDeterministic conversion between lambda values and private host data.
runtime/host.rktThe sole privileged host; start at dispatch-request.
lang/expander.rktPublic exports, literal expansion, currying, and one-time host injection.
runner/attalambda.rktCommand, source validation, sanitized diagnostics, and one source load.
macros/The two trusted mechanical-expansion modules every production file compiles through.
readers/One-way human-readable observation used outside production computation.
tests/Behavioral, representation, error, laziness, and boundary tests.
tooling/Purity, boundary, and distribution checks.

For more detail:

License

Copyright 2026 Kyle Serrecchia.

AttaLambda is available under the Apache License 2.0. Self-contained release archives include the applicable Racket runtime notices and license texts.

Contributors

kserrec

159 commits

Languages

Racket

85.7%

Shell

7.5%

PowerShell

6.9%