- My Scheme Stuff:
- Category: Scheme: My blog posts on Scheme.
- scheme-test-unit: My unit test runner for SRFI-64.
- Basic Games in Scheme: Classic BASIC games & demos rebuilt in Scheme.
- A Schemer in Common Lisp Land: Notes/comparison to Common Lisp.
- Information:
- Scheme Wiki: Everything you wanted to know about Scheme, maintained by the community.
- SRFI archive: All of the standard libraries.
- SRFI-Thunderchez: Collected volume of all SRFIs used in Thunderchez
- IRC: #scheme on libera.chat
- Planet Scheme
- Scheme Modules Example
- Every Scheme impl has a totally incompatible way to organize programs and load modules. So I've been reworking the same trivial example for each of them.
- Chez
- Chibi
- Chicken
- Gambit
- Gauche (Gosh)
- MIT Scheme
- Racket
- Books:
- The Scheme Programming Language: Excellent tutorial book for programmers, uses Chez Scheme or any R6RS
- SICP: Structure and Interpretation of Computer Programs
- SICP Lectures: Highly recommend watching these, then doing the book chapter which will be more current but less lively.
- Implementations (That I Use):
- Chez Scheme: One of the fastest Schemes, requires a runtime blob, very limited libraries, fantastic REPL with inline editing, R6RS version.
- Chicken Scheme: Fairly slow compiler & interpreter, compiles to adequately fast native binaries, enormous library selection, shitty low-tech REPL, R5RS/R7RS hybrid.
- Gambit Scheme: Old, currently maintained, very fast, R7RS with some quirks. Good support for native FFI.
- Gerbil Scheme: Reasonably fast, compiles to fast native binaries, limited library selection, adequate REPL, R7RS + new object model.
- Gauche: Runs OK, but on every platform, and good library selection including GUIs. My go-to for scripting across different machines.
- (many many more are listed on the Scheme Wiki)
- Libraries:
- Thunderchez: Essential libraries for Chez Scheme
- Akku: General library/package manager
- Snow Fort: R7RS

Comments are closed.
Mentions
up to Scheme
SRFI (Scheme Request For Implementation) is how libraries and new features are added to Scheme, much like the PEP system for Python.
I've repeatedly run into places where I need some tool, can't find it, and write my own… and then find out there's a perfectly good SRFI or three that do the same thing. So I'm doing a review and sample code for every one, in pseudo-random order, posted irregularly.
worker.rkt
#lang racket(provide
make-worker
)
(define (make-worker n)
(lambda () (set! n (+ n 1)) n) )
main.rkt
#!/usr/bin/env racket -t-#lang racket
(require
scheme
"worker.rkt"
)
(provide main)
(define (print* . args)
(for-each display args)
(newline) )
(define (main argv)
(let ( (w (make-worker 0)) )
(print* "worker: " (w))
(print* "worker: " (w))
(print* "worker: " (w)) ) )
(main (current-command-line-arguments))
build.sh
#!/bin/sh
raco exe main.rkt
run as script
% ./main.rkt
build & run as binary
% ./build.sh
% ./main
Up to Scheme
worker.scm
(define (make-worker n)
(lambda () (set! n (+ n 1)) n) )
main.scm
;; no shebang line.(load "worker.scm") ;; no module system
(define (print . args)
(for-each display args)
(newline) )
(define (main argv)
(let ( (w (make-worker 0)) )
(print "worker: " (w))
(print "worker: " (w))
(print "worker: " (w)) ) )
(main (command-line-arguments))
(%exit 0) ;; drops into repl otherwise
main.sh
#!/bin/sh
DISPLAY= mit-scheme --quiet --load main.scm
run as script
% ./main.sh
build & run as binary
Not possible.
Up to Scheme
worker.scm
(define-module worker(export make-worker)
(select-module worker) ;; separates header from function declarations
(define (make-worker n)
(lambda () (set! n (+ n 1)) n) )
) ;; end module worker
main.scm
#!/usr/bin/env gosh -I.(use worker)
(define (main argv) ;; automatically called as script
;; args are (cdr argv)
(let ( (w (make-worker 0)) )
(print "worker: " (w))
(print "worker: " (w))
(print "worker: " (w)) ) )
run as script
% ./main.scm
Up to Scheme
worker.scm
(declare (unit worker)) ;; required for static build, remove in dynamic build(module worker
(make-worker)
(import scheme)
(define (make-worker n)
(lambda () (set! n (+ n 1)) n) )
) ;; end module worker
main.scm
#!/usr/bin/env csi -s(import scheme
(chicken load)
(chicken process-context)
)
;; repeat for each library
(cond-expand
(compiling (declare (uses worker))) ;; required for static build, remove for dynamic build
(else (load-relative "worker.scm")) )
(import worker)
(define (main argv)
(let ( (w (make-worker 0)) )
(print "worker: " (w))
(print "worker: " (w))
(print "worker: " (w)) ) )
(main (command-line-arguments)) ;; csi -ss will call main, but no such convenience exists in csc
build.sh
#!/bin/shbuildtype=$1
if [[ $buildtype == static ]]; then
csc -c -j worker worker.scm -o worker.o || exit $?
csc -c main.scm -o main.o || exit $?
csc main.o worker.o -o main || exit $? # add -static for a binary with no Chicken dependencies
elif [[ $buildtype == dynamic ]]; then
csc -j worker worker.scm -o worker.so || exit $?
csc main.scm -o main || exit $?
else
echo "Usage: ./build.sh [dynamic|static]"
exit 1
fi
rm -f *.o *.import.scm *.link
run as script
% ./main.scm
build & run as binary
% ./build.sh static
% ./main
Up to Scheme
worker.sld
(define-library (worker)
(export make-worker)
(import (scheme base))
(include "worker.scm")
) ;; end library worker
worker.scm
(define (make-worker n)
(lambda () (set! n (+ n 1)) n) )
main.scm
#!/usr/bin/env chibi-scheme(import (scheme base)
(scheme write)
(scheme process-context)
(worker)
)
(define (print . args)
(for-each display args)
(newline) )
(define (main argv)
(print argv)
(let ( (w (make-worker 0)) )
(print "worker: " (w))
(print "worker: " (w))
(print "worker: " (w)) ) )
(main (cdr (command-line))) ;; or remove this line, add -r to shebang line
run as script
% ./main.scm
Up to Scheme
(puns about "scheme" names are mandatory)
Neat: New version 4.9.4 of Gambit Scheme is out and they have a web site again after like 3 years.
OK: So I start adapting my little module/how do you run example: here
Bad: Not only does the R7 library system not work, their version of this hello example
will load code from fucking github at runtime! NPM viruses & sabotage are baked into the system. See Modules in Gambit at 30
SIGH.
Share this:PrintEmailTwitterMoreTumblrRedditWhatsAppTelegramSkypeLinkedInLike this:Like Loading...
Apple App Store wiping historical apps
Note, currently all my old apps like Perilar, DungeonDice, etc. are off the store. They all still work. Apple wants me to pay $100 extortion, recompile a bunch of old code that maybe takes minutes, maybe hours or days of catching up to "modern" APIs, before I can resubmit.
And once they start requiring Monterey instead of Big Sur, I have to buy new hardware to even do that, my iMac just misses the deadline for support (but they still give me a notification a couple times a month to "upgrade" to Monterey, so smart & classy).
And my reaction these days is basically "fuck you, App Store". I could pay them nothing, and spend that effort on my Mystic Dungeon Club Javascript games, or my Scheme games (shipping real soon now!), and then I'm the only one who can disappoint me. Most of my JS stuff works on an iPad just fine; I'm not really inclined to try resizing for iPhone or Android, but in theory they'd work, too.
My little Glitch.app, full of mostly-not-allowed tools which I don't distribute but sideload, doesn't currently run, and I think I can get it to reload on the free account. If not, I guess I don't glitch. I could probably rewrite a lot of it in Pythonista, assuming that survives the App Store-pocalypse.
I have no problem with Apple's 30% cut, 15% would be better but hey, whatever. It was a nice storefront for a few years there, anything less than the 50% cut retail takes was warranted.
But every other part of the App Store policy is so noxious, all that's left are shovelware predatory gacha games from China, "social" (masturbatory pictures of yourself) network garbage, and AAA studio teaser games, but not the real games. And now they're just gonna make it impossible to get anything from the good era.
I literally use my iPhone now as a, uh, phone. It's almost back to the 2007 release set of Apple apps, because nothing else is any better. The iPad has several more useful tools, and I worry that they'll be removed by this policy.
Android fanatics, note that you are not helpful:
Share this:PrintEmailMoreTumblrFacebookRedditTwitterWhatsAppTelegramPocketPinterestSkypeLinkedInLike this:Like Loading...