Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
steps:
- uses: actions/checkout@v4

# Python, Node.js, Perl, GCC/G++ 14, and the .NET SDK (F#) come
# preinstalled on the runner.
# Python, Node.js, Perl, GCC/G++ 14, Swift, Gradle (Groovy), and the
# .NET SDK (F#) come preinstalled on the runner.
- name: Install toolchains not preinstalled on the runner
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
racket ruby lua5.4 ghc ocaml elixir
racket ruby lua5.4 ghc ocaml elixir r-base-core

# Clojure's deps.edn CLI (clj) is not in apt; use the official installer.
- name: Install Clojure CLI
Expand All @@ -28,5 +28,9 @@ jobs:

- uses: oven-sh/setup-bun@v2

# v1.8.1 omitted dart-analyzer.json from its published bundle; pin the
# signed v1.7.2 release until that regression is fixed upstream.
- uses: dart-lang/setup-dart@65eb853c7ba17dde3be364c3d2858773e7144260 # v1.7.2

- name: Run all language tests
run: ./run-tests.sh
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@ This project is inspired by the classic "hello-world" repo idea, but takes thing

Lambda Core currently has implementations in:

- [ArkScript](languages/a/arkscript), [Bash](languages/b/bash), and
[bruijn](languages/b/bruijn)
- [C](languages/c/c), [C++](languages/c/c++), and
[Clojure](languages/c/clojure)
- [ArkScript](languages/a/arkscript), [Assembly](languages/a/assembly),
[Bash](languages/b/bash), and [bruijn](languages/b/bruijn)
- [C](languages/c/c), [C++](languages/c/c++),
[Clojure](languages/c/clojure), and [Dart](languages/d/dart)
- [Elixir](languages/e/elixir), [FatScript](languages/f/fatscript), and
[F#](languages/f/fsharp)
- [Go](languages/g/go), [Haskell](languages/h/haskell),
- [Go](languages/g/go), [Groovy](languages/g/groovy),
[Haskell](languages/h/haskell),
[Java](languages/j/java), and [JavaScript](languages/j/javascript)
- [Kotlin](languages/k/kotlin), [Language 84](languages/l/language84), and
[Lua](languages/l/lua)
- [OCaml](languages/o/ocaml), [Perl](languages/p/perl),
[PHP](languages/p/php), [PowerShell](languages/p/powershell), and
[Python](languages/p/python)
- [Racket](languages/r/racket), [Ruby](languages/r/ruby),
[Rust](languages/r/rust), [SQL](languages/s/sql), and
[TypeScript](languages/t/typescript)
- [R](languages/r/r), [Racket](languages/r/racket), [Ruby](languages/r/ruby),
[Rust](languages/r/rust), [SQL](languages/s/sql),
[Swift](languages/s/swift), and [TypeScript](languages/t/typescript)

The August 2026 expansion added Bash, PHP, PowerShell, Rust, and SQL by
filtering the [2025 Stack Overflow language usage results](https://survey.stackoverflow.co/2025/technology)
Expand All @@ -38,7 +39,10 @@ against the implementations already present. GitHub's
and the [August 2026 TIOBE index](https://www.tiobe.com/tiobe-index/) were used
as cross-checks.

Still wanted: Swift, Scala, Zig, Dart, Gleam, Prolog, Erlang, APL, and Idris.
The second August 2026 expansion continued down the same Stack Overflow
ranking and added Assembly, Dart, Swift, R, and Groovy.

Still wanted: Scala, Zig, Gleam, Prolog, Erlang, APL, and Idris.

---

Expand Down
27 changes: 25 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,36 @@ Octoverse independently places PHP and Shell in its top ten, while the August
reports 11 passed, 0 failed, 10 skipped for unavailable local toolchains,
and the pre-existing Java baseline still pending.

### Phase 2 — next five languages by 2025 usage

Selection method: continue down the Stack Overflow 2025 "have used" language
ranking after removing repository implementations and C#, whose implementation
already exists in active PR #37. The next five absent languages are Assembly
(7.1%), Dart (5.9%), Swift (5.4%), R (4.9%), and Groovy (4.8%).

- [x] **Step 1 — verify the selection and starting state.** None of
`languages/a/assembly`, `languages/d/dart`, `languages/s/swift`,
`languages/r/r`, or `languages/g/groovy` exists on main. This phase
creates five new implementations; it does not modify an existing
language implementation.
- [x] **Step 2 — implement all five cores.** Add Church booleans, Church
numerals, native output observers, and self-checking examples for
Assembly, Dart, Swift, R, and Groovy. Assembly uses an explicitly
documented x86-64 System V closure ABI because GNU assembler has no
first-class closure type.
- [x] **Step 3 — add verification artifacts.** Every folder gets README.md,
test.sh, and expected-output.txt captured from an observed run.
- [x] **Step 4 — integrate and verify.** Use the runner's preinstalled GCC,
Swift, and Gradle toolchains; install only the R and Dart runtimes; list
the new implementations in the README; run every focused check and the
repository harness. GitHub CI reports 25 passed, 0 failed, 0 skipped,
and the pre-existing Java baseline still pending (PR #39).

### Later major-language phases

- [ ] C#
- [ ] Swift
- [ ] Scala
- [ ] Zig
- [ ] Dart
- [ ] Gleam (reopens the slot from closed PR #28)

Keep a "wanted" list in the README for languages left open to contributors
Expand Down
38 changes: 38 additions & 0 deletions languages/a/assembly/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Assembly Lambda Core

This implementation expresses the project's Church booleans and Church
numerals in x86-64 GNU assembler. It includes `TRUE`, `FALSE`, `NOT`, `AND`,
`OR`, `ZERO`, `SUCC`, `PRED`, and `ONE`, then checks every printed example.

## Requirements

- An x86-64 System V environment, such as 64-bit Linux
- GCC and the system C library
- No additional packages or libraries

GCC and GNU binutils are preinstalled on GitHub's `ubuntu-latest` runner.

## Run and verify

From this directory, run:

```sh
sh test.sh
```

The test script compiles a position-independent executable into a temporary
directory, runs it, and removes the build artifact. The repository-level
`run-tests.sh` compares its standard output with `expected-output.txt`.

## How the representation works

GNU assembler has no first-class closure type, so each term uses an explicit
three-word closure: a code pointer followed by two captured-value slots. Every
code pointer follows the x86-64 System V calling convention and receives its
own closure plus one argument. The core encodings do not store native booleans
or integers; only the output observers create those values.

The syntax is documented in the
[GNU assembler manual](https://sourceware.org/binutils/docs/as/Manual.html),
and the calling convention comes from the
[x86-64 System V ABI](https://gitlab.com/x86-psABIs/x86-64-ABI).
22 changes: 22 additions & 0 deletions languages/a/assembly/expected-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
CHURCH BOOLEANS
TRUE: true
FALSE: false
NOT TRUE: false
NOT FALSE: true
FALSE AND FALSE: false
FALSE AND TRUE: false
TRUE AND FALSE: false
TRUE AND TRUE: true
FALSE OR FALSE: false
FALSE OR TRUE: true
TRUE OR FALSE: true
TRUE OR TRUE: true
CHURCH NUMERALS
ZERO: 0
ONE: 1
SUCC ONE: 2
SUCC (SUCC ONE): 3
PRED ZERO: 0
PRED ONE: 0
PRED (SUCC ONE): 1
PRED (SUCC (SUCC ONE)): 2
Loading
Loading