Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Nikolaos Chatzikonstantinou
On Mon, May 12, 2025 at 11:36 AM Eric Blake wrote: > > On Mon, May 12, 2025 at 10:24:12AM -0500, Eric Blake wrote: > > On Mon, May 12, 2025 at 09:54:54AM -0500, Nikolaos Chatzikonstantinou wrote: > > > > $ echo 'eval(1 || (1/0))' | m4-1.4.20 > > > > 1 > > > > $ echo 'eval(1 || (1/0))' | m4p > > >

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Nikolaos Chatzikonstantinou
On Mon, May 12, 2025, 10:36 AM Eric Blake wrote: > On Mon, May 12, 2025 at 10:24:12AM -0500, Eric Blake wrote: > > On Mon, May 12, 2025 at 09:54:54AM -0500, Nikolaos Chatzikonstantinou > wrote: > > > > $ echo 'eval(1 || (1/0))' | m4-1.4.20 > > > > 1 > > > > $ echo 'eval(1 || (1/0))' | m4p > > > >

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
On Mon, May 12, 2025 at 10:24:12AM -0500, Eric Blake wrote: > On Mon, May 12, 2025 at 09:54:54AM -0500, Nikolaos Chatzikonstantinou wrote: > > > $ echo 'eval(1 || (1/0))' | m4-1.4.20 > > > 1 > > > $ echo 'eval(1 || (1/0))' | m4p > > > m4:stdin:1: divide by zero in eval: 1 || (1/0) > > > 1 > > > > >

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
On Mon, May 12, 2025 at 09:54:54AM -0500, Nikolaos Chatzikonstantinou wrote: > > $ echo 'eval(1 || (1/0))' | m4-1.4.20 > > 1 > > $ echo 'eval(1 || (1/0))' | m4p > > m4:stdin:1: divide by zero in eval: 1 || (1/0) > > 1 > > > > I have a file where I noted some of these here: > https://codeberg.org/a

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Nikolaos Chatzikonstantinou
On Mon, May 12, 2025, 9:16 AM Eric Blake wrote: > [Dropping automake; at this point, m4-discuss is the best place to > discuss how m4p is progressing] > > On Sat, May 10, 2025 at 04:45:26PM -0400, Nikolaos Chatzikonstantinou > wrote: > > > Try this in the source dir (one time only): > > > > > > p

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
On Mon, May 12, 2025 at 09:16:29AM -0500, Eric Blake wrote: > [Dropping automake; at this point, m4-discuss is the best place to > discuss how m4p is progressing] > Another bug you need to fix: $ echo divnum | m4p 1 $ echo m4_divnum | m4p -P $ all of the builtins appear to be broken when -P is i

Re: m4p: an implementation of GNU m4 in Python

2025-05-12 Thread Eric Blake
[Dropping automake; at this point, m4-discuss is the best place to discuss how m4p is progressing] On Sat, May 10, 2025 at 04:45:26PM -0400, Nikolaos Chatzikonstantinou wrote: > > Try this in the source dir (one time only): > > > > python3 -m venv .venv > > source .venv/bin/activate > > pip instal

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Nikolaos Chatzikonstantinou
On Sat, May 10, 2025, 4:43 PM Nikolaos Chatzikonstantinou < nchatz...@gmail.com> wrote: > On Sat, May 10, 2025, 4:35 PM Eric Blake wrote: > >> On Fri, May 09, 2025 at 04:33:44PM -0400, Nikolaos Chatzikonstantinou >> wrote: >> > Hello lists, >> > >> > I rewrote GNU m4 in Python. Long story short,

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Nikolaos Chatzikonstantinou
On Sat, May 10, 2025, 4:35 PM Eric Blake wrote: > On Fri, May 09, 2025 at 04:33:44PM -0400, Nikolaos Chatzikonstantinou > wrote: > > Hello lists, > > > > I rewrote GNU m4 in Python. Long story short, I wanted to learn m4 to > > fix some issues I had with GNU Guile and Autotools, and after > > rea

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Eric Blake
On Fri, May 09, 2025 at 04:33:44PM -0400, Nikolaos Chatzikonstantinou wrote: > Hello lists, > > I rewrote GNU m4 in Python. Long story short, I wanted to learn m4 to > fix some issues I had with GNU Guile and Autotools, and after > realizing m4 1.4 is ~8000 lines of code and reading e.g. >

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Eric Blake
On Fri, May 09, 2025 at 04:33:44PM -0400, Nikolaos Chatzikonstantinou wrote: > Hello lists, > > I rewrote GNU m4 in Python. Long story short, I wanted to learn m4 to > fix some issues I had with GNU Guile and Autotools, and after > realizing m4 1.4 is ~8000 lines of code and reading e.g. >

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Nikolaos Chatzikonstantinou
On Sat, May 10, 2025 at 2:09 PM Eric Blake wrote: > > On Fri, May 09, 2025 at 04:33:44PM -0400, Nikolaos Chatzikonstantinou wrote: > > Hello lists, > > > > I rewrote GNU m4 in Python. Long story short, I wanted to learn m4 to > > fix some issues I had with GNU Guile and Autotools, and after > > re

Re: m4p: an implementation of GNU m4 in Python

2025-05-10 Thread Zack Weinberg
On Fri, May 9, 2025, at 5:45 PM, Nikolaos Chatzikonstantinou wrote: > I rewrote GNU m4 in Python. Long story short, I wanted to learn m4 to > fix some issues I had with GNU Guile and Autotools, and after > realizing m4 1.4 is ~8000 lines of code and reading e.g. >