Announcement

Collapse
No announcement yet.

Modula-2 Language Frontend Patches Ready For Merging Into GCC 13

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

  • #11
    Originally posted by Akiko View Post

    Yeah, but the machine code generated by this compiler is so bad that even a German company put a 15k Euro prize into the public to get it at least on par with the compiler from Delphi/Kylix (fucking Kylix, which is million years old - just to understand how bad it is). Having a Pascal dialect as frontend for GCC really is a huge thing. I am already looking forward to it.
    Any benchmark link? As long as it is faster than Python or Javascript, I think fpc/Lazarus can still work outside system programming and high performance computing.

    Comment


    • #12
      Originally posted by billyswong View Post

      Any benchmark link? As long as it is faster than Python or Javascript, I think fpc/Lazarus can still work outside system programming and high performance computing.
      I can give you the link to this bounty by the company https://fpc-devel.freepascal.narkive...linux-x86-llvm, they did some serious benchmarking.

      Comment


      • #13
        Originally posted by billyswong View Post

        Any benchmark link? As long as it is faster than Python or Javascript, I think fpc/Lazarus can still work outside system programming and high performance computing.
        A single datapoint: https://github.com/ibelarouci/nodpyvsfpcserver

        It's an interesting topic for me as I grew up with Turbo Pascal 3 and finally overwhelmed the teacher by string-grepping the compiler's binary to find and reverse engineer some more of the Pascal commands yet unbeknowest to me. These days a walk to the library was just too much fuss

        Comment


        • #14
          Originally posted by Mark625 View Post

          Don't be ridiculous. A lot of work has gone into this, and these developers deserve to have their contributions recognized. Adding this front-end to GCC won't impact any other GCC languages, and it may introduce the language to a wider audience.

          Modula-2 actually popularized the idea of separate compilation with full type checking and enforcement of data abstraction. The C++ language is only just now getting support for modules, 40 years after Modula-2 pioneered the concept.

          I agree that the look of Modula-2 source code can be somewhat jarring compared to the all-lower-case C family languages, and it is not object oriented. Nor does it support templates, and it lacks the memory safety features of Rust. It was designed as a systems-level programming language, more akin to C than C++. In fact the OS and all applications for the Lilith computer were written in Modula-2. So it is a capable language that introduced a lot of important concepts to computer science back in the day. Kind of like Rust is doing today.

          Cheers!
          Hopefully it does not introduce the language to a wider audience.

          Modula-2 might have brought forward interesting ideas, innovations and concepts at the time it was introduced, and perhaps we owe thanks to it, and that our modern programming languages of today inherit from that heritage, but Modula-2 should be regulated to history. The best before time has expired, it has overstayed it's welcome, it's time to leave.

          Originally posted by rclark View Post
          Neat! Syntax wise it looks much like Pascal which I really like . See Pascal was the language of choice at college, and Turbo Pascal came out while I was there.... Loved it and all its updates through Delphi. I've never dabbled in Modula-2, but have heard about it in passing now and then over the years. We should get back to the 'basics' (the simple life) so to speak rather than all these complicated ivory tower high level object oriented languages that cause so much headaches (a lot of time) . Ie. Just the standard easy to learn and use languages like C, Pascal, Fortran, Modula-2, even dare I say Cobol maybe?.... Push Rust, C++, Java to the side.... Ha! That said, might have to kick Modula-2's wheels just to see what's there.
          No, it does not have a "neat" syntax. It looks absolutely terrible. It sounds like you have been damaged from being exposed to this language at a young age, so you romanticize about it. Like it was your first programming language, so it have a special place in your heart. No, it is not neat, it is ugly!

          If you want some easy-to-learn and use language but that is simple, then C, Pascal or Modula-2 are not good candidates. Check out Zig, or C3. There are modern language that are simple, no-frills languages.

          Originally posted by Ironmask View Post

          As long as there's someone to maintain the code then there's no reason to remove it.
          Linux is chock full of ridiculous and useless drivers for some old obscure hardware, but someone's still maintaining it, so they earned their right to stay.
          Modula-2 belongs in a museum, not in a modern compiler toolchain.

          Comment


          • #15
            Originally posted by billyswong View Post

            Any benchmark link? As long as it is faster than Python or Javascript, I think fpc/Lazarus can still work outside system programming and high performance computing.
            This is what I have at hand: https://benhoyt.com/writings/count-words/#unix-shell

            Comment


            • #16
              Originally posted by uid313 View Post
              Ugh!
              Remove it from the tree, delete the code! Let's forget Modula-2 ever existed!
              You can tell them what to do when you pay their salaries ...

              Comment


              • #17
                Originally posted by Akiko View Post

                I can give you the link to this bounty by the company https://fpc-devel.freepascal.narkive...linux-x86-llvm, they did some serious benchmarking.
                I would say the comparison is a bit unfair. The simple.c assumed no words is longer than 100 bytes, and contained no code to even check and halt it if assumption violated. The simple.pas didn't use the 255 bytes limited classic pascal string but used the dynamically allocated unlimited length delphi string. This is comparing apple to orange.

                Comment


                • #18
                  Originally posted by billyswong View Post

                  I would say the comparison is a bit unfair. The simple.c assumed no words is longer than 100 bytes, and contained no code to even check and halt it if assumption violated. The simple.pas didn't use the 255 bytes limited classic pascal string but used the dynamically allocated unlimited length delphi string. This is comparing apple to orange.
                  Not to mention that the fastest in the list - grep - is written in C ...

                  Comment


                  • #19
                    Originally posted by Akiko View Post

                    Not to mention that the fastest in the list - grep - is written in C ...
                    Oh yeah, while we're at it:




                    *ducks, snickers and runs away as fast as he can*

                    Comment


                    • #20
                      Originally posted by reba View Post

                      Oh yeah, while we're at it:




                      *ducks, snickers and runs away as fast as he can*
                      You missunderstood me, I mentioned that because the list also contains an horrible C based example ... just to illustrate that the used language may not be the main problem. I'm pretty sure that you can get some impressive examples by sticking to a language that actually fits current processor architectures and principles, means picking a functional programming language like ocaml or R. Rust is no surprise here, it uses principles from these functional programming languages like defaulting to read-only variables.

                      Comment

                      Working...
                      X