This project aims to be an implementation of the APL programming language created by Kenneth E. Iverson in the late 1950's.
Below is an example of Conway's Game of Life in Kepler.
⍝ A Game of Life!
⍝ Setting up a 10x10 board.
glider ← 3 3⍴1 1 1 1 0 0 0 1 0
board ← ¯10 ¯10↑glider
⍝ The function of life.
Life ← {1 ⍵∨.∧3 4=⊂+/,¯1 0 1∘.⊖¯1 0 1∘.⌽⊂⍵}
⍝ Helpers for updating the board.
Update ← {board ← Life board}
Round ← {Update ◊ ⎕←'\n \n' ◊ ⎕←board}
⍝ Run 5 rounds.
(Round⍣5)0
If you have the compiled binary (see next section), simply execute the following command to enter the REPL:
./Kepler
You can also execute a specific .kpl
file by running:
./Kepler /path/to/file.kpl
Lastly, it is also possible to run the automatic test suite by executing:
./Kepler --test
Kepler has been tested on Linux, macOS, and Windows. Please see below for detailed instructions for your platform.
CMake requires an installation of Git to be available. This is required to automatically fetch dependencies required to build Kepler.
After downloading the source code, compile it using CMake, as follows:
- Ensure you are in the root folder of the downloaded project. This is the folder which contains the
CMakeLists.txt
file. - Execute
cmake -B ./build -DCMAKE_BUILD_TYPE=Release
- Execute
cmake --build ./build --config Release
- After compilation ends, the
Kepler
andKeplerBench
binaries can be found inside/build
.
Windows users should ensure they have GCC installed, as Kepler currently does not compile with MVSC. These instructions have been tested only with GCC 12.2.0, which can be downloaded here. To ensure that GCC is selected as the compiler, ensure that the Path
has the /bin
directory of MinGW appended.
After downloading the source code, compile it using CMake, as follows:
- Ensure you are in the root folder of the downloaded project. This is the folder which contains the
CMakeLists.txt
file. - Execute
cmake -B ./build -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles"
- Execute
cmake --build ./build --config Release
- After compilation ends, the
Kepler
andKeplerBench
binaries can be found inside/build
.
If you encounter any issues with Kepler while using it, please report them under issues. Please make sure you include as much detail about the error (and what you did to cause it), so it can be fixed.
All pull requests are welcome, so feel free to contribute!