Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
MacLua5.3: Classic MacOS port of Lua 5.3 (github.com/solrabizna)
131 points by arm on Nov 30, 2018 | hide | past | favorite | 40 comments


Here is Lua being compiled on Turbo C 1.0 (1990):

  https://www.youtube.com/watch?v=-jvLY5pUwic
It is truly amazing how the authors have put so much effort in keeping Lua so portable - about the only dependency for running Lua on any device is having a C compiler and a bit of memory.


There was Plua for PalmOS as well. I still use that for a Palm-powered remote light control. It even had GUI construction primitives built-in and could be "cross compiled" (disclaimer: I maintained the Mac OS X port).


(actually Turbo C++ 1.0)

Having said that, it would probably also build fine on Turbo C also.


I’m so glad there are people doing this kind of thing.

I have a sweet spot for classic Mac OS, something about its simplicity hasn’t been match since, but I can’t imagine the motivation for doing this beyond pure fun.


Came here to say this. Lack of memory protection and preemption was atrocious. But the UI was dead simple and a joy. I also used to like to pick apart things in ResEdit.


I recently picked up my dream computer from 19 years ago - the PowerBook G3 (Bronze Keyboard) https://imgur.com/a/zhmi6cP

It's been great fun noodling around with, customizing the OS with Kaleidoscope schemes etc. Really love the classic MacOS. But it does bomb/hard freeze a lot. Especially with network activity (one AppleTalk glitch and the whole thing just freezes up)

One of the main issues in actually using it is that the adoption of HTTPS and deprecation of old encryption methods has made all the browsers available (including Classzilla) completely useless. My solution has been to install Firefox in a VM on my NAS and connect to that through VNC or an X11 client (former is zippier, but the latter makes it feel more native)


Both Windows 3.11 and the classic MacOS would be great interface to clone in a Unix window manager or Wayland compositor. Sure they're old but so many of the concepts still hold up and honestly most of us don't need much more than that.


It's not just the interface, though. Note how "installing" stuff is just dragging files to the right locations.

You could make fully bootable backups of your main drive just by copying everything from the root to a new drive. None of this re-installation rubbish or ownership getting messed up or what have you. It even worked across architectures, a Mac System 7.5 installation will boot on both 68k machines and supported PowerPC systems, just swap the drive over and you're going.


I concur. Not only is it not just about the interface, but it's about the Macintosh User Interface Guidelines and the ecosystem of applications that conform to it.

It would be nice to use a desktop environment that's inspired by the classic Mac interface (I particularly have a soft spot for the Platinum theme), but without an ecosystem of applications that conform to the Macintosh User Interface Guidelines, then all we have is yet another window manager.

It's the ecosystem of applications, like Microsoft Word 5.1, Adobe Photoshop, Adobe PageMaker, ClarisWorks, and others, combined with the Mac interface, that made the Mac so special.


Fun fact: You can copy/paste a whole linux system as long as `-a` is passed to copy.

Also, if you like copy/pasted Linux apps, there is the `AppImage` project that provides such a format and its tooling is rapidly improving. It is a self-contained alternative to Snap and Flatpak which only handle the file container and leaves security/sandboxing and distribution to other projects.

But yes, the classic Mac was the first computer I ever used and I also have a sweet spot for it. I still own some recent Mac, but don't really like the increasing lack of flexibility and non-iOS development environment macOS has and do all my development on Linux. Classic macOS was the ultimate flexible OS, you could monkey-patch everything (which is also called a virus, but... POWER!).

Disclaimer: I am one of the authors of AwesomeWM, a Lua window manager framework for Linux.


> Fun fact: You can copy/paste a whole linux system as long as `-a` is passed to copy.

But it won't boot.


> But it won't boot.

If you have the proper bootloader in place it will boot. This is less the fault of Linux and more that x86 platform have to boot multiple OSes.

A Raspberry Pi for example will happily boot from a .tar.xz archive.


With either the proper EFI files in the partition or grub already installed in the EFI/MBR: yes, it will boot.


Even better: you could create a RAM disk, copy system file and reboot from it at lighting speed.

What I miss the most is the true spacial Finder. Copy a file to a floppy disk, add a custom icon and place it at a precise location on a window. Go to a different Mac and insert the drive. All those attributes are honored. Every single time no matter what. Such a simple and powerful model.


Don't they still have that? Isn't that what the .DS_Store folders are for? I feel like I used to do that with USB drives to use on school computers.


Yep, I can absolutely confirm this still works.

(And honestly, while I see the advantages, I'd rather we not have this feature so we can also not have .DS_Store files. .DS_Store files suck.)


Not reliably and consistently. And it's not a bug, it's a design decision.

There used to be a one to one mapping of folders to windows. The moment you decide 2 windows can show the content of the same folder simultaneously (which has its advantages), you run in these issues. Which is the canonical view that should be preserved?

And yes, we had all that without . DS_Store files.


> There used to be a one to one mapping of folders to windows. The moment you decide 2 windows can show the content of the same folder simultaneously (which has its advantages), you run in these issues. Which is the canonical view that should be preserved?

I'd posit most of us rarely open the same folder in two different windows, which means the icons should behave as expected in all but an uncommon edge case. It has worked in my experience, at least.

But separately, just as a though experiment: when an icon is moved in one window, the placement ought to update in both windows, in real time. Probably wouldn't have been feasible when macOS X was new, but perfectly doable today given modern computing power.


The files are an implementation detail that could be handled by metadata on a modern 1990's filesystem.


And one window, one folder. That was a powerful yet subtle way of enforcing consistency.


Exactly


Installing modern macOS X apps usually work this way as well. Unfortunately, Apple has obscured their own simplicity somewhat with Launchpad. (Also partly why Snow Leopard is the GOAT)


Forgot all about ResEdit until I read your post. Too much fun.


Spent so many hours in ResEdit. So much fun.


or.. Resourcerer !


When I think about programming on Mac in a language like Lua, I think about Apple Automator and another visual programming environment for mostly digital audio synthesis which I can't remember, but it starts with an 'S' afair. (it's very graphics intensive)

This Lua Logic Editor presentation has a lot more info: https://www.lua.org/wshop13/Gladysh.pdf


Max started out on MacOS, now owned by Cycling 74:

https://cycling74.com/

PureData is an open-source package inspired by Max:

https://puredata.info/



No. That one is strictly audio and is cross-platform. The one I'm thinking of has some closer connection to Automator... now I remember! It's https://en.wikipedia.org/wiki/Quartz_Composer

Wonder how the S wire got crossed with it.. :)


It would be fun to do a similar port of an embeddable JS engine like Duktape (https://duktape.org) also


This looks quite interesting. Kudos for the porting effort.


Lua is such a great language. I wish I had a chance to use it more often.


Any chance of an hqx-ed up binary release? I'd love to give this a spin on my Powerbook 180.


There's one under Releases https://github.com/SolraBizna/MacLua5.3/releases

Just tried it on my PowerBook G3, runs beautifully: https://i.imgur.com/y0cI15O.jpg

Now I just gotta learn Lua...


Oh wow, I love how you have Mac OS skinned in that screenshot! Mind sharing what you did to get it looking like that?


Using this classic piece of software https://en.wikipedia.org/wiki/Kaleidoscope_(software)

This account tweets random schemes for an idea of how they can look: https://twitter.com/kaleidoscopemac


Very nice. With ShapeShifter, this will also run on classic Amigas.


And with Apollo Core it'll be fast too :)


That's excellent news. I wish the MacOS has more open source porting support, like making Wine work on 64-bit MacOS.


This is classic MacOS (pre-OS X "macOS"). Porting to it is a rather different kettle of fish. Things like SIOW and SIOUX helped but tools ported in that fashion were never first class citizens in the classic Mac ecosystem because there's no native CLI or underlying Un*xy layer. At least this one chains up to MPW, which is a nice little feature.




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

Search: