I sat down the other day to re-look through David Thompson guile-bstructs library, as a learning exercise.

I re-learnt a few things I didn't know before. Like how far it's possible to push syntax-rules/case. I've never quite seen anything like it before.

I've said it before, but scheme syntax-rule related stuff isn't the most intuitive thing. Fear of Macros is still the best explanation I've read; but doesn't show off the capability quite like that library does.

#Scheme #Guile #GuileScheme

guile-bstructs โ€” dthompson

@MinervasRefuge Fear of Macros is nice. I went through it on the stream and adapted to guile specifics: https://youtu.be/Ag4movPnGa8?list=PLZmotIJq3yOJzhA0T6Y6EH2gxMfIm5pVQ

Also, take a look at syntax-rules primer: http://www.phyast.pitt.edu/~micheles/syntax-rules.pdf

And Writing Powerful Macros: https://mnieper.github.io/scheme-macros/README.html

#scheme #guile #macros

Lesson 1-3: Transform! | Fear of Macros

YouTube

@abcdw Taa thanks for those links. I've seen the "syntax-rules primer" one previously, though I'll be good to review that too. I don't think I've seen the "writing powerful macros" before.

Also nice, I didn't I didn't realise you'd done a stream on FoM. Totally will check that out tomorrow.

@MinervasRefuge @abcdw I added some worked examples to "writing powerful macros": https://github.com/rogerturner/scheme-macros/tree/main/examples
scheme-macros/examples at main ยท rogerturner/scheme-macros

Scheme Macro Programming. Contribute to rogerturner/scheme-macros development by creating an account on GitHub.

GitHub