The more you know...
August 31st, 2007, at 8:06 p.m.
It turns out that you can have WordPress automatically show a post after a specific time. To do so, simply set the post’s time stamp in the future. Presto! The post won’t appear either in RSS or on the main page until after the time you’ve set, and in the management interface, shows up as a “scheduled post.” I’ve actually been using this feature for awhile now: I wrote most of this week’s posts on Sunday afternoon, but set their post times so that they’d appear steadily throughout the week. This lets me write when I feel in the mood, but end up publishing daily, even if I forget/don’t have time/don’t see anything interesting to write on that particular day. If only I’d known about this sooner…
Almost...there...
August 31st, 2007, at 4:24 p.m.
Our last major piece of furniture, an expandable glass coffee table, arrives today. After this, the only things left to buy for the apartment are a music keyboard (I’m currently favoring the Roland FP-7) and a bit of shelving for my closet, after which I’ll at long last be able to unpack my sweaters and throw out the very last box. It’s so, so nice to finally be moved in. This apartment is the first place I’ve lived in New York that I’d actually feel comfortable calling home.
New Rule
August 31st, 2007, at 11:07 a.m.
If you drive your bike at twenty miles per hour through a dense pack of pedestrians who have to dive out of your way to avoid getting hit, just so that you can plow into an intersection against the light and thereby cause an accident, shouting “Good morning!” while pedaling away at high speed shall not be construed as making amends.
May the fleas of a thousand camels infest your armpits, you putz.
The Open XML Debate, Revisited
August 31st, 2007, at 12:18 a.m.
From Slashdot, which is slowly redeeming itself, comes a link to Microsoft admitting that it bribed members of the Swedish ISO committee to vote for OOXML. Unsurprisingly, the Swedish ISO committee just voided its own vote. Due to time crunch, they will not be casting a vote at all in the Open XML ratification process.
I find it depressing but predictable that I’m unsurprised.
Kosher, Kasher, Kwhat?
August 30th, 2007, at 9:49 p.m.
Since I moved in with my current roommate, we’ve wanted to have a kosher kitchen. This past Sunday, with a plethora (two hours) of free time, we finally got around to kashering it.
Q. What the frak is Kosher?
A. Kosher is just a Hebrew word that means, basically, “in full accordance with the rules,” where “the rules” means “laws established in the Hebrew Bible.” The laws set forth in the Hebrew Bible are all in the first five books, known as the Pentateuch or the Book of Moses to scholars and Christians, and known as the Torah to Jews.
Q. I thought kosher only applied to food.
A. It usually does, in common parlance, but there are lots of things that can be kosher, ranging from food to clothing to sex.
Q. Kosher sex?
A. Yes. For example, sex on Friday night with your spouse is not only kosher, but Biblically commanded.
Q. Sweet.
A. Totally.
Q. But what makes a kitchen kosher?
A. Several things. First, all food in the kitchen has to be kosher.
Q. What does that mean?
A. Kosher food is limited to fruits, vegetables, fish with scales, specific kinds of fowl (such as chicken, turkey, and duck), and meat from cloven-hoofed, cud-chewing mammals that has been killed in a specific way under rabbinic supervision. You also cannot mix milk and meat. (For kosher purposes, though, fish does not count as meat.) Shellfish, insects, pork, and camel, among others, are not kosher.
Q. Those rules seem arbitrary.
A. They actually have definite health benefits in a society lacking modern sanitation, but nowadays, following the rules are a matter of faith, tradition, or both.
Q. So is all that’s required for a kosher kitchen having kosher food?
A. No. You also have to follow a bunch of other rules, such as, you have to have separate milk and meat dishes and implements.
Q. That’s nuts.
A. I can see that.
Q. So what’s kashering mean?
A. Kashering a kitchen is the act of making it kosher. This basically involves throwing boiling water over the countertops and throwing any non-kosher silverware or pots into boiling water in a kosher pot such that, at least for a moment, they touch neither the sides of the pot nor anything in the pot.
Q. That sounds wonderfully dangerous.
A. I have burn aloe recommendations if you need them.
Q. I am an Orthodox Jew. You are grossly oversimplifying.
A. Congratulations. You are not the target audience for this post. שקט. :-)
Q. Why is this important to you? You never seem that religious.
A. The full response to that is long and complicated, and is something that I want to talk about fully in another article. For now, though, I’d point out that there can be an incredibly spiritual experience in elevating something as mundane as a kitchen to a miniature sanctuary, in turning eating food into a religious experience. It’s not for everyone, but it’s something that even an atheist—something which, despite the vibe I may give off, I am not—could appreciate, if not share.
The WSJ on Open XML
August 30th, 2007, at 2:17 p.m.
I think that the Wall Street Journal does a fairly good job covering technology from a consumer’s perspective, but I feel that they struggle whenever they try to cover more industry-focused issues, making outright mistakes and failing to understand what in the debate is actually important, which leads them to follow up (or fail to) on the wrong points. Today was no exception: in an article entitled “‘Office’ Wars,” they attempted to cover the politics revolving around Microsoft’s efforts to get their Open XML adopted as an ISO standard. The mistakes began cropping up depressingly early in the article:
To gain approval as an international standard, Microsoft had to bare the code that undergirds the Office file format, called Open XML.
Um, no. Microsoft created a brand-new file format called Open XML that is a totally different format from the ubiquitous DOC format. They then published a 5000-page specification of its supposed operation that is incomplete and inconsistent with their own Open XML implementation, which they have not had to lay bare. This not-actually-implemented-as-specified Open XML specification is the one Microsoft is trying to ram down everyone’s throats.
Jean Paoli, one of Microsoft’s top standards experts, says the company wants Open XML adopted as a standard to encourage rivals to use its format, not squelch interoperability. He points out that other vendors, including Apple Inc., are adopting it.
Apple supports reading an extremely limited subset of Open XML in TextEdit in its upcoming Mac OS X Leopard. The most recent version of Pages can also import a slightly larger subset of Open XML, but, so far as I know, can’t write it back out. Neither Pages nor TextEdit use Open XML as their native formats. I do not think that Apple’s behavior can honestly be construed as “adopting [Open XML].”
He says IBM is stirring up opposition to Open XML’s gaining approval from the International Organization for Standardization, or ISO, to protect its Lotus Notes office suite, which uses the rival format Open Document.
Probably partially true, in the sense that Lotus Notes bundles a version of the open-source OpenOffice, which uses ODF as its native format, but since there actually are several word processors that work natively with ODF, I’m hazy how this could be construed to protect Lotus Notes. In fact, given that Lotus Notes used to ally itself with SmartSuite, which had a proprietary file format, I think this actually opens up Notes to more competition. Given that there are no word processors other than Word that support Open XML, I think Microsoft’s claim applies far more strongly against itself.
Open Document is already an ISO standard, but Microsoft says there’s room enough for more than one document standard.
Why? “Just because” isn’t a good enough reason. ODF has already been standardized for some time and has broad industry support. Only Microsoft Office uses something superficially resembling Open XML. This strikes me as a hilarious extrapolation of the old joke, “The only problem with standards is that there are so many to chose from.”
In addition, Mr. Robertson said, the technical committees should include lots of voices—and that means some on Microsoft’s side. “Where you find expansion in the committees, you will find expansion on both sides,” he said. “That’s OK because it represents the community a whole lot better.”
This is the “all ideas are equally valid” fallacy. If we are going to have a debate on whether we should require, by law, that people dress up in purple chicken suits and make monkey noises at 3 PM on the second Thursday of the month, no one would be particularly surprised if a committee were completely biased against the idea. Even if I tripled the size of the committee, having a purple chicken suit proponent likely would actually make the committee less representative, since the position would then be over-represented.
We have a similar situation with Microsoft’s Open XML. IBM, Sun, RedHat, Novell, Canonical, and Google, among others, support ODF. So far as I know, the only major company backing OOXML is Microsoft. Why does it follow that we should expect roughly equal numbers of OOXML proponents and detractors on any given committee?
I appreciate that the WSJ has recognized that the OOXML-ODF debate is an important one, and I’m glad that they’ll be increasing public awareness of it, but I still wish that they’d done a better job covering what’s actually going on. This is a case where both sides are not created equal, and fair reporting probably should not treat Microsoft as if they have equal merit.
New Rule
August 29th, 2007, at 4:49 p.m.
If you hear a car horn honking, floor it. They may be honking at you. This will apparently help alleviate congestion.
Dreams Dashed in C++; News at Eleven
August 29th, 2007, at 12:10 p.m.
In my previous article, I discussed some alternatives to C++ for systems programming. Today, I want to provide an example of why you might care.
Tyler and I recently debated rewriting Fog Creek Copilot in Qt, a powerful, high-level, cross-platform C++ framework. The idea came to us when we started discussing the implications of maintaining four helper applications (Windows Helper, Windows Helpee, Mac Helper, Mac Helpee), each of which shares depressingly little code with the others. Because Qt is fully cross-platform, and, unlike some other toolkits, doesn’t stick out like a sore thumb on Macs, we figured we ought to be able to cut down the number of real code bases to two (and hopefully greatly increase the amount of code shared between Helper and Helpee in the process). To evaluate the practicality of using Qt, I grabbed the open-source version and a copy of C++ GUI Programming with Qt 4 and sat down to write a small demo app (“Virtual SysAdmin”—the only app that simulates a rapid-fire deluge of mindless support emails).
The good news is that I love Qt. As far as C++ frameworks go, I can now say without hesitation that it’s my favorite. Both its low-level and high-level libraries are very well thought-out and easy to use. Its willingness to extend C++ with its signal-slots mechanism effectively makes C++ as flexible as Objective-C, and enables a wonderfully clean MVC implementation compared to any other C++ GUI framework I’ve used. Working in the GUI designer is effortless, and Qt makes the refreshingly correct (and depressingly rare) decision to have its GUI designer generate descriptor files rather than the convoluted C++ code with tons of “DO NOT MODIFY BELOW THIS LINE” comments spat out by other designers. I think I still prefer Cocoa over Qt for Mac-only development, but otherwise, I’d probably pick Qt at the moment for writing an end-user app.
To be suitable for Copilot, though, the framework’s ease-of-use doesn’t matter. What matters is how large the framework is when statically linked. Qt, sadly, falls flat. I worked with the Qt mailing list to get a small version of Qt, but, even following their advice, I was only able to shrink “Hello, world” to about 2 MB—well more than double what Copilot has to be with all of its code and data files. That is, sadly, a deal-breaker. (I admittedly have not yet had a chance to play with qconfig as suggested late in the thread. If that substantially changes things, I’ll be happy to post again, but I’ve dedicated enough time to compiling Qt for the time being and need to focus on other things.)
What makes me sad, though, is that the bloat in a “Hello, world” app isn’t entirely Qt’s fault. Some of it may be; it’s possible that the framework really does have that many interdependencies. But an equally likely culprit is the C++ language and linker.
Back in 1996, when I was 13, had just learned Squeak Smalltalk, and was trying to get into lower-level languages, I picked up a copy of Delphi 3. Delphi is (or at least was) based on Object-Pascal—basically Turbo Pascal with a lot of additional object-oriented extensions (including interfaces and COM support) and a powerful run-time library to support introspection. Delphi 3 had a rich framework that was extraordinarily similar to Qt. It had the same way of building forms, a nearly identical class hierarchy, and, though not having a concept quite as powerful as signals and slots, had an event system that bears more than a passing similarity to the Qt-comparable event system in .NET. (Hardly a coincidence, since Anders Hejlsberg, who designed Delphi, went to Microsoft to work on J++ and later C#.) Yet despite Delphi’s similarity to Qt in features and capabilities, its executables were far, far smaller. “Hello World” in Delphi comes in at about 100 kB, give or take. A fairly full-featured app I wrote at the time that tells you what kind of rock you’re looking at comes in at a heftier, but still petite, 300 kB. Other Delphi apps I wrote at the time have similarly small sizes.
Part of the reason that Delphi apps could be so small was that the Borland compiler did a spectacular job compared to the likes of GCC/MinGW, which is what I was using for tests. But in turn part of why it could do such a stellar job is that the Delphi language made it easy. Object files had rich metadata that made it easy for the linker to find and remove dead code. Certain facets of the language, such as having native strings, sporting a simpler, more consistent object system, and lacking templates, meant that the linker frequently had less total code it needed to sift through. The generally higher-level nature of Object Pascal also meant that the compiler could do a better job reasoning about what the code was actually trying to accomplish, allowing it to make superior optimizations earlier on. All of these features combined made for a system that could simultaneously deliver a rich object framework without giving up small executable sizes and without requiring a massive DLL. C++, at least in its current form, simply can’t achieve the same performance.
Would Qt be small enough to be viable if only it were written in a different language? I honestly have no idea. But from experience, I can only imagine that, at the very least, it would have helped.
New Rule
August 29th, 2007, at 10:12 a.m.
If the sidewalk is so narrow that only one person can fit, and there are people behind you, do not stop, turn around, and gawk at a dog, even if it’s a chihuahua.
Especially not if it’s a chihuahua.
Scientists v. Romantics
August 29th, 2007, at 8:57 a.m.
I honestly haven’t figured out whether this comic is really funny or really sad, but the romantic in me mostly just wishes that it were false.
Avoiding the Masochist's Programming Language
August 28th, 2007, at 12:13 p.m.
As you may or may not know, ANSI is trying to push a new C++ standard out the door called C++0x (which those of you who know C may find amusing, since you can read it “C++ Hex”). C++0x’s primary goal is to take C++’s already horribly convoluted syntax and make it even worse. Looking at a summary of C++0x‘s additions, for example, we come across the concept of rvalue references, expressed as int &&x. With this move, C++ now has a bizarre hybrid of pointers and handles that solves a legitimate problem in C++, but one that really shouldn’t exist to begin with. C++0x also introduces the odd concept of nullptr, a strongly typed null pointer. There’s a reason similar constructs exist in higher-level languages like Java or Python that try to move away from the hardware, but given that one of C++’s huge initial advantages was retaining the close-to-the-metal feel of C, I really fail to see why we want nullptr when we already have 0. Most of the other changes seem frivolous (the new concept keyword), closing the barn doors after the horses have already come home (Boost‘s sharedptr and weakptr will enter the language), and trying to cram high-level constructs into a language never designed for them (such as garbage collection).
Thankfully, even if you need to stay close the hardware (which most programmers rarely do), there are several superior alternatives available. On Windows and Linux systems, you can take a look at D, which is basically everything that C++ should have been: easy low-level access when need be, a vastly cleaner and less ambiguous syntax, per-allocation optional garbage collection, optional contracts, generic containers, typesafe varargs…the list goes on. Calling existing C code from D is downright trivial, involving little more than a few extern declarations. It’s a project that anyone stuck doing low-level programming should be keeping an eye on.
On Windows, Linux, and Macs, Objective-C can also make a superb choice—especially when coupled with GNUstep, whose FoundationKit framework provides a rich, cross-platform set of low-level libraries for things such as memory management, common data structures, and file operations. With Objective-C, you can program in an almost Smalltalk-like environment for non-speed-critical components, but then drop down seamlessly into C for the tight parts. Because Objective-C, unlike C++, is a true superset of C, this can actually be easier in Objective-C than C++ anyway.
If you’re in the mood for something a bit different, but still want to stay close to the hardware, take a look at Free Pascal, a superb cross-platform Pascal implementation that includes a massive, powerful class library, a great language runtime, and the scarily easy ability to drop down into assembler that made Turbo Pascal so great. If you’re scared by what you once read in Why Pascal is Not My Favorite Programming Language aeons ago, fear not; the Pascal language implemented by Free Pascal resolves basically every single one of those problems. And, of course, calling C libraries involves nothing more than running the C header file through a converter or linking against the shared object directly. Easy.
Keep in mind, I’m a high-level language fan. I’d greatly prefer to be working in Smalltalk or Common Lisp over any of these options if I have the choice, but I recognize that there are time you really do need to be close the hardware, whether for size, speed, or both. But even in that domain, there is no reason why any sane person should feel compelled to chose C++ over the alternatives.
I have a hunch, given this blog’s audience, that I’m probably preaching to the choir, but on the off chance I’m not: if you haven’t already, take a look at something other than C++ the next time you have to do system programming. You might really like what you see.
The College Aftertaste
August 28th, 2007, at 9:01 a.m.
Does anyone other than me have a recurring dream that you didn’t actually graduate college? I tend to get it whenever Duke gets in my face—such as right now, just as classes are resuming. It’s…it’s getting kind of annoying.
(Yeah, I should’ve posted this at Michael‘s Dream Ledger, but in general I don’t like making my dreams public. It feels like maintaining a Flickr gallery of your underwear.)
First Impressions of Movable Type 4
August 27th, 2007, at 3:19 p.m.
I’d sometimes like to think that I can be a purely rational person, but the fact is that I’m anything but. I’ll ignore software that does what I want if it’s not “pretty,” and I’ll often ignore software that does what I want and is pretty if it’s not “open enough.” I favor using the NYC Subway or walking instead of taking the bus, even when I know darn well the bus is the fastest option. I frequently ignore weather reports when I leave in the morning, instead going by what I feel the weather’s actually going to do.
My powerful distaste for MySQL is not irrational. The nominal database has corrupted the minds of a generation of web developers who don’t really understand ACID, are afraid of using transactions, couldn’t make a schema that used a composite primary key if their lives depended on it, have a genuine fear of triggers and views, and think this is a fine and SQL-compliant way to quote a database entity. I am happy to say that no project I have ever worked on that needed a relational database has used anything except DB2, PostgreSQL, or Microsoft SQL Server—all real, ACID, SQL-compliant systems.
Yet though my distaste for MySQL is not irrational, the dirtiness I feel whenever I use a program that requires MySQL…probably is.
This blog is powered by WordPress, a blogging platform written in PHP (which is in turn a story for another day). WordPress requires MySQL. This has never sat well with me. It’s the only thing on the entire server that requires MySQL, which in turn requires me to learn how to administer MySQL just so that I can have my blog on here. Because MySQL has Unicode issues, WordPress has Unicode issues, and because I’m one of those jerks who insists on writing “naïve,” “café,” and, on rare occasions, even pretentious crud like “reëxamine” and “rôle,” this isn’t just a theoretical problem: when I moved to Linode from Dreamhost, I had to try several times before I finally got all of the posts properly moved. Not a pleasant experience. Yet I have a hard time giving up WordPress. It’s so easy-to-use, and it just gets so much stuff right, that I can’t really justify using an inferior project just so that I can keep the data on PostgreSQL.
When Six Apart announced that Movable Type would become open-source, I thought that my prayers had been answered. Movable Type is a powerful, tested, feature-rich blogging platform. It has superb traffic analysis. It does a great job filtering spam. It supports OpenID. It’s easily themeable. And, of course, it runs just fine on PostgreSQL. This, I thought, would be perfect.
Turns out I was wrong.
My problems began with the install. Installing WordPress, provided that you have PHP set up correctly, involves the following steps:
- Extract all the WordPress files into a directory
- Go to the install page
- Tell it where your database is
- There is no step four
Installing Movable Type, at least for me, looked more like this:
- Extract Movable Type into the
cgi-bindirectory on Apache - Move some of the Movable Type files into your
staticdirectory - Go play with permissions on the
cgi-bindirectory, cause apparently MT needs to write things there - Install DBI for Perl via
apt-get - After trying for a few minutes to figure out why MT insists I haven’t installed DBI for Perl, remember that DBI needs drivers for its databases; install them also via
apt-get - Allow
apt-getto pull in roughly 30 additional dependencies - Enter my database connection information
- Play with permissions again, because MT just set them to 777 on one of its directories
- Log in and get notified that I still have bad permissions, apparently now in the static files directory
Once I got all of that sorted out, though, my hopes were high. After all, you only go through installs once, and the WordPress caveat, “provided you have PHP set up correctly,” shouldn’t be overlooked. It’s a biased comparison. What really matters is how the software performs and how easy it is to use.
The answers are, respectively, “Slower than a 70-year-old man trying to outrun a hoard of Playboy Playmates” and “not very.”
Movable Type is slow. Really slow. Operations that are virtually instantaneous on WordPress take a significant amount of time for Movable Type. Publishing, for example, which involves hitting “Publish” in WordPress and completes in about half a second, takes a couple of clicks in Movable Type (you have to republish your blog à la Blogger, you see) and takes a few seconds. I’d be more willing to put up with that if it weren’t for the fact that WordPress is running on my virtual host at Linode—a shared CPU system where I’m allotted 256 MB of RAM—whereas Movable Type is running on Vera, a server my roommate and I keep in our apartment, which has a blasé 2 GB of RAM and a RAID controller. PostgreSQL isn’t the bottleneck, nor is Apache; I checked. It’s MT all the way.
I haven’t totally written off MT4 yet, but my experience thus far has not been a good one. I’ll have to see if my opinion changes as I work with it more. I’m slowly overhauling the look of bit qua bit to get away from this professional and severe theme to one that’s gentler and more fuzzy, and will be implementing the theme in both platforms simultaneously. I’m also going to muck with Vera a bit more to ensure that something’s not badly misconfigured. But, at the moment, it looks like WordPress may be my blogging platform of choice for quite some time to come.
New Rule
August 27th, 2007, at 9:45 a.m.
You may not ask me for money while listening to your iPod nano.
Too Much Emacs
August 26th, 2007, at 10:19 p.m.
This afternoon, on a lark, I installed Conkeror, a Firefox plugin that makes Firefox look and act like Emacs. As far as these things go, I’m actually extremely impressed. A substantial number of Emacs commands are implemented—including the less-common ones, such as C-x h (select all), that most Emacs-style emulators seem to miss. Suddenly, navigating the web entirely by keyboard seems…pretty reasonable. If you’re either an Emacs or a keyboard junkie, check it out. You may really like what you see.
What's in a Name?
August 26th, 2007, at 12:01 p.m.
Today, I was going through the sizable network that my roommate and I have built up, compiling a sysadmin-style binder of addresses, MACs, components, operating system settings, and so on, and was surprised how many systems we actually have on the network just within the apartment. The following is a full list. What I find interesting is how these machines’ names at once make them more “interesting” than just being “the machine in the bedroom,” and also seem to reflect something of what was going on in the brain of the owner at the time, to the extent I can easily tell which machines are mine and which are my roommates.
Mungus/Pacifica
- Apple Power Macintosh
- Mac OS X 10.4
- 2x2.5 GHz PowerPC G5
- 2 GB RAM
- 410 GB storage
- ATI Radeon 9800 XT
- 1680x1050 20” LCD
Squeegee
- Nokia N800
- Official Maemo-derived Linux
- 330 MHz Texas Instruments OMAP2420 (ARM11 variant)
- 128 MB RAM
- 256 MB Flash ROM
- 800x480 4.1” LCD
Twoface
- Dell Inspiron 6400
- Ubuntu Linux 7.04/Windows XP Pro
- 1.67 GHz Core 2 Duo
- 2 GB RAM
- 80 GB storage
- ATI Radeon Mobile X1400
- 1680x1050 15.1” LCD
Blue
- Custom-built machine
- Windows Vista Ultimate Edition x86
- 2.33 GHz Core 2 Duo
- 2 GB RAM
- 400 GB of stoorage
- ATI Radeon HD 2600 Pro
- Dual 1024x768 LCDs
Haven/Gumbi Expandomatic
Apple AirPort Express, used nowadays purely for music broadcasting (though, as you can probably guess from the name, it was originally an AirPort network extender as well)
Wii
Our Wii. I wish there were a name to change what name the Wii self-identifies as, but there doesn’t appear to be.
NintendoDS
We have a DS and a DS Lite, though neither I nor my roommate play them much these days
Persephone
Our router, a Linksys WRT54G 8.0
Smear
Our PAP2 VoIP-to-phone adapter
Vera
- Custom-built machine
- Debian Etch
- 1.70 GHz Pentium 4
- 2 GB RAM
- 144 GB storage
Solomon (Retired)
Solomon is all but dead (the memory clip, located directly under the keyboard, broke from strain, and I can’t justify replacing the whole mobo on a six-year-old machine), and is being left to live out its remaining days in my climate-controlled office at Fog Creek for occasional use.
- PowerBook G4
- Mac OS X 10.4
- 667 MHz PowerPC G4
- 512 MB RAM
- ATI Radeon Mobile 7500
- 1280x854 15.1” LCD
Best. Product. Name. Ever.
August 26th, 2007, at 11:39 a.m.
Okay…who else is psyched about being able to buy an i.Beat blaxx?
The German company also seems very excited about their upcoming sun-colored version, the i.Beat jooz.
Edit: The company has renamed the product simply “blaxx.” You can still see the original name in Wired’s piece on the player.
Writing an Emulator
August 5th, 2007, at 4:34 a.m.
I don’t know why, but recently, as my love of really low-level hardware and my desire for low-power, high-performance computing has increased, I’ve been researching all the old, famous CPUs and operating systems. I started over what I swore was going to be a computer-free vacation by delving into programming in assembly for 680x0 Macintoshes (during which time I fell in love with 68k assembly), then explored ARM chips, and finally somehow or another ended up at 4:30 AM on a Sunday working on an assembler and cycle-accurate emulator for the MOS 6502. Resources I’ve found useful:
- Assembly in One Step, which provides a superb overview of the 6502 execution model
- A list of 6502 opcodes, including their mnemonics, size, and how many cycles they should take to execute
- WLA DX, an open-source cross-assembler for a bunch of old CPUs (including the 6502, 65C02, 65816, and Z80), which lets me check that I actually understand the documentation and am writing my own implementation correctly
When I have something worth looking at, I’ll post it. On a lark, I’m actually writing my assembler and emulator in Free Pascal, a superb open-source clone of Borland Turbo Pascal. I’ll also post about how that goes. (The short version: my memory is better than the experience, but both are better than C++.)
