Crate ksplang

source ·
Expand description

§ksplang

A stack-based programming language with 33 instructions, independently designed by 33 people.

§Introduction

This is an implementation of ksplang, the best programming language, as proven by the logic of a Czech children’s story.

The famous Czech children’s story Jak si pejsek s kočičkou dělali k svátku dort (English translation) by Josef Čapek teaches that you can bake the best cake by adding many good things into it. Yes, that is definitely the correct interpretation. We have decided to prove this experimentally, with a programming language.

We have done this within KSP, a Czech programming competition for high-school students. Within the first series of tasks of the 36th year, we have asked each competitor for a single original instruction for a stack-based language. The result is ksplang, and you are currently looking at its reference implementation in Rust.

Modules§

  • ksplang instructions.
  • Simple parsing for the ksplang language.
  • Functions for executing ksplang programs.