Posts

Write yourself a GIT!

I found a website called "write yourself a Git!", which, as the name suggests, explains how Git is implemented and explains how to replicate it using Python. By looking at the requirements, a few things that are readily available in Python must be addressed first. It requires a parser for Microsoft's INI format, it needs SHA-1, regular expressions, and ZLib. I've decided to start by coding a SHA-1 function in C. It can then be imported as a C++ method. The ZLib should have been implemented somewhere with C++98, so I'll try and find something like that. I think there's regex on C++, but I need a refresher on that language.

For Dummies indeed

The second book I grabbed is 'Mac Programming for Dummies - 3rd Edition' from 1999 by Dan Parks Sydow. This book is seriously slow-paced and repetitive, and it only scratches the surface on the Toolbox. If one ignores most of the extremely simplistic explanations, one can finish that book in a few days. The best takeaway was the tutorial on ResEdit, but that's about it. There's a small Toolbox explanation as well, but very superficial. Also, it's still plain old C even thuog the book is rather recent. I'll have to find other books.

Flashback: 2001

In Brazil the primary school used to take 8 years to come to an end, after which a 3-year long secondary school period took place. They eventually introduced a special kind of secondary school that added a professional training programme, lasting the same 3 years period. It was called something that roughly translates to 'Technical Tuition.' I enrolled on a Technical Tuition school to learn IT. I was excused of English lessons after I suceeded on a proficiency exam. On year one we had basic computing and logic, but we also had Visual Basic and Delphi. Of course, it was all very Windows-centric, no Brazilian school could afford Macintoshes. Apple products were still a niche thing in 2001. I didn't know that Delphi was a version of Object Pascal, and that Pascal was one of the gates for Macintosh programming, otherwise I would put more effort into learning it. Delphi was more attractive than Basic for me in the beginning anyway, so that would have been fun. Because of the sch...

Catching up with C

I've finished reading Learn C on the Macintosh, second edition, by Dave Mark. It's a good refresher on C. I forgot how simple it was. But there's no Toolbox involved in this book, no GUI at all. Also, typing code into the emulator is a major pain in the arse. I've installed CodeWarrior Pro 8 on Mac OS 9. The IDE is version 5. I don't know what these guys had in mind when numbering these things, but it isn't very intuitive. QEMU has no clipboard support. And CodeWarrior is not great for typing. I'm spoiled with newer editors, and I'd like to use multiple cursors, fancy shortcuts and stuff like that. So I figured I could sync a directory with the shared drive on QEMU. But no game, because the thing is broken. The shared drive is a one-way road into classic Mac OS, and I can't save stuff back into it from the guest system. So I've decided to make a DMG or IMG file and put it there. By mounting on the guest and the host, I'd be able to sync the f...

Flashback: 1999 - part 2

Image
Pirates of Sillicon Valley was released in 1999 and it describes how Apple and Microsoft were funded and how this relationship caused Microsoft to supplant IBM in the 1990s. The film ends with Jobs returning to Apple and cutting a deal with Bill Gates, who became the proverbial Big Brother depicted on Apple's iconic Macintosh advertisement in 1984. This is a great film I managed to watch on VHS as it was released on Blockbuster. The story kind of stuck in my head and I eventually copied the whole thing into a new tape. I would see that film again a few times. It introduced me to the Xerox Alto, the Apple Lisa and some of Microsoft's and IBM's history as well. It also led me into learning about Next and some other stories concerning Apple and Steve Jobs. More or less at that time I found out about Macintosh emulators and started playing with them. Fusion, Basilisk II and vMac would be part of my collection of software. I even developed a website in Portuguese with tutorials ...

The epiphany

So, after sorting out Mac OS 9.2.2 on a neat QEMU setup, I asked ChatGPT to suggest 10 modern apps for classic Mac OS. This is the list the AI came up with: Basic Markdown Editor To-Do List App with Simple Sync (Local Sync) Local Weather Forecast App Lightweight Personal Wiki RSS Reader Pomodoro Timer for Productivity File Hashing Utility (MD5, SHA-1) Retro Messenger App Basic Image Viewer with PNG Support USB Drive Explorer There are a few obvious messy ones, like a retro messenger app and a USB drive explorer, and a few that few a bit pointless like an image viewer, an RSS reader (do people still use that?) and a wiki. But overall, it's not too bad. I thought about starting with the markdown editor. Why not? I tell you why not. It's painful, that's why. I soon realised that classic Mac OS has no git support. So I would have to code the old-fashioned way: comment out old code, update code, delete code, duplicate files, save a version with a date, rinse, repeat. Sure, I cou...

Flashback: 1999

My parents were separated, albeit not divorced, and I lived with my mum. One winter in 1999 I spent a winter school break with my dad. He had worked for a publishing house for many years and decided to start his own publishing house, and his business partner had yet another publishing house specialising in maps. Naturally, all design was done in Macintosh machines. I had been using Windows for quite a while then. My mum got an IBM PC when I was about 7 or 8 years old. It ran DOS and Windows 3.11. It was rather boring, there was a few games I enjoyed, but not many as they were hard to come by and expensive. We had an upgrade eventually, and Windows 95. That machine stayed with us for half a decade. In 1996 I used the internet for the first time. I remember sending my first e-mail to my dad and my mum explaining that it was cheaper than making a phone call to my grandma. We used Netscape to browse the web. I didn't see anything interesting about it, so my experience was limited. But ...