04 August, 2005

On the way in to work this morning, I solved a problem I'd been grappling with. I didn't want to make my first kiloline C# program be asynchronous network programming. It took me a few years to get to that point with perl, I figure it's jumping the gun with C#. But synchronous network protocols just irritate me. The idea came to me, sitting on the 520 westbound in Seattle. Why not write an asynchronous "pidgin" protocol. Make the protocol extensible, and functional either synchronously or asynchronously.


So instead of listening to Brian Valentine's keynote again, I started writing my protocol. Using POE and perl, I actually got pretty far. I've actually got the server listening, and the state machine is complete. The hard part is really making the server robust, as it is intended to expose bugs in my C# code. The previously mentioned Params::Validate should be helpful.


It's been nine months since I actually coded perl "for a living," and while today was hardly worth any money to anyone, the experience was both scary and refreshing. Due to the aforementioned network problems at work, it was just easier to switch to linux and get the code written. As usual, screen was employed, and mono was built in the background while I wrote the server and associated libraries. The hard part was the specifics. What were the flags to the constructors I wanted? How do I abstract my protocol into a cohesive lexer and subsequently into a lexer object? How do the data structures look? Perhaps the hardest part has actually been not writing the client in perl. Where the server is probably 500 lines (without contracts or documentation), the client would be less than fifty. But I know if I write the client, I won't actually get the C# client written, which was the whole point of the exercise to begin with.


I called it "Moscow," after an item in the book I'm reading. I had some pseudo-code for a client I had wanted to write six or seven months ago, and even some "real" code. Moscow gives me enough to be enthusiastic about that, I may finish it. The client I wrote back then was really more an exercise in dynamically pluggable code (C# doesn't have any real notion of code references, closures (well, sort of, but iterators don't count in my book), or the kind of interpreted code that allows perl to do it), and as such wouldn't impinge on my writing the C# client for Moscow.


Given Moscow's inherent extensibility, and the low barrier to actually getting a working client (fewer than ten lines to be fully functional, in perl), it seems a reasonable candidate for release. I'd just like to have a client before I publish. I don't suppose I could publish a C# client with a perl server, say Net::Moscow, and get away with it. This means I write two clients, one of which has a much steeper learning curve. Mono seems to have mostly built, so I may get that done tomorrow. The source itself is a lot easier to read than what MSDN offers as documentation, and the ability to offer "apropos System.Net" support is terrific.


Hadn't ever written a protocol before with the built-in requirement of extensibility. That in itself was refreshingly different. I'm really looking forward to adding in database access layers, an irc layer (client and server), and a syslog layer. Think about it. Sometimes it's hard to get your application to be able to speak syslog. If instead, you could speak a simplified dialect which would get you transactional, asynchronous access to both a database and syslog, wouldn't that be a huge win?

03 August, 2005

recentlog

    knipknap

      Just vertical windows? The help is exceptionally clear here. You've got :vs and :sp, along with commands to change windows sizes (C-w {<,>} come to mind, I don't remember the vertical ones)



work


    After all the recent criticism, I haven't felt really up to actually mentioning work in specific. There's something deeply disingenuous about a group of people who claim to be supporting competition, who at the same time, refuse to hear comment from one person, organization, etc. As I said before, I'm just a Unix guy. My qualifications and skill didn't go away. My employer changed. Get over it.


    I have been in Seattle at another Microsoft briefing. This one is supposedly more technical. My own experience is that it's pretty bland and uninteresting. Unfortunately, the interesting parts I can't really talk about because they're under NDA (before anyone gets their knickers in a wad about people working for companies who require NDA's to begin with, please, stfu and realize that you get paid because whomever pays you has a proprietary advantage over somebody). One of the things that really got me excited today was Nathan Muggli's talk on what AD will be doing for the next, oh, three years. As a Unix guy, I've always known that AD was more or less respected. It scales pretty well, and it does the job for Windows pretty well. Sun has their own LDAP server, which more or less works for Solaris. Novell has NDS, but who knows what the hell they're doing with SuSE and ... whatever they call Novell these days. Even MIT-gradumacated EMACS using people seem to agree that AD is reasonably good stuff. I think that the folks in Redmond have some very good ideas about what AD needs to be doing.


    One thing that the rest of you won't disagree with is there is a huge knowledge gap in the Windows Administrator community. There was a complaint about an unreleased feature of Active Directory today, which basically was, "well, if you do that, then I have to be hands-on to all twelve-hundred of my customer sites." Feh, I said, I'd just write a 300-line C# program to implement specific ACLs for my own site. A coworker correctly informed me that, well, Windows admins don't think that way. Be it perl, VB-script, C#, or outright C, 300 lines of anything isn't trivial for 95% of Windows admins. That bugs me, but it's not a fight I think I can even undertake, let alone win.


    I am yet again reminded of the fact that no matter how you plan to be at a conference, and attend all the sessions, or meet with all the speakers, the stuff that happens in between sessions, the stuff that happens off site, or over chicken wings and gin-and-tonic, is ever so much more important. It makes me think I should just book a hotel for the times that I'm in town for a conference, and just "hang out" around, talking to attendees. Why is it we can't have talks that actually don't suck? Why is it the people who are capable of having a meaningful discussion only do it over drinks or indian food after the meeting? This was true of Solaris and Linux admins just as well as Windows admins and sales folks. The fact is, the meetings and "breakout sessions" seem to focus largely on a least-common-denominator rather than a "fuck-the-newbies" kind of technical session. Fuck the newbies is frequently the best tack to take when you're hosting a technical conference, right?


    Lastly, I don't think I can even mention more than the word, Hypervisor. Wow. Such very cool shit. I must have been under a rock when Xen started. I am finally starting to see what Will Law at Cornell was talking about.


life

    Ordinarily, I would feel bad about a long entry, or about blathering on about the "life" stuff. However, the oft-bitched-about shlomif has recently posted irc logs, etc. Which, incidentally, I enjoyed reading. Is it insulting to him to say that there's solidarity in being hated by an ignorant but vocal few? Maybe it's just inciting more vituperation (look it up, you two) from the throwers-of-stones. At any rate, I've been particularly pleased with my own Linux installation.


    This week has been challenging for intarweb access. In particular, we have wireless just about everywhere. But its only eleven megs, and when fifteen people show up in a session and check their email, for some reason it gets clobbered to shit. Windows kind of looks for the bathroom and pukes its cute little guts out in a commode. Linux takes an attitude more like "Hey, well, you know, I kinda sent this packet to you. You didn't get back to me, but well, I respect you for that, and I'll just wait here for you to get back to me." Really. It's extremely tolerant of shitty connections. So I found that while I was at this conference, running Linux on my laptop just made sense. Boy jebus, I now feel guilty; I don't remember the name of the pdf viewer that comes with Fedora Core 4. It's real swank. It's not xpdf, which I had grown accustomed to. I'm also missing, of course, wget, on Windows. So I used wget and the pdf viewer to get to the cornell case studies I needed. I was more or less able to get on the corporate network, although the KWifi accessory, shall we say, "inhaled the donkey." By frobbing the /etc/sysconfig/network-scripts/ifcfg-OnboardWireless script, I was able to get it to come up reasonably well with "sudo service network restart", which is more or less how it is supposed to work.


    All that having been said, I have been using Acrylic (please notice that aforementioned product is free-as-in-beer and you may use it as long as we don't have a commercial product based on it, and it rocks.) to edit a lot of art for various presentations I need to do. Initially, Acrylic wasn't as nice as the stuff I'd seen demoed internally. However, I've found my pace with it, and I'm finding it to be a little bit more intuitive than Photoshop. Plus, the auto-tracing feature is, well, better than Illustrator.


    I'm pleased to find such synergy with a box (my M3) that has two installations. Many of my office applications I can access from Windows, and many of my more hackishly inclined operations can be entirely served by teh intarlinux. I've been thinking of installing Mono. Presently, I've been hacking code in gvim and feeling dirty about it. Why not code in vim vim vim, and compile on linux?


    Reading Iron Sunrise by Charles Stross. Well, I expected it to not be able to touch Singularity Sky, judging by amazom's description. Wow, I was wrong. It's so much more mature than Singularity Sky was. I guess I'm looking forward to Accelerando, although I was so burned by Alastair Reynolds "going pro" that I could be up for serious disappointment.


    I think I am falling in love with the pacific northwest. It is so pretty here. There's a cancerous hipster clique festering on the city of Seattle in general, but it's gorgeous as fuckall, and for that reason, I'm gearing up to summit Ranier. There's a National Park at Ranier, and I'm going to get a practice hike in next weekend. I'll hit 8,000 feet, or whatever I am most comfortable with (0° to 15° fahrenheit are about what to expect, not to mention snow and other inhospitable things), re-equip, and head back, until I've stood on that fucker's back, and taken some pictures for the fancy intarpedia and, well, my own personal satisfaction. It's there, right? Climb it.