Bantertainment

A “best of” the Xbox Live “ban” forum postings here.

I would weep (especially for the Lost Art of Spelling), except that I’m too busy shaking my head and hitting Next.

“Cuz” is not a word. And people should be properly licensed before being allowed to use apostrophes.

WinPhone 7 two months later

[Disclaimer: I work at Microsoft. I would probably still be saying the following even if I didn’t, though]

I’ve had a Windows 7 Phone, the Samsung Focus, for a couple of months now, and thought I’d give a quick report.

First, I really, really still like it. More than the iPhone. The reasons for this are several-fold:

  • The email client is efficient and I don’t need to spend a whole lot of time in it. Multiple accounts are nearly friction-free (just multiple slabs in the root UI). I can easily tell which accounts have recently received mail.
  • Syncing music over wireless is great. If the phone is in the house, I can sync to it without uncoiling cables and whatnot.
  • It’s a phone; I can actually make calls on it. The iPhone was pretty clumsy when it came to answering and originating calls. I haven’t missed one yet.

I’m also having a ton of fun programming it. I’ve had all week to work on a 2-D game and the development environment is fantastically good. (I wish I was a better artist; my art is solidly rooted in the early 80s, but I figure I can give some people a decent amount of entertainment for a buck, when I finish this thing). I’m having flashbacks to programming the Atari 800 in Basic, only C# and the XNA framework are a zillion times faster and easier to use; I was dead to the world this afternoon while I got some snazzy input classes working.

It’s not total daisies and puppies, though:

  • Marketplace search is full of stuff I don’t want (I want to look for /games/ but I get /music/ and vice-versa).
  • The browser needs work (hyperlink hit areas are too small).
  • App tombstoning seems unpredictable. I’m sure it’s working as designed, I’m just not privy to how it works, and I’ve just gotten used to every app forgetting about its previous state, with the occasional pleasant surprise when they haven’t forgotten.

Cut-and-paste? Never used it on the iPhone, I don’t miss it now.

It’s pretty good, but there’s room for improvement, and I imagine the WP7 team is not sitting on their fundaments.

Vent Filter

If I ever set up another email system for a company, I’m going to configure a dud internal address named asshole, with a filtering rule set so any message composed with asshole as a recipient (either To: or Cc:) gets held, undelivered, until you remove the fake address.

Likewise filter if asshole appears in the first line or two of the body text.

This way it’s possible to compose something like:

From: blah
To: asshole

Dear Clueless Waste of Oxygen,

… stuff that makes you feel better but that you would never, EVER send …  ooops

This probably would have saved a certain person (not me!) a huge headache a not too long ago . . .

How the Atari ST almost had Real Unix

“Walkies!”

It was 4:00 in the afternoon, and time to walk to the dump, out past the Sunnyvale sewage plant, and talk about hard problems.

I’ve had some of my best ideas while out walking. I’m 6’4″ with long legs, and I walk fast. I find when my legs are occupied I can let things sift through my head and sort of bounce around until they fall into place. I have to leave the cell phone and music player and other distractions behind or I won’t get work done. Without distractions, I just get out there and let the ground travel past my feet, and things get solved. At least it’s good exercise.

That, or just go out for a walk with cow-orkers and enjoy the day, and bullshit about stuff.

The latest problem I was working out was how to run Unix on the Atari ST. The Tramiels had somehow wrangled a license for AT&T’s SVR-something-or-other version of Unix (might have been SVR3, but this was in the bad old days when AT&T was actively fucking up Unix, and it could have been just about any version, including SVR666). The license was for a mind boggling, nay, jaw-dropping ten bucks a seat. The problem was that the ST didn’t have any kind of memory management hardware, just a raw CPU flinging real addresses at naked DRAM, and the machine’s cheap-ass vanilla 68000 was incapable of recovering from a fault unless you cheated.

[What’s that about Linux? Dear child, Linus was probably not out of whatever they use for high school in Finland. All we had in the market was 4.2bsd running on Vaxen, 68K-based Suns with a ton of hardware to work around the 68000 limitation re faulting, and a whole running field of wannabes that would sink without a trace in five years. Oh, and some screwed up AT&T workstations with monochrome graphics and UIs that curdled your eyeballs and left you wishing AT&T had simply stuck with making phones.]

The hardware folks were convinced that grafting an MMU into the ST was impossible; in theory you could still run something like Unix, but with no memory protection and no way to easily grow and shrink a process’s address space a straight-forward port of Unix would be glacial and prone to crashing really badly. The hardware guys were mostly right; the 68000 wasn’t capable of handling a page fault (it didn’t save enough information on its exception frames to restart all cases of a faulted instruction). Motorola didn’t offer an MMU chip anyway (the 68020 didn’t exist yet, and the sticker shock of its optional external MMU meant that only Apple folks could afford it, and it was still optional on most Macs for several years). Furthermore, the memory system of the ST wouldn’t tolerate the delays that a traditional MMU would incur; the ST’s DRAMs were being thrashed ten or fifteeen nanoseconds under spec (“You have to understand,” said our hardware guys, “DRAMs are really analog devices,” and I’m sure a DRAM designer somewhere felt cold and shivery all of a sudden, and didn’t know why).

To run Unix effectively we needed some hardware that was very fast, that was simple enough to put into a minor spin of the ST’s memory controller with little project risk, and that would still provide some kind of memory relocation and protection. The ability to have separate address spaces to isolate processes would be good, too.

“If you can come up with something that takes about a gate delay, I’ll put it in,” said John, the memory controller guy. He seemed dubious, but willing to listen.

I went for a bunch of walks.

– – – –

In the early 80s, eastern Sunnyvale bordered southern San Fransisco Bay with a landfill hill (a large, long mound maybe a hundred feet high), and a sewage treatment plant just beyond. Beyond these were settling ponds for the sewage, separated by a large number of wandering dikes upon which were set miles upon miles of paths for walking. I never exhausted the paths. It was easy to get your heart pumping and your legs swinging and let your head fly off into some tough technical nut. I never really noticed any smell; maybe once or twice. The winter rains washed the stink out of the air.

There were birds out there by the thousands, and any number of rodents. I saw an enormous heron once and realized why my parents had been so excited to see them nest in a marsh we’d lived near in Ohio.

We could also get a good view of planes at Moffet Field. Occasionally a U2 would take off, shaking the ground slightly as it roared into the stratosphere to look (we were told) for pot fields in northern California, saving the world for democracy.

Then the path would loop back, and I’d bounce some ideas off of people. Eventually we got it.

– – – –

The MMUs I knew about did page table walks of a multi-level tree; those multiple indirections implied complex, stateful and slow machinery. There was no room in the ST’s memory controller for the caches required to make a table-based system perform reasonably, even if the gate count of table-lookup hardware had been possible. The ST was no VAX. We had to pay dearly for chip area, schedules were tight, and DRAM timing was even tighter. Nobody wanted to pay for a feature they’d never use.

Non-MMU-based systems used base-and-bounds; a favorite technique in mainframes and minis from the 60s and 70s. We could get protection by checking user accesses against limit registers, a pretty cheap operation, but that wouldn’t get you relocation. To do that you had to muck with the address bits, and do an addition.

The problem was, there wasn’t time to do an addition with the necessary carry-propagation on every single address issue, not to mention the gate count.

So how does a typical Unix process grow? The text and data are at the bottom of the address space and don’t move; the bss follows those, and grows up via the “brk.” The stack grows down. That’s it. Very simple, very hippy 70s.

So imagine something really minimal, like replacing a bunch of address lines with a chosen constant value for user-mode accesses. Leave everything untouched for supervisor accesses. That’s it, that’s your total relocation. It’s really simple to implement in hardware, just a latch and some muxes to choose which address lines go through and which get replaced.

For address space growth you have another register, a mask or a bit count, that checks to see if some number of the issued upper address bits are either all zero or all one. You start the stack at 0xfffffffe and grow down. You start the bss low and grow up. A variable number of bits in the middle of each address are simply substituted. If the upper N bits aren’t all 0000…00 or 11111…11 then you generate a fault.

Now you have a system that both relocates addresses and handles growth in two directions in powers of two. You use throwaway instructions to do stack growth probing (dud sequences that don’t need to be restarted if they fault), and that needs a little compiler work, but it’s not too bad. Processes are tiled in memory at power-of-two addresses, so there’s more physical copying going on than you probably like when stuff grows, but again, it’s not too bad. Welcome to the world of doesn’t-totally-suck, and probably runs rings around a PDP-11 despite its limitations. AT&T SVR-N didn’t have paging anyway (like I said, they should have stuck with phones).

– – – –

John Horton, the memory chip guy, actually did this hardware for the Mega ST; I don’t know if it’s documented, or if he had to sneak it in or not. I do know that it was not used for Unix in my time at Atari; the deal with AT&T expired before the hardware existed, and frankly, supporting Unix probably would have been a massive effort, and one that the Atari software group would have been unable to adequately support. I vaguely recall some Unix-a-like environments for the ST, but I pretty much lost interest in the ST after I left Atari in 1987.

I recall talking about this scheme with John Gilmore, who took a kind interest and asked some good probing questions. We had some great conversations at some otherwise strained hacker dinners in Berkeley. (I’ll talk about South Bay versus North Bay geeks some other time…).

Rules of SCRAM

Here are the rules of SCRAM, which we found on a notebook lodged above the ceiling tiles of an office whose former occupant had been Dismissed Without Favor Under Abrupt and Very Mysterious Circumstances.

May these serve you well.

—-

1. The team must meet for at least 15 minutes, blocking traffic in a hallway if possible. The meeting must be held once a day, at a different time every day to accommodate different team members’ schedules. If a single time is convenient for everyone then a different time must be chosen, preferrably one which causes at least one person to miss a bus or shuttle.

2. There are GOATS and there are COWS. GOATS get blame; they are otherwise uninvolved. COWS must stand around and talk (or “moo”) about inconsequential nonsense, or if technical details about the project need to be mentioned, the COWS will talk about deeply booorring esoterica.

3. The BARNYARD MANAGER must conduct each Scram wearing a funny hat, an untucked flannel shirt and hip waders. When the team is assembled, the BM’s job is to go around the room and ask what the team members have had for breakfast, whether they have enough coffee (and if not, provide it), and after an adequately long and polite exchange of nothings, inquire as to how things are going on the project, if it’s not too much trouble.

4. Status reports (from the COWS only) are one of:

“Moo.” Things are going great.

“Moo.” Honest, that bug fix is done and ready to be checked in.

“Moo.” Maybe there is still a little problem.

“Moo.” We have backups for the production database, right?

“Moo.” That GOAT over there is the real problem; it’s HIS code I’m fixing.

“Moo.” Who made me a cow on this project anyway? I was happy working on ________ until they dragged me in here to work with you ________.

[common reponse:] “Mooooooo,” and move on to the next COW.

5. GOATS just stand around during this phase and stare at each other, rolling their eyes frequently at howlers (such as using serialization to SOAP for storage, or databases as RPC mechanisms). It is often useful for GOATS — or anybody, really — to take notes for the monthly BACKSTABBING drill.

6. COWS also report what they will be working on, and whether they are blocked by anything and need medical attention. A long, cud-chewing description of every planned keystroke and mouse click for the next 24 hours is about the right level of detail.

7. I lied earlier, there are also ORANGUTANS. The ORANGUTANS drop in on the meeting, raise a ruckus, throw shit around, and leave. These can be managers, architects, high-ranking sales folks or executives who have discovered a new shiny methodology to chase.

“Why aren’t you guys using Aspect Oriented Programming for this? You should be using SOAP-on-Rails and template meatprogramming! [sic] You’d better have those cyclo-automatic complexity numbers submitted and down by half by next week or we’ll have to find a new team who can! Our field people need instrumention numbers and ROI valuation or this project is history!”

(leaves)

“Who was that guy?”

“Third floor, sales I think.”

“Not high enough for when we get him to jump.”

8. After the last COW has spoken, everyone goes off and does whatever they were planning to do anyway, and the BM polices the area with the shovel.