|
Leonardus
|
There are three main ways to get started with Leonardus:
For detailed documentation consult the project's GitLab Pages. There you can find the latest user and developer information including content
extracted from the source code files.
Alternatively, you can find it in the Docker image leonardus under
/usr/local/share/doc/leonardus/.
To get command-line help, type:
lc -h (for the calculator)lb -h (for the LeoScript interpreter)either within the Docker image or after building the project.
Leonardus integrates the traditional UNIX man page subsystem.
Usage examples:
The GitLab CI/CD pipelines automatically build and publish Docker images to
Docker hub. You get quick access to a ready-to-run Leonardus installation by
using them.
As prerequisites you need a running Docker environment. In the following
documentation we additionally assume, the you configured your environment to
allow docker commands run as your login user. This can usually be accomplished
by adding your login user to the "docker" group:
Pull the image hagenbund2/leonardus and start it:
The CLI applications lc and lb will be available in the opening shell.
lb runs LeoScripts. lc serves as command line calculator.
Follow the hints on the welcome screen.
As a Docker feature, you could even execute lc in one line with e.g.:
With a shell alias,
you get:
The previous command line
runs the image as root user on your system. For better integration with you
home directory data leonardus can be executed with you login user.
Consult the Tools/udocker.sh script from the GitLab repository.
With it, you can map your home directory into the image to get persistancy of
LeoScripts and data.
Leonardus integrates with JupyterLab by serving as so called Jupyter kernel.
The leojupyter Docker image contains
To use it, pull the image hagenbund2/leojupyter
and start the JupyterLab X application using the command provided in the Docker hub repository's "Overview" section.
You should see:
Follow the instructions to install a Python environment. And after selecting
"New session..." you will see the option to create a new notebook with
a LeoScript kernel.
To run one of the given LeoScript examples in the Docker image leonardus:
You can use the calculator. For example:
To use the vocabulary Numbers and an arbitrary long rational number
for calculating 12^64:
TODO: Jupyter notebooks -> USING
See ARCHITECTURE.