
@ben I think that the recent rackunit changes (https://github.com/racket/rackunit/commit/eceb061e974773a44bb0412df1eee06852e7d683) broke something: http://drdr.racket-lang.org/48609/racket/share/pkgs/rackunit-test/tests/rackunit/check-test.rkt

but the drdr results suggest that it might be something else I don’t understand

thanks for the notice — that test expects (= 1)
to raise an arity error, but it doesn’t anymore (https://github.com/racket/racket/commit/412818949915f6ecbf9a9c31915dcafdf7016762); I’ll update the test

@dan do you want to turn https://github.com/racket/slideshow/pull/4 into a package?

(I’m thinking I want to use it, and so I was thinking about making a package for it myself)

@ben I don’t know if it really belongs in its own package rather than part of pict of slideshow, at one point it looks like it was (is?) part of unstable/gui/pict/plt-logo
(http://docs.racket-lang.org/unstable-gui/pict.html?q=color#%28def._%28%28lib._unstable%2Fgui%2Fpict%2Fplt-logo..rkt%29._make-plt-title-background%29%29) and there’s also a pict exported from Jay’s puresuri package (http://docs.racket-lang.org/puresuri/index.html?q=plt-slide#%28def._%28%28lib._puresuri%2Flib%2Ftitle..rkt%29._plt-title-background%29%29) those are a little less customizable than the version in my pull request though

Ok, the unstable logo probably works for me. (I like the idea of a separate package)

Hopefully quick question about at-exp syntax, functions, and quoting/unquoting: In the following code, the first two lines work, but the third does not: #lang at-exp racket
@(define (foo x) (* 2 (string-length x)))
`(1 "a" #t ,@(foo "2"))
`(1 "a" #t ,@foo{2})

If I understand the docs right, @foo{2}
is the same thing as (foo "2")
, so I would expect the two lines to evaluate identically, to '(1 "a" #t . 2)

Instead, I get “unquote-splicing: contract violation / expected: list? / given: #<procedure:foo>”

(This is excerpted and reduced from a more real-world scenario; obviously this particular code is meaningless…)

Why doesn’t the second line work?

`(1 "a" #t ,@foo{2}) ;; doesn't work
`(1 "a" #t , @foo{2}) ;; ok

I don’t know how lexing and parsing work though..

O_o a space matters here?

well, I have no clue how lexing and read-table interact with each other

from the macro stepper, the former is the same as `(1 "a" #t ,@foo {2})
while the second is `(1 "a" #t ,(foo "2"))

{2}
is just (2)

oooh, well, they actually give slightly different answers — the first ,@(foo "2")
version yields '(1 "a" #t . 2)
, while the spaced version gave me '(1 "a" #t 2)
— note the lack of non-list dot

confused

ohhh I realized that ,@
is unquote splicing

(that is, ,@
is a thing)

oh.

right.

thanks for the reminder :slightly_smiling_face:

@blerner A not-obvious twist in@
notation: if you put ,
after the @
, then it’s effectively moved before the @
. So, you could use @,foo{2}
.

Thanks. Is that documented somewhere that I didn’t notice, or is that just some expertise I haven’t acquired yet?


I saw that part. I didn’t understand any of it, tbh

I think I didn’t understand the phrase “punctuation prefix”; I still had each of backtick, comma, apostrophe in my head as one-key shortcuts for longer primitive names, rather than as a “prefix” of anything.

so many subtleties! thanks for the reference