Skip to content

Instantly share code, notes, and snippets.

View weinholt's full-sized avatar
🏳️‍🌈

Gwen Weinholt weinholt

🏳️‍🌈
View GitHub Profile
@weinholt
weinholt / gist:171b53c76cb7b7be11127044bc4aa93a
Last active September 22, 2019 11:42
Build Chez Scheme boot files for arm32le
# Build Chez Scheme boot files from amd64 for armhf (i.e. from a6le for arm32le)
./configure --workarea=crossbuilder
make -C crossbuilder
./workarea arm32le
make -C arm32le/s -f Mf-cross m=a6le xm=arm32le base=$PWD/crossbuilder
# Now copy arm32le/boot/arm32le to ChezScheme/boot/ on the ARM system and build normally
# On a 32-bit ARM machine the build works as usual, but on a 64-bit ARM machine some extra flags are needed:
sudo apt install libncurses5-dev:armhf uuid-dev:armhf libx11-dev:armhf gcc-8-arm-linux-gnueabihf
linux32 ./configure -m=arm32le CC=arm-linux-gnueabihf-gcc-8 LD=arm-linux-gnueabihf-ld AR=arm-linux-gnueabihf-ar CFLAGS='-marm'
@weinholt
weinholt / gensym-decoder.sps
Created August 1, 2018 13:59
What's in a Chez gensym
(import
(rnrs)
(only (chezscheme) gensym pretty-print))
(define (session-key->number key)
(define alphabet "abcdefghijklmnopqrstuvwxyz0123456789")
(define separator #\-)
(define b (string-length alphabet))
(define (char->digit ch)
(let lp ((i 0))