<countvajhula>
(blah (abc 5)) ;=> blah: bad syntax
<countvajhula>
i haven't used a syntax class taking an argument before. not sure if that colon syntax is still valid? It didn't seem to complain about that though
<countvajhula>
for reference, here's the code defining the syntax class:
<countvajhula>
aha, I found this in Ryan's paper on Fortifying Macros: "The colon notation
<countvajhula>
is a shorthand for parameterless syntax classes; e.g., x:identifier is short for (˜var
<countvajhula>
required."
<countvajhula>
x (identifier)). When the syntax class takes parameters, the explicit ˜var notation is
<countvajhula>
aaannd that did it! :)
<countvajhula>
(define-syntax-parser blah
<countvajhula>
[(_ ((~var i (starts-with "abc")) expr ...)) #''hi])
<countvajhula>
;=> 'hi
<countvajhula>
(blah (abcd 5))
TCZ has quit [Read error: Connection reset by peer]
TCZ has joined #racket
<samth>
Yay
codingquark has quit [Read error: Connection reset by peer]
capfredf has joined #racket
schulze has quit [Ping timeout: 260 seconds]
Guest64873 has joined #racket
Guest64873 has left #racket [#racket]
capfredf has quit [Ping timeout: 250 seconds]
badkins has quit [Remote host closed the connection]
TCZ has quit [Quit: Leaving]
ur5us has joined #racket
countvajhula has quit [Read error: Connection reset by peer]
libertyprime has joined #racket
codingquark has joined #racket
aliasless has quit [Ping timeout: 240 seconds]
libertyprime has quit [Ping timeout: 256 seconds]
xgqtd has quit [Quit: WeeChat 3.3]
xgqt has joined #racket
sts-q has joined #racket
libertyprime has joined #racket
tyson2 has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 252 seconds]
aliasless has joined #racket
Vaelatern has quit [Ping timeout: 252 seconds]
capfredf has joined #racket
capfredf has quit [Ping timeout: 252 seconds]
notzmv has quit [Ping timeout: 240 seconds]
Vaelatern has joined #racket
Vaelatern has quit [Changing host]
Vaelatern has joined #racket
Algernon69 has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 252 seconds]
skapata has joined #racket
skapata has joined #racket
skapata has quit [Changing host]
gproto23 has joined #racket
notzmv has joined #racket
schulze has joined #racket
badkins has joined #racket
badkins has quit [Ping timeout: 256 seconds]
libertyprime has quit [Ping timeout: 252 seconds]
Avichi has joined #racket
libertyprime has joined #racket
capfredf has joined #racket
capfredf has quit [Ping timeout: 250 seconds]
libertyprime has quit [Quit: leaving]
<jakzale>
does racket provide assertions? I saw that typed/racket/base provides assert, but I didn't find any in racket/base. Is using assertions in racket discouraged?
<bremner>
jakzale: it's more typical to use contracts or unit tests, depending on your goals
<bremner>
contracts are like assertions on steroids, I guess.
<jakzale>
bremner: thanks
schulze has quit [Quit: nyaa~]
schulze has joined #racket
tyson2 has joined #racket
gproto23 has quit [Read error: Connection reset by peer]
badkins has joined #racket
capfredf has joined #racket
badkins has quit [Ping timeout: 268 seconds]
capfredf has quit [Ping timeout: 260 seconds]
badkins has joined #racket
badkins has quit [Remote host closed the connection]