More Fun and Swearing with Scheme

I have ideas for some little games, which aren’t suitable as giant Electron-powered applications. My preference in language for this would be Objective-C, Scheme, Pascal, C if I absolutely had to. Obj-C’s lack of portability rules it out for now, but if GNUstep gets their crap together it may go back in the running. Scheme looked promising, I’ve liked using Chez Scheme for some data processing.

So after 2 days of experimentation and abuse, and none of my tools working right in the process, I was unable to get thunderchez/sdl2 to link. I can explicitly load the dylib, and it doesn’t find SDL_Init. I wrote a little C program to prove that SDL is reachable, and it is. Chez just won’t load it.

Frustrated, I grabbed Chicken Scheme again, did a chicken-install -sudo sdl2, ran the sample code(!), and bam, it just worked. 15 minutes of effort at most, and I’m up and running.

Down side, Chicken compiles slow, and the interpreter is PAINFULLY slow; Chez “interprets” by compiling fast with low optimizations. And Chicken defaults to R5RS which is… 1990 called and wants me to watch MIT SICP lectures on VHS. It has some R7RS support, but I prefer the guarantees of portability, safety, and specified behavior in R6RS. Have to go looking thru SRFI docs to find any feature, it’s not batteries-included. Oh well, I’ll probably live just fine without ideological purity.

2 thoughts on “More Fun and Swearing with Scheme”

    1. Yes, but as previously noted in my Scheme adventures, I hate Racket’s “REPL” that discards your data, and it has problems launching on Mojave.

Comments are closed.