eeide
2017-1-16 15:51:36

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.”


mflatt
2017-1-16 15:57:49

@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.”


eeide
2017-1-16 16:02:59

@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?


mflatt
2017-1-16 16:03:09

Yes


sbelknap
2017-1-16 16:08:49

@sbelknap has joined the channel


eeide
2017-1-16 16:21:08

@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.


mflatt
2017-1-16 16:23:53

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


mflatt
2017-1-16 16:24:10

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


eeide
2017-1-16 16:27:35

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.


fahree
2017-1-16 17:44:12

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


leif
2017-1-16 19:04:29

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


leif
2017-1-16 19:04:46

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


fahree
2017-1-16 19:20:09

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


fahree
2017-1-16 19:26:10

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


leif
2017-1-16 19:32:33

@fahree probably


leif
2017-1-16 19:32:47

@fahree Also, I agree.


leif
2017-1-16 19:32:53

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


leif
2017-1-16 19:32:59

(Kind of behind writing prose at the moment…)


leif
2017-1-16 19:33:11

But yes, I 100% agree with you.


fahree
2017-1-17 03:28:29

@leif I fixed settopmatter.


pocmatos
2017-1-17 07:45:31

@pocmatos has joined the channel