
of course we’re all on slack

The define-syntax
is special because it acts as a bridge between the scope of “run-time code” and “compile-time values”

Next Friday, 19 July at 12pm–3pm there will be an impromptu Racket meetup at the cafe at the British Library ‘The Last Word’. https://goo.gl/maps/M62e4b9JK7c1oaA69
No agenda. All welcome. Spread the word!
I’ll be drinking tea, eating cake(I hope), and will be easily identified as a the man with racket logo on his laptop. Updates on this thread. updates on #uk

One thing @tov and I worked out is the ability to macro expand yesterday’s typed syntax into regular racket (I found drracket to be unbearably slow (1.8 gig ram!) and error prone…
#lang racket
(require (for-syntax (prefix-in r: racket)
racket/pretty
syntax/parse
"stlc.rkt"))
(define-syntax (dbg/1 stx)
(syntax-parse stx
[(_ e)
(r:#%app pretty-print (r:#%app syntax->datum (r:#%app expand-once #'e)))
#'(void)]))
(define-syntax (dbg stx)
(syntax-parse stx
[(_ e)
(r:#%app pretty-print (r:#%app syntax->datum (r:#%app expand #'e)))
#'(void)]))
(dbg (let ([a 10]) (+ a 1)))
;; outputs:
#;
'(#%app (lambda (a) (#%app +- a '1)) '10)
(dbg/1 (let ([a 10]) (+ a 1)))
;; outputs:
#;
'(erased
((lambda- (a) (erased (#%app- +- a (erased (#%datum- . 1)))))
(erased (#%datum- . 10))))


save into macracket/main.rkt
then raco pkg install ./macracket

That #lang macracket
sounds very similar to #lang agile

¡you’re agile!

Instead of hard-coding a list of modules, I wish it reads the modules from a new variable in info.rkt
(project-wide config), and if it doesn’t exist, read from https://docs.racket-lang.org/drracket/drracket-files.html#%28part._.Preference_.Files%29 (system-wide config), etc.

And probably name it #lang default