Hacker News new | past | comments | ask | show | jobs | submit login
MacRelix – Unix-like features for classic Mac OS (macrelix.org)
163 points by Lammy 8 months ago | hide | past | favorite | 81 comments



Quite some years ago I did a bit of digital archeology and put the 68k MacMinix 1.5 release source on GitHub, sadly the original file dates weren't preserved in the distribution image.

They were archived using tar(1) to dump the files to a floppy disk on a PowerBook 150 running MacMinix. I don't know why I did that. :-)

https://github.com/macminix/MacMinix


I remember seeing multiple kinds of options like this for MacOS over the years, including some attempts to port tools or create different environments within MacOS.

Like: https://macintoshgarden.org/apps/mac06

Or MachTen: https://macintoshgarden.org/apps/professional-machten-68k

Or Mac Minix: https://macintoshgarden.org/apps/macminix-15

Really fun and wild stuff. Curious how MacRelix relates or differs.


Makes me wonder. What would it take for Mac the tech to have this sort of feel/appeal again?

Would a full wintel+nvidia gpu daughterboard move any needles? Or something oddball and hardware like the lamp imac, idk.

Basically, computing nowadays feels very well baked and staid at times. Stuff like a unixy subsystem feels experimental in ways computing hasn't in decades.


> Makes me wonder. What would it take for Mac the tech to have this sort of feel/appeal again?

We tend to forget that, but Macs are the last standing members of the Unix workstation family, and quite good ones at that.


This! I've probably said it here before, but Apple won the Unix workstation wars in the most awesome way possible. You can now buy an insanely powerful RISC Unix workstation at the mall! How awesome is that?


NeXT acquiring Apple for less than one Steve Jobs (receiving about $400 million as change) was nothing short of brilliant. They got their great OS, attached it to their own bespoke hardware, focused the product line, and now they pretty much rule the world.


I don't think the last decade has been completely uninteresting.

ARM Macs with unified memory, and on the software side WSL on Windows (maybe even Proton, although Wine has been a thing for more than two decades now) felt experimental enough for a while.

Sure, nothing as crazy as running Unix on an Apple ][ (http://web.archive.org/web/20230122214955/http://www.gno.org...)


Not entirely on topic, but it is such a pleasant touch to see the titles for the properties displayed before the shell all lining up just by word choice alone. I've seen people who pad out code comments like that; it has this rather capricious, sculpture-like feeling to it.


Author of MacRelix (and system-info) here.

I'm delighted that you've noticed and appreciate this. :-)


Out of curiosity, how is MacRelix able to detect even under what emulator the system is running on?


It's mostly checking Gestalt() and scanning the unit table for specific graphics drivers, occasionally peeking in low memory. (My own v68k core identifies itself through undefined CCR bits in the CHK instruction.)

Have a look at tools/mac/system-info/system-info.cc and mac/libs/mac-sys-utils/mac_sys/has/virtualization.hh in the metamage_1 repository.


For a change of pace from the `68k` and `os9` flavors already shown, here's MacRelix's Carbon (`osx`) flavor running successfully in Mac OS X Public Beta: https://i.imgur.com/9S5lE2a.png

This is not something any reasonable user would ever do but I was impressed at its versatility. For the ultimate janky-Carbon-environment test I will have to try it in the Mac OS X Developer Previews, but PB was the earliest that would run on the hardware I was using. I do have all the necessary hardware since DP1 calls out wanting specifically either a Beige G3 or a Blue G3, and I ♡ PowerMac1,1 and have like three of them lol


You can also install MPW (Macintosh Programmer's Workshop) and access a pretty decent command line environment via official Apple software.


MPW was actually one of the inspirations for MacRelix, in a backhanded sort of way:

https://www.metamage.com/text/relix/origins.html

I still use MPW's ToolServer for running the Metrowerks build tools, but sadly it's no longer available as an official download from Apple.


Question - looking at the code quickly, I see stuff about MWCC and Metrowerks object file format - is your tool chain in some way generating Metwowerks compatible object files? BeOS PowerPC uses the same compiler so you got me excited!


Yes and no. The MacRelix toolchain does, in a very trivial sense, generate Metrowerks-compatible object files, because mwcc is ultimately a wrapper around the Metrowerks-proprietary MWC68K and MWCPPC tools that run in MPW.

I reverse-engineered enough of the .o header format so that MacRelix's ar and ld could retrieve architecture and runtime information from a static library instead of making the caller provide it via a switch.

Separately, I've been writing post-linkers that patch or rewrite the Metrowerks-provided startup code in 68K code resources. The next step on this path might be writing my own compatible linker.


I'll come find you on Github, but I'd certainly be interested in getting involved in a Metrowerks compatible linker. The BeOS toolchain suffers from being so old that nothing modern compiles anymore and so this combined with other projects might make a replacement more viable. Because BeOS PowerPC uses PEF as the linker and a load of the support code is in the form of object code (they pretend to be static libs, but they are just object files) and as the API is in C++ and uses whatever the MW standard mangling was, replacing the linker without the object file format is not really viable.


Back in the day, the Aztec C development environment provided a "shell" experience for development.

Essentially, you coded in vi, you used make, had the basic shell commands (notably ls, cat, mv, cp). I can't speak to it much deeper than that. I used it for some time, but I had no Unix experience, so I can't say what was missing.

I'm sure, today, if I tried to work on it like a would a normal Unix environment, even a limited one, I would run smack into some deficiency. For example, I doubt you can shell out in vi, something that is bread and butter in my toolbox and workflow.

But, it was a very early (1985) "Unix on Mac" experience.


You don't happen to have access to Aztec C for the classic 68k? I (and others) have been trying to track down a copy for some time. There appears to be one on Macintosh garden, but that is for ms-dos.


Honestly I probably got rid of my final box of ancient Mac 3.5" floppies in my last move 5 years ago.

Can't say I actually had Aztec C at the time, but it wouldn't have surprised me one way or the other.

Short answer, no I no longer have access to it any longer.

I used to run it on my basement upgraded, 512K Mac with 2 400K drives. Spent real money on it. I think it was $499 at the time. Maybe less, it was certainly no Turbo Pascal that's for sure.


Ah thanks for sharing your memories, seems like computing was so much more expensive compared to now. I enjoy playing around with an old Mac Plus and a modern emulated HD20 drive. Eventually like to use it as a terminal, but really I just enjoy playing with an older retro computer that has a pretty clear lineage to my daily modern computer.


> seems like computing was so much more expensive compared to now.

Heh. That's an understatement.

My Mac was $1800 (college discount), the 512K upgrade was $400, the extra drive was $400, and $499 for Aztec C.

That's ~$9000 in todays dollars.

I spent almost $5K (today) for my Atari 800 system (essentially obsolete by the time I got my Mac, < 5 years, gave it away to a friend).

I remember being excited when I got my first 1GB drive, since it was only $1/MB. (We already had $1/MB drives, but not that big -- and not SCSI).

I later sold that Mac and put the money towards a motorcycle. Boy, that was one of the best trades I ever did. I had that bike for 26 years. I can't say either was an investment, but that bike aged a lot better than the Mac did!

Anyway, yea, computing was expensive.


A installation guide would be great. I'm trying to install it and I don't know what to do with the mbin file. When click on it says something about connectfour application missing.


mbin most likely refers to "MacBinary" (a format used to preserve the Mac resource fork when a file is passed around online/on non-Mac file systems)


Indeed, I use .mbin for MacBinary, as the more conventional .bin is overloaded with other meanings.

I also use .mbim for MacBinary+, which encodes a directory tree instead of a single file.


I've tried different versions of Macbinary without luck, maybe I'm missing something.


The mbin file can be opened with StuffIt Expander, it contains the installer application.


Stuffit extract the installer but it doesn't do anything, I don't know what I'm missing.


I was also using Stuffit (5.5) originally, but I just gave it a try with good ol' standalone MacBinaryⅢ and that worked too. It should go like this: https://imgur.com/a/YKd4Zvs (first three screenshots)

Once it says Done you can trash the installer. There will be a new folder in the same location as the installer, and within that folder you can run `MacRelix`.

The last two screenshots are me using the `sbin/upgrade` script from within the first Relix flavor to fetch a second Relix flavor.


Thank you. I was finally able to install it, I think my setup is to blame for all the issues. I think I wasn't able to open the .mbin because I downloaded it on Linux before moving it to the emulator, and it missed some information in the process. Downloaded it inside the emulator using iCab, and after several tries (probably because networking on my emulator doesn't work properly) was able to open it on StuffIt 5 and decompress the .gz during the installation.


It doesn’t really go into what all it can do


Aside from the fun of having a CLI on a Mac, I also use it to dump the ROMs from my machines.

e: it also comes with Git (among other utilities) which might make it worth it to some people for that alone.


I had forgotten how strange it was to see a terminal in OSX, a huge step sideways, I won't say backwards as it has its uses, but that was also the nasty green screen world I thought we had escaped from...


Yeah, even though I routinely use a mix of CLI and REPL environments, I also don't get the fetish to use computers as I was doing back in 1990 in MS-DOS and Xenix.

One of the appeals of Amiga was to only dive into the Amiga DOS shell if I really needed to.


Yeah, when I was younger and a neophyte, I thought it was idiotic that Mac OS X had a command line. Now that I’ve switched to Mac and that I’ve learned how to use it, I wouldn’t move to a platform without strong Unix roots. So what I guess I’m saying is I wouldn’t use Windows.


wsl with directory tree integration is also good, or cmd.exe with native gnu tools and additional binaries.


It sounds so ... clumsy.


How does it run git? Is there some kind of posix layer? What utilities does it come with?


Here's a screenshot for you, fresh from my PowerBook G3: https://i.imgur.com/zmFJy5l.png


Yeah. I even checked screenshots and all they show is a $ prompt.


Yeah, could use a readme for sure.


Poking through it - it looks like it might include Perl, but no idea about what level of Perl-Unix-ism it might support. But I didn’t enjoy rereading ye old Perl implementation with Tolkien references [1] to give a feel for what the source file is about.

[1] https://github.com/jjuran/metamage_1/blob/4d1a24875036fee128...


The Perl interpreter is v5.6.1, though strictly speaking it's miniperl, not perl — there's no support for XS (i.e. native-compiled) modules.

Unlike MacPerl, it supports system(), exec(), and backticks in the Unixy way you'd expect. In fact, the program that packages up a MacRelix archive is a Perl script running in MacRelix.

I guess we'll just have to disagree about the Tolkien references. :-)


It does include Perl, though quite an old version: https://i.imgur.com/ySMhy3o.png (my screenshot)

This is the same version that was available as “MacPerl” back in The Day https://macintoshgarden.org/apps/macperl-561


Doesn't look like there's an Awk included, which is a real shame.


This is timely, in the middle of restoring a Mac Classic - looks like something fun for it to do.


I wonder if there would be a way to adapt this to also use MacTCP instead of OpenTransport.


Curious, what does someone gain with MacTCP? I'm not familiar with the space, but a casual glance (not an assessment!) suggests that OpenTransport was standard-ish from system 7.6 onwards.

Does it boil down to compatibility with older hardware?


Different software. They had different APIs from the programmer perspective. MacTCP was older and was based on Berkeley sockets (I think with some BSD code in the implementation?) and was somewhat primitive.

OpenTransport was fully multithreaded and based on SysV UNIX streams. Technically much superior. It has partial MacTCP API support for older apps but some programs demanded real MacTCP to work properly. I think Mac was the only place that really used Streams widely. Mac network programming in the OpenTransport days was alien from a Unix perspective.

OS X now uses sockets like everyone does these days.

Going off memory here it has been a long long time.


At the very least, MacTCP supports System 6 and the 68000; Open Transport is incompatible with both.

(I seem to recall there's a version of OT you can use with System 7 Pro, a.k.a. System 7.1.1.)


Yes, MacTCP support is absolutely doable. It's a question of free time and priorities.


Aahhh, I still have my set of floppies for MacMinix! I ran than on a Powerbook 140 back then, it was quite cool! This predates Linux by quite a bit, having any way to have a shell on MacOS back then was incredible.


This makes me wonder.. Are there any quirky whimsical or nostalgic but still functional desktop OS out there.. Like the fantasy console PICO-8, but for Desktop applications?


9front, seemingly Plan 9's de-facto successor, is almost surely quirky, often whimsical, at times nostalgic. It might even be functional, depending on how you define that[1]. Is actively developed, has a vibrant community. Puts an interesting spin on how you lay out systems, but doesn't diverge much from the Bell Labs formula. I'd certainly recommend giving it a shot, for the UNIX-inclined.

[1] I've daily driven it back in high-school, for all that's worth. Wrote assignments in troff and all. Some people might be able to tell of less mundane success stories as well.


I tried Plan9 as a minimalist desktop. I soon realised that three-button mouse chording isn't doable in this decade, and wish someone had written a Platinum-like window manager to replace rio.


> I soon realised that three-button mouse chording isn't doable in this decade,

The scroll wheel on any wheelmouse is a button and you can click it as well as spinning it.

All wheel mice are also 3-button mice.


Try doing that on a trackpad--but if I wanted to use a mouse, the chording is too cumbersome.


On my work MacBook Air, I installed a FOSS app.

https://github.com/artginzburg/MiddleClick-Sonoma

Works well, but I miss the physical middle button on my Thinkpads.

The chording isn't really cumbersome, just unfamiliar. You get used to it quite quickly with a few tens of minutes of practice.


Forking Rio to create a Twm clone would be nice.


It's been somewhat done (there are a couple of forks out there, but nothing usable or maintained).


Writing high school assignments in troff puts your an ubernerd status, which I am slightly envious of ;-)


Plan 9's successor, is Inferno, which folks keep forgeting about.


Nothing's stopping you from making classic MacOS that OS – infinitemac.org is a tremendous website full of emulators with a large software collection and drag and drop file transfer! It has very good ergonomics if you just want to play around with it, throw some software you downloaded on to it, etc. When coding for the very early Mac, you just targeted a B&W 512x384 display.

The Macintosh Toolbox is a bit verbose, though.


For me Ubuntu and Fedora give me nostalgia for Mac OS 10.5 and earlier. They remind me of that pre-iPhone era when software was shared via websites, when code signing and developer accounts hadn't become a thing yet, when the App Store was a radical suggestion, and before the OS became locked down with security and sandbox "features".


Yeah, you can still live in that era thankfully :)



Haiku lost the plot as far as I'm concerned when they didn't even try to support the Raspberry Pi as a target (where it would have been incredibly awesome). Right now the RISCv port is usable, but a lot of momentum was lost to the gods of fully open hardware...



They have been working on ARM64, but avoided touching the Pi.


The makers of Pico-8 just released a fantasy desktop called Picotron, and it's rather amusing. Not really a suitable daily-driver yet, though.


I've been having an absolute blast with it though! Don't think it's really geared to be daily drivable at all, just a fun environment to make stuff.


AROS -- an AmigaOS-like environment -- can run in "hosted mode" on Linux or Windows environments, maybe Mac as well, in addition to standalone.

https://www.aros.org

Note that because it's an API-compatible reimplementation of AmigaOS, it's not really a "fantasy OS". Hosted mode is rather a tool for serious OS development. Nevertheless, it's much more like a modernized retro Amiga than it is any extant DE for Windows/Linux/Mac.


SerenityOS is probably your best shot, although it’s definitely not ready to be a daily driver yet.



If you have a RPi, RISC OS is an option.


Why does it need an internet connection?


MacRelix has an `upgrade` command that will check for and fetch a new version of itself.

The installer is merely a stripped-down, single-file build of MacRelix with just enough tools to run the installer script, including `upgrade`.


I do wish there was a periodic side-loadable “full” release since I usually run my old Macs with no network connection at all.

I didn’t feel like setting up open WiFi or WEP WiFi (same thing amirite) for my PowerBook so to install it I had my ThinkPad running internet connection sharing, connected through two patch cables and an old PowerConnect switch since I couldn’t find a crossover cable.


The fellow who does this is an absolute class individual. Definitely support this project!


Reminds me of Idris from Whitesmiths. https://en.wikipedia.org/wiki/Idris_(operating_system)


Gibram




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: