Namespaces
posted by chip on 2006-03-20 17:35:07
Last night we had an impromptu potluck and movie get-together for everyone still here during spring break. The dinner involved a menagerie of dishes, including baked pasta, sloppy joes, thai peanut noodles, and my chicken and lychee stir-fry. Afterwards we watched Pulp Fiction.
Pulp Fiction is a great fucking movie. There's no other way to describe it.
Linux 2.6.16 came out today, and with it a number of interesting features, such as support for the Cell processor, the Oracle OCFS2 cluster file system, and a new syscall that allows processes to implement, among other things, per-process namespaces. Now, this may not ring a bell to you, but it was very exciting to me because it's a feature that Plan 9 was designed around from the beginning. Did I mention that Linux has supported the 9P2000 protocol, the protocol Plan 9 uses for resource sharing, since 2.6.14? Do you see where this is going? :) Linux has finally caught up to 15 years ago. While that may sound like an asinine statement, it's actually pretty good for an OS whose design principles originate from the 60's and 70's.
What can you do with per-process namespaces and 9P2000 (hereafter referred to as 9P for brevity's sake), you ask? Well, suppose your favorite editor serves up, via 9P on a FIFO, the contents of its edit buffers, as well as some other information, maybe cursor position, or a list of files it has open and some control files. Now, in your shell or some other program, you can mount this on a directory somewhere else and do fun things with your editor, without having to use an API, a specific protocol, or an application-specific tool. Want to cat another file onto your edit buffer? Instead of using your editor's function for that, you can just use the mounted namespace, and actually do that.
Now, cat is a very simple example, and one that most text editors can do rather easily on their own. Suppose, however, that you want to run some sort of external program on your data? What is your usual course of action? Write the file out, run the program on the file, and read the file back in. Or maybe your editor is a bit more intelligent, and can do that for you. With this, you just run your program on the file representing the edit buffer and be done with it. And since 9P is just a stream protocol, it works equally well over pipes, sockets, SSH connections, etc., giving you a plethora of opportunities like X-style window sharing, remote debugging, and secure filesystem mounting (Yes, 9P works as a NFS replacement, too, but it isn't nearly as fast).
These sorts of things have been commonplace in Plan 9 since it was created some time in the late 80's. More recently, wmii has used 9P as an internal IPC mechanism, though a relatively crippled one since you need to use special tools to access it. The ability to manipulate your window manager properties with cat and perl has me absolutely salivating with anticipation.
0 comments reply permalink
Read/Write Head
posted by chip on 2006-03-19 03:56:05
I've been reading a book I got for my birthday called "the Chip". (My mom thought it would be clever. Har har. :) ) It's about Jack Kilby and Robert Noyce, the inventors of the integrated circuit. Unfortunately, the book is getting a bit long in the tooth. It's starting to ramble on about how the Japanese beat us at, well, just about everything electronic. 1) Duh. 2) Booooring.
In other news, I've managed to get Windows NT 4.0 installed on my Alpha box. I present to you a screenshot!
Now that is something you don't see every day. I should also mention that the machine crashes. A lot. In fact, the first time I took this screenshot, NT barfed as soon as I tried to save the picture in paint. The machine has issues, to put it mildly.
Lastly, I'd like to gingerly redirect your attention in the direction of a story I'm working on, called The Waiting Room. I would appreciate your honest criticism, since I'm actually pretty proud of it. If you do feel like taking it apart piece by piece, I prefer HTML. :)
0 comments reply permalink
WARNING WARNING
posted by chip on 2006-03-16 01:47:29
A NEW WEBCOMIC HAS ENTERED THE ARENA!
Please orient your eyeballs towards Aikida. It's got sexy demons and assassins set in a pseudo-ancient Japan. I like it. Most of you probably won't.
Also, I AM SO HIGH ON THIN MINTS RIGHT NOW WOOOOOOO!!!
0 comments reply permalink
Random Ponderings
posted by chip on 2006-03-15 18:14:42
It has occurred to me that since I am male, under 25, and with an accident on my record, maybe getting another deathtrap sports car is not the brightest thing to do, financially speaking. Not that I couldn't afford one, but I probably couldn't afford the insurance. The good news is that I'll be 25 in 10.5 months, so I'm thinking I'll just wait a bit and drive an old Corolla hatchback in the mean-time. Of course, when I say "old Corolla hatchback," I really mean an
AE86 Trueno/pix/ae86.jpg

. }:->
I have... obtained... the first season of Battlestar Galactica, and while I haven't finished it, I'm really impressed with it so far. They've taken a classic, and updated it in a way that's not a bastardization of the original. It's really well done. If you're a sci-fi fan, I'm sure you've already seen it. For the rest of you, find your nearest torrent site video store, and download rent it now!
Also, people were selling Girl Scout cookies on the quad (and muchas gracias to Kan Kan for giving me the heads up, and for graciously offering me a Samoa cookie. You rox teh sox, Kan), so I bought a couple of boxes of Thin Mints. Oh, yes.. my Thin Mints... my precious.
I'm sure that anyone who reads NN2S is aware that Mitch Clem has moved on to newer and same-er pastures in his new webcomic San Antonio Rock City. And apparently, a lot of people are disappointed about the loss of NN2S, even though SARC is all the same jokes, in the same format, by the same artist. Why exactly did he need a new comic to do this? Beats the heck out of me. Hey, Mitch, how about you just do whatever the heck you want with NN2S, and quit yanking our chain? No? All right, fuck you, too.
Oi.
0 comments reply permalink
Man-Machine Interface
posted by chip on 2006-03-13 01:49:15
So our robot finished 9th out of 23, but the real achievement is that we not only were able to field the bot every round, but we were able to
score every round. That's a major accomplishment over last year, and speaks a lot for the robust design of our bot (since some rounds one thing or another failed, but we were still able to herd balls out of our base). Apparently on Saturday we had everything working perfectly, but I slept right through it. :-/
At some point during the competition, a reasonably attractive girl came over and started talking to Erickson and I. She asked things about the bot, about the competition, and the team. After she left, I leaned over to Erickson and asked,
"So, who was that?"
"I have no idea," he replied. "I thought you knew her."
There are girls, unbeknownst to us, who are interested in robots. The mind boggles.
So basically, our control system involves a laptop with a joystick (client), a small embedded computer (server), and a small AVR microcontroller (what you might call the hindbrain). Client communicates to the server via 802.11, and the server communicates to the microcontroller via RS-232. Erickson brought up an interesting idea for replacing that last RS-232 link with a pseudo-terminal that connects to a simulation framework. This way, everything according to the bot's perception is the same as in the real world, just simulated. It brings up some interesting philosophical questions.
For example, how does the bot know whether what it's experiencing is real, or a computer simulation? Furthermore, does it matter? For our purposes, it doesn't, but suppose that you are the robot. Everything you're experiencing is already just a electrical signal, who's to say that your perception is not simulated? And now that we're dealing with sentience, does it matter?
I'm aware that these ideas have been discussed before, by probably every great philosopher since people started thinking about the nature of reality. It was just interesting to me from the POV of someone who has the ability to do this to lesser, artificial organisms. For example, Jen's tiny artificial life "animates" exist in a simulated matlab environment, but it's entirely possible to adapt that code to run on, say, the eerily similar looking iRobot Roomba, and have it do the same things.
Hello, Operator? I need an exit.
0 comments reply permalink
Return of the Robot
posted by chip on 2006-03-08 16:22:31
So with last week taken care of, I've been taken out of retirement to work on this year's JSDC bot. It turns out that people who graduated in December are still eligible to compete. }:->
Oh, last week? I'll give you the short version: coding on awful block bashing game every night 'till 4am, went to court on Friday morning, and did business competition Saturday morning. I'll grant that doing things on Friday morning sucks, but is allowable. But scheduling things on Saturday morning is unforgiveable.
So on the team this year, we have the regulars: Erickson, Rob, and Travis. Two new members have been brought in: Steve, master of all things electric, and Caroline, freshman whipping girl. Erickson's been doing pretty well with the code, having to wrestle both the foreign embedded ARM platform, and learn how to program for an Atmel microcontroller. I've been brought in to help him out, since we've got all of about 36 hours to wrap things up before the competition. So if I disappear for the next few days, that's where I am. :)
I encourage everyone to come see us Friday and Saturday during EOH, in the Kenney Gym Annex (that's the one near Wright and Springfield). This year's competition should be really great, since it's only slightly modified from last year, and most teams will have last year's experience to build on.
Back to the code...
0 comments reply permalink
Morons!
posted by chip on 2006-03-02 14:41:19
Alright, I just found this and had to share it. In the
XScreenSaver distribution (No, you can't get it for windows :-P) there's a program called
ljlatest. It downloads the most recent public posts from
livejournal.com, and prints them to stdout in a text format readable by screensavers like phosphor or apple2.
Yes, I know. Utterly pointless. But in the BUGS section of the manual:
BUGS
This program makes it seem like morons have invaded your
screen saver.
Priceless.
0 comments reply permalink
Grilled Cheese and Tomato Soup
posted by chip on 2006-02-28 03:23:48
Oh, man, I'm eating what is quite possibly the world's perfect meal: grilled cheese, tomato soup, and a tall glass of whole milk. Cuisine does not get closer to home than that. I grew up on this simple fare, but along side other childhood staples like PB&J, macaroni and cheese, and a bowl of Fruit Loops, grilled cheese and tomato soup always stood out as something more substantial. Something... closer to the heart. Grilled cheese was quite possibly the first non-dessert food item I learned how to cook, and remains one of my favorites to this day. Tomato soup is dead simple: warm, smooth, and inviting. And a glass of milk? Well, that needs no explanation. It's a combination that can't be beat.
There are some who would say that grilled cheese is child's fare, or that tomato soup is disgusting. There is a word for these people: Communists. Real Americans™ love grilled cheese and tomato soup. Instead of lengthy searches, airport security officials need only ask the simple question:
Security: Do you like grilled cheese and tomato soup?
Passenger: Um, no.
Security: I'm sorry, sir, I can't let you on this plane.
Passenger: What?
Security: Might I suggest you take a bus?
Passenger: To Hawaii?
Security: Yes.
At which point the passenger stares incredulously at the security officer while four men armed with M-16s move to escort him out of the terminal. It's foolproof.
Grilled Cheese and Tomato Soup, I salute you!
0 comments reply permalink
FINALLY
posted by chip on 2006-02-27 01:44:11
Marten gets some freaking
action. He was
way overdue. Plus, this means that Faye will almost certainly deal near-fatal damage to someone in the coming days, which is always fun.
So Friday night, despite having tons of coding work to do, I went to Illinites. I got to see all my friends I hadn't seen in a while, in addition to seeing Ed and Octavian karakoe "Back That Thang Up" one and a half times. Much fun. After the Union kicked us out, I went back to Jen and Nancy's place, where we recorded a VFS segment that's sure to make you cringe.
In another random observation, I tried to drive a Mitsubishi 3000GT in GT4. You remember back to F-Zero, when there were four cars, and there was that green one that was slow, and ugly, and nobody liked it? That's a Mitsubishi 3000GT. You see, with the exception of the Mitsubishi Lancer, Mitsubishi doesn't really make cars. What they make are thinly-disguised four-wheel tanks.
1 comment reply permalink
Emo Kids = owned
posted by chip on 2006-02-20 23:55:54
Alright, so I wasn't completely honest with the last post. I would, if I had the money, buy a Honda S2000 ... and put a rotary in it. I meah, heck, with the length of the S2000's nose, I could probably fit a 3-rotor in it. How much ass would that kick? Answer: 99% as much ass as Chuck Norris kicks.
Speaking of roundhouse kicks to the face, I played some Quake 3 with my brother today. At one point we decided to do a 2v2 against a couple of bots on nightmare mode. That was a wholly humiliating experience. We'd be cowering behind corners, and as soon as we'd peek our heads out, there would be a train of plasma balls/rockets aimed directly at our heads. This is a very wide-open map, too, (Minimanq3, if you're familiar with it) so they were headshotting us with freaking plasma from like 200 yards. We finished the game 40-7, and we were happy to have that many frags. I decided that nightmare mode should be renamed "Chuck Norris" mode.
Oh, and for those of you who haven't heard it, Myspace got hacked. Again. Why don't I have a myspace? Well, lets tick off the list:
- The site has been exploited by a cross-site scripting javascript worm.
- This recent hack was apparently just an attack on weak passwords. This leads me to believe that the average myspace user is not terribly bright.
- Their blog RSS feeds only give you a very limited amount of the actual content from each post (around 200 characters)
- I've not experienced it myself, but the profile editor apparently makes it nearly impossible to create a profile that can be read by human beings
Not exactly a place I want to hang around. I'll leave you with this:
Erickson: Oh my God. My girlfriend just turned her MySpace into an unreadable mess
Me: Words cannot describe my utter lack of surprise.
0 comments reply permalink