This is a traditional ("small") Scheme implementation. From the R7RS report:
Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today.
[The] Scheme Steering Committee decided in August 2009 to divide the standard into two separate but compatible languages — a “small” language, suitable for educators, researchers, and users of embedded languages, focused on R5RS compatibility, and a “large” language focused on the practical needs of mainstream software development, intended to become a replacement for R6RS. The present report describes the “small” language of that effort: therefore it cannot be considered in isolation as the successor to R6 RS.
> Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.
"A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." - Antoine de Saint-Exupery
I've been writing a picolisp-like lisp interpreter[1] and I have really noticed this too. I added a length built-in just because recursion wasn't working properly, but if I had continued without the important functionality for too long, I would have needed to implement many more functions (and the lisp still would be missing important things).
R7RS-large is a work in progress, and will not have a single "ratification" event. The work has been divided into editions named after colors, which are cumulative. So far the contents of the Red Edition and the Tangerine Edition have been voted on (anyone interested can vote) and are established; the Orange Edition is currently in preparation.
We use the SRFI process to develop specific components of an edition, which means that all components already have implementations before they are voted on, usually portable ones. See r7rs.org for details.
SRFI 1 -- enough functions to make lists useable
SRFI 25 -- multidimensional arrays
SRFI 28 -- format strings
SRFI 30 -- nested multiline comments
SRFI 34 -- exception handling
SRFI 41 -- streams
SRFI 43 -- make vectors usable
SRFI 47 -- add arrays
SRFI 50 -- C FFI
SRFI 57 -- records
SRFI 69 -- hash tables
SRFI 79 -- primitive (low-level) IO calls
SRFI 89 -- optional args and named params
SRFI 111 -- Boxes
SRFI 121 -- Generators
SRFI 169 -- underscores in numbers
SRFI 180 -- JSON (not approved as final version until 2020....)
The convention of using SRFI numbers is very anti-user. Those names are much easier to read and understand. It's very hard to discover stuff.
Let's say I'm not new to programming, but I'm new to scheme and choose the very popular chicken and find myself wanting hash tables. Are they built-in or an egg? Well, searching around the manual gives the following:
The manual has a clear "extensions to the standard" page, but that has a hard assumption that you know what the standard says (you probably don't). If you assume hash tables are in the r5rs spec, you are about to waste a ton of time finding out that they aren't there.
Well great. After that standard dead-end, I've probably run into SRFI somewhere down the line (if not, I'm probably about to google one of these things). Either way, I wind up on the SRFI page.
OK, there are FOUR hash table SRFIs. I'll go with SRFI-69 Basic Hash Tables. Looking back at those lists, srfi-69 is nowhere to be seen. More searching will sooner or later take me to the official Chicken Scheme SRFI-69 egg which thankfully is documented.
Quite an ordeal. Now, if I want records, I'll know to compare that list of SRFI numbers from the extension page with the SRFI list in the SRFI website. That'll show me that I want SRFI-9. One of two things is going to happen at this point. I might find out that the Chicken wiki has an entry for records. If I miss that somehow (why isn't it in the manual?), then I'll have no choice but to read the entire specification document and be either thankful that it's short, and/or upset that I'm stuck with zero examples (unless I find the wiki along the way).
Moving away from that, what about compatibility? It's basically not possible to polyfill C FFI, underscores in numbers, primitive IO, exception handling, optional args, and similar. I don't want to play the "does X library work" game (sometimes switching implementations is unavoidable). These things either need to be required or need to be removed from the SRFI list.
Along those same lines, things like records or arrays also need to be required. Sure, they can technically be polyfilled using lists, but the performance of that will make them basically useless.
I understand the "teaching language" bit, but r7rs is already too complicated for an average student to implement. Likewise, "embedded must be small" doesn't hold weight either. Embedded devs expect to have features stripped out. Saying "generators aren't available on tiny platform X" is much easier than saying that "some desktop variants include generator support; good luck".
This is the primary reason why Common Lisp is seen as "business ready" while Scheme is not. Feature Stability, predictability, and documentation matter.
In theory, R7RS Large will fix the discoverability problem by picking a single blessed SRFI implementation of each kind of library, and giving each one a name like (scheme hash-table), etc. Whenever it's done. And who knows when that will be.
In the meantime, I'm in the process of building my own "alternate prelude" for several R7RS Schemes that chooses the latest SRFI for most of the common features you'd want (strings, hash tables, console text formatting, etc.) and polyfills them for Schemes that don't have them: https://github.com/ar-nelson/schemepunk
Also, the compatibility story in R7RS is better than you'd think. The biggest problem is that a lot of R7RS implementations are incomplete and don't conform to the standard. For the ones that do, it feels similar to JavaScript in the early 2000s: lots of little inconsistencies, but they can be polyfilled over with enough work. Someone just needs to give it the Crockford treatment and isolate the "good parts" that can be shared between implementations.
> In the meantime, I'm in the process of building my own "alternate prelude"
I'm thinking more and more about doing the same. But – there is always a but – I also dislike some other things:
Fix procedure signatures → Why is there 'remove' and 'delete'? Scheme is not statically typed, but strangely enough, this fact in not exploited often. There should be only one word with the meaning "delete" in the programming language.
Fix argument positioning → The order should always be: proc-name, main-object, arguments... Ideally one should be able to guess the name and arguments of a procedure.
Fix procedure names → Some procedure names are too long or have strange names. List procedures should have a list- prefix, only Transducers or generic procedures should have no prefix.
Also maybe stop supporting a :key argument and design everything to use lenses to target sub-structures.
Some handy general purpose procedures are missing here and there, so an improved prelude should come with them, too. I don't want to import multiple string/list/whatever-libraries to handle a task. The nice thing about Scheme is, all of this is doable.
I also feel like it would be useful for Schemes to have a common FFI interface.
Currently AFAICT (I don't know much, so might be wrong...) each Scheme implementation has its own FFI. So even though pure-Scheme R6RS or R7RS libraries are portable across multiple Schemes I don't think any Scheme libs which are wrappers for C libs are (?)
But these C libs are often vital to many projects.
Just look at Python to see how difficult this is. It's hard to specify a FFI which doesn't assume a bunch of things about the implementation of the language. Racket is also having some pain points with this in the move over to the Chez Scheme backend.
Python is different since most people use the same implementation (I realise the whole FFI situation there is currently undergoing an overhaul to better support PyPy)
And https://github.com/ktakashi/r6rs-pffi seems to show that such a thing is possible for Scheme as it supports half a dozen different R6RS Schemes, but (I believe?) it needs library authors to target the PFFI interface rather than the implementation-specific FFI interface of a particular Scheme as most do currently.
So it seems like that shows that a compatibility layer is possible, at least for many of the major Schemes, and it "just" needs standardisation and adoption.
They've been working on r7rs-large for at least 7 years and last I looked had less than 20 SRFI approved. I know they do it on their free time, so no gripes about them. The point is that at the current rate, I'll be retiring before they finish.
r7rs-large also doesn't fix issues where some SRFI must be in the r7rs-small spec to ensure cross-implementation compatibility. They need a r7rs-standard which adds these features over the minimalist r7rs-small while retaining r7rs-large as additional libraries.
I think in general R7RS-large is supposed to be what mainline implementations implement with R7RS-small mainly being for implementations used for embedding scheme as part of a larger application (and even then you might still use large) as well as for experimental/hobbyist implementations.
Particularly if you are just using scheme as a scripting language which mostly calls out to C, it doesn't necessarily make a bunch of sense to include complex features like reflection or weak boxes. Such an implementation might not even have a GC in the first place and just rely on the scheme process ending to release memory back to the OS.
To the Cyclone devs, If you want real-world users make sure you address the glaring documentation issues.
I'd recommend moving the SRFI list to a footnote. Have your own API documentation with examples. Instead of SRFI-69, have an entry for hash tables. Mention at the bottom that you comply with SRFI-69 with a link to the spec, but have your own docs that show how to use those APIs instead. Also make sure you document all the r7rs-small functions and data types too.
I'm getting a 404 error on the example code links from the home page.
Also, how does Windows installation work? I figure most people would prefer a single executable that drops into the REPL and can compile programs rather than an install wizard if at all possible, but I have no idea if that is possible at any point.
I don't think it's entirely a matter of "need". All these implementations are independent projects.
Some of them include their own features on top of the standard. Some of them focus on specific use cases and/or optimize for specific performance characteristics. Some of them are toy projects.
How many C implementations/compilers are there? Even Python (which has a massive and often ill-defined spec) has multiple implementations.
I can compile same source code with pretty much any C compiler. I might be wrong, but the lisp compilers are all "slightly different". I guess scheme ones can be the same? But are they really?
That's fair, until you get into GCC extensions. I guess the difference is that the Scheme "core" is typically smaller and the amount of extensions is typically larger.
See also: Common Lisp, which has a similar problem.
Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary. Scheme demonstrates that a very small number of rules for forming expressions, with no restrictions on how they are composed, suffice to form a practical and efficient programming language that is flexible enough to support most of the major programming paradigms in use today.
[The] Scheme Steering Committee decided in August 2009 to divide the standard into two separate but compatible languages — a “small” language, suitable for educators, researchers, and users of embedded languages, focused on R5RS compatibility, and a “large” language focused on the practical needs of mainstream software development, intended to become a replacement for R6RS. The present report describes the “small” language of that effort: therefore it cannot be considered in isolation as the successor to R6 RS.