badkins has quit [Remote host closed the connection]
badkins has joined #racket
random-jellyfish has joined #racket
random-jellyfish has quit [Ping timeout: 260 seconds]
random-jellyfish has joined #racket
<
random-jellyfish>
(syntax-case stx-expr (literal-id ...)
<
random-jellyfish>
clause ...) - what is the use of literal-id ... in syntax-case?
<
winny>
I think it's how one sets up literal names in syntaxes. Such as the `else` in `cond`
<
winny>
rudybot: eval (syntax-case #'(def a <- 1) (<-) [(_ binding <- expr) #'(define binding expr)])
<
rudybot>
winny: ; Value: #<syntax:eval:1:56 (define a 1)>
<
winny>
rudybot: eval (syntax-case #'(def a <<< 1) (<-) [(_ binding <- expr) #'(define binding expr)])
<
rudybot>
winny: error: eval:1:15: def: bad syntax <NEWLINE> in: (def a <<< 1)
<
winny>
rudybot: eval (syntax-case #'(def a <= 1) (<-) [(_ binding <- expr) #'(define binding expr)])
<
rudybot>
winny: error: eval:1:15: def: bad syntax <NEWLINE> in: (def a <= 1)
<
random-jellyfish>
winny: those literal names override whatever they mean in the enclosing context if they mean anything?
<
winny>
Hmm good question. I'm not sure on that
jeosol has joined #racket
<
random-jellyfish>
othewise I don't see the point of listing them there, why not just use them in the pattern?
badkins has quit [Remote host closed the connection]
<
winny>
rudybot: eval (syntax-case #'(def a <- 1) () [(_ binding <- expr) #'(define binding expr)])
<
rudybot>
winny: ; Value: #<syntax:eval:1:54 (define a 1)>
<
winny>
I wonder if that might fail when evaluated
<
winny>
since <- will be a free identifier (I think that's what it's called 🤔)
<
random-jellyfish>
a is unbound if I execute that
<
random-jellyfish>
#lang racket
<
random-jellyfish>
(define-syntax (defa stx) (syntax-case #'(def a <- 1) (<-) [(_ binding <- expr) #'(define binding expr)]))
<
random-jellyfish>
(defa)
<
random-jellyfish>
(print a)
<
random-jellyfish>
jdoodle.rkt:5:7: a: unbound identifier
<
random-jellyfish>
in: a
<
random-jellyfish>
location...:
<
random-jellyfish>
jdoodle.rkt:5:7
random-jellyfish has quit [Quit: Ping timeout (120 seconds)]
random-jellyfish has joined #racket
ur5us has quit [Ping timeout: 252 seconds]
random-jellyfish has quit [Quit: Client closed]
random-jellyfish has joined #racket
ns12 has quit [Read error: Software caused connection abort]
ns12 has joined #racket
random-jellyfish has quit [Quit: Ping timeout (120 seconds)]
random-jellyfish has joined #racket
random-jellyfish has quit [Ping timeout: 260 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 252 seconds]
rekahsoft has joined #racket
random-jellyfish has joined #racket
random-jellyfish has quit [Ping timeout: 260 seconds]
random-jellyfish has joined #racket
random-jellyfish has quit [Ping timeout: 260 seconds]
ormaaj is now known as ormaaj2
random-jellyfish has joined #racket
random-jellyfish has quit [Quit: Client closed]
ormaaj2 has quit [Quit: Reconnecting]
ormaaj2 has joined #racket
ormaaj2 is now known as ormaaj
ttree has quit [Ping timeout: 268 seconds]
rekahsoft has quit [Ping timeout: 260 seconds]
jao has quit [Ping timeout: 252 seconds]
skapata has quit [Read error: Connection reset by peer]
snits has quit [Ping timeout: 248 seconds]
badkins has joined #racket
badkins has quit [Ping timeout: 260 seconds]
codingquark has quit [Quit: No Ping reply in 180 seconds.]
codingquark has joined #racket
jeosol has quit [Quit: Client closed]
jeosol has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 255 seconds]
random-jellyfish has joined #racket
<
random-jellyfish>
Greg Hendershott, if you're in here, I found your tutorial on macros very helpful, thanks!
random-jellyfish has quit [Quit: Client closed]
random-jellyfish has joined #racket
badkins has joined #racket
morte_ has joined #racket
monkey_ has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
morte_ has quit [Read error: Connection reset by peer]
morte_ has joined #racket
monkey_ has quit [Ping timeout: 246 seconds]
random-jellyfish has quit [Quit: Client closed]
badkins has quit [Remote host closed the connection]
badkins has joined #racket
skapata has joined #racket
random-jellyfish has joined #racket
badkins has quit [Remote host closed the connection]
random-jellyfish has quit [Quit: Client closed]
badkins has joined #racket
badkins has quit [Ping timeout: 252 seconds]
gnomon has quit [Ping timeout: 248 seconds]
morte_ has quit [Remote host closed the connection]
gnomon has joined #racket
jeosol has quit [Ping timeout: 260 seconds]
rudybot has quit [Remote host closed the connection]
rudybot has joined #racket
ec_ has quit [Ping timeout: 255 seconds]
ec_ has joined #racket
jao has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 255 seconds]
jeosol has joined #racket
ttree has joined #racket
badkins has joined #racket
terrorjack has quit [Ping timeout: 248 seconds]
terrorjack has joined #racket
badkins has quit [Remote host closed the connection]
badkins has joined #racket
random-jellyfish has joined #racket
random-jellyfish has quit [Ping timeout: 260 seconds]
xgqt has quit [Read error: Connection reset by peer]
wwalker has quit [Remote host closed the connection]
xgqt has joined #racket
ttree has quit [Ping timeout: 260 seconds]
libertyprime has joined #racket
badkins has quit [Remote host closed the connection]
cky has quit [*.net *.split]
ratzkewatzke has quit [*.net *.split]
Oxyd has quit [*.net *.split]
dbohdan has quit [*.net *.split]
koluacik has quit [*.net *.split]
leah2 has quit [*.net *.split]
energizer has quit [*.net *.split]
cky has joined #racket
ratzkewatzke has joined #racket
leah2 has joined #racket
koluacik has joined #racket
energizer has joined #racket
Oxyd has joined #racket
dbohdan has joined #racket
badkins has joined #racket