Skip to content
Open
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
11 changes: 5 additions & 6 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ Folders without a `test.sh` are skipped until backfilled.
dotnet. OCaml + Elixir captured locally; F# and Clojure captured from the
CI log (PR #31). Clojure uses `clojure`, not the interactive `clj` wrapper
(which printed an rlwrap notice instead of running). All four green on CI.
- [ ] **Step 5 — Java and Kotlin.** Java: PR #29 (the `java` branch) fixes the
numeral typing so PRED works; add test.sh + expected output to that
branch, let CI validate it, then merge #29. Kotlin: runner has a JDK;
install kotlinc in the workflow.
- [x] **Step 5 — Java and Kotlin.** Java's numeral fix and `test.sh` landed in
PR #29; its expected output was captured from that PR's actual CI run.
Kotlin's existing implementation compiles unchanged with Kotlin 2.4.10;
its test builds a temporary runnable jar. GitHub's `ubuntu-latest` runner
already provides Kotlin 2.4.10 and Java 17, so no installer is needed.
- [ ] **Step 6 — exotic languages: ArkScript, FatScript, bruijn, Language 84.**
Each needs its own toolchain acquisition (GitHub releases, cargo/stack
installs, or building from source). If one is genuinely unobtainable in
Expand Down Expand Up @@ -71,5 +72,3 @@ Keep a "wanted" list in the README for languages left open to contributors
spec or needs a runtime supplement.
- [ ] Comment on merged PR #6 noting the `Function<Term, Term>` fix, closing
the loop on the thread there.
- [ ] Java README still describes an Oracle JDK manual install — point it at
apt/Temurin and the test.sh instead.
27 changes: 13 additions & 14 deletions languages/j/java/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
# Java 21 Installation Guide
# Java Lambda Core

## Download Java 21
Download Java 21 from the official Oracle website:
[Java 21 Downloads](https://www.oracle.com/in/java/technologies/downloads/#java21)
This implementation requires a Java Development Kit version 11 or newer.
Java's source-file mode compiles and runs `LambdaCore.java` directly, so no
separate build command or external package is needed.

## Installation Steps
1. Select the appropriate JDK version for your OS (Windows, macOS, or Linux).
2. Download the installer or compressed archive.
3. Follow the installation instructions provided by Oracle.

## Verify Installation
Run the following command to check the installed Java version:
## Run

```sh
java -version
java LambdaCore.java
```

# Run Code
## Test

From this folder, run:

```sh
java LambdaCore.java
sh test.sh
```

The repository's root `run-tests.sh` compares the program's output with
`expected-output.txt` on every pull request.
18 changes: 18 additions & 0 deletions languages/j/java/expected-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
BOOLEAN TRUE
BOOLEAN FALSE
BOOLEAN FALSE
BOOLEAN TRUE
BOOLEAN FALSE
BOOLEAN FALSE
BOOLEAN FALSE
BOOLEAN TRUE
BOOLEAN FALSE
BOOLEAN TRUE
BOOLEAN TRUE
BOOLEAN TRUE
0
1
2
1
0
0
8 changes: 7 additions & 1 deletion languages/j/java/test.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
java LambdaCore.java
#!/bin/sh
set -eu

command -v java >/dev/null 2>&1 || exit 42

dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
java "$dir/LambdaCore.java"
29 changes: 21 additions & 8 deletions languages/k/kotlin/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
# Kotlin instalation
Download Kotlin version 2.1.10 ot above from here https://kotlinlang.org/docs/command-line.html
# Kotlin Lambda Core

# Run code
```shell
# build
kotlinc lambda-core.kt -include-runtime -d lambda-core.jar
This implementation requires the Kotlin command-line compiler and a Java
Development Kit. It is tested with Kotlin 2.4.10 and Java 17 or newer; both are
preinstalled on GitHub's `ubuntu-latest` runner.

## Build and run

#run
```sh
kotlinc lambda-core.kt -include-runtime -d lambda-core.jar
java -jar lambda-core.jar
```
```

## Test

From this folder, run:

```sh
sh test.sh
```

The test compiles into a temporary directory, runs the resulting jar, and
removes the build artifact afterward. The repository's root `run-tests.sh`
compares the output with `expected-output.txt` on every pull request.
28 changes: 28 additions & 0 deletions languages/k/kotlin/expected-output.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
LOGIC
----------------
TRUE/FALSE
true
false
NOT
false
true
AND
false
false
false
true
OR
false
true
true
true
CHURCH NUMERALS
---------------
ZERO/SUCC
0
1
2
PRED
2
1
0
12 changes: 12 additions & 0 deletions languages/k/kotlin/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -eu

command -v kotlinc >/dev/null 2>&1 || exit 42
command -v java >/dev/null 2>&1 || exit 42

dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
build_dir=$(mktemp -d)
trap 'rm -r "$build_dir"' 0 1 2 15

kotlinc "$dir/lambda-core.kt" -include-runtime -d "$build_dir/lambda-core.jar"
java -jar "$build_dir/lambda-core.jar"
Loading