Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheme coverage #13

Open
lassik opened this issue Apr 6, 2020 · 3 comments
Open

Scheme coverage #13

lassik opened this issue Apr 6, 2020 · 3 comments

Comments

@lassik
Copy link

lassik commented Apr 6, 2020

Very nice list!

We can supply as much information about Scheme implementations as you want. The question is more about how much is too much :p What level of coverage are you aiming at?

The schemedoc project has (evolving) files on dozens of implementations, with more to come: https://github.com/schemedoc/implementation-metadata

When grouping Scheme implementations, the most immediately useful criterion is which standard it supports. There are active efforts to make libraries more portable, so coding against a standard instead of a particular implementation is getting more practical. R6RS and R7RS are the actively used standards; R7RS is the latest one but R6RS is still perfectly useful and preferred by some.

The other useful criterion is a division between:

  • Native-code compiler (custom, or JVM, CLR, V8, etc.)
  • Compile to native code by generating C code and running it through a C compiler. (This is a common and accepted compilation strategy in the Scheme community - several prominent implementations do it with good results.)
  • Bytecode compiler and interpreter.
  • Tree-walking interpreter only.

Sorting by compiler/interpreter type as above conveniently sorts by size/featurefulness as well.

  • The native-code compiled implementations tend to be the biggest, most full-featured ones and have the most sophisticated optimizers. They generally run fastest but bootstrapping and porting may be more difficult and builds take longer.

  • The bytecode-interpreted ones are "agile" and typically start up very fast - great for scripting or embedding, easy to bootstrap and port while still having enough features to be useful.

  • The tree-walking interpreters are slowest, but extremely simple and small. This means they are very easy to port and the internals are easy to study and modify for custom purposes. They also start up instantly and embedding in C tends to be trivial. They are well suited for "glue code" or idiosyncratic situations in larger systems.

The R6RS standard is monolithic and specifies a reasonably full-featured language. Therefore all R6RS implementations are somewhat big.

R7RS is split into a small language, and a large language extending it with many more features. (The small language is done; the large language is a work in progress.) Therefore R7RS implementations vary in size quite a lot. Chibi-Scheme is 10x smaller than Gauche, for example.

The tree-walking interpreters are so small that they generally do not even aim to fully implement any standard. They tend to be subsets of R5RS or the R7RS small language. Due to its highly orthogonal design, Scheme is well suited for subsetting.

The really fast Scheme implementations are Gambit and Chez Scheme. But even the interpreters can be surprisingly fast and we use them all the time for scripting.

@lassik
Copy link
Author

lassik commented Apr 6, 2020

Here is my humble suggestion for a Scheme C/C++ list, as a starting point for discussion:

C/C++

  • Scheme native-code compilers (R7RS)

    • Chicken
    • Cyclone
    • Digamma (derived from Ypsilon; also R6RS)
    • Gambit
    • Gerbil (runs on Gambit)
    • Larceny (32-bit only; also R6RS)
    • MIT Scheme, aka MIT/GNU Scheme
  • Scheme native-code compilers (R6RS)

    • Chez Scheme
    • Ikarus (from the Chez Scheme tradition)
    • Loko (from the Chez Scheme tradition)
    • Racket
    • Vicare (derived from Ikarus)
  • Scheme native-code compilers (other)

    • Bigloo
  • Scheme bytecode interpreters (R7RS)

    • Chibi-Scheme
    • Gauche
    • GNU Guile (also R6RS)
    • Sagittarius (also R6RS)
    • STKlos
  • Scheme bytecode interpreters (R6RS)

    • Mosh
    • Ypsilon
  • Scheme bytecode interpreters (other)

    • FemtoLisp (almost Scheme)
  • Tree-walking Scheme interpreters

    • Mini-Scheme
    • S7
    • Scheme 9 from Empty Space
    • TinyScheme

@lassik
Copy link
Author

lassik commented Apr 6, 2020

Note: All of the popular Scheme->C compilers also include a separate bytecode interpreter which is used for the REPL and can be used to run scripts.

@dundalek
Copy link
Owner

dundalek commented Apr 6, 2020

Wow, what a great resource! To be honest my initial goal was to cover just mostly non-traditional lisp-like languages because there were already comprehensive lists for CL and Scheme. So for CL/Scheme I picked a few that I felt were the most prominent (it almost matches that each of your group has one representative) and included links to full lists for people interested to go deeper.

Your division based on compilation/interpretation strategy is very useful. Although including all that information in the current Markdown-based format would be too overwhelming I think. But what could work would be to render it as an interactive page where the criteria would be shown perhaps as tags. And it would be great to have an ability to filter implementations based on different criteria.

The repo you linked is a treasure of information! Did you try to present that data as an interactive page? Maybe we could try to combine Scheme implementations from your list and non-scheme from mine to get them all :) Although it would take a big effort to bring the level of metadata of my list to the same level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants