
What should the following R6RS program output? #!r6rs
(import (rnrs))
(write (null? #'()))
plt-r6rs
prints #f
for this program.
The description of syntax objects in R6RS (http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-13.html) leaves me somewhat confused, but there is an example on that page that suggests that (null? #'())
should be true. See the example code after this text: “The following definition of unnamed let
uses bound-identifier=?
to detect duplicate identifiers.”

@eeide #f
is the right answer, because there are no pattern variables in ()
; see the last bullet for “The output produced by syntax is wrapped or unwrapped according to the following rules.”

@mflatt Thanks, I will read this. But a quick follow up: Are you saying that the example code that I mentioned makes sense because unique-ids?
is called on an object that /does/ contain pattern variables?

Yes

@sbelknap has joined the channel

@mflatt FWIW, Chez Scheme 9.4.1 outputs #f
for the above program—but evaluating (null? #’())
at the REPL yields #t
. This appears to be because entering #’()
at the top level yields ()
. I have to say, this is confusing.

@eeide Roughly, R6RS is a compromise between the Racket and Chez positions on #'

So, both Racket and Chez do different things in native mode from R6RS

OB Racket relevance: My questions arise from some code that I am porting from R6RS to Racket. I came across some code like this: (not (null? #'(final …)))
And it seemed that to make this work as intended in Racket, I had to do: (not (null? (syntax->list #’(final …))))
I reported a relevant patch upstream (using syntax->datum
), and this led to some discussion about whether the patch was necessary. From this discussion, I understand that my patch is not necessary for R6RS.

@leif thanks for resolving the conflict with acmsmall — does that mean that acmsmall also is installing things too high in the file hierarchy?

@fahree Yup, its a problem that only happens when two packages make that mistake.

Although I’m still getting build errors for the documentation, going to look into that in a bit.

since acmsmall itself copied lipics, does that mean that lipics is making the same mistake?

@leif: we should probably be using latex-utils where applicable instead of reinventing them at times. https://docs.racket-lang.org/utils/index.html

@fahree probably

@fahree Also, I agree.

Just haven’t had a chance to deal with it that much yet.

(Kind of behind writing prose at the moment…)

But yes, I 100% agree with you.

@leif I fixed settopmatter.

@pocmatos has joined the channel