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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Notable changes to shen-lua. Release notes for earlier versions are under

## [Unreleased]

## [0.13.0] - 2026-11-09

### Changed

- **Kernel: ShenOSKernel 43.4** (community `Shen-Language/shen-sources`, tag
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ luarocks make --local shen-scm-1.rockspec # this tree
```

LuaJIT required (`lua == 5.1`). This tree uses ShenOSKernel **43.4**; release
**0.12.0** is the first on the community 43.2 kernel, **0.11.1** uses Tarver's S42 kernel; **0.9.0** was 41.1. Or grab `shen-bundle.lua` from
**0.13.0** uses community 43.4, **0.12.0** was the first on the community 43.2 kernel, **0.11.1** uses Tarver's S42 kernel; **0.9.0** was 41.1. Or grab `shen-bundle.lua` from
[Releases](https://github.com/pyrex41/shen-lua/releases/latest) — one file,
`require("shen-bundle")`.

Expand Down
21 changes: 21 additions & 0 deletions doc/RELEASE-0.13.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# shen-lua 0.13.0

This release moves shen-lua to the community **ShenOSKernel 43.4** (`Shen-Language/shen-sources`, tag `shen-43.4`, commit `f34b307`). `(version)` prints `43.4`, and the official kernel suite passes 154/154.

The vendored `klambda/` and `tests/` are byte-identical to the 43.4 release archive (SHA-256 `15e7972e6bf0cd65d37c2eba85750b8839d2dbadda41027eae0c88e5017a2756`). The standard library now declares its signatures with `shen.declare-with-signature`, so the stdlib signature sidecar of the kernel cache is gone; the native typechecker wraps that function and its fingerprints are unchanged.

Also in this release, since 0.12.0:

- A test that is not a boolean raises: the test of `if` and `cond`, the operands of `and`/`or`, and the argument of `not`. `(str "a")` is quoted, as on the other ports, and several primitives check their arguments (`absvector`, `address->`, `<-address`, `set`, `value`, `hash`).
- Faster startup, compile and run: delta global pushes in the fasl, native reader paths, fixed-arity call helpers, uncurried lambda groups, direct `hd`/`tl` and raw arithmetic where a value is proved a cons or a number, and a quicker Prolog engine.
- A compiled lambda called from Lua with fewer arguments than it takes returns its partial application; `(thaw F)` of a lambda that takes arguments no longer runs its body with nil.
- A compile that raises leaves no state behind; one such case returned a wrong answer with no error.
- `make certify` fails when the kernel suite fails or stops early, and CI runs it with the native typechecker required, plus `make golden`. Lua 5.5 boots.

Full list in the [CHANGELOG](https://github.com/pyrex41/shen-lua/blob/v0.13.0/CHANGELOG.md).

## Install

From a checkout, or with Nix: `nix run github:pyrex41/shen-lua/v0.13.0 -- -e '(version)'`. The attached `shen-0.13.0-1.rockspec` and standalone `shen-bundle.lua` are alternatives. This release is not published on LuaRocks.org.

Validation: 2,417 port assertions across 38 specs, the official 43.4 kernel suite, 154/154, and 27 golden typechecker and Prolog results, plus a standalone-bundle smoke test.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
packages = eachSystem (_system: pkgs: rec {
shen-lua = pkgs.stdenvNoCC.mkDerivation {
pname = "shen-lua";
version = "0.12.0";
version = "0.13.0";
src = self;

nativeBuildInputs = [ pkgs.makeWrapper ];
Expand Down
58 changes: 58 additions & 0 deletions shen-0.13.0-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
rockspec_format = "3.0"
package = "shen"
version = "0.13.0-1"

source = {
url = "git+https://github.com/pyrex41/shen-lua.git",
tag = "v0.13.0",
}

description = {
summary = "A speed-focused LuaJIT port of the Shen language (kernel 43.4)",
detailed = [[
shen-lua runs the Shen language on LuaJIT 2.1 by compiling KLambda to Lua
source. Embed with `local shen = require("shen")` (boot/eval/call/fn plus
list/symbol marshaling), or use the `shen` launcher for a REPL, running
.shen files, and -e one-liners. Requires LuaJIT (Lua 5.1 semantics + FFI);
the ShenOSKernel 43.4 KLambda sources (kernel, extensions and precompiled
standard library) are bundled and compiled on first boot, then served from a
bytecode cache.

0.13.0 moves to the community ShenOSKernel 43.4 (shen-sources tag shen-43.4,
commit f34b307).
]],
homepage = "https://github.com/pyrex41/shen-lua",
license = "BSD-3-Clause (Shen kernel: BSD)",
labels = { "shen", "language", "compiler", "luajit" },
}

dependencies = {
-- LuaJIT only: the runtime uses the FFI (prolog engine, test driver) and
-- Lua 5.1 semantics (loadstring/setfenv).
"lua == 5.1",
}

build = {
type = "builtin",
modules = {
shen = "shen.lua",
boot = "boot.lua",
prims = "prims.lua",
runtime = "runtime.lua",
compiler = "compiler.lua",
prolog_engine = "prolog_engine.lua",
prolog_compile = "prolog_compile.lua",
typecheck_native = "typecheck_native.lua",
lua_interop = "lua_interop.lua",
checked_integer = "checked_integer.lua",
repl = "repl.lua",
},
install = {
bin = { shen = "bin/shen" },
},
-- The vendored ShenOSKernel 43.4 KLambda sources, compiled on boot.
-- They land in the rock directory
-- (<tree>/lib/luarocks/rocks-5.1/shen/0.13.0-1/klambda); boot.lua's
-- find_kldir() derives that path from its own install location.
copy_directories = { "klambda" },
}
Loading