Re: Quoted symbols in R7RS mode don't work

Shiro Kawai <[email protected]> Sat, 25 Apr 2026 09:22:07 -1000
Newsgroups gmane.lisp.scheme.gauche
Message-ID <CALN0JNF_TU-PR47R50DBqHDgtxCAKpYtJ9eMJddA+wDE9tz7Mw@mail.gmail.com>
--===============5528127017950199743==
Content-Type: multipart/alternative; boundary="000000000000bf12f606504dcc39"

--000000000000bf12f606504dcc39
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Tracking at https://github.com/shirok/Gauche/issues/1260

On Sat, Apr 25, 2026 at 9:15=E2=80=AFAM Shiro Kawai <[email protected]>=
 wrote:

> That's because you started REPL with Gauche native namespace, where
> traditional Gauche libraries are available by default, and then switched =
to
> a namespace where only (srfi 1) is imported.
>
> Starting gosh with -r7 option gives you R7RS REPL.
>
> $ gosh -r7
> gosh[r7rs.user]$ 'foo
> foo
>
> But I see users expecting R7RS REPL are easily confused with the
> behavior.  I can notice the users when the user switched from Gauche mode
> to R7RS mode first time on REPL.
>
> Cf. See "Using R7RS REPL" and "Switching from Gauche REPL" sections below=
.
>
>
> https://practical-scheme.net/gauche/man/gauche-refe/R7RS-integration.html=
#R7RS-integration
>
> On Sat, Apr 25, 2026 at 9:00=E2=80=AFAM John Cowan <[email protected]> wrote=
:
>
>> So it turns out this is because when you start R7RS mode, (scheme
>> base) is not auto-imported, which vioates R7RS section 5.7:
>>
>>  For convenience and ease of use, the global Scheme environment in a
>> REPL must not be empty, but must start out with at least the bindings
>> provided by the base library
>>
>> On Sat, Apr 25, 2026 at 2:44=E2=80=AFPM John Cowan <[email protected]> wrot=
e:
>> >
>> > johnwcowan@skunk:~/Documents/mung$ gosh -V
>> > Gauche scheme shell, version 0.9.15-p2
>> > [utf-8,pthreads,snapshot=3D20241205], x86_64-pc-linux-gnu
>> > (version "0.9.15-p2")
>> > (command "gosh")
>> > (scheme.id gauche)
>> > (languages scheme r5rs r7rs)
>> > (encodings utf-8)
>> > (website "https://practical-scheme.net/gauche")
>> > (build.platform "x86_64-pc-linux-gnu")
>> > (build.configure)
>> > (build.gosh-version "0.9.15-p2")
>> > (scheme.path "/usr/share/gauche-0.98/site/lib"
>> > "/usr/share/gauche-0.98/0.9.15-p2/lib")
>> > (threads pthreads)
>> > (gauche.net.tls mbedtls)
>> >
>> > johnwcowan@skunk:~/Documents/mung$ gosh
>> > gosh$ 'foo
>> > foo
>> > gosh$ (import (srfi 1))
>> > gosh[r7rs.user]$ 'foo
>> > *** UNBOUND-VARIABLE-ERROR: unbound variable: foo
>> > Stack Trace:
>> > _______________________________________
>> >   0  (report-error e)
>> >   1  (eval expr env)
>> >         at
>> "/usr/share/gauche-0.98/0.9.15-p2/lib/gauche/interactive.scm":405
>> >   2  (evaluator exp (vm-current-module))
>> >   3  (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ...
>>
>>
>> _______________________________________________
>> Gauche-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/gauche-devel
>>
>

--000000000000bf12f606504dcc39
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:large">Tra=
cking at=C2=A0<a href=3D"https://github.com/shirok/Gauche/issues/1260">http=
s://github.com/shirok/Gauche/issues/1260</a></div></div><br><div class=3D"g=
mail_quote gmail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On =
Sat, Apr 25, 2026 at 9:15=E2=80=AFAM Shiro Kawai &lt;<a href=3D"mailto:shir=
[email protected]">[email protected]</a>&gt; wrote:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmai=
l_default" style=3D"font-size:large">That&#39;s because you started REPL wi=
th Gauche native namespace, where traditional Gauche libraries are availabl=
e by default, and then switched to a namespace where only (srfi 1) is impor=
ted.<br><br>Starting gosh with -r7 option gives you R7RS REPL.<br><br>$ gos=
h -r7<br>gosh[r7rs.user]$ &#39;foo<br>foo<br><br>But I see users expecting =
R7RS REPL are easily confused with the behavior.=C2=A0 I can notice the use=
rs when the user switched from Gauche mode to R7RS mode first time on REPL.=
</div><div class=3D"gmail_default" style=3D"font-size:large"><br>Cf. See &q=
uot;Using R7RS REPL&quot; and &quot;Switching from Gauche REPL&quot; sectio=
ns below.</div><div class=3D"gmail_default" style=3D"font-size:large"><br><=
a href=3D"https://practical-scheme.net/gauche/man/gauche-refe/R7RS-integrat=
ion.html#R7RS-integration" target=3D"_blank">https://practical-scheme.net/g=
auche/man/gauche-refe/R7RS-integration.html#R7RS-integration</a></div></div=
><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sa=
t, Apr 25, 2026 at 9:00=E2=80=AFAM John Cowan &lt;<a href=3D"mailto:cowan@c=
cil.org" target=3D"_blank">[email protected]</a>&gt; wrote:<br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex">So it turns out this is because wh=
en you start R7RS mode, (scheme<br>
base) is not auto-imported, which vioates R7RS section 5.7:<br>
<br>
=C2=A0For convenience and ease of use, the global Scheme environment in a<b=
r>
REPL must not be empty, but must start out with at least the bindings<br>
provided by the base library<br>
<br>
On Sat, Apr 25, 2026 at 2:44=E2=80=AFPM John Cowan &lt;<a href=3D"mailto:co=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; johnwcowan@skunk:~/Documents/mung$ gosh -V<br>
&gt; Gauche scheme shell, version 0.9.15-p2<br>
&gt; [utf-8,pthreads,snapshot=3D20241205], x86_64-pc-linux-gnu<br>
&gt; (version &quot;0.9.15-p2&quot;)<br>
&gt; (command &quot;gosh&quot;)<br>
&gt; (<a href=3D"http://scheme.id" rel=3D"noreferrer" target=3D"_blank">sch=
eme.id</a> gauche)<br>
&gt; (languages scheme r5rs r7rs)<br>
&gt; (encodings utf-8)<br>
&gt; (website &quot;<a href=3D"https://practical-scheme.net/gauche" rel=3D"=
noreferrer" target=3D"_blank">https://practical-scheme.net/gauche</a>&quot;=
)<br>
&gt; (build.platform &quot;x86_64-pc-linux-gnu&quot;)<br>
&gt; (build.configure)<br>
&gt; (build.gosh-version &quot;0.9.15-p2&quot;)<br>
&gt; (scheme.path &quot;/usr/share/gauche-0.98/site/lib&quot;<br>
&gt; &quot;/usr/share/gauche-0.98/0.9.15-p2/lib&quot;)<br>
&gt; (threads pthreads)<br>
&gt; (gauche.net.tls mbedtls)<br>
&gt;<br>
&gt; johnwcowan@skunk:~/Documents/mung$ gosh<br>
&gt; gosh$ &#39;foo<br>
&gt; foo<br>
&gt; gosh$ (import (srfi 1))<br>
&gt; gosh[r7rs.user]$ &#39;foo<br>
&gt; *** UNBOUND-VARIABLE-ERROR: unbound variable: foo<br>
&gt; Stack Trace:<br>
&gt; _______________________________________<br>
&gt;=C2=A0 =C2=A00=C2=A0 (report-error e)<br>
&gt;=C2=A0 =C2=A01=C2=A0 (eval expr env)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0at &quot;/usr/share/gauche-0.98/0.9.1=
5-p2/lib/gauche/interactive.scm&quot;:405<br>
&gt;=C2=A0 =C2=A02=C2=A0 (evaluator exp (vm-current-module))<br>
&gt;=C2=A0 =C2=A03=C2=A0 (with-error-handler (^e (report-error e) #t) (^ ()=
 (let loop2 ...<br>
<br>
<br>
_______________________________________________<br>
Gauche-devel mailing list<br>
<a href=3D"mailto:[email protected]" target=3D"_blank">Gau=
[email protected]</a><br>
<a href=3D"https://lists.sourceforge.net/lists/listinfo/gauche-devel" rel=
=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listi=
nfo/gauche-devel</a><br>
</blockquote></div>
</blockquote></div>

--000000000000bf12f606504dcc39--


--===============5528127017950199743==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5528127017950199743==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Gauche-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gauche-devel

--===============5528127017950199743==--