Scheme implementation comparison table
Looking from the outside into the Scheme world

Sitemap — — — Webring — — — Repositories — — — About

Abstract:

Table of Contents

Comparison between Scheme implementations

This guide was written by someone looking from the outside in, so, without much experience. Therefore, inconsistencies an important omissions may take place. Please, refer to the footnotes as they will include more information and explanations.

The motivation for doing this comparison chart is to select an Scheme implementation with which an Ada/GNAT bootstrapping compiler could be created. Some of the more important aspects that we are looking for are:

Implementation Type License OS support Arch support1 Scheme Standard Build dependencies Runtime dependencies Can be X-compiled Supports X-compiling TCC support2 Library support3 Full numeric tower Full tail recursion optimisation CPS (Continuation Passing Style) Macro support Define types FFI (Foreign Function Interface) Unicode support Embeddable Runs on RISC-V/Linux Build-project system Notes
Chez Compiler, Interpreter Apache v2 Linux, OSX, Windows, Android4 x86*, arm[6], powerpc, more? R6RS C compiler None? ?? Does not seem like it Yes4                 Seems like it       Needs itself to compile itself -> bootstrap problem
Chibi Scheme VM-Interpreter BSDv3 Linux, *BSD, Solaris, Plan 9, Android, iOS, WASM, OSX, Windows Everything supported by the C compiler? R7RS C compiler, GNU Make recommended None, can use Boehm-GC More or less yes5 - Yes6 R7RS small, some SRFIs Yes Yes Yes syntax-rules, SRFI-46, low-level hygienic with syntactic-closures interface Yes, SRFI-9, SRFI-99 Yes Yes Yes, goal of the implementation   No  
Chicken 5 Compiler7, Interpreter BSDv3 Linux, *BSD, Solaris, Hurd, Haiku, Android, Windows, OSX, more? Everything supported by the C compiler? R5RS, R7RS8 C compiler9, GNU Make None10 Yes Yes Yes   Yes Yes Yes syntax-rules, implicit and explicit renaming macro transformers SRFI-9 (built-in), SRFI-99 (egg). Yes11 Yes No/Yes12 Using -embedded can create .so Yes Yes Has some autogenerated Scheme files
Cyclone Compiler7, Interpreter MIT Linux, FreeBSD, OSX, Windows Know to run on *x86, and arm[7-8] R7RS C compiler, GNU Make, libtommath, concurrencykit ConcurrencyKit ?? Maybe with the generated C code   R7RS large               No, can create .so?     Requires and has a bootstrap
Gambit Compiler7-Translator, Interpreter Apache v2 and LGPLv2.1 Linux, *BSDs, OSX, Windows, JavaScript, iOS, NintendoDS, FPGAs… Everything supported by the C compiler? R4RS, R5RS, R7RS C compiler, GNU Make, (autotools) None Yes Yes Yes CC=tcc                 Can create .so Yes    
Gauche VM-Interpreter BSDv3 Unix-like, Android Everything supported by the C compiler…? R7RS C compiler, GNU Make, (autotools) (libiconv?, Mbed TLS, pthreads)13 None ??/Likely - No, requires C++ (gc)                       It is still not v1.0, but should be there closely
Gerbil Compiler, Interpreter Apache v2 and LGPLv2.1 Gambit's support Gambit's support R5RS, R7RS Gambit, libcrypto None Likely ?? -             Yes          
GNU Guile 3 VM-Interpreter, JIT GPLv3, Library LGPLv3 Linux, *BSD, Solaris, Hurd, Windows, OSX Everything supported by the C compiler? R5RS, R6RS, R7RS C compiler, GNU Make, pkg-config, runtime dependencies GMP, libFFI, Boehm-GC, libltdl, libunistring Yes - No               Yes? Yes, official GNU scripting lang   No14 Fully bootstrapped and reproducible. LOC count in15
Loko Scheme Compiler EUPL-1.2 Linux, NetBSD, Bare-metal x8664 x8664 R6RS, R7RS C compiler, GNU Make, Akku, see Notes None Yes Yes16                         Requires bootstrap from another Scheme compiler…
Maru TODO                                          
Ol VM-Interpreter, Compiler7 MIT and LGPLv3 LibC Everything supported by the C compiler? R7RS subset C compiler None Yes Yes?                          
Owl VM-Interpreter MIT LibC Everything supported by the C compiler? R7RS subset C compiler None Unlikely Unlikely Yes Basic No     Yes?     Yes No? Yes17 No Very small implementation in C/Scheme
Racket18, 19 VM-Interpreter, Wierd compiler MIT and Apache v2, Runtime LGPLv3 Linux, FreeBSD, OSX, Windows Mostly everything Everything? C compiler, GNU Make, libffi None? Yes Yes20   Huge             Yes No   Yes? Biggest Scheme implementation, it is basically its own language
Ribbit VM-Interpreter BSDv3 Any target language Any target language Subset of Scheme   None Likely       No                    
S7 Interpreter 0-clause-BSD (simpler ISC) LibC Everything supported by the C compiler? R5RS21, R7RS C compiler None Yes - Yes22   Yes/Mostly23 Yes Yes Low-level: CL-style define-macro SRFI-9, SRFI-99 and setters24 Yes Yes/Fully manual25 Meant to, main design Yes26 No Extremely minimal (once .c and one .h file). Modelled after Guile 1.8
s9fes TODO                                          
SCM VM-Interpreter, Compiler7 LGPLv3 Amiga, Atari, Linux, OSX, MS-DOS, Windows, OS/2, VMS, *NIX Everything supported by the C compiler R5RS C compiler, GNU Make, SLIB27, (autotools) None Yes Maybe with the generated C code No, compiler errors R5RS plus SLIB               Yes   No  
STklos VM-Interpreter GPLv2 Linux, OSX, Windows, Android (used to work in many others) Everything supported by the C compiler R7RS C compiler, GNU Make, Bohem-GC?, GMPLite?, PCRE?, FFI?, pthreads? (autotools) <- C++ deps! None, Unlikely - No, requires C++, also28 R7RS               Yes?   Package manager  
TR7 VM-Interpreter BSD-0 LibC Everything supported by the C compiler R7RS C compiler None Yes - Yes R7RS Yes Yes Yes In the works ? ? Yes Yes Needs work No Still fresh. Based on TinyScheme
TinyScheme VM-Interpreter BSDv3 LibC Everything supported by the C compiler R5Rs C compiler None Yes - Yes None No rationals/complex     No hygienic macros   Yes   Yes Yes No Very small29, but lacks in a few areas…
TinyScheme.C TODO                                          
BoCL TODO                                          
Embedded CL Compiler7, Interpreter LGPLv2 Linux, *BSD, Solaris, Android, Windows, OSX x86*, sparc, arm[6-8], alpha, powerpc Common Lisp ANSI X3J12 C compiler, GNU Make, libatomicops30, Boehm-GC (autotools) None if built-in Yes Yes No, requires C++ (gc) Lisp               Yes Yes Yes, ASDF  
Easy-ISLisp Compiler7, Interpreter BSDv2 Linux, *BSD, OSX, *NIX Everything supported by the C compiler? ISLisp C compiler, ncurses*31 None (ncurses)31 Likely Likely Yes, patched32               Yes   Yes    
Femtolisp TODO                                          
newLISP TODO                                          
TinyLisp TODO                                          
uLisp TODO                                          
Lua VM-Interpreter MIT Aix, *BSD, Linux, C89, POSIX, Solaris, OSX, Windows Everything supported by the C compiler? Lua, no formal specification C compiler, Make33 None Yes - Yes, minor patch - +- ? ? No? ? Yes Basic Yes Yes LuaRocks Not lispy
Fennel TODO                                          
TCL VM-Interpreter MIT   Everything supported by the C compiler? TCL C compiler None Yes - Yes TCL           Yes Yes Yes Yes None?  
Jim TCL VM-Interpreter BSDv2   Everything supported by the C compiler? Most of TCL C compiler, autosetup34 None Yes - Yes Some extras           Yes Yes Yes Yes None?  
Janet TODO                                          

Deeper look into selected Scheme implementations

These implementations were chosen because they can be comiled by TCC and they seem to compile to a large number of targets.

Implementation Type License Arch support Scheme Standart Library support, SRFIs3 SLOC Requires pregenerated files Weight (RISC-V) Drawbacks Advantages Comments
Chibi Scheme VM-Interpreter BSDv3 C compiler and LibC R7RS Quite a few35 ~85_00036 No, with a catch37 237KB5, 1.2MB libchibi.so, 1.7MB static38 Cross-compiling is not that straight forward. Not very performant Great license for reusability  
Chicken 5 Compiler, Interpreter BSDv3 C compiler and LibC R5RS, R7RS Quite a few39 ~620_00040 Yes41 2.4MB42 Requires pregenerated Scheme files, requires GNU Make Great license for reusability  
Gambit Compiler, Interpreter Apache v2, LGPLv2.1 C compiler, LibC and common OSs R4RS, R5RS, R7RS Quite a few43 ~1_700_00044 Yes45   Requires autotools, GNU Make Potentially one of the most complete and performat implementations Check which which parts of the library are under LGPL.
Owl VM-Interpreter MIT C compiler, LibC Subset R7RS Minimal ~20_00046 No 1.3MB47 Not a full R7RS implementation. Very slow, has some compile issues. Unmaintained? Extremely small C core  
Ribbit VM-Interpreter BSDv3   Subset None ~6_50048 Non Scheme files seem to be pregenerated   Minimal bootstrapping implementation    
S7 VM-Interpreter 0-BSD C compiler and LibC R5RS, partial R7RS Basic49 82_60550 No 2.7MB51, 2.0MB static26 Compiling to RISC-V staticly is not so simple52. Reduced library support Smallest implementation by far. Extremely easy to compile. Great license for reusability  
TR7 VM-Interpreter 0-BSD C compiler and LibC R7RS Basic ~13_60053 No 715KB54 Very fresh and still unfinished. Still has errors while testing in RISC-V Incredibly small and targets R7RS Keep an eye on it
Easy-ISLisp Compiler, Interpreter BSDv2 C compiler and LibC ISLisp - 39_00055 No 843K56   Defined standard. Can compile to C. Great license for reusability. Very small. Keep an eye on it
Lua VM-Interpreter MIT C compiler, LibC and common OSs - - ~20_00057 No 210KB58 No defined standard Very small Worth it compared to Schemes?
Jim TCL VM-Interpreter BSDv2 C compiler, LibC and common OSs - - 41_20059, 21_000 autosetup34 No? 1.4MB static60 TCL is a bit quirky. Jim is not THE standard TCL TCL is extremely flexible. Core is small. Most tests pass61!  

Things that could also be interesting

  • Silex: a lexer generator for R5RS/R7RS implementations. See Github.

Footnotes:

1

A lot of the information presented has been taken by the package support in Debian Sid as of <2022-04-28 Do>.

2

TCC is the Tiny C compiler. This is an important compiler since it is used in the first stages of the Guile/World bootstrapping system. For more information see Live-bootstrap.

3

There is this wonderful page that lists all SRFIs and known implementations that supports them.

5

Compiled with default flags: -O3 -g3, dynamicly. JUST THE CHIBI EXECUTABLE! Cannot cross-compile cleanly directly as the libraries need to be built by the executable, which does not run natively. In order to fix this, we follow a two step compilation process, see this procedure.

6

Some tests fail, they are mostly related to mathematical operations having the wrong sign.

7

Requires a C compiler on the host in order to compile Scheme. It basically translates Scheme into C and compiles it.

8

R7RS support is added by explicitly including the R7RS egg (Chicken jargon for extension).

9

It is known to work with the Tiny C Compiler. It would not surprise me if it worked with other "small" compilers.

10

The dependence on LibC is said to be small, which means it could run on a customised LibC.

11

Requires the probably non-portable (chicken type) import.

12

The compiler, as of <2022-05-15 So> does not support UTF-8. However, a major rewrite is taking place that will add it. The UTF-8 egg is what currently provides support.

13

Can be turned off.

14

There is the package hall that does it however.

15

LOC count generated from git on <2022-12-10 Sa>

fernando@localhost:~/Builds/Guile/guile> cloc . --process=4 --exclude-dir=doc,emacs,examples,bechmark,benchmark-suite,test-suite,gc-benchmarks
    1447 text files.
    1347 unique files.                                          
     101 files ignored.

github.com/AlDanial/cloc v 1.92  T=1.15 s (1168.1 files/s, 351669.4 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                              490          23763          17250         144168
Scheme                         352          12097          22104          93785
C/C++ Header                   264           7220          10317          32305
m4                             199           1651           1739          25996
make                            19           1323           1520           5025
Bourne Shell                    12            398            635           2556
Lisp                             2            128             35            507
awk                              2             76            166            240
diff                             4             13             43            171
lex                              1             36             13            147
Markdown                         1             16              0             41
YAML                             1              6              0             32
-------------------------------------------------------------------------------
SUM:                          1347          46727          53822         304973
-------------------------------------------------------------------------------
17

Seems to have an issue running tests. A second make is required to build it. The error:

Running tests/ against bin/vm fasl/bootp.fasl: .....................................................................|............................. FAILED
1c1
< #true
---
> #false
ERROR: tests/char-ready.sh
18

Minimal variant.

19

It uses Chez Scheme at its core.

21

R5RS differences.

22

touch mus-config.h && tcc -c s7.c -I. && tcc -o repl repl.c s7.o -lm -I. && ./repl May require a patch to enable/force WITH_GCC Already fixed <2022-06-25 Sa>.

23

For multiprecision arithmetic, GMP, MPFR, MPC are needed…

24

setters are likely to not be portable.

25

From this mailing list discussion, it seem it does support it but only when entered raw… So a very rudimentary way.

26

Compiled with $CC s7.c -o s7-riscv -I. -DWITH_MAIN -DWITH_C_LOADER=0 -static -Os -lm -pthread -Wl,-export-dynamic and stripped.

In order for S7 to be useful with the C library, it needs libc_s7.so. libc_s7.so is generated automatically by S7 when it loads r7rs.scm or libc.scm. It transpiles libc.scm to C producing libc_s7.c. Then it loads cload.scm to compile the generated libc_s7.c into libc_s7.so.

The technique that is theorised but still not successfully used to cross-compile S7 would be:

  1. Compile S7 natively, for example: gcc s7.c -o s7 -DWITH_MAIN -I. -O2 -g -ldl -lm -Wl,-export-dynamic or tcc -o s7 s7.c -I. -lm -DWITH_MAIN -ldl -rdynamic -DWITH_C_LOADER
    1. -Wl,-export-dynamic is needed! Otherwise some symbols, such as s7_f will not be found and loading libc_s7.so will fail.
  2. Run ./s7 r7rs.scm so that S7 generates libc_s7.c
  3. Compile S7 with a cross-compiler riscv32-buildroot-linux-gnu-gcc s7.c -o s7-riscv -DWITH_MAIN -DWITH_C_LOADER=1 -ldl -static -Os -lm -I. -Wl,-export-dynamic
  4. Cross compile libc_s7.c, for example riscv32-buildroot-linux-gnu-gcc libc_s7.c -o libc_s7.so -shared -rdynamic -DWITH_MAIN -DWITH_C_LOADER=1 -Os -ldl -lm -I. -pthread -Wl,-export-dynamic

The method described above does not work as symbols are still not found:

s7: 22-Jun-2022
load /mnt/s7/libc_s7.so failed: /mnt/s7/libc_s7.so: undefined symbol: s7_f

;unbound variable (symbol "\x7f;ELF\x01;\x01;\x01;")
;    (symbol "\x7f;ELF\x01;\x01;\x01;")
;    libc_s7.so, line 1, position: 7

;unbound variable fileno in (fileno stdin)
;    (fileno stdin)
;    repl.scm, line 207, position: 6849
; (fileno stdin)
; ((terminal-fd (fileno stdin)) (tab-as-spa...
; ((lambda (hook lst) (when (or (not (proce...

;unbound variable *repl*
; (*repl* 'run)
; ((*repl* 'run))
; ((lambda (new-size) (unless (= new-size h... ; histsize: 100, histpos: 0
;                                              histbuf: #("" "" "" "" ...)
;

Maybe libc_s7.c could be compiled directly into s7?

28

Also

tcc -DHAVE_CONFIG_H -I. -I. -I./../gc/include -I../gc/include `./get-atomic-ops-flags.sh .. .. --cflags`   -g -Wall -Wextra -Wno-unused-label -fPIC  -c box.c
In file included from box.c:35:
In file included from gauche.h:124:
In file included from ./gauche/float.h:43:
In file included from /usr/include/complex.h:110:
/usr/include/bits/cmathcalls.h:55: error: ';' expected (got "cacos")
make[1]: *** [Makefile:17: box.o] Fehler 1
29
tinyscheme-1.42> cloc .
      15 text files.
       8 unique files.                              
       7 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.04 s (197.4 files/s, 165288.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                2            576            256           4370
C/C++ Header                     4             82             32            568
Scheme                           1             96             78            542
make                             1             20             39             39
-------------------------------------------------------------------------------
SUM:                             8            774            405           5519
-------------------------------------------------------------------------------
30

I can build its own distribution of the library, but TCC errors out with

make[4]: Verzeichnis „/home/fernando/Builds/ecl-lisp/ecl/build/atomic/src“ wird betreten
source='/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c' object='atomic_ops.lo' libtool=yes \
DEPDIR=.deps depmode=tcc /bin/sh /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/depcomp \
/bin/sh ../libtool  --tag=CC   --mode=compile tcc         -fPIC -DHAVE_CONFIG_H   -I../src -I/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src  -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -fPIC -D_THREAD_SAFE  -c -o atomic_ops.lo /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c
libtool: compile:  tcc -fPIC -DHAVE_CONFIG_H -I../src -I/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -g -fPIC -D_THREAD_SAFE -c /home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c -MD -MF .deps/atomic_ops.TPlo  -fPIC -DPIC -o atomic_ops.o
/home/fernando/Builds/ecl-lisp/ecl/src/bdwgc/libatomic_ops/src/atomic_ops.c:104: error: ';' expected (got "AO_locks")
make[4]: *** [Makefile:612: atomic_ops.lo] Fehler 1
31

curses support has been recently made optional. Compile with WITHOUT_CURSES. Currently it requires ncurses, however, we may be able to easily patch it out, see this issue.

32

The set of patches has been upstreamed. A set of patches to disable nana and "complex.h" are needed. They are basic and simple.

33

Could easily be taken out

34

Build system included as part of the source code.

~/Builds/jim-tcl/jimtcl/autosetup> cloc .
      19 text files.
      13 unique files.                              
       6 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.59 s (22.0 files/s, 51834.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1           3959           3192          15358
Bourne Shell                     4            380           1012           4722
Tcl/Tk                           8            169            605           1184
-------------------------------------------------------------------------------
SUM:                            13           4508           4809          21264
-------------------------------------------------------------------------------
35

Chibi has a List of supported modules. It has standard SRFIs and Chibi specific ones.

36

Output from cloc. Cloned from git early may 2022.

cloc . --exclude-dir=benchmarks,build-lib,contrib,data,js,examples,doc,tests,tools
     594 text files.
     561 unique files.                                          
      39 files ignored.

github.com/AlDanial/cloc v 1.92  T=1.00 s (560.0 files/s, 106811.8 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Scheme                          494           8187           7951          58099
C                                46           1806            653          24629
C/C++ Header                     11            540            373           3357
make                              1             86             21            427
CMake                             1            113             65            424
Markdown                          3             48              0            104
YAML                              3              9              0             71
Bourne Again Shell                1              2              2             26
Bourne Shell                      1              1              0              4
--------------------------------------------------------------------------------
SUM:                            561          10792           9065          87141
--------------------------------------------------------------------------------
37

If Chibi is being compiled staticly, it needs the `clibs.c` file (which can be generated via `make clibs.c`). This file translates all the hand-written Scheme libraries to C so that it can be compiled statictly using `chibi-ffi`, which is a handwritten utility. If no library support is needed, then this is not required.

38

Compiled by building first make clibs.c with the local Chibi installation and then compiling with make -B chibi-scheme-static SEXP_USE_DL=0 CFLAGS="-DSEXP_USE_STATIC_LIBS -DSEXP_USE_STATIC_LIBS_NO_INCLUDE=0 -Os -g0". Adding -march=rv32imafd generates a binary of the same size. Executing the static version requires passing the -q flag, for example: CHIBI_IGNORE_SYSTEM_PATH=1 CHIBI_MODULE_PATH=lib ./chibi-scheme-static -q tests/r7rs-tests.scm

39

Chicken maintains a somewhat outdated (as of <2022-05-15 So>) list of supported SRFIs.

40

Output from cloc. Version 5.3.0. It includes the pregenerated C files for the bootstrap. This means that the handwritten Scheme files and their translation to C are counted. This may seem unfair, but the Scheme files are written by humans, and therefore count, and the C transpilation is needed by the compiler.

cloc . --exclude-dir=manual-html,tests,scripts
     244 text files.
     208 unique files.                                          
      41 files ignored.

github.com/AlDanial/cloc v 1.92  T=4.20 s (49.5 files/s, 178924.0 lines/s)
-----------------------------------------------------------------------------------
Language                         files          blank        comment           code
-----------------------------------------------------------------------------------
C                                   90          25984          92662         577108
Scheme                             109           4697           4309          41229
C/C++ Header                         1            472            188           2930
Tcl/Tk                               1            419             60           1446
Bourne Shell                         2              7             32             41
make                                 2              5             29             27
R                                    1              3              0             10
DOS Batch                            1              0              0              2
Windows Resource File                1              1              1              1
-----------------------------------------------------------------------------------
SUM:                               208          31588          97281         622794
-----------------------------------------------------------------------------------
41

Some files need to be generated by a previous version. See the Bootstrapping section from the README.

42

Compiled dynamicly, chicken executable, the csi executable weights 183 KB. In order to cross-compile Chicken, we follow this guide.

43

The documentation entry is quite outdated as of <2022-05-15 So>. However, Gambit has support for a nice number of SRFIs and can use package managers as documented in the link of the previous sentence.

44

Output from cloc. Version 4.9.4. It includes the pregenerated C files for the bootstrap. This means that the handwritten Scheme files and their translation to C are counted. This may seem unfair, but the Scheme files are written by humans, and therefore count, and the C transpilation is needed by the compiler.

cloc . --exclude-dir=bench,bin,contrib,doc,examples,githooks,misc,prebuilt,tests
     739 text files.
     707 unique files.                                          
      51 files ignored.

github.com/AlDanial/cloc v 1.92  T=11.10 s (63.7 files/s, 166709.0 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               69          22583           3802        1464490
Scheme                         484          34913          18820         231427
Bourne Shell                    10           2927           2172          17574
C/C++ Header                    33           3500           1407          15329
Pascal                           2              2          10432           9184
m4                               1            767              0           3063
make                            83            921            123           2984
C++                             11            319            206           1733
Qt                               5              1              0           1608
YAML                             2             56             21            217
Smalltalk                        1             27             25            194
Markdown                         2             48              0             64
JavaScript                       3             21              6             39
Dockerfile                       1              0              0              6
-------------------------------------------------------------------------------
SUM:                           707          66085          37014        1747912
-------------------------------------------------------------------------------
45

See make bootstrap.

46
cloc . --exclude-dir=tmp,tests,doc
      86 text files.
      83 unique files.                              
       5 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.11 s (746.7 files/s, 221577.2 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Scheme                          78           2921           1831          18070
C                                1             60             41           1389
make                             1             41             21            135
Markdown                         1             25              0             69
sed                              1              0              0             18
YAML                             1              2              0              6
-------------------------------------------------------------------------------
SUM:                            83           3049           1893          19687
-------------------------------------------------------------------------------
47

Compiled with make CC=gcc CFLAGS="-Os -static", not stripped.

48
cloc . --exclude-dir=docs,bench  --fullpath --not-match-d="/*prebuilt" --exclude-lang=OCaml,Scala,Haskell,Rust,Idris,JavaScript,Java,Python,Go
     114 text files.
      88 unique files.                              
      37 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.12 s (681.6 files/s, 76586.0 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
Scheme                           44           1028            898           4460
Bourne Shell                     10             71             33            724
C                                 1            136             37            649
Lua                               1             42             24            284
make                             16             35             14            275
Markdown                          2             46              0             95
HTML                              1              0              0             10
JSON                              1              0              0              6
CMake                             1              2              0              4
Bourne Again Shell                1              0              0              2
Ruby                              1              0              0              2
--------------------------------------------------------------------------------
SUM:                             79           1360           1006           6511
--------------------------------------------------------------------------------
49

S7 by default is a small language. However, it does support some of the more important extensions and it could use some external SRFIs to expand its library.

50

Output from cloc. Core implementation is s7.c s7.h. Cloned from git early may 2022.

cloc s7.c s7.h 
       2 text files.
       2 unique files.                              
       0 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.85 s (2.4 files/s, 113773.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1           8990           3625          82605
C/C++ Header                     1            137            584            509
-------------------------------------------------------------------------------
SUM:                             2           9127           4209          83114
-------------------------------------------------------------------------------
cloc *.scm
      23 text files.
      23 unique files.                              
       0 files ignored.

github.com/AlDanial/cloc v 1.92  T=1.14 s (20.2 files/s, 130341.3 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Scheme                          23          12549           5078         131062
-------------------------------------------------------------------------------
SUM:                            23          12549           5078         131062
-------------------------------------------------------------------------------
51

REPL binary compiled with GCC for RISC-V, dynamic linking to LibC.

52

Compiling staticly does not work out of the box. It needs to then run repl libc.scm which generates a libc_s7.c file and tries compiling it to a libc_s7.so file which it then loads. However, in a embedded RISC-V we do not have a working C compiler… Compiling it dynamicly does not seem to work out of the box either. Need to ask the authors.

53

Version 0.3.1

cloc . --exclude-dir=tests,examples
      14 text files.
       8 unique files.                              
       8 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.19 s (41.4 files/s, 97154.8 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                                1           1474           1975          11819
Scheme                           5            272            606           1027
C/C++ Header                     1            124            659            711
make                             1             26              2             89
-------------------------------------------------------------------------------
SUM:                             8           1896           3242          13646
-------------------------------------------------------------------------------
54

Compiled with -Os -g0 -static and stripped.

55

The patch has been upstreamed. Patched out nana and fixed TCC build.

fernando@localhost:~/Builds/Easy-ISLisp/eisl> cloc . --exclude-dir=example,tests,verify,documents,bench,nana-mv
     146 text files.
     138 unique files.                                          
      10 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.17 s (820.2 files/s, 270043.7 lines/s)
---------------------------------------------------------------------------------------
Language                             files          blank        comment           code
---------------------------------------------------------------------------------------
C                                       60           2693           1055          26234
Lisp                                    34           1154            973           7848
C/C++ Header                            33            265             83           3124
Markdown                                 2            122              0            433
HTML                                     1             29              0            311
make                                     3             36             10            304
Windows Module Definition                1              0              1            286
Assembly                                 1              0             12            171
D                                        2              8              2             96
diff                                     1             12             91             84
---------------------------------------------------------------------------------------
SUM:                                   138           4319           2227          38891
---------------------------------------------------------------------------------------
56

Default compile options (-O3 -lto) with -static and stripped.

57
 cloc .
      73 text files.
      70 unique files.                              
      42 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.32 s (218.0 files/s, 134655.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
C                               34           3259           3769          17327
HTML                             3           3949             11           9013
C/C++ Header                    28           1354           1492           2534
make                             2             65             38            225
CSS                              3             34              0            169
-------------------------------------------------------------------------------
SUM:                            70           8661           5310          29268
-------------------------------------------------------------------------------
58

Compiled with CFLAGS="-Os -static -fPIC" and stripped.

59

This includes some modules that could be taken out.

cloc . --exclude-dir=example.api,example.ext,freebsd,examples,sqlite3,tests,tools,jsmn,autosetup
     113 text files.
      86 unique files.                              
      28 files ignored.

github.com/AlDanial/cloc v 1.92  T=0.52 s (165.1 files/s, 102332.6 lines/s)
---------------------------------------------------------------------------------------
Language                             files          blank        comment           code
---------------------------------------------------------------------------------------
C                                       44           3965           5545          26287
HTML                                     1            108              0           9263
Tcl/Tk                                  19            330            554           2321
C++                                      1            443            162           1671
C/C++ Header                            10            233            586            930
Windows Module Definition                1             60              0            570
Bourne Shell                             4             19             54             97
IDL                                      1              0              0             34
YAML                                     2              0              0             28
XML                                      1              0              0             11
make                                     1              8             10             11
m4                                       1              0              0              3
---------------------------------------------------------------------------------------
SUM:                                    86           5166           6911          41226
---------------------------------------------------------------------------------------
60

Compiled with CC=riscv32-buildroot-linux-gnu-gcc CFLAGS="-static -Os -g0" ./configure --utf8 --math --disable-lineedit. It can be made smaller if modules are disabled and if it is stripped.

61

The results are great. And some errors come because of dynamic modules, which will always fail with this system.

root@buildroot:/mnt/jimtcl# LD_LIBRARY_PATH="/mnt/jimtcl:$(LD_LIBRARY_PATH)" ./jimsh "/mnt/jimtcl/tests/runall.tcl"
[...]
=========================================================================
          Totals: Total  5462   Passed  5276  Skipped   176  Failed    11

Date: 2022-04-30 Sa 00:00

Author: Fernando Oleo Blanco

Email: irvise _at_ irvise.xyz

Created: 2023-08-02 Mi 21:27

Emacs 28.2 (Org mode 9.4.6)

Validate