Why is matrico developed in the CHICKEN Scheme Scheme dialect?

Chicken Scheme is an implementation of the R5RS Scheme programming language, and provides both, a read-eval-print-loop (REPL), the Chicken Scheme Interpreter csi, and also an optimizing compiler, the Chicken Scheme Compiler csc.

Chicken Scheme states that it follows ideas from the research paper:

H.G. Baker: “CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A.”; ACM Sigplan Notices 30(9): 17–20, 1995.

and aims to be “a practical and portable Scheme system”.

When I was seeking a suitable Scheme for implementing matrico, I had the following wish list:

  • Open Source For long-term and widespread availability, the Scheme system has to be released under an open-source license and part of a major Linux distribution’s repositories.

  • R5RS A mere fifty pages defining a complete programming language holds its own minimalistic appeal.

  • Modules To bundle function libraries, organize library hierarchies, and control accessibility of library elements, modules are required.

  • Homogenous Vectors (SRFI-4) Particularly, vectors solely composed of double-precision floating-point numbers (f64) are essential for numerical computations.

  • Cross-platform (X86 & ARM) While X86(-64) dominates the desktop and laptop market, ARM(64) systems, like Apple’s M1 and the Raspberry Pi 4B, became very attractive efficiency- and performance-wise.

  • Typed math (fixnum & flonum) For performance and code readability the two most relevant number systems, exact integers (fixnums) and inexact floating-point numbers (flonums) should have respective math functions.

Chicken Scheme provided all of the above, so it became my Scheme of choice. Additionally, once I familiarized myself with Chicken Scheme environment, I got to know the following features, which turned out to provide bonus value:

  • Chicken Base This included module provides most generic functions you could miss from plain R5RS.

  • Included Modules The extend and content of the included modules is straight out fantastic.

  • Extension Repository Chicken Scheme has a central repository for extensions packaged in the “egg” format, which is itself pretty awesome.

  • Documentation Be it the included modules or the egg extensions, everything is very well documented.

  • Functors A very interesting feature of Chicken’s module system are functors, which allow to parameterize a module by another module.

  • Profiling It turns out Chicken Scheme has statistical and instrumentation profilers included.

Working for about one year with Chicken Scheme, I can say have never had a more joyful and satisfying programming experience. That is not to say Chicken Scheme is perfect, but in comparison the issues I encovered are minor; and I will discuss those further down the road. For now, and in brief: writing matrico in Chicken Scheme was and is fun. And next, I will lay out matrico’s structure.