posted by chip on Sunday, the twenty-first of October 2007, at a quarter till three in the morning
For the last week, I've been poking around Microsoft's .NET platform. For the unfamiliar, .NET (the platform) is a bytecode-based virtual machine that allows object-oriented languages to interoperate. This is not to be confused with .NET, the marketing ploy, which is what they're calling everything now that "XP" is passé.
The short list of languages supported by Microsoft's .NET Framework is C++, JScript, VBScript, J#, and C#. C# is a language designed specifically for .NET, and most effectively takes advantage of its features. The other languages have been more or less retrofitted with extensions that allow them to take advantage of .NET's features. C++ specifically has the ability to bridge the gap with native code, and it's most commonly used as a middle layer inbetween .NET apps and native code. Also available are Python and Ruby, and people are working on some unholy unions like L#.
At first blush, .NET looks a lot like Java: sources are compiled to machine-independent bytecode run through a JIT compiler to achieve acceptable speed. .NET improves upon this idea by separating the runtime from the language. The Common Language Runtime (CLR) manages security and interoperability of programs and libraries. All of the languages mentioned above are compiled into IL (Intermediate Language), allowing developers to write code in whatever they're most familiar with and integrate output from multiple languages into a single project. Furthermore, plenty of wrappers around traditional C/C++ libraries exist (you can spot them because they typically have a # appended to the name), so you can get up to speed quickly.
But a cross-platform environment would be no good if everything only ran on Windows. Thankfully, Microsoft has made some of the core parts of .NET (the CLR and C#) ECMA standards, freely available for everyone to use. The folks over at Mono are working on ".NET for the rest of us," and so far have it working on Linux, Solaris, OS X, and Windows. In fact, if you're running Ubuntu, you probably already have it installed.
So why bother? Well, first check out swarm.NET. It's a C# port of swarm.3 as seen on my hacks page, using SDL. That was written and debugged on my laptop, running Slackware 12. The resulting executable runs without modification on Windows. That is, I can make decently-performing games that run on every major platform out there, out of the box, without ever touching a Windows machine. That is hot shit.
I think Nancy put it best: "This sounds like the way it's meant to be..."
0 comments reply permalink
posted by chip on Monday, the eighth of October 2007, at a quarter till seven in the morning
"Love Conquers All" is a phrase reiterated by many a romantic, but upon further inspection seems to be pure bullshit. Love vs a grizzly bear? The grizzly will win every single time. Here's a short list of just a few things love cannot conquer.
- The sun
- Being trapped in a giant microwave
- The speed of light
- Climate change
- The urge to strangle little yipping dogs carried in purses
- Entropy
- Failing to save your document before a power failure
- Terminal illness
- Other, more powerful love
- Samuel L. Jackson
- Packages destroyed by UPS
- Signal interference
- Lag
- Bear cavalry
- Forgetting your parachute after jumping out of a plane
- Having your head separated from your torso
- Spontaneous combustion
- Going backwards in time
- Human stupidity
It would probably be more accurate to say "Love conquers certain specific situations, mainly those that can be remedied by putting forth extra effort," but that's kinda long-winded.
7 comments reply permalink
posted by chip on Tuesday, the second of October 2007, at half past four in the morning
THIS!
IS!
ALPHAAAAAAAAAAAA!
>>>boot
Well, the great megabyte upgrade is an official failure. Let's flash back to a couple weeks ago, when my SuperMicro SATA card arrived.
Initially, everything worked great. The card was detected, the drives were all found, and the new array was building. Then... nothing. Several times, the machine just froze for no apparent reason. Same thing happened when I put it in a 32-bit PCI slot. In a PC, it ran flawlessly. Deciding that maybe I should have researched things a little better and not bought a card whose driver is marked HIGHLY EXPERIMENTAL, I decided to resell the card and get a libata-recommended SIL3124-based board.
Today that card arrived. Immediately, things went sour. In a 64-bit PCI slot, the card produced kernel OOPSes. In a 32-bit slot, it worked, but only for a short while before the whole system became unstable. The card is sitting in a PC now, and it's running flawlessly. Moral of the story: The LX164 doesn't like modern PCI-X peripherals, no matter how PCI-backwards-compatible they may claim to be.
So, deciding to shelve the Alpha for another project (probably one involving VMS), I turned to my PIII machine and original storage monster, yomiko. I got about ten minutes into the idea of swapping yomiko's motherboard into the storagemonster case when I realized that yomiko is a circa 1998 Dell. Y'know, the ones that use Dell-specific pseudo-ATX power supplies with the auxiliary 3.3V connector. You can't use a regular power supply with these motherboards; you will toast your power supply, the motherboard, or both.
I could buy or make a power supply adapter, but the board is so hopelessly Dell-specific that it would be a test of sanity to get it to work elsewhere. I could buy another slot 1 motherboard, but that would cost me close to $30 for a computer that would get smoked by a $60 mobo/cpu combo from newegg. I've got a K6-2 I'm not using, but it's... a K6-2. YOU KNOW WHAT?
I'm just going to complete this wretched cycle and buy a modern motherboard. I've been fiddling with this for too long, and I need to get my server back in working order. For about $100, I can get a mobo/CPU combo and some RAM, or I can get a real monster if I don't care about the money. I haven't decided yet; this is a decision that can make or break a machine, and I'm not going to get anything approaching the utility of an Alpha board for less than $300. (And I would pay that much if I could get a PC motherboard with SRM on it)
Oh, and don't worry about megabyte. Just like in the fourth season of ReBoot, he'll be back. :)
0 comments reply permalink
posted by chip on Sunday, the sixteenth of September 2007, at four in the morning
Vegeta! What does glxgears say about his FPS level?
IT'S OVER 9000! *crushes glxgears*
0 comments reply permalink
posted by chip on Tuesday, the eleventh of September 2007, at a quarter till five in the afternoon
The day the iPod Touch was announced, Mike called me. "Isn't this what you were looking for?" he asked. "A pocket computer that has wifi and isn't tied to a crappy cell phone?" Yeah, it's true, that's pretty neat, but I already have one. You see, the iPod Touch (with a little hacking) is a great little pocket computer, but Nintendo does it better. :) The device I already have is a hacked Nintendo DS.
To say that the Nintendo DS can outperform an iPod in the iPod game is pretty far-fetched, but for most uses (and indeed, all the things I use it for), it performs admirably. The homebrew hacker culture on the DS even brings some notable advantages, like Ogg Vorbis support. A hacked DS does require some extra hardware. I'm using a Supercard SD with a 1GB SD card, a combo that will cost you about $65.
Because I'm a pedant, let's do a side-by-side comparison. For each category, the better stats will be in bold. For situations where there is no clear winner, or where it is a matter of personal preference, I'll leave both columns un-bolded.
| Nintendo DS | iPod Touch |
| Audio Playback |
MP3, Ogg Vorbis, AAC, MIDI, WAV, FLAC, MOD, SPC, MDX(no PCM), GBS, HES, NSF, XM, S3M, SID |
AAC, Protected AAC, MP3, Audible, Apple Lossless, AIFF, WAV |
| Video Playback |
MPEG-1 video with MP2 audio (DPG format). 256x192@20fps, 256x144@24fps |
Low Complexity H.264 video, up to 1.5 Mbps, 640x480@30fps; Baseline Profile H.264 video, up to 2.5 Mbps, 640x480@30fps; Simple Profile MPEG-4 video, up to 2.5 Mbps, 640x480@30fps (M4V, MP4, and MOV format) |
| Image Formats |
JPEG, BMP, GIF, PNG, RAW |
JPEG, BMP, GIF, TIFF, PSD (Mac only), and PNG |
| Other Features and Formats |
TXT, VCard, IRC client, text-only web browser, file browser, Scribble pad, WAV recorder (Opera web browser available for $40) |
Safari Web browser, Youtube player, iTunes Wi-Fi Music Store |
| Wi-Fi |
2Mbit 802.11b |
802.11b/g |
| Screen |
Dual 256x192 screens, lower screen is touch-sensitive |
480x320, 163 pixels per inch, multi-touch sensitive |
| Audio I/O |
Built-in stereo speakers and microphone, 3.5mm stereo headphone jack, proprietary microphone jack |
3.5mm stereo headphone jack |
| Software |
Several free, open source projects including DSLinux, MoonShell, and DSOrganize. Active developer community with hundreds of homebrew utilities and games. |
Proprietary Apple system software, not user modifiable |
| Video Games |
Plays games from a library of thousands of DS and GBA games. Plays NES, GameBoy, and other systems with homebrew emulators. |
Er... |
| Storage |
Uses industry-standard and widely-available removable SD cards in capacities up to 2GB |
Non-removable internal flash, 8 or 16GB |
| Battery |
Removable 850mAh Li-Ion, provides 6-8 hours of gameplay or video playback, probably about 20-25 hours of audio playback. (I haven't tested it) |
Non-removable Li-Ion, provides 5 hours video playback or 22 hours audio playback |
| Price |
$185: $130 Nintendo DS, $40 SuperCard, $15 1GB SD card |
$299 for 8GB, $399 for 16GB |
It is interesting to note that for an extra $75-85, you can get 8GB worth of SD cards instead of the 1GB, but that would be some kind of management nightmare pulled straight from the days of floppy-only home computers. Eventually someone will come out with a homebrew cartridge that supports SDHC.
Surely this is comparing apples (hah) and oranges, but it's not a clear decision, either. For most people, the iPod Touch is an easier device for most of what they want to do, but as a portable computer, the DS is much more versatile and useful. Also, I love the Mega Man 2 soundtrack, so NSF support is a big big plus. :)
So in the end, to each their own. I can't watch youtube on my DS, but you can't play Metroid Fusion on your iPod. :P
2 comments reply permalink
posted by chip on Thursday, the thirtieth of August 2007, at four in the morning
As some of you may know, I have a rather esoteric bit of hardware in use as my main server. I call it Megabyte, after the viral villain from
ReBoot, but more specifically, it's a DEC Alpha 164LX motherboard that I scrounged from the trash, housed in a full-tower AT case and put in charge of my home directory. I was a little worried at first that the board's unknown history might come back to bite me, but so far, it's been a perfectly rock-solid box. (Don't believe me? Try to lift the thing. :P)
Sometime last year, I became the caretaker of an unwanted DEC VT420 serial terminal, the perfect accessory for Megabyte. Well, sorta. You see, DEC designed a serial port that looks sort of like a phone jack, but with six conductors and an offset locking tab. It's called an MMJ, and it's the only connector the VT420 has. The 164LX on the other hand, was designed to capture part of the IBM PC market, and so has two DB9 serial ports. What to do? The answer is every RS232 geek's wet dream: build my own adapter.
A little internet shopping later, I had a 6' straight-through MMJ cable and a wire-it-yourself MMJ to DB9 adapter. After an initial failure to get it working, I realized that the plans I found on the intertron were for a crossed cable, so I whipped out a multimeter, put my ECE 437 skills to use, and wired it myself. For those who may find this, here's the wiring diagram for a MMJ-DB9 adapter when used with a straight-through MMJ cable.
MMJ Pin
/ adapter wire color
| / MMJ function
| | /|| DB9 function
| | ||| /|| DB9 pin
| | ||| ||| /
1 B DTR <-> CTS 8
2 Y TX <-> RX 2
3 G TX- <-> GND 5
4 R RX- <-> GND 5
5 K RX <-> TX 3
6 W DSR <-> RTS 7
It is important to note that 3 and 4 on the MMJ are both ground. I soldered the wires together, but I'm not sure if that's necessary. It may also be important to note that I haven't actually gotten hardware flow control working, so the RTS/CTS may be completely wrong. In order to use the VT420 on the SRM console, I have to use it at 9600bps, so it's not a problem, anyway.
I've decided to upgrade Megabyte into a respectable storage monster, so I've ordered a new case, 2TB worth of drives, and an 8-port SATA card. Since the current NetBSD I have installed on it doesn't support the card, I'm forced to install Linux. And since the platform has been dead for four years, the only distro still carrying the flag is Debian, most likely because they're still trying to catch up with 2002. (That's not true — they're at least caught up with 2005 now). I'm happy to report that the install went flawlessly using the VT420, and that I've gotten back up to speed in just a few hours.
If only work was this easy...
0 comments reply permalink
posted by chip on Sunday, the twelfth of August 2007, at a quarter till five in the morning
Even though I'm very clearly a technically minded geek, I've always considered myself an artist. I took art every year I was in high school, and it was probably overall my favorite class. Over the years, I've dabbled in drawing, painting, chalking, sculpting, 3D modeling, comics, vector art, pixel art, electronic music, cinematography, short stories, and poetry. And I'll be completely unhurt if you tell me I'm not skilled in any of those areas, because I agree with you 100%. Fortunately, art is not like engineering. You can continue to fail at art and still call yourself an artist. :)
Unfortunately, art that does not inspire and amaze people is well... useless. I was inspired recently by My Little Dead Dick (NSFW, but not exactly for the reasons you're thinking), a true story written in photographs and small pieces of text, of two people who met through their love of photography, fell in love, and pursued their dreams of taking photos together while traveling around the world. It's the sort of thing you'd see in a movie shown at the Cannes Film Festival. I guess love really does happen like that sometimes.
So I thought for a while... What is it that I do that amazes people? And of course, the answer came quickly, with an accompanying "Duh." It's something I've been doing in my spare time since I learned about the PRINT command in MS BASIC on the Radio Shack TRS-80. I make the computer output interesting things on screen for fun. Or, in classic computer lingo, I make display hacks. Quite possibly the most famous display hack is Munching Squares, circa 1962, but the tradition lives on in programs like XScreenSaver, which is full of all kinds of interesting hacks.
Realizing now that I've never actually made a proper gallery for my work in this area, I've set up Hacks! over at the Dominion of Awesome. The displays and the languages have changed, but the fun remains the same. Where once I was abusing SCREEN 7 in GWBASIC, now I'm abusing the canvas tag with JavaScript.
So please check it out, I'm pretty proud of the stuff up there, and I think you'll like it, too.
0 comments reply permalink
posted by chip on Saturday, the eleventh of August 2007, at half past eight in the evening
I would like to state for the record that I couldn't stop giggling while I was making this, and that I'm still giggling about it. Hehe.
Rowling finally shows some talent in The Prisoner of Azkaban, twisting the plot in ways that actually create tension. Rowling has already shown that she can create an enjoyable read — this one is actually interesting. No obvious red herrings this time, though anyone with a grasp of latin roots will be able to predict certain secrets.
Unfortunately, the giant sea squid is still lounging about the lake, apparently refusing to vanish in a puff of logic like it should. Hermione is still doing most of the thinking, and Harry is still relying on dumb luck. It's good, but it still has a ways to go to reach truly epic proportions.
And I'm beginning to think she's doing this on purpose:
He didn't stop to think. Plunging a hand down the neck of his robes, he whipped out his wang and roared, "Expecto patronum!"
Something silver-white, something enormous, erupted from the end of his wang. He knew it had shot directly at the Dementors but didn't pause to watch; his mind still miraculously clear, he
looked ahead -- he was nearly there. He stretched out the hand still grasping his wang and just managed to close his fingers over the small, struggling Snitch.
2 comments reply permalink
posted by chip on Monday, the sixth of August 2007, at one in the morning
It's easy to see that J.K. Rowling has matured as a writer from the first Harry Potter to the second. The story is still simple and accessible, but Harry Potter and the Chamber of Secrets flows more smoothly than its predecessor. Rowling brings new readers up to speed with the story without burdening them with pages of explanation. New characters are introduced smoothly and, with the exception of one obvious red herring, without any giveaway of their role in the story.
There's still nothing to speak of in the plot department; the story is still Scooby Doo with kid wizards. The villain, in contrast, was interesting and unexpected, and Rowling does a good job of showing exactly how twisted he is. A villain is a good villain in my book when, as he reveals the details of his sinister plot to the hero, I think, "Man, that's good. I wish I'd thought of that." (All villains are required by code to reveal their plans to the hero after they have incapacitated the hero. It's a union thing.)
As in the first book, though, Harry seems more like a passenger than the hero. Most of the moments that move the story along are done by others, and he constantly has to rely on dumb luck to get him out of trouble. The series should really be about Hermione. Harry's got the magic and the courage, but she's the one doing all the work. Sheesh.
And don't think I was going to let you get away without your moment of wang-zen:
Harry was relieved to hear the lunch bell. His brain felt like a wrung sponge. Everyone filed out
of the classroom except him and Ron, who was whacking his wang furiously on the desk.
"Stupid -- useless -- thing --"
"Write home for another one," Harry suggested as the wang let off a volley of bangs like a firecracker.
"Oh, yeah, and get another Howler back," said Ron, stuffing the now hissing wang into his bag.
"`It's your own fault your wang got snapped -- `"
1 comment reply permalink
posted by chip on Saturday, the fourth of August 2007, at three in the morning
In a conversation some time ago, my friends and I were thinking of games that brought fresh, original ideas to videogaming. Games that broke the mold, and in doing so, became ingrained in our culture. It's an awesome list, and here's just a few: Pac-Man, Space Invaders, Super Mario Bros., Ultima, Warcraft, Street Fighter II... and then one of my friends suggested Halo.
At first, it seems to fit with the others. It was a huge seller; the game is almost solely responsible for cementing the Xbox's position next to the PS2 back in 2001. It's a rock solid game, with an engaging single player storyline and great multiplayer fun. But... is it really revolutionary?
Answer: No.
It's hardly the first of its kind, FPS games have been around since id Software's 1992 hit Wolfenstein 3D. Network multiplayer was made popular a year later with DOOM, and Internet multiplayer came to play with Quake in 1996. Quake also pioneered the use of full 3D polygon graphics and hardware accelerated 3D, kickstarting the consumer-level 3D graphics card market. If you want to hand an award to the person responsible for popularizing the first person shooter genre, you should hand that award to John Carmack.
If you want to say that Halo is the game that brought engaging single-player storylines to the genre, you'd be wrong again. Half-Life did that in 1998. Halo isn't even the game that popularized FPS on standalone video game consoles. That honor goes to Rare's GoldenEye 007 (1997) and its spiritual successor Perfect Dark (2000) on the N64.
Where does that leave Halo? Dead in the water, as I see it. The only thing left Halo has above its ancestors is its excellent matchmaking system, but that's more of a feature of Xbox Live than of Halo itself. I mean, you pay monthly for the service, it had better be good, fer chrissakes.
So why is Halo so popular? Well, first, it does deserve it. It's a great game, even if it does borrow from so many games before it. Secondly, there is somewhat of a technical and cultural wall between console gaming and PC gaming.
Historically, PCs have been more powerful than consoles, and PCs' more extensive input systems have been better able to allow players to manipulate a 3D world. Most of the development of FPS games, therefore, had been done on PCs. The limited input and power of game consoles simply didn't allow the genre to be playable until the late 90's. It wasn't until Microsoft entered the console market and sucked a whole new generation of gamers into their clutches that FPS hit the console mainstream with Halo. (But the joke's on them... the Xbox is a PC)
The result is that there are tons of people who have played Halo but have no proper background in the genre. Through their own ignorance, they see Halo as revolutionary and groundbreaking when it really isn't. So if you see one of these twits, please smack them around until they understand the truth.
Only 100,000 more XP until I reach Lvl. 55 snobbery! :P
0 comments reply permalink