I’ll make a research-oriented entry before long; I promise. I’m starting to get towards writing up some of the cool stuff in my thesis.
I’ve started writing an Itanium tutorial. That document will magically update every now and then as I write more. On the one hand it’s slightly embarrassing how much I’ve written — it’s almost half as much as I’ve written for my thesis so far — but it’s an entirely different kind of writing. There’s really no rigour at all to it. I don’t have to worry about proving things or citing things; I’ve never proofread any of it. I just write whatever pops into my head, which makes it very quick and easy. Primarily it’s for my benefit, so I don’t forget anything and so that it forces me to figure things out more concretely than I would otherwise.
This is a follow-up to this post. Mark was magnanimously amazing and bought an Itanium machine for “the lab”. It’s currently sitting in my apartment. I’ll make another post tomorrow, I expect, where I actually get to play with it properly, but I thought at the very least I’d make a post about the headaches of actually getting it working.
Go through the pictures and read the running commentary because I’m not going to repeat the pictures here.
Sadly the machine is noisy and relatedly probably quite a power sucker. It’s in the corner of the living room, not far from where Jasna’s office is so I’m not going to be able to leave it on very often, I don’t think. The noise would probably drive Jasna crazy.
I should say I still haven’t got a chance to really sit down and play with it — namely play with the assembler — like I planned because HP-UX needs so much more setting up. I’m going to have to install pretty well the entire GNU userland because HP’s userland is absolute garbage.
Yes, I’m a computer architecture nerd. I expect this won’t surprise anyone.
The recent story on Microsoft ending support for Itanium (side note: this is hardly news. No one ran Windows on Itanium in the first place) rekindled my love affair with the Itanium architecture. Every six to twelve months I become infatuated with it all over again.
My infatuation usually dies down when I realize the Itanium is out of reach for mere mortals. Sometimes I day dream about when I’ve accidentally stumbled into money and I’m able to afford one. It’s hard to find a new Itanium server for under $30k and playing around with the online configurators it’s not hard to run yourself into the half a million dollar range.
Today’s different, though: today I decided to check out Ebay. Used Itanium servers are actually very cheap. Here’s one for $340. It’s only about 6 or 7 years out-of-date, too. Being out-of-date with Itanium isn’t such a big deal since they were never in-date to begin with. The prospect that I might be able to buy myself one as a graduation present — when I have time to play with it — is exciting.
I won’t bore you with the details of Itanium and why it failed in its promise to be the next big saviour, the one computer architecture to bind them all. I was actually going to write about why I love the Itanium so much, but before I knew it I’d written six paragraphs about how beautiful the architecture is and realized no one but me would ever care to read it. Suffice it to say it’s the nicest architecture I’ve ever seen, from the perspective of someone who truly enjoys writing assembly code, the perfect balance between exposing the architecture and hiding away the mundane details that sometime plagued RISC architectures. Whenever someone foolishly asks me about Itanium — don’t worry, I’m usually able to restrain myself — I describe it as “everything SPARC should have been”, SPARC being one of the more elegant RISC architectures to date.
For my purposes it doesn’t matter if Itanium is practical or popular or well-fabricated or none of the above since it’s just for my own enjoyment. One of the biggest problems is that no one’s managed to write a suitable compiler for it. That suits me just fine since I’d rather be writing assembly code by hand or writing my own compiler for it. I’m actually half convinced that if anyone actually is going to write a brilliant compiler for Itanium, one that intelligently takes advantage of all its speculative loads and rotating register windows and similar toys that I like to drool over, it’s going to be a compiler that has a serious leg up in static analysis, maybe for a language that’s been seriously restricted, for which my research would be appropriate.
Well I’m not so arrogant as to think that I can write a compiler for Itanium where so some of the world’s top back-end developers have failed before. Even if failure is nigh guaranteed, it would be a really fun challenge, and it’s always more fun when the challenge is inherent in the beauty of what you’re working with. I think I may have to seriously put aside a few hundred dollars for after graduation so I have this to play with.
I desperately miss the demoscene. Towards the end of the 1990s when personal computers got powerful enough to do, well, just about anything, I started turning my interests elsewhere. It’s still alive, though, and picking up some amazing coders. The latest jaw-dropping demo to be released is a 256 byte demo from Řrřola, a coder in the Czech Republic. Here’s the Youtube version of it for those of you that don’t have DOS installed:
This is one of the most technically impressive demos I’ve ever seen in my life. What he’s done should be flat-out impossible to do in 256 bytes. As a reddit comment pointed out, taking a single screenshot of the demo in action will yield a file 96 times larger than the demo itself. A simple “hello world!” written in SPARC assembly, as taught by our university, is over 2.6 times as large than this demo (2.59 times as large if you’re clever about filling delay slots). Hell it takes over 1/20 the size of this demo just to represent the string “hello world!”. From an information theory it boggles the mind that that video can effectively be compressed down to 256 bytes.
Anyway, if all of this weren’t exciting enough, it gets even more exciting due to the fact that he’s released the source code. More exciting still is the fact that the comments are written in (very clear) English instead of Czech. I don’t think it will be possible for me to resist figuring out how he did this. Parts like this:
push 09FCEh ;<aligns with the screen
pop es
mov bh,56h ; xyz addressing trick from neon_station
; vecNN = (words){[5600h+N] [5656h+N] [56ACh+N]}
;frame loop - prepare constants
;ax=key bx=5600h bp=dx=0 cx=3 si=100h di=-2 sp=-4 word[5700h]=T
are going to have me stumped for a long while, I think, but I’m pretty psyched about it. Taking a quick 5-minute pass through the source code I understand a surprisingly large amount of it, just not the parts that really count. Tracing through it sort of brings me back to my demoscene days, except now I have the luxury of going through source code instead of trying to deal with DOS Debug. One of my first thoughts reading through this was “he’s using floating point instructions? That’s so cheating. Who has the money for a math co-processor‽”