Hacker News Comments on
C Programming on System 6 – Intro
jcs.org
·
114
HN points
·
0
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.⬐ nickloewenCoincidentally, I also started trying to learn C programming on System 6 yesterday.So far the key resource for me has been "Macintosh C Programming by Example,"[0] which also uses THINK C. The disk that originally accompanied the book is available on Macintosh Garden.[1]
Scott Knight also has a nice intro to classic Mac development, using Pascal in the Macintosh Programmer's Workshop instead of THINK C.[2]
Then there's also the old Inside Macintosh books[3] and other how-to books[4][5], but I haven't looked at those yet.
[0]: https://vintageapple.org/macprogramming/pdf/Macintosh_C_Prog...
[1]: https://macintoshgarden.org/apps/macintosh-c-programming-exa...
[2]: https://knight.sc/software/2020/04/19/classic-macos-developm...
[3]: https://vintageapple.org/inside_o/
[4]: https://vintageapple.org/macprogramming/index_year.html
[5]: https://macintoshgarden.org/apps/learn-c-the-macintosh-0
⬐ atommclain⬐ steveklabnikWhile not C focused, https://macgui.com might be a good resource for your endeavor.⬐ nickloewen⬐ duskwuffThis does look promising, thanks! There's clearly a wealth of information available on the web—the trick is just tracking it down...⬐ news_to_meI routinely search "site:preserve.mactech.com $query" — there's a lot of interesting and helpful tech tips there.Inside Macintosh is vital for classic Mac programming. Get a copy of the the 1995 Inside Macintosh CD-ROM -- it's much easier to work with than the PDF scans you've found at Vintage Apple. With an online index (like ObiWan), jumping to documentation for a Toolbox function is trivial.⬐ news_to_meIf you can find a physical copy of Vol I-III on eBay or elsewhere, I highly recommend it. It's much easier to flip through (even though it's a big tome) than searching through PDFs in my experience.⬐ nickloewenGreat tip, thanks! Macintosh C Programming by Example suggested the shareware "Inside Mac Desk Accessory," but I'm not sure if that's available anymore; this seems like a good alternative.I've also noticed that the original documentation for OS 8 and 9 is still available on the web—http://mirror.informatimago.com/next/developer.apple.com/doc.... Do you know if there was there ever a web-based version of the earlier Inside Macintosh?
⬐ duskwuffNope. Early editions of Inside Macintosh were pre-Internet. The CD edition was 1995, for instance -- web publishing was still in its infancy at that point.The PDFs on Apple's old developer site (mirrored at informatimago, among other places) are a decent substitute for the Inside Macintosh CD, although they are a bit scattered around the site.
Gosh this takes me back to my childhood. System 6 was the first operating system I ever used. I started with C using CodeWarrior, but I'm pretty sure it was System 7 (or maybe even Mac OS 8) by that time.I recently realized that CodeWarrior is still going, owned by NXP. And here I am with a NXP dev board on my desk, though I'm not using CodeWarrior. Small world.
⬐ adrianpike⬐ news_to_meOh man, early Mac OS was great for tinkering but horrible for development. I remember looking so longingly over to Linux so I could use Free toolchains, but all I had was Apple hardware.I also started with CodeWarrior, but it was with a copy I "borrowed" on a bunch of floppies - then at some point I saved up enough money to buy the Starter Kit, and 30-odd years later here we are.
This is awesome! I've also been doing development on an old Mac 512k (upgraded to 2MB). It's pretty wild and super fun.Until recently I was using Think C, which was great, but recently I've switched to Think Pascal. It's true what you read on the old forums, Think Pascal had more love put into it. The editor is better, the errors more helpful, and little things like remembering which files you had open in a project make a big difference.
Shout out to the Mac 512k Blog[0], which has some great content as well.
(Edit) Also for anyone else looking for helpful online resources (beyond tutorial books and Inside Macintosh, which are essential), preserve.mactech.com has tons of great old articles.
⬐ wrsI remember when I got THINK C I was just blown away by it. I think I was actually grabbing people in the hallway and babbling to them about how great it was. It was a huge improvement over the pseudo command line Mac compilers that came before (Megamax?).⬐ unkeptbarista⬐ retracGood memory, there was a Megamax C, but I never used it.When Lightspeed C (renamed to Think C) came out most of the Mac developers I knew that used C switched to it. I was still writing in MPW Pascal, and would continue to use it for professional Mac development until '91.
The C compiler that I remember working with was Aztec C, but for early Mac side projects. Later I switched to Think C for my side projects.
An aside: My first C compiler was for CPM and was named BDS C.
⬐ optimuspaulMPW was my favorite environment to work it. It was like as editor and a CLI all in one. I wasn't going C or Pascal with it, just using it to manipulate files and the like. I have long wanted to write a terminal that emulated some of it's intuitive behaviors.⬐ wrsYou’d have to write not only a terminal, but a FUSE layer or something, because when an MPW tool opens a file, it’s actually opening the live editor buffer for the file (if there is one). You can even give a filename to a tool that represents the editor selection in the file. Which was all awesome, and I have also thought of trying to figure out how to do it in newer MacOS or Linux.I always figured this was inspired by Smalltalk, with its “DoIt” command, but never asked the MPW folks.
⬐ kabdibMPW was pretty neat, and I've not seen its equal since I left Apple. It's a simple concept, a shell-plus-screen-editor that lets you have both source code and commands in the same window, and the combination let you do things like put context-sensitive commands in project directories. A little like Jupyter, I suppose.The NIH attitude of the team didn't help the toolset make inroads anywhere. MPW had its own take on Make and a bunch of other Unix-y tools. Basically it was a license to revisit a bunch of hoary, old (even then) utilities, sometimes improving them, sometimes striking out.
My lord, it was slow. It didn't help that the fastest I/O on a Mac back then was a 5Mhz SCSI bus hooked to spinning rust. Builds could take hours. The symbolic debugger was . . . interesting (okay, it was awful).
[I worked on a bunch of its tools, including the linker and some runtime stuff.]
While not used by the author here, Retro68 is a hobbyist project targeting a modern GCC-based cross-compiler to the classic 68K and PPC Mac environment.https://github.com/autc04/Retro68
So you can write C++17 for System 6 too, if you want.
⬐ mhh__⬐ fmakunboundThere was a good cppcon talk a few years ago about using modern languages on ye olde hardware.Very cool. I wasn’t aware of resource and data forks, having grown up coding on DOS and then Linux. It’s pretty neat how stuff was loaded in as needed and then freed afterwards (eg. that list def he mentioned, with the assembly language icon graphic).⬐ duskwuff⬐ verytrivialThe classic Mac OS concepts of resources and handles were brilliant. They were hamstrung a bit by C and Pascal, which didn't provide tools for ensuring you interacted with handles appropriately; I have to imagine that a modern language might handle this better.If you self host a 400MB+ video you're going to have a bad time.Anyone have a mirror or a magnet link?
⬐ nmdeadheadI wrote the first 10,000 lines of ROMlib on a Mac+ with no hard drive or even a second floppy drive. I had Think C on multiple (IIRC, five) floppies and enough room to have a few portions of ROMlib and tests on the rest of each of the floppies.Backups involved copying floppies, which was a bit time consuming with only a single drive.
Good times!
(ROMlib was my clean-room reimplementation of much of System 6; it was a big part of Executor [0])