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
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,38 @@ This project is inspired by the classic "hello-world" repo idea, but takes thing

---

## Implemented Languages

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)
- [Elixir](languages/e/elixir), [FatScript](languages/f/fatscript), and
[F#](languages/f/fsharp)
- [Go](languages/g/go), [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)

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)
against the implementations already present. GitHub's
[2025 Octoverse language ranking](https://github.blog/news-insights/octoverse/what-the-fastest-growing-tools-reveal-about-how-software-is-being-built/)
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.

---

## What is the "Lambda Core"?

The *Lambda Core* refers to:
Expand Down
34 changes: 30 additions & 4 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,41 @@ Folders without a `test.sh` are skipped until backfilled.

## Milestone 2 — fill out the missing major languages

One language per step, each landing as its own PR with implementation, README,
test.sh, and expected output, CI-green before merge. Order roughly by reach:
Most additions land one language at a time with an implementation, README,
test.sh, and observed expected output. The five-language batch below is one
explicitly requested single-pass phase.

### Phase 1 — 2025 popularity expansion

Selection method: filter the Stack Overflow 2025 "have used" language ranking
against the repository's existing implementations, excluding HTML/CSS because
it is markup. The five highest absent entries are SQL (58.6%), Bash/Shell
(48.7%), PowerShell (23.2%), PHP (18.9%), and Rust (14.8%). GitHub's 2025
Octoverse independently places PHP and Shell in its top ten, while the August
2026 TIOBE index ranks SQL eighth, Rust tenth, and PHP thirteenth.

- [x] **Step 1 — verify the selection and starting state.** None of the five
language folders existed before this phase; choosing them creates new
implementations rather than fixing existing ones.
- [x] **Step 2 — implement all five cores.** Add Church booleans, Church
numerals, native output adapters, and self-checking examples for Bash,
PHP, PowerShell, Rust, and SQL. SQL may use an explicitly documented
relational emulation because SQLite has no first-class functions.
- [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.** Verify the five toolchains in the
current GitHub runner inventory (all are preinstalled), list the new
implementations in the README, run focused checks, and run the repository
harness. All five focused baseline checks pass; the full local harness
reports 11 passed, 0 failed, 10 skipped for unavailable local toolchains,
and the pre-existing Java baseline still pending.

### Later major-language phases

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

Expand Down
38 changes: 38 additions & 0 deletions languages/b/bash/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Bash Lambda Core

Bash has shell functions, but it does not have first-class functions or
lexical closures. This implementation therefore uses a small closure runtime:
each lambda term has an opaque ID, and Bash associative arrays attach a
handler plus captured terms to that ID. The handlers directly implement
`TRUE`, `FALSE`, `NOT`, `AND`, `OR`, `ZERO`, `SUCC`, `PRED`, and `ONE`.

## Requirements

- Bash 4 or newer (for associative arrays)
- No external commands or packages at runtime

Bash is part of the base operating system on GitHub's `ubuntu-latest` runner,
so this folder does not require a workflow installation step.

## Run and verify

From this directory, run:

```sh
sh test.sh
```

The repository-level `run-tests.sh` runs the same script and compares its
standard output with `expected-output.txt`.

## How the representation works

The term registry is the only emulation layer. Applying a term dispatches its
handler in the current shell process, and nested handlers allocate terms that
capture their arguments. The Church definitions never store native boolean or
numeral values. Output observers use two marker terms for booleans and count
function applications for numerals.

The GNU Bash manual documents
[shell functions](https://www.gnu.org/software/bash/manual/bash.html#Shell-Functions)
and [associative arrays](https://www.gnu.org/software/bash/manual/html_node/Arrays.html).
22 changes: 22 additions & 0 deletions languages/b/bash/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