Announcement

Collapse
No announcement yet.

A Proposal To Allow Python Scripting Within The GCC Compiler, Replacing AWK

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #11
    Originally posted by gens View Post

    That is a completely baseless statement.

    "
    Awk (there's a good video on YouTube about it's development) was pretty cool way back at the start of computer history, doing great things on 16K UNIX machines....but that was a long time ago and we've certainly moved on.
    "

    This is completely fallacious way of thinking about things.
    Nice going...going on the attack with no substance. Troll much?

    Python (without any extra modules), has file management facilities built-in, has error handling and it has good documentation. A very well rounded system management environment. And of course it has regular expressions, which would be the significant part with respect to replacing AWK.

    Memory resources are pretty much the least of the problems that large scale projects have...It's much more likely that they have limited developer resources.

    Comment


    • #12
      Originally posted by gens View Post

      That is a completely baseless statement.

      "
      Awk (there's a good video on YouTube about it's development) was pretty cool way back at the start of computer history, doing great things on 16K UNIX machines....but that was a long time ago and we've certainly moved on.
      "

      This is completely fallacious way of thinking about things.
      Nice going...going on the attack with no substance. Troll much?

      Python (without extra modules), has file management facilities built-in, has error handling and it has good documentation. A very well rounded system management environment. And of course it has regular expressions, which would be the significant part with respect to replacing AWK.

      Memory resources are pretty much the least of the problems that large scale projects have...It's much more likely that they have limited developer resources.

      Comment


      • #13
        Originally posted by cbxbiker61 View Post

        Nice going...going on the attack with no substance. Troll much?

        Python (without any extra modules), has file management facilities built-in, has error handling and it has good documentation. A very well rounded system management environment. And of course it has regular expressions, which would be the significant part with respect to replacing AWK.

        Memory resources are pretty much the least of the problems that large scale projects have...It's much more likely that they have limited developer resources.
        And "python is a natural fit" is "substance" ?
        I don't even know what they were using awk for. Based on how you talk about it, i don't think you know either.
        That said, awk is good at what it does. Python, on the other hand, is a generic scripting language. A generic object oriented scripting language, to be precise. Awk is specifically designed for text processing (and data extraction/formatting).

        That said, i don't have to provide "substance" at all. Especially not to your "substance-less" post.

        "Memory resources are pretty much the least of the problems that large scale projects have...It's much more likely that they have limited developer resources."
        That is beside the point, and fallacious reasoning. Even more so that "limited developer resources" is a point for awk, as it is much easier to learn and use effectively (in the domain it is used in).

        Attack ? I wasn't attacking you, but your logic. And your logic is very much flawed in practically any objective way.
        "Hur dur, you just are attacking me 'cuz, hur dur, you is an asshole or something" Grow up. Nobody but your mother will tolerate you when you are being childish.
        Last edited by gens; 17 July 2018, 01:21 PM.

        Comment


        • #14
          I took a look at the awk scripts in the GCC sources. It's been a while, I used to know them quite well, and some of them have grown a little crufty just like my old hound dog and I have and if you're lucky you will too. They're mostly just a lot of regex pattern matches and print lines, exactly what you'd need for text preprocessing based on configuration values.

          There's no doubt the scripts could be rewritten in Python 3. Or Guile. Or Rust. Or turned into Go mini-OS binaries and run in Docker containers. After all, memory and CPU are cheap and it would eliminate all the old bugs and the new code would all be self-documenting.

          If I were to code those scripts from scratch, I would choose to use awk because it's very small, very fast, and designed to do exactly what those scripts do. Then again, I didn't grow up using Microsoft Windows so I don't have the mindset that one big monolithic tool to do everything is the best way to go. If I have to use pip and virtualenv to build my toolchain from SVN, I'm switching to LLVM. Oh, wait, the cmake morass, never mind.

          Comment


          • #15
            Originally posted by bregma View Post
            If I were to code those scripts from scratch, I would choose to use awk because it's very small, very fast, and designed to do exactly what those scripts do.
            Something to consider is how the AWK scripts are integrated into the whole. Of course the awk scripts are limited in their scope...awk by itself can only do what it's designed do. Python could be used in a much more expansive way that incorporates the regex handling into a larger more cohesive whole.

            The bottom line in all of this is, will a change allow the programmers to produce a better compiler faster? An answer to that question is all that's required. It may be that more and younger programmers will take up the call, if they don't have to grok older and more esoteric tools.

            Comment


            • #16
              Originally posted by cbxbiker61 View Post

              Something to consider is how the AWK scripts are integrated into the whole. Of course the awk scripts are limited in their scope...awk by itself can only do what it's designed do. Python could be used in a much more expansive way that incorporates the regex handling into a larger more cohesive whole.
              "When the only tool that you have is a hammer, then every problem looks like a nail."

              Comment


              • #17
                Originally posted by NotMine999 View Post

                "When the only tool that you have is a hammer, then every problem looks like a nail."
                And when you have a nail-gun, you use a nail-gun rather than a hammer. But I'm not sure what this commentary adds.

                Comment


                • #18
                  I've recently touched AWK option generate machinery and it's quite unpleasant to make any adjustments.
                  So why is is unpleasant to make adjustments? Three reasons come to mind:

                  1. The person making the changes doesn't really know Awk. The obvious solution is to learn Awk better.

                  2. The code is not well written. It would be better to refactor the code in the existing language, i.e. Awk, before considering moving to another language. This should be done before moving to another language anyway -- refactoring and changing languages in a single pass is a bad idea.

                  3. Awk is not well suited to the task. This is really the only case where it makes sense to port to another language.

                  Kids nowadays. :-)
                  Last edited by bison; 17 July 2018, 04:01 PM.

                  Comment


                  • #19
                    Originally posted by cbxbiker61 View Post
                    The bottom line in all of this is, will a change allow the programmers to produce a better compiler faster? An answer to that question is all that's required.
                    Actually no, that's not "all that's required", because it's not a commercial product, and is instead open source so it's even expected that other people compile it. Difficulty of compilation from scratch should be a factor.

                    Comment


                    • #20
                      Originally posted by Weasel View Post
                      Actually no, that's not "all that's required", because it's not a commercial product, and is instead open source so it's even expected that other people compile it. Difficulty of compilation from scratch should be a factor.
                      Well, from experience... I build complete distros for x86_64, i686, arm and aarch64. I have no problem compiling gcc on any of those platforms and that would not change if they require Python. As far as keeping my Python up to date, I change the version number in my build script and recompile. I have not had issues compiling Python since way back when it was young. It just works.

                      FYI, gcc would not be the only package that requires Python to compile. Any full-featured distro is going to have Python compile dependencies.

                      Someone mentioned version incompatibities between Python2/Python3. There is only one version to program for, Python3. Projects that are still dependant on Python2 are mostly not being maintained. Python2 development is ending at the end of the year. You can't blame the Python developers for making improvements/progress.

                      Gcc isn't the easiest tool to compile from source. I really don't seeing Python making it harder.

                      Comment

                      Working...
                      X