Hacker News new | ask | show | jobs
by jabl 3680 days ago
To some extent I think the R7RS-large effort is a bit misguided. I believe successful "large languages" (as in, comes with a big "standard library") need a large team of professional programmers to implement it all (professional, in this sense as directed by some organization so that they work on what the organization prioritizes rather than on whatever they fancy), and preferably a single implementation so that all the implementation effort can be concentrated on that one implementation. Successful examples of this approach: Java, .NET.

Scheme is not anything like the above: Plenty of implementations, mostly by pretty small teams.

With ubiquitous internet access, and the rise of open source, I think the better approach for R7RS-large would be to instead standardize a package manager, and then let a thousand flowers bloom. This approach has proved successful, e.g. npm (for node.js), Cargo (Rust), elpa (emacs-lisp), quicklisp (Common LISP).

Then again, I'm not a Scheme "insider", so what do I know. YMMV.

3 comments

I maintain a number of Chicken packages and am a contributor to Geiser.

With standardized libraries in R7RS-small the opportunity has existed for sometime for a community-created package manager to come into existence. There are several in existence, mostly targeting particular schemes, but Snow2 is the closest to what you desire.

Why it hasn't caught on is unquestionably, IMHO, because of the limitations upon the R7RS-small language. Library writers often cannot write for standard R7RS and must ship implementation-specific code. For instance, the R7RS opted not to define a standard FFI of any sort.

Even if your library is internally R7RS compliant it is often the case that it may rely on packages which are not, so deploying to the likes of Snow2 is a matter of porting code you didn't write to every scheme that Snow2 supports.

The best reason I have been given for the decision not to define an FFI is because it would force writers of toy schemes to conform their data structures to the standard. And so in an effort to remain a toy language it has restricted itself to being only a toy language.

Use Chicken, Chez, Gambit, Chibi or Racket. Forget about RnRS.

IMHO, Scheme has two, somewhat conflicting, goals. There's the desire to make it a practical language, with rich libraries (the central package repository is ok, but it'll require quite an infrastructure to implement portable package manager client.)

On the other hand, Scheme has been a toolkit to test out ideas of programming languages since its origin. We still keep call/cc not because we use it for daily application development, but rather because it is invaluable to implement new idea of control abstraction portably. With this goal, we don't want to restrict implementation too much (hence the loose definition of "error"), nor want to raise the hurdle of standard conformance by requiring too many libs.

R7RS small/large split reflects this view, and I think it's a good thing. I also think SRFI process is working. If there ever is a common package manager thing, R7RS-large is a step to it. I've been using Scheme at work for last 20 years; let's see what we have in the next 20 years.

The problem is that there's a baseline minimum of features that need to be standardized to have enough interoperability between implementations for a package manager to actually work, and that minimum is still too big for many die-hard Schemers. Call them "50-page-purists", if you will, but they want the standard to be as small as it can possibly be. They argue that inessential features are better left to the programmer -- the problem is that in reality, those features get implemented by the implementor, often in a different way than another implementor did it. So we wind up with a mess where everybody is R5RS-conformant, but nobody has a modules system compatible with anyone else's.

The R6RS editors tried to remedy this, but wound up causing a schism in the Scheme community which was pretty damaging. The "50-page-purists" have somehow gotten into their heads that the R5RS is the be-all, end-all of Scheme, and that any additions whatsoever are features piled on top of features. Now, with the R7RS, we've not re-united the Scheme community, we've fractured it yet again. There are now three factions (in no particular order): (1) those who think the R7RS sucks because of gratuitous incompatibilities with R6RS; (2) those who think the R7RS sucks because it's got more features than the R5RS; (3) those who like the R7RS.

Personally, I find that a module system and user-defined records are extremely welcome, and a long-time-coming, really, but I fear that the R7RS-small on its own is still too small for something like Snow2 to really take off in an implementation-independent way.

In short, I agree with you. But, it's complicated.

For what it's worth, they did introduce a standard module system. That is the prerequisite to a global standard package repository.

I've been following the effort and voted on ratifying R7RS-small. One of the nice things about the large-small split is that it satisfies all parties, while clarifying the specification. It also means that new implementers can start with a R7RS-small implementation, and immediately gain the power of much of the R7RS-large library in a portable form. This benefit is not to be underestimated for the community we're talking about.

> One of the nice things about the large-small split is that it satisfies all parties, ...

Unfortunately not. R7RS-small introduced some incompatibilities with R6RS that caused some R6RS fans (yes, they exist) to dissent. One was samth, as I recall, but I can't remember the names of any of the other outspoken critics of R7RS. If the mailing lists hadn't disappeared, I'd probably be able to find the threads for you. They made some good points.

Personally, my gripes with the R7RS-small are pretty minor, and overall I think it's good and I welcome it whole-heartedly. The modules and the records were sorely needed for decades. They were slotted for R5RS, but back then the RnRS was ratified by full consensus rather than majority vote, and some people simply refused to compromise. This is why R5RS took almost 10 years when its predecessors only took a handful of years. (In retrospect, I wish they'd made them an appendix in R5RS, like what they did for macros in R4RS, but it's far too late for that now...).

Some 66% of those who voted on R6RS voted "yes" (including me). Some 88% of those who voted on R7RS voted "yes" (including me).
Yup, and neither of those is a full consensus. Iirc, the only person holding out on the record proposal for R5RS was Kent Dybvig, and that was enough to block it. Prior to R6RS, the RnRS was only ratified on full consensus, not almost consensus.

Note that I'm not opposed to the new "80%+ vote in favor" system (I think it's a very good thing), I'm just pointing out the history.