|
|
Log in / Subscribe / Register

Replacing AWK with Python in GCC?

Replacing AWK with Python in GCC?

Posted Jul 25, 2018 20:03 UTC (Wed) by rahvin (guest, #16953)
In reply to: Replacing AWK with Python in GCC? by madscientist
Parent article: Replacing AWK with Python in GCC?

Are you volunteering to rewrite the AWK scripts in perl?


to post comments

Replacing AWK with Python in GCC?

Posted Jul 25, 2018 20:07 UTC (Wed) by epa (subscriber, #39769) [Link] (1 responses)

There is an awk to Perl translator. It used to ship as part of the Perl core and is still available.

Replacing AWK with Python in GCC?

Posted Jul 25, 2018 20:49 UTC (Wed) by smurf (subscriber, #17840) [Link]

The a2p translator is likely to create an even greater mess of unreadable code from the current awk scripts.
They are also complex enough that the translated version is unlikely to work at all, given that a2p is essentially unmaintained AFAIK.

WRT old machines without Python >= 2.7: there's always cross compilation.

Replacing AWK with Python in GCC?

Posted Jul 25, 2018 20:37 UTC (Wed) by madscientist (subscriber, #16861) [Link] (1 responses)

What I'm saying is that the complaint in the post I replied to is inappropriate for (at least) this situation. It's perfectly reasonable, and not whining or bikeshedding, to consider and discuss carefully and fully a decision like adding a huge new build dependency.

However, to answer your question, if the choice ends up being either someone comes up with a Perl implementation in which case we'd prefer to use that, or if no one does that then we're going to start requiring Python 3 as a GCC build dependency, then sure, I'd be willing to put in that effort. It does not appear that these are the options on offer, however.

Replacing AWK with Python in GCC?

Posted Jul 25, 2018 21:22 UTC (Wed) by rahvin (guest, #16953) [Link]

Maybe you should make your offer to convert these scripts to perl officially on the list so they can be considered. Mind you, they'd probably also want a commitment from you to maintain them as well.

Commenting on it here is all well and good, but the discussion is moving towards python, at least partly, because no one has come forward and said they'd move the scripts to perl. If you don't make the offer it's not there for consideration.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds