On Sep 29, 2008, at 8:59 PM, Peter da Silva wrote:
There is something I call the =93Chernobyl Design Pattern=94,
where =
you =20
take your worst bug, the ugliest part of your code, the part that
=20
is so bad, so radioactive that no one can touch it without
getting =20
killed, and you make it private and inaccessible, and put a new =20
interface around it, essentially entomb it in concrete so that no
=20
one can get close to it. In other words, if you can't fix it, at =20
least contain the damage.
That's what the whole "software tools" thing was all about. Before
UNIX,
even the nicest operating systems were like that.
I'm still waiting for someone to come up with a way of dealing with
GUIs that
entombs every horrid GUI API in adamant. Concrete isn't strong enough.
My plan is to use Unix filing calls and multiple processes:
// Pseudo-code follows
setsid();
int window = open( "/dev/new/window", O_RDWR );
ioctl( window, TIOCSCTTY, NULL ); // Yes, a window is a terminal
ioctl( window, WIOCSTITLE, "Untitled 1" );
ioctl( window, WIOCSHOW, NULL );
I expect this will be hated in several different ways.
Why do you suppose I'm implementing POSIX over classic Mac OS?
You like pain?
Once you accept the premise of developing for classic Mac OS at all,
it's the only thing that makes sense. (Which of course begs the
question.)
So, why?
It's a great hack. (Also, the fact that no one other than myself is
likely to use it makes it a kind of performance art.)
It's valuable experience. I'm not going to learn anything calling
glibc's backtrace() function rather than writing my own.
It's less silly than Cygwin in the sense that classic Mac OS has a
more solid API than Windows. The lack of protected memory is a
liability, but that makes things more challenging. Sure, some bugs
are fatal, but I fix them.
Since I control the kernel and userland, I can do weird things like
mapping the GUI into filespace.
I have perfectly usable hardware that I'm not willing to throw away
just because Apple would prefer I buy new machines to run their
bloatware. Besides, I'd much rather use 68K and PowerPC assembler
than 32-bit Intel.
It's my way of defying people who wanted me to upgrade because Mac OS
X was the new fashion, not because it served my needs better, and
also of giving the finger to Apple for thinking they know better than
me, or maybe for just not giving a rat's ass as long as my check clears.
Classic Mac OS was my first love. I don't hate it, because I see in
it (or perhaps beyond it) the ideal system that Apple never shipped.
Instead my hate is directed toward Apple for botching it. I mean,
it's not the *software's* fault that Apple made it that way, right?
Wait, never mind. Don't answer that. :-)
Too late.
;-)
Josh