• Installing Modula-2 on MacOS Big Sur

    From Deadmarshal@21:1/5 to All on Tue Sep 21 23:52:11 2021
    Hi, How can I install Modula-2 on Mac? Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Deadmarshal@21:1/5 to Nemo on Wed Sep 22 06:47:31 2021
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?
    Are you are on Intel or M1?
    Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!
    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.
    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nemo@21:1/5 to Deadmarshal on Wed Sep 22 09:35:20 2021
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?

    Are you are on Intel or M1?


    Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!

    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Deadmarshal@21:1/5 to Deadmarshal on Fri Sep 24 05:05:23 2021
    On Wednesday, September 22, 2021 at 5:17:31 PM UTC+3:30, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?
    Are you are on Intel or M1?
    Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!
    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.
    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.
    Don't we have a Modula-2 compiler for Mac? Why nobody answers?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Martin Brown@21:1/5 to Deadmarshal on Fri Sep 24 21:42:25 2021
    On 24/09/2021 13:05, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:17:31 PM UTC+3:30, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?
    Are you are on Intel or M1?

    Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!

    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.

    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.

    Don't we have a Modula-2 compiler for Mac? Why nobody answers?

    There were a couple of 68k Modula 2 compilers that worked OK on the old
    Macs back in the day. I haven't kept track of which M2's would work on
    the modern Intel based ones. Mocka might be a reasonable place to start.

    https://github.com/trijezdci/MOCKA

    The reason nobody answers is that there is hardly anyone left...

    I still follow this group but I haven't done any serious development in
    M2 now for more than two decades. The world has moved on!

    XDS works pretty well on Intel and Windoze.

    --
    Regards,
    Martin Brown

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Brian Knoblauch@21:1/5 to adeadm...@gmail.com on Fri Sep 24 15:07:18 2021
    On Friday, September 24, 2021 at 8:05:24 AM UTC-4, adeadm...@gmail.com wrote:
    Don't we have a Modula-2 compiler for Mac? Why nobody answers?

    Unfortunately I don't even really know anyone that uses Mac these days. With OS X being BSD at the core though I'd expect some *nix based Modula-2 has a chance of being ported/working. Easiest option though might be to spin up a VM with Windows 10 or
    even *nix. Windows Modula-2 compilers are your best choice, but if you don't like Windows you should be able to get Modula-2 up and running on *nix.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Nemo@21:1/5 to Deadmarshal on Fri Sep 24 18:59:41 2021
    On 2021-09-22 09:47, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?
    Are you are on Intel or M1?
    Preferably, I want to install gnu modula-2 gm2 compiler but couldn't. It downloaded 800mb!
    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.
    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.

    Unfortunately, I know of no good free MacOS compiler. (The p1 compiler
    sells for 500 Euro.) You could try the Homebrew m2c but it requires a
    bit of fiddling to install it.

    N.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Chris Burrows@21:1/5 to adeadm...@gmail.com on Fri Sep 24 15:19:03 2021
    On Friday, September 24, 2021 at 9:35:24 PM UTC+9:30, adeadm...@gmail.com wrote:
    On Wednesday, September 22, 2021 at 5:17:31 PM UTC+3:30, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:

    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.
    Don't we have a Modula-2 compiler for Mac? Why nobody answers?

    I didn't answer because you didn't give sufficient information about:
    a) why you wanted a Modula-2 compiler?
    b) why you particularly wanted to install gnu modula-2?
    c) why you had a problem installing gnu modula-2. Was it just the size that was a problem?
    d) was there any particular feature of MacOS Big Sur that you need support for? e) does it matter whether it is 32-bit or 64-bit?
    f) were you looking for freeware or a commercially supported version?
    etc. etc.

    The more you tell us about your requirements, and which are 'must haves' or 'nice to have' the more we can help you with exactly what you want or maybe some alternative possibilities.

    P1 Modula-2 is a commercial Modula-2 compiler for MacOS that is still actively maintained:

    https://modula2.awiedemann.de/

    If you want to investigate other Modula-2 compilers for other systems, here's a comprehensive list:

    https://freepages.modula2.org/compi.html

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From trijezdci@21:1/5 to Deadmarshal on Wed May 3 00:01:47 2023
    On Friday, 24 September 2021 at 21:05:24 UTC+9, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:17:31 PM UTC+3:30, Deadmarshal wrote:
    I am on Intel. If Gm2 is not good, please give me the link of a good Mac compiler with install instructions to install it.
    Don't we have a Modula-2 compiler for Mac? Why nobody answers?

    The only Modula-2 compiler dedicated to MacOS for modern Macs (Intel + ARM) is Albert Wiedemann's p1 compiler:

    https://modula2.awiedemann.de/

    It is a commercial product, but there is a free "demo" version which is limited to x86-64 and comes without library sources.

    Otherwise, you need to look out for open source compilers that target x86 or generate C sources.

    GM2 has been difficult to build and install on MacOS because it is based on gcc but had not been integrated into the main gcc branch yet. But this has now changed with GCC 13. So if you install GCC13 on your Mac, you will get GM2 automatically with it.

    hth
    benjamin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From trijezdci@21:1/5 to Martin Brown on Wed May 3 00:43:35 2023
    On Saturday, 25 September 2021 at 05:42:28 UTC+9, Martin Brown wrote:

    I haven't kept track of which M2's would work on the modern Intel based ones.
    Mocka might be a reasonable place to start.

    https://github.com/trijezdci/MOCKA

    I'm afraid but MOCKA only generates elf binaries. On MacOS you need mach-o binaries though.

    Now, there is still some mach-o support within the MOCKA sources as there might have been a version for NeXT back in the day and not all of it appears to have been removed in the open source version (which is only for Linux and BSD, all the others were
    commercial).

    I had looked into that with a view to restoring mach-o support in the open source version you linked to. However, I can only work sporadically at these kinds of things and by the time I got back to it, the world had moved on to 64-bit only on desktop
    OSes. And since MOCKA's backend was generated by a commercial tool for which there are no sources available, this means that MOCKA is pretty much stuck in the 32-bit era. It would be a major effort to try to add 64-bit support to the generated backend
    code. And the only alternative would be to rip out the backend altogether and replace it with an entirely different one, either hand coded from scratch or a backend generated by an open source backend generator, like say MBurg. I have looked at the
    latter option as well, but concluded that I don't have the time for such an undertaking. So, I have basically written off MOCKA. I won't do any further maintenance on it, either.

    But this also means that I lost my development platform for the bootstrap kernel of my own compiler, which I had initially started writing in C, then transcribed it to classic Modula-2 with some sources needing two versions, one for PIM and one for ISO
    even though I was mostly working on the PIM side using MOCKA. This made sense from a portability/deployment point of view but it required a lot more effort. So with MOCKA being stuck in the 32-bit era, I have now started to transcribe it all back to C.

    https://github.com/m2sf/m2c

    One of the major factors why I had put this on hold and transcribed the code to M2 was that the name translation scheme for translating Modula-2 identifiers into C identifiers while taking C's flat namespace into account was far too ambitious and complex,
    resulting in countless scenarios and a specification of about 20 pages for the name translation alone.

    I have now fixed this by restricting the use of lowlines in M2 identifiers to non-leading, non-trailing and non-consecutive occurrences and ignoring any potential name collision cases that may arise from using any naming convention for the Modula-2
    sources other than the prevailing camelCase and TitleCase convention. The name translation specification is now down to 1 page and a bit.

    https://github.com/m2sf/m2c/wiki/Mapping-Modula-2-Identifiers-to-C

    As this allows me to continue work without the sword of Damocles hanging over the development environment, I expect to be doing more work, less sporadically and possibly get the translator part working this year by leaving most of the semantic analysis
    for later.

    But MOCKA is really dead now. Sure, it still works, but only on 32-bit Linux/BSD.

    Translating to C won't have that kind of problem :-)

    regards
    benjamin

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From OrangeFish9737@21:1/5 to Nemo on Tue May 30 18:57:03 2023
    On 2021-09-24 18:59, Nemo wrote:
    On 2021-09-22 09:47, Deadmarshal wrote:
    On Wednesday, September 22, 2021 at 5:05:21 PM UTC+3:30, Nemo wrote:
    On 2021-09-22 02:52, Deadmarshal wrote:
    Hi, How can I install Modula-2 on Mac?
    Are you are on Intel or M1?
    Preferably, I want to install gnu modula-2 gm2 compiler but
    couldn't. It downloaded 800mb!
    Gm2 is built on gcc so downloading the former means downloading the
    latter. Also, I recall that the default gm2 build is with full
    debugging info, hence larger binaries.

    N.
    I am on Intel. If Gm2 is not good, please give me the link of a good
    Mac compiler with install instructions to install it.

    Unfortunately, I know of no good free MacOS compiler.  (The p1 compiler sells for 500 Euro.)  You could try the Homebrew m2c but it requires a
    bit of fiddling to install it.

    N.

    This is a bit but the latest GCC 13.1 now comes with gm2. Install it
    (say via Homebrew) and you will have gm2.

    O.F.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)