Re: Loading to_poly_solve has side-effect ?

serge de marre <[email protected]> Mon, 27 Jul 2026 21:42:23 +0200
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <CAON_BKzVAce5bN5RnFO=Ab6gVj1zh2w_S6+VLRpA9CWXcde0ZQ@mail.gmail.com>
--===============3183078588671500962==
Content-Type: multipart/alternative; boundary="000000000000788e8e06579ceca8"

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

As Richard pointed out, to_poly_solve defines %or as an infix operator,
which is fine.
What's strange to me is that I'm not using %or anywhere in my code, just
%orb(), it looks like parsing gets confused, somehow ?
Very strange.

serge

On Mon, Jul 27, 2026 at 10:03=E2=80=AFAM serge de marre <[email protected]=
> wrote:

> Hello all,
>
> I'm defining a function %orb, and that works fine:
> Maxima branch_5_49_base_597_g673c43be8_dirty https://maxima.sourceforge.i=
o
> using Lisp SBCL 2.6.0
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) %orb(a,b):=3D(a+b);
> (%o1)                         %orb(a, b) :=3D a + b
> (%i2) %orb(23,19);
> (%o2)                                 42
>
> So far everything ok. Now, I need to_poly_solve, so I load it.
> (%i3) load(to_poly_solve);
> (%o3)
> /home/serge/local/share/maxima/branch_5_49_base_597_g673c43be8_dirty/sha\
> re/to_poly_solve/to_poly_solve.mac
> (%i4) %orb(23,19);
> (%o4)                                 42
>
> Everything ok.
> I forget I loaded to_poly_solve, so I load it again (could happen, right =
?
> :))
> (%i5) load(to_poly_solve);
> (%o5)
> /home/serge/local/share/maxima/branch_5_49_base_597_g673c43be8_dirty/sha\
> re/to_poly_solve/to_poly_solve.mac
> (%i6) %orb(23,19);
> incorrect syntax: %or is not a prefix operator
> %orb
>   ^
> I didn't investigate further than finding a "small" reproducing case (if
> loading to_poly_solve can be considered small, of course).
> To make sure it isn't something specific to my setup (maxima version, lis=
p
> version, local startup files), I just tried this on
> https://maxima-on-wasm.pages.dev/ (great project!) and it gives exactly
> the same error.
> Any ideas ?
>
> serge
>
>
>
>

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

<div dir=3D"ltr"><div>As Richard pointed out, to_poly_solve defines %or as =
an infix operator, which is fine.</div><div>What&#39;s strange to me is tha=
t I&#39;m not using %or anywhere in my code, just %orb(), it looks like par=
sing gets confused, somehow ?</div><div>Very strange.</div><div><br></div><=
div>serge</div></div><br><div class=3D"gmail_quote gmail_quote_container"><=
div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jul 27, 2026 at 10:03=E2=80=AF=
AM serge de marre &lt;<a href=3D"mailto:[email protected]">sdemarre@gmail.=
com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"marg=
in:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1e=
x"><div dir=3D"ltr"><div>Hello all,</div><div><br></div><div>I&#39;m defini=
ng a function %orb, and that works fine:</div><div><span style=3D"font-fami=
ly:monospace">Maxima branch_5_49_base_597_g673c43be8_dirty <a href=3D"https=
://maxima.sourceforge.io" target=3D"_blank">https://maxima.sourceforge.io</=
a><br>using Lisp SBCL 2.6.0<br>Distributed under the GNU Public License. Se=
e the file COPYING.<br>Dedicated to the memory of William Schelter.<br>The =
function bug_report() provides bug reporting information.<br>(%i1) %orb(a,b=
):=3D(a+b);<br>(%o1) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 %orb(a, b) :=3D a + b<br>(%i2) %orb(23,19);=
<br>(%o2) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 42</span></div><div><span =
style=3D"font-family:monospace"><br></span></div><div><span style=3D"font-f=
amily:arial,sans-serif">So far everything ok. Now, I need to_poly_solve, so=
 I load it.</span><span style=3D"font-family:monospace"><br>(%i3) load(to_p=
oly_solve);<br>(%o3) /home/serge/local/share/maxima/branch_5_49_base_597_g6=
73c43be8_dirty/sha\<br>re/to_poly_solve/to_poly_solve.mac<br>(%i4) %orb(23,=
19);<br>(%o4) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 42<br></span></div><di=
v><br></div><div>Everything ok.</div><div>I forget I loaded to_poly_solve, =
so I load it again (could happen, right ? :))</div><div><span style=3D"font=
-family:monospace">(%i5) load(to_poly_solve);<br>(%o5) /home/serge/local/sh=
are/maxima/branch_5_49_base_597_g673c43be8_dirty/sha\<br>re/to_poly_solve/t=
o_poly_solve.mac<br>(%i6) %orb(23,19);<br>incorrect syntax: %or is not a pr=
efix operator<br>%orb<br>=C2=A0 ^</span></div><div><span style=3D"font-fami=
ly:arial,sans-serif">I didn&#39;t investigate further than finding a &quot;=
small&quot; reproducing case (if loading to_poly_solve can be considered sm=
all, of course).</span></div><div><span style=3D"font-family:arial,sans-ser=
if">To make sure it isn&#39;t something specific to my setup (maxima versio=
n, lisp version, local startup files),=C2=A0I just tried this on <a href=3D=
"https://maxima-on-wasm.pages.dev/" target=3D"_blank">https://maxima-on-was=
m.pages.dev/</a> (great project!) and it gives exactly the same error.</spa=
n></div><div><span style=3D"font-family:arial,sans-serif">Any ideas ?</span=
></div><div><span style=3D"font-family:arial,sans-serif"><br></span></div><=
div>serge</div><div><span style=3D"font-family:monospace"><br></span></div>=
<div><br></div><div><br></div></div>
</blockquote></div>

--000000000000788e8e06579ceca8--


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


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

_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss

--===============3183078588671500962==--