Alchemy is an extensible computer algebra library written in portable R7RS Scheme2. Its aim is to provide a meaningful way to express and use mathematical objects. A notable goal it tries to achieve is breaking cryptography without fighting the library as it should be as easy as parsing the data and calling a function, not harder. It tries to be readable and portable. Due to Scheme nature, it is easy to extend.
The rationale behind this are building my own birdfeeder and I do not really like Python, Sagemath, MAGMA, et al.'s approach. By other means, luck is when preparation meets opportunity. Then, I hope this code publication is one of Type II. Moreover, this project is meant to be a continuous endeavour based on my knowledge.
Read more in the documentation.
- It is implemented starting from CHICKEN Scheme because it is the most portable, complete, and simple Scheme I could find.
CHICKEN Scheme is mainly used. We list the SRFI used and then we provide the line to install all packages for CHICKEN.
| Task | SRFI import |
|---|---|
| List Library | 1 |
| Homogeneous numeric vector datatypes | 4 |
| String Library | 13 |
| Source of Random Bits | 27 |
| Basic Format Strings | 28 |
| Sorting and Merging | 95 |
| Bitwise Operations | 151 |
| String Library (reduced) | 152 |
| String-notated bytevectors | 207 |
| Flexible curried procedures | 232 |
chicken-install r7rs srfi-1 srfi-4 srfi-13 srfi-27 srfi-95 srfi-151 srfi-152 srfi-207 srfi-232 linenoise trace
It is also suggested to create a config file ~/.csirc.
(import linenoise)
(current-input-port (make-linenoise-port))
- Test library with
csi -R r7rs src/alchemy.scm -s src/.../library.test.scm - Run with
csi -R r7rs src/alchemy.scm
Basic functions, algebraic structures, and combinators. See documentation.
- Berlekamp's algorithm for polynomial factorization
- Berlekamp–Massey algorithm
- Distributed computation
- Hensel lifting