KSL Wiki
This website is used to record the language documentation of KSL, as well as the usage documentation of its built-in functions, and also showcases some examples of use.
99 Problems
The original set of 99 problems can be found here.
Bundle
If you want to package a KSL script into an executable file, there’s a workaround using the bundle.sh script. This script will generate an executable file that runs the corresponding KSL script.
./bundle.sh <ksl script> <output name>
Note: Make sure to place the
ksl
executable, the script file to be bundled, andbundle.sh
in the same directory.
For example, suppose you have a script fib10.ksl
:
Let[a, 0];
Let[b, 1];
Let[m, 0];
While[Less[m, 10],
{ Let[{a, b}, {b, Add[a, b]}],
Let[m, Add[m, 1]] }];
Print[a];
You can try bundling this script:
./bundle.sh fib10.ksl fib10
The bundle.sh
script will package fib10.ksl
and ksl
together into an executable file named fib10
.
The execution result should be the same:
./ksl fib10.ksl # => 55
./fib10 # => 55