I just found āBringing together language workbenches and macro systemsā presentation by @michaelballantyne to the Strumenta Community*
Iāve only just started, but Michael begins with a cracking example with five languages in 9 lines of #lang rash! (Iām not sure what a metalanguage is?)
(* a community for persons interested in Language Engineering. We discuss Domain-Specific Languages (DSLs), parsers, compilers, interpreters, editors, transpilers, code processing techniques. - https://strumenta.community/ )
I think Greg Cooper's talk at LL2 (2002?) had the coolest Racket-related demo I've seen. It was one of the first demos that I saw that showed off the power and flexibility of DrRacket. You could hear a hundred people's assumptions shattering at the same time. It wasn't recorded, but I'll try to relay a little bit of the magic to you. Open DrRacket and change the language to FrTime. (It isn't enough to use #lang frtime; you must select FrTime from the language menu; it's under "Other languages" in the Experimental section.) Then paste the following program into DrRacket and run it.
(require (lifted pict
circle disk colorize text
refocus pin-over inset cc-superimpose))
;; clock : Integer -> Pict
(define (clock s)
(define RADIUS 100)
(define DETAIL 40)
(define base (colorize (disk (* 2 RADIUS)) "lightgray"))
(define (fraction->clock-radians x) (* 2 pi (- x 1/4)))
(define (2digit n) (if (< n 10) (format "0~s" n) (format "~s" n)))
(define (center p) (let ([b (blank)]) (refocus (cc-superimpose p b) b)))
(define s-rad (fraction->clock-radians (/ s 60)))
(define m-rad (fraction->clock-radians (/ s 60 60)))
(define h-rad (fraction->clock-radians (/ s 60 60 12)))
(define s-disk (center (colorize (disk (* DETAIL 1/4)) "red")))
(define m-disk (center (colorize (disk (* DETAIL 1/2)) "blue")))
(define h-disk (center (colorize (disk (* DETAIL 1)) "purple")))
(define (add base radius rad p)
(pin-over base
(+ RADIUS (* radius (cos rad)))
(+ RADIUS (* radius (sin rad)))
p))
(define analog
(let* ([base (add base (* RADIUS 3/5) h-rad h-disk)]
[base (add base (* RADIUS 3/4) m-rad m-disk)]
[base (add base (* RADIUS 1) s-rad s-disk)])
base))
(define digital-s
(format "~a:~a:~a"
(2digit (modulo (quotient s (* 60 60)) 24))
(2digit (modulo (quotient s 60) 60))
(2digit (modulo s 60))))
(define digital (center (text digital-s)))
(inset (cc-superimpose analog digital) (* RADIUS 1/10)))
seconds
(clock seconds)
(let ([start (value-now seconds)])
(format "You have been watching this program run for ~s seconds."
(- seconds start)))
(Then check out Greg's real demos in the frtime package.)
The version of this demo where the result of current-seconds changed every second got a spontaneous ovation in the middle of the talk at the 2003 Scheme Workshop.
Aha, I was mistaken, my memory was from LL3, the day after Scheme Workshop 2003, and he talked at both. My fuzzy recollection is that the Scheme audience was impressed but the LL3 audience was astonished. And apparently LL3 was recorded (at 320x240!) but the links to the recordings are now broken.