The S Series Kernels

Home Learn Download News Group Chatroom OS Wiki About Us

The S series Revival

The S-Series revival brings older Shen ports back to life on the modern S kernel. Many of these implementations were innovative and useful in their time, but have since become difficult or impossible to build with current compilers, runtimes and operating systems.

Mark Tarver announced the S series revival in September 2026 and worked with ChatGPT to make this great body of work useful again. Three ports were revived; Python, Java and Javascript. All defunct ports are being restored with the minimum changes necessary, preserving their original character and license, but making them usable again as part of the Shen ecosystem. The S series revival does not apply to respositories where there is active work going on.

Improvements in the S kernel

The S prefix indicates that the kernel is conformant to the standards laid down in 'The Book of Shen, 5th edition'. The S series was so named because the first entry, S30, derived from version 30 of Shen Professional. Apart from a few Prolog primitives, any Shen program written for the pre-S kernels will run under the S series.

There are some important improvements and developments in the S series beginning with the S30 kernel which allow the S series to run programs that the pre-S series cannot.

1. The S series allows Shen YACC to incorporate types.

This means that you can create type secure compilers in the S series.

2. The S series includes a garbage collected Prolog

Space on the binding vector is reclaimed under backtracking. This means that Shen Prolog under S series kernels can be run for hours and not seconds.

3. The S series perform partial applications.

Though Shen has always supported partial applications, pre-S versions pushed the responsibility of coping with partial applications onto the native platform implementation of KLambda. Under the S Series the kernel does all the work. This makes porting Shen much easier.

4. New compiler technology.

The YACC, sequent calculus, Prolog and Shen code compilers are all rewritten to a new approach which is faster and smaller than the pre-S versions. The Prolog compiler runs under Common Lisp without the need for writing optimising patches in native Lisp for speed.

5. A rigorous approach to distinguishing functions and the symbols used to name them.

Pre-S versions printed results such as 'reverse : (list A) --> (list A)' following the Lisp tradition which allows quoted symbols to be applied as functions. Though this conflation between the name for a function and the function itself is sometimes convenient, it is strictly not correct. The S series prints '(fn reverse) : (list A) --> (list A)'. This distinction is not pedantry; it is integral to being able to handle partial applications within the kernel and the type checker enforces this usage.

6. Better hashing function.

Pre-S kernels had a rather basic hashing function that would not take advantage of a large amount of memory for storing information. The new hashing function is suitable for very large amounts of information.

7. A structured approach to non-binary standard input and output.

Pre-S kernels assumed that standard input and output were byte streams although in many platforms they are not. The S series uses a structured decision table for platform installation that makes this much easier.

8. Ability to put the top level inside a package.

An 'in-package' command places the REPL inside a package allowing the user to interact with the package program without having to type the package name.

9. Facility for low level integration of Shen into Prolog.

The S series includes a revision of Prolog primitives and an injection of some new ones. The 'is' predicate is now conformant to ISO Prolog and there is provision for fine tuning Shen function calls from Prolog to make them run efficiently.

10. Clearer and documented source code.

By extensive factorisation and rewriting it has been possible to cram all these improvements into a code base that is actually smaller than the pre-S kernels. For the first time 'The Book of Shen' includes this source code within its pages as an executable specification of the workings of the language.

News

Shen site to be reconfigured in September 2026.

Old Shen builds are being revived in the S-series revival.