Rat-Hole Mac OS

Classic Mac OS, as it's now known, had a decade-long honeymoon period. From its release in 1984 until 1994, it enjoyed a healthy development life that included several major revisions. But by 1994, the limitations of the OS were apparent to technophiles both inside and outside Apple. Sure, there was a lot of legacy cruft from the 80s in what was then known as System 7, but the real problems were more fundamental. These problems were so well-known that I'm sure anyone who was a 'PC enthusiast' back in those days can rattle them off. Classic Mac OS lacked two very important features. Say it with me, folks:

RatHole 3.61 for Mac can be downloaded from our website for free. The unique identifier for this program's bundle is com.edgesounds.RatHole. The most popular version among the program users is 3.6. The application relates to System Tools. The actual developer of this free software for Mac. Any Rat holes are technical blocks that are made by Rats when they dig through 'soft' blocks. Rats can usually dig through wooden planks and anything not made of stone or a very solid material. The properties of the Rat hole depend on the block it was made of.

Memory protection and preemptive multitasking

In the early 1990s, Apple created the Copland project to add these two features to its operating system. Yes, a lot of new end-user features were going to be added as well, but memory protection and preemptive multitasking were Copland's raison d'être.

Funny story—as it turns out, it wasn't too easy to add these features to classic Mac OS while also maintaining backward compatibility with existing software. Oh, and did I mention that Apple switched processor architectures around this time as well? By 1996, the Copland project was dead, and classic Mac OS still lacked memory protection and preemptive multitasking.

Thus began a downward spiral that included several more frantic, abortive attempts to solve Apple's OS dilemma. We all know how it ended. A series of unlikely events led to the return of Steve Jobs and the refashioning of NeXTSTEP into Apple's new operating system—yes, an operating system with memory protection and preemptive multitasking. Phew.

So, here we are in 2005, with severalmajorrevisions of Mac OS X behind us. Maybe we Mac users are feeling a bit smug, knowing that we once again have The Best Operating System™. Of course, I felt that way in 1991 when System 7 was released, too. But a mere five years later, things were going downhill fast. Hm.

Will Mac OS X suffer the same fate? Surely not, you say. Mac OS X is The World's Most Advanced Operating System! But this is exactly the kind of thinking that lets an OS crisis sneak up on you. It's worthwhile to think about what Mac OS X will need in order to remain competitive two, five, even ten years in the future.

Advertisement

Obviously Mac OS X will need (and will get) a ton of new features in the coming decade or so. The trick is to find the equivalent of 'memory protection and preemptive multitasking.' That is, the features that will be essential in the future, but that are very hard to add while still supporting existing software.

I'm tempted to make this a two-part post, asking the readers to write their opinions in the comments area first, and then revealing mine in a follow-up post. But that'd be cruel (or lame, take your pick), and I'm sure plenty of people would have the same ideas I do. Why let them steal my thunder?

So, here it is. Here's what I think will quickly become Mac OS X's most glaring technical limitation, and what could lead to another Copland-style disaster if Apple isn't careful. Here's what Mac OS X is missing today that will be very difficult to add later without causing big problems for existing software and developers:

A memory-managed language and API

<cue dramatic music>

Both of Mac OS X's primary application development APIs require the programmer to manually manage memory. Carbon is a C-based API, and memory management doesn't get much more manual than plain-old C these days. Cocoa uses Objective-C, which abstracts memory management with a retain/release system, but the programmer must still explicitly trigger or schedule these actions. Under the covers, Objective-C is just a runtime engine on top of C anyway, so it's no surprise that manual memory management is still part of the development experience.

But why is this a bad thing? Doesn't manual memory management offer more opportunities for optimization? Aren't languages with totally automatic memory management 'slower' than their lower-level brethren? Yes and yes. But 'more abstracted' is a better way to think of those 'slower' languages, and 'more abstracted' always wins in the end, especially when it comes to operating systems and application development.

I don't want to go down the rat-hole of programming language religion, but suffice it to say that languages (and their associated APIs) that support automatic memory management are the future of software development. In fact, in many cases, they're the present. Java has made great strides in the server arena, and languages like Perl, Python, and Ruby are coming from the other direction. C, C++, and yes, even Objective-C, are being squeezed in the middle.

Advertisement

As was the case with the memory protection and preemptive multitasking crisis, Microsoft is way out ahead on the memory-managed language/API front. MS has its own new programming language, C#, and is working on an all-new memory-managed API to supplant the venerable C-based Win32 API. These are both projects that were started years ago, and that are finally coming to fruition today.

Whither Apple? Back when C# and the API that would come to be known as WinFX were on the drawing board at Microsoft, Apple was kind of busy trying to finally get over that pesky 'memory protection and preemptive multitasking' thing. Today, Carbon and Cocoa are just settling down; Tiger is the first Mac OS X release to be accompanied by a promise from Apple that APIs won't be intentionally broken in future releases.

Put bluntly, Apple is way behind here. Yes, 'Copland' behind.

Even if Apple is smart and 'borrows' an existing memory-managed programming language (hello, C#), there's still that pesky API issue. Apple recently killed their Objective-C/Java bridge, and with good reason. Bridges stink. So forget about an Objective-C/C# bridge. And no, don't talk to me about adding garbage collection to Objective-C. That is exactly the sort of 'half-way' mindset that led to Copland. No, Apple needs to pull a WinFX and rethink the whole widget, so to speak, from top to bottom.

New APIs are extremely risky and hard to pull off, of course. Plus, Apple's just coming off a big transition, moving from the Mac Toolbox to Carbon and, for new development, to Cocoa. It's way too soon to even think about another move, right? Sure, if you're a developer. But if you're Apple, you'd damn-well better be thinking about it—not only thinking about it, but beginning work.

Rat-hole Mac Os Update

Oh yeah, that's right, there's some other transition going on right now, isn't there? Well, fine, delay the whole memory-managed language/API thing a year or two if necessary. But someone, somewhere at Apple had better be thinking long and hard about this issue. If Apple does get itself into another Copland-style jam around 2010, I'm not sure there'll be any pre-fab 'modern operating systems' hanging around for them to purchase and refurbish this time.

Tonight I have 2 hours free. It’s time to pull together the various snippets of info and manual tasks I’ve been following to build my app that runs on Mac OS X and Windows desktops and engineer a script I can just run each time.

Mac os versions

The tools: first javafxpackager. https://docs.oracle.com/javafx/2/deployment/packager.htm

I’ve used this partially to build the windows executable but am using manually built ant script for Mac OS and manually signing everything in the bundle messy. Let’s sort that first.

Mac OS X

My compile / edit / test cycle is in Eclipse, and when I’m happy I export a runnable jar with the required Apache libs embedded, so my starting point for packaging is the jar. Might be nice one day to have a task in Eclipse that just does the packaging, anyway no distractions tonight.

I’m using jdk 7 still on the Mac and javafxpackager is nowhere to be found. First hurdle. The hunt begins, firstly Oracle tell me it’s included in the version of the jdk I’m running, 7.0.6. Aha it’s been renamed javapackager – nope that’s not there either. Sod it, let’s update to the latest jdk 7 – not ready to go to 8 yet. Hmm, still no packager. Pokes about a bit and sees in /Library/Java/JavaVirtualMachines there’s a few versions of the sdk now including 7u71, the most recent. Checks it out and the 7u6 I think I’m running and lo and behold there’s javafxpackager in both. OK so where is Mac OS X picking the SDK up from, or more importantly where _should_ it be picking it up from.

And voila more learnings! Short answer is ensure JAVA_HOME is set preferably using /usr/libexec/java_home to choose. Now javac reports it’s using the jdk I just installed. OK but still no javafxpackager in the default path. Henceforth it shall be known as $JAVA_HOME/bin/javafxpackager ….

Back to the job in hand, how do I go from a runnable jar to a signed .app with an embedded jre and a suitably signed installer pkg? javafxpackager -deploy appears to be the way, or it’s equivalent using ant, which might be more extensible and usable going forward. $JAVA_HOME/lib/ant-javafx.jar is your friend at this point. 30 minutes reading and researching later I think the 2 hours tonight isn’t going to be enough …..

Prototyping using the command line, the following generated a usable .app

javafxpackager -deploy -srcfiles ./DrumScoreEditor-Community-1.00.jar -outdir ./outdir -outfile DrumScoreEditor -native image -appclass org.whiteware.DrumScoreEditor -name Drum Score Editor

Rat-hole Mac Os Download

Seemed to strip out the Quicktime libraries that Apple reject your app store submission for, but can’t find a way to get it to sign everything for me yet, nor produce a .pkg (signed or otherwise). Using -native installer produced a well put together dmg with a typical ‘drag to /Applications’ image – nice but doesn’t help for the app store.

Rat-hole Mac Os Catalina

More when I have another 2 hours …..