A LaTeX-inspired mathematical computing environment that unifies seven animal-themed C libraries behind a GUI, command-line interpreter, and scripting language.
  • C 76.1%
  • C++ 23.4%
  • Makefile 0.4%
Find a file
2026-05-23 11:48:11 -04:00
art addmoved screenshots to the right place 2026-05-16 13:08:13 -04:00
include prepared for v2.0.0 2026-05-23 11:25:05 -04:00
packaging/windows updated README 2026-05-23 11:48:11 -04:00
src prepared for v2.0.0 2026-05-23 11:25:05 -04:00
tests prepared for v2.0.0 2026-05-23 11:25:05 -04:00
third_party/linenoise updated code to make it safer against overflow 2026-04-26 21:12:06 -04:00
tools fixing issue with Windows release 2026-04-27 11:49:02 -04:00
.gitignore removed accidental inclusion of build files 2026-05-17 15:40:40 -04:00
bestiary-banner.png changed banner again 2026-04-25 16:11:57 -04:00
build.sh added screenshots 2026-04-26 20:14:36 -04:00
LICENSE.md root commit 2026-04-18 09:40:01 -06:00
Makefile fixed roots formulae 2026-05-17 13:23:16 -04:00
README.md prepared for v2.0.0 2026-05-23 11:25:05 -04:00
run_tests implemented Quaternionic into Bestiary; next is to add KUMA commands 2026-05-13 20:45:08 -04:00
test implemented session preservation and restoration 2026-05-16 09:22:20 -04:00

Bestiary - v2.0.0: Release the BEASTs!

...the Bundles of Efficient Algorithms for Science and Technology, that is!!

Bestiary is a LaTeX-inspired mathematical computing environment built around several C-based, animal-themed mathematics libraries. It combines a language, command-line interface, and GUI application so that these libraries can be used together as one unified system. Its core idea is simple: mathematical expressions should be typed the way mathematicians already write them. Each library is referred to as a "BEAST," and provides a set of commands that can be accessed in Bestiary. All commands in Bestiary start with a backslash \ character, and the language is themed after LaTeX, such that many objects can be defined in a way identical to how they would be typed in LaTeX.

Each BEAST is written from scratch in C. The wxWidgets-based GUI application, which allows for easy access to documentation, running multiple Bestiary shells in parallel, 2D and 3D graphing, and more, is written in the C++ language. For full documentation on each of the hundreds of commands and operations available in Bestiary, see the "Help" tab in the application. More information on each BEAST and its functionality can be found below.

Bestiary is currently in active development, but as of v2.0.0, it can be expected to be stable and efficient for regular use. Future releases will add new features to the core BEAST libraries, add new BEASTs, and fix any bugs that may be discovered, but the core architecture, GUI layout, and basic functionality will remain the same. Bestiary has mostly been tested on the GNU/Linux operating system, so there is more support for it than for Windows, but it is supported and developed for Windows as well. Build files for an unofficial Mac version exist in the source, but MacOS is not supported at this time.

Features

  • LaTeX-inspired language: backslash commands, math-like syntax, native and LaTeX-style object definitions, variables, and expressions
  • Full programming language: loops, conditionals, dynamic arrays, user-defined functions, control flow
  • Unified CLI/REPL evaluator: hundreds of commands exposed through one environment, with shared syntax and object handling
  • GUI application: multiple shell tabs, scripting, searchable local help pages, graphing, automatic session save/restore
  • Graphing and visualization: 2D Graph tabs, 3D Graph tabs, KUMA Plot tabs, interactive pan/zoom/rotation/reset, PNG saving
  • HEBI: complex arithmetic, field arithmetic, basic mathematical functions, transcendental constants, shared data structures, PRG-powered randomness
  • Sokko: matrices, vectors, row and column reduction, determinants, eigenvalues, eigenvectors, LU decomposition, linear-algebra support for other BEASTs
  • USAGI: finite groups, rings, fields, subobjects, quotients, homomorphisms, ideals, constructors for common algebraic objects, advanced finite-algebra computations
  • NEKO: symbolic and numerical calculus, differentiation, integration, rootfinding, ODE solving, polynomial factorization over real and complex numbers, graph resampling support
  • TORA: finite-group representations, characters, irreducibility checks, character computations, fast character-table algorithms
  • PONI: kinematics, dynamics, forces, energy, work, vector-based physics calculations, multibody simulation tools
  • OOKAMI-ng: integer combinatorics, sumsets, difference sets, product sets, representation functions, additive/multiplicative energies, arithmetic progressions, geometric progressions
  • KUMA: probability and statistics, one- and two-variable statistics, common discrete and continuous distributions, random sampling, histograms, scatter plots, box plots, other statistical plots
  • Quaternionic: quaternions, octonions, Cayley-Dickson algebras over fields, CD arithmetic, zero-divisors, ideals, commutators, associators, quaternion matrix representations

Installation

To install Bestiary, download the latest release for your platform from the repository's Releases page. Extract the downloaded archive to a convenient location.

On Windows, open the extracted folder and run:

install.bat

This installs Bestiary into the default local application folder and creates shortcuts when possible. You can also run bestiary.exe directly from the extracted folder if you prefer to use it as a portable application.

On GNU/Linux, the extracted archive contains the Bestiary executables. You can run them directly from the extracted folder, or move them to a directory used for applications on your system, such as /bin, /usr/bin, /usr/local/bin, or another directory on your PATH. If you want Bestiary to appear in your desktop environment's application launcher, you may also create a .desktop file pointing to the bestiary executable.

GUI application

Bestiary can be used either through the GUI application, bestiary, or through the command-line interpreter, bestiary-cli. The GUI is recommended for serious work and long-term use, since it provides multiple shell tabs, searchable documentation, script tabs, 2D and 3D graphing, statistical plotting tools, PNG export for graphs and plots, and convenient access to the same evaluator used by the CLI.

Here are some screenshots from Bestiary:

Bestiary start page
The Bestiary start page.
Bestiary shell with character table output
Multiple shell tabs running mathematical computations in parallel.
Bestiary help page for Sokko
Integrated help pages for BEAST-specific commands.
Graph tab in Bestiary
A Graph tab in Bestiary, showing a graph of y=x.
3D Graph tab in Bestiary
A 3D Graph tab in Bestiary, showing a graph of two parabolas.
KUMA Plot tab in Bestiary
A KUMA Plot tab in Bestiary, showing a simple histogram.

Note that, as Bestiary is primarily developed for GNU/Linux, there may be some issues with the GUI application on some Windows systems. Windows users who encounter bugs in the GUI may wish to use the CLI application.

Usage examples

To get an idea of how Bestiary is used and why it is powerful, consider a series of commands executed in Bestiary:

Bestiary v2.0.0 -- Ctrl+C cancels, Ctrl+D quits, Ctrl+L clears screen
\help lists commands, \help{commandName} displays command info
> A = \begin{matrix} 1 & 1 \\ 1 & 0 \end{matrix}
=> ()
> A
=> 
| 1 , 1 |
| 1 , 0 |

> Aeasy = [1, 1; 1, 0]
=> ()
> Aeasy
=> 
| 1 , 1 |
| 1 , 0 |

> A == Aeasy
=> true
> 

As can be seen from this example, there are both easier native ways to define objects, and methods which are identical to how LaTeX is commonly used. In many cases, this makes it possible to paste mathematical expressions directly from LaTeX source into Bestiary and compute with them. This goes farther than just defining objects. Consider this example, using the same definition of A as in the first:

> A \otimes A
=> 
| 1 , 1 , 1 , 1 |
| 1 , 0 , 1 , 0 |
| 1 , 1 , 0 , 0 |
| 1 , 0 , 0 , 0 |

> \det(A \otimes A)
=> 1

Yet again, a line that is often used in LaTeX source documents can be directly pasted into Bestiary to get the desired result. For common operations and invariants, the goal is that you should not need to translate mathematics into a special programming idiom: you should be able to type something close to the way you would write it in a paper.

There are many commands in Bestiary that are not commonly used in LaTeX, but they are a combination of LaTeX syntax with intuitive function names, e.g. \isIrrep determines whether a representation is irreducible or not, and \listElements lists the elements of a group or a ring. Information on all of these commands can be found in the help pages in the Bestiary GUI application.

Scripting

Bestiary can run any ".bsy" file as a line-by-line script:

./build/bin/linux/bestiary-cli file.bsy

It can also evaluate temporary script text and exit immediately:

./build/bin/linux/bestiary-cli --eval "2 + 2"
./build/bin/linux/bestiary-cli --eval "x = 3
x^2"

Inside of a Bestiary environment, use \run{file.bsy} or \run{"path with spaces.bsy"} to run a script in the current session. Script lines share the same evaluator and environment as the REPL, so assignments made by a script remain available after \run finishes. Scripts can also be loaded into the GUI application as tabs.

To write a script, simply create a .bsy file with a series of commands as you would type them into the interpreter. Semicolons are not needed to end lines. You can also use \export{file.bsy} or \export{"path with spaces.bsy"} to export a script which, when run, will reproduce the current environment exactly.

Meet the BEASTs

Bestiary is powered by 7 core C-based mathematics libraries, known as BEASTs, with additional BEASTs being added regularly to increase breadth of functionality. Each of the core libraries is named after the Japanese word for an animal, which also functions as a backronym for the full name. Each BEAST provides different commands and functions to the program, and they build on and require each other to be complete.

  • HEBI (蛇): Highly Efficient Basic math Interpreter (basic math and shared libraries)
    • the versatile serpent, providing shared libraries used by the other BEASTs
    • powers other powerful BEASTs, and provides efficient functions and structs for basic mathematics
    • Main features: complex arithmetic, basic functions, field arithmetic, PRG-powered randomness, transcendental constants
  • Sokko (速狐): Speedy Kitsune (linear algebra)
    • the swift fox, providing a fast, self-contained linear algebra library
    • provides fully self-contained matrix and vector operations, and provides the backbone for other BEASTs requiring linear algebra
    • Main features: matrices, vectors, row reduction, column reduction, eigenvalues and eigenvectors, efficient LU decomposition
  • USAGI (兎): Utilities Bundle for Algebra and Group Invariants (finite group and ring theory)
    • the petite rabbit, hopping through rings, skipping through fields, and always staying in a group (;3)
    • provides a full library for finite group and ring theory, including constructors for common objects, quotients, homomorphisms, and much more
    • Main features: groups, rings, fields, sub-objects, quotients, homomorphisms, ideals, advanced computations
  • NEKO (猫): Numerical Estimation Kernel with Optimizations (calculus, numerical analysis, and solvers)
    • the supple feline, squeezing quickly and leanly into even the tightest of functions and ODEs
    • offers symbolic and numerical methods for calculus and applications
    • Main features: differentiation, integration, numerical rootfinding, ODE solvers, polynomial factorization over R and C
  • TORA (虎): Toolkit Of Representation-theoretic Algorithms (representation theory of finite groups)
    • the ferocious tiger, suitable for wrangling representations of even the trickiest of finite groups
    • provides a full library for representation and character computation
    • Main features: representations, characters, speedy character table computations for finite groups
  • PONI (ポニ): Physics Operations and Numerical Interpreter (physics, kinematics, simulations)
    • the majestic pony, providing solutions to basic physics problems and multibody simulations
    • makes use of Sokko to provide vector-based kinematics and dynamics, with more planned for future updates
    • Main features: kinematics, dynamics, force, energy, work, multibody simulations
  • OOKAMI-ng (狼): Operations Over K-fold Addition and Multiplicative Integer sets (integer combinatorics)
    • the fearless wolf, hunting down the properties of sets of integers with ferocious intensity
    • a self-contained library for integer combinatorics based on OOKAMI
    • Main features: computing sumsets, difference sets, product sets, rep functions, energies, APs and GPs, and much more
  • KUMA (熊): Kernel for Uncertainty Measurement and Analysis (probability and statistics)
    • the ferocious bear, meeting uncertainty with the mathematical force of a grizzly
    • uses HEBI and NEKO when necessary, providing access to essential features for probability and statistics
    • Main features: basic invariants, statistics of two variables, various statistical plots, essential discrete and continuous probability distributions, random sampling
  • Quaternionic (quaternions, octonions, and Cayley-Dickson algebras)
    • the first and only non-animal library; an implementation of Quaternionic
    • makes use of HEBI, Sokko, and USAGI to do arithmetic and algebra with quaternions, octonions, and higher-degree Cayley-Dickson algebras
    • Main features: defining Cayley-Dickson algebras over fields, CD arithmetic, zero-divisors, ideals of CD algebras, commutator and associator, matrix representations of quaternions

Dependencies

For GNU/Linux, Bestiary is expected to run out of the box. For Windows, the necessary DLL files are shipped with bestiary.exe, and are installed when the user runs install.bat. If any dependencies are missing, please create an issue to report a bug.

Building

Bestiary can be built on GNU/Linux with:

make

This produces the GUI application and command-line interpreter under:

./build/bin/linux/

To build the Windows version from GNU/Linux, use a MinGW-w64 toolchain and run:

make windows

To build release artifacts for all supported platforms, run:

make release-artifacts

On Windows, the required DLLs are included alongside the executables. The test binaries and repl are not included in these release archives.

A portable Windows bundle can be created with:

make windows-bundle

MacOS users may wish to attempt building the Mac version. This option is present in the Makefile, but is not fully supported or thoroughly tested, so it is recommended to use another platform or use a wrapper to run Linux binaries on MacOS at this time.

License and attribution

The contents of this repository and the corresponding Releases page are licensed under the GNU General Public License v3.0 (GPL-3.0).

Bestiary is brought to you by Algebraity and Mizufuwa. Special thanks to dcc5480 for working on an unofficial Mac port, Taiga for testing on Windows, and Mizufuwa for help with the lexer and an early version of the README file. (<3)