IRC channel logs

2025-09-30.log

back to list of logs

<euouae>Hello
<adamhume>wingo, I recently found that in Guile 3.0.9, (call-with-input-string "foo'bar" read) will return a symbol named #{foo'bar}#
<adamhume>IMO it's a bug, it should return a symbol named 'foo
<mwette>What (document) makes this a bug?
<adamhume>mwette: This violates the Lisp trandition, and also incompatiable with RnRS (n >= 4) standard
<adamhume>n >= 4 because I don't check any standard before it
<adamhume>See https://people.csail.mit.edu/jaffer/r4rs.pdf, the 7.1.1 describe the lexical syntax in BNF
<old>MIT scheme seems to return 'foo
<old>well identifier foo note quote foo
<old>racket also
<mwette>It's not clear to me. R5RS says "Tokens which require implicit termination (identifiers, numbers, characters, and dot) may be terminated by any delimiter, but not necessarily by anything else."
<old>> In addition to the standard read syntax defined above (which is taken from R5RS (see (r5rs)Formal syntax)), Guile provides an extended symbol read syntax
<old>that allows the inclusion of unusual characters such as space characters, newlines and parentheses.
<old>I guess that might be it?
<rlb>(From the above, I'd also want to know how "any delimiter" is defined.)
<mwette>To be pedantic, it seems the character sequence foo'bar is not legal R5RS Scheme.
<mwette>R5RS says delimeter is whitespace | ( | ) | " | ;
<adamhume>old: No, the extended alphabetic characters set doesn't contain the quote
<adamhume>The "extended syntax" is just #{foo'bar}#, in this case it can be interpreted as a symbol named foo'bar
<dpk>the lexical syntaxes of the RnRSes except R6RS are not supposed to be comprehensive
<dpk>whether Guile’s particular extension here is conforming can probably be debated (indeed, is being debated here)