chipotle: (Default)
2005-07-25 05:10 pm
Entry tags:

Stupid MUCK tricks

So one of the things that I’ve always disliked about TinyMUCK-based systems is the parser. Even Scott Adams’ adventure games, written for TRS-80s with 16K of RAM in 1978, had a (marginally) better grasp of action and direct object. In TinyMUCK, if you wanted to implement just a small set of commands that weren’t built-ins, like (say) “eat,” “sit,” and “listen,” it’d be a fair amount of work: make a listen @action with the appropriate lock and messages in a high-level environment room as a default, then have separate @actions everywhere that needed to be overridden. And suppose you have a room with background music playing, and you’re carrying an MP3 player: make sure your actions are all named right, because native actions don’t actually have objects from the parser’s standpoint.

But, with some creative MPI... )
chipotle: (Default)
2005-04-06 08:37 am
Entry tags:

Ruby-LJPost

In a rush of, uh, things rushing, Monday I registered my LiveJournal client as a project with RubyForge, and last night I checked it into CVS there. Shortly I’ll make the version 0.9 release available at its project page.

No actual web page available for the project yet, but I suspect the project’s already ahead of 90% of its SourceForge-esque companions in having started its release in beta stage. I did some testing with the client on Windows 2000 today and, to my faint surprise, it worked perfectly on its first try. (I’ve included an ljpost.cmd file that seems to be necessary to let it accept standard input when called from something like NT XEmacs.)

Right now it's developed a strange problem which only shows up on the real server, but not on the test server. But, that's tonight's debugging...

chipotle: (Default)
2005-04-03 07:07 pm
Entry tags:

Stupid Ruby Tricks

I liked the idea of being able to post to LiveJournal directly from BBEdit. I find that any post that I’m doing that’s of significant length, and sometimes even short ones, is easier to compose in a real text editor and write with Markdown. This leaves me the short but kind of Rube Goldberg-esque task of converting the file to HTML and posting it to LJ in another program. Why not have it all happen within BBEdit? Hence my experiment yesterday, which had the minor problem of using a qualitatively sucky command line client for the back end.

So naturally, I figured, why not write my own? And, hey, I could use it as an opportunity to actually write a mildly functional Ruby program. And while I’m at it, why not set it up so it can do the translation from Markdown to HTML for me?

After a few false starts, I have a program which seems to actually do that. It’s pretty dirt-simple–a few configuration options saved in .ljpostrc, and metadata set in a way which looks like email (i.e., at the top of this message I have lines that start with ‘headers’ for subject, mood and music). It’s not terribly elegant and I suspect it fails to do things The Ruby Way™, but it does nearly everything I want it to. (All it really needs to be as feature complete as a post-only client can get is handling post security; right now it only knows ‘public’ and ‘private.’ Friends group handling is unnecessarily wonky in the LJ protocol.) And, I’ve tried to write it in a way where it’d be useful for anyone else who, for some ungodly reason, wanted to have a CLI post-only LiveJournal client.

I can see why people like Ruby. For the most part it’s very straightforward; once you’ve learned the language basics, a guess at what the syntax for something “should” be will usually be correct, which neither PHP nor Perl can claim with a straight face.

What am I going to do with Ruby other than stupid pet tricks? I don’t know, yet. It’s been good at keeping my mind off other angsty things today, though, so that’s certainly something…

chipotle: (Default)
2005-03-14 01:06 am
Entry tags:

Quick post weekend update

Theoretically, I was going to get more done this weekend than I actually did. This is usual for me. I’m usually ready to get around to my personal projects by the third day of the weekend, which is of course problematic.

Saturday I decided that I’d head off to the East Bay on another day trip, up to Martinez by way of Oakland so I could stop off at a taco truck for lunch. I have to say, it was a pretty damn good burrito. (Undoubtedly more authentic than the ones at Chipotle, although I’m not sure it was necessarily better. Eventually I’ll get around to writing a mini-essay about the trap of authenticity, but as Alton Brown says, that’s another show.) It also makes me want to try to cook carnitas sometime.

Why Martinez? you may ask. Because that’s where the John Muir National Historic Site is, and I wanted to give it a visit.

It’s an interesting place, although not terribly interesting: a turn-of-the-century Victorian house that Muir bought from his in-laws, and that was undoubtedly too fancy for his tastes. When the house was damaged in the 1906 earthquake, he rebuilt a lost fireplace not as the dainty marble coal-burning kind the rest of the house has, but as a big rustic brick affair that could burn logs and make him think of campfires.

I wandered about there for a while, taking some pictures, most of which didn’t come out in ways that were particularly interesting. I need to work not only on composition but on more prosaic things like watching the camera settings.

On the way out, I explored Martinez itself a bit. Some of the East Bay is quite pretty; while Martinez has a claim to fame as the birthplace of the martini, it’s otherwise pretty non-descript. The downtown was typical of many older small towns in somewhat touristy metro areas, a mildly quaint veneer over a several-block stretch whose economic pain can be measured in the quantity of antique stores. (All small towns inexplicably believe that not only are antique stores are a draw, but the more the merrier.) And, while the claim seems to check out, it’s a little bit stretched: the original drink, simply the “Martinez,” is only slightly more martini-like than a Cosmopolitan is.

One thing I did notice, though, is that Martinez has a very pretty Amtrak station. In fact, I passed by one in Oakland that was also pretty. I also noticed that the trains here are differently colored than most Amtraks and prominently display “Amtrak California” on them. I wonder if this branch of the railway is trying to set themselves up so they can saw off the rest of the corporation when it finally finishes collapsing.

Sunday, I’d thought about cooking those carnitas. I did get a few household-type chores done: a load of laundry, running the dishwasher I’d loaded the day before, cleaning up the stove. But [livejournal.com profile] dracomistle was thinking about getting a nice dinner, and being of weak will, I found an interesting-sounding steak house in San Carlos called Izzy’s. I liked it; it’s somewhere between the level of an Outback and a Ruth’s Chris, with a lot of the gentleman’s club swank of the latter at decidedly less painful prices. The food was uniformly good with one caveat—both my prime rib and [livejournal.com profile] dracomistle’s steak were cooked medium instead of the requested medium rare. I’m not sure if the kitchen (or waiter) just biffed the order, or if they’re used to diners not really meaning medium rare when they ask for it. I’m pretty sure I’ve noticed this effect at other steak houses.

So, did I do anything productive? Well, I finished poking through Curt Hibbs’ tutorial on Ruby on Rails, working through it more or less verbatim save for setting my version up on PostgreSQL rather than MySQL. There are still a few nerdy questions I have (how would I change a parameter URI from “/recipe/list?category=Snacks” to something more REST-happy like “/recipe/list/snacks”, for instance), but on the whole I’m pretty impressed.

At some point I may revive an old idea of a restaurant review website that people suggested—years ago!—that I should do, using Rails as the back end. It would cut down on a lot of the pain that’d be required to set something like that up.

Of course, this is assuming I get those other projects back on track…

chipotle: (Default)
2005-03-04 12:36 pm
Entry tags:

(no subject)

So the experiment with WordPress went pretty well, getting that site up and running with… I was going to say a “minimum of fuss,” but that’s not entirely true. I ended up writing my own simple gallery plug-in because the simple gallery plug-ins that existed weren’t very good, and I’ve since found a bug in WP 1.5. (I’ve documented it on their support forums but so far I haven’t found a bug tracking system I can actually file a ticket in!)

Doing this, though, has led me to a bit of a re-assessment of what drives me. Simply put—and in retrospect, this should have been obvious to me, and it’s probably obvious to everyone around me—I’m more interested in building things than in running things.

I’m not a great programmer, but I genuinely enjoy programming (despite the bouts of screaming frustration). Similarly, the most enjoyable things about magazine work for me have to do with layout first, editing second and business a distant third. And Claw & Quill is unfortunately teaching me that I’m not much of an editor/publisher even on the web—building the site was a lot of fun, but my enthusiasm for the ongoing work has been limited, and I can’t completely write that off to my short attention span. (I can write off some of it to that, since when I get obssessed with a new project I tend to let old ones slide more than I should.)

I have to face reality: things are slow with it because I’m putting time and money into something I’m not particularly enjoying. As much as I think the fandom needs something like C&Q out there, it doesn’t necessarily follow that I’m the right person to do it, certainly on my own.

This doesn’t mean I’m giving up on C&Q, although it may mean I’m going to start looking for help with it. At this point I’m not sure how I’ll attempt to divide duties; having someone act as a front-line editor and someone else handle finding art would help. Really, having someone handle the business side and just leaving me as executive editor and webmaster would be ideal. However, I expect the funding will continue basically being me, so I’m probably stuck as the guy doing the contracts.

But this is a larger thing than just C&Q; it has some implications for what I should be doing with my life.

Okay, that’s a really broad statement, I understand. But I think everyone has things that they enjoy and things that they’re good at, which are generally non-identical but overlapping sets. It’s difficult to do something you’re good at but don’t enjoy unless you’re getting (sufficiently) paid for it. Conversely, something you enjoy but aren’t particularly good at is something you probably won’t get paid for—even though it may make a pleasant enough hobby.

The thing about the “sweet spot” where the two sets overlap is that it contains both the best hobbies and the best career paths. I’m not sure what direction this points me in for either one, but I’ll be thinking more on it. [livejournal.com profile] shaterri said yesterday that I’m a tinkerer, which is pretty accurate. What kind of hobbies and work does that lead to? I’ve established that my muse has NADD, but even after all this time, I’m not 100% sure what her strengths are. I’m still possessed by the desire—sometimes a need, no less—to create things. But that desire might be met by designing and rolling out a web site, or creating a new program. (No, I haven’t given up on the CMS idea, I’m afraid, but more about that later, perhaps.)

And, you know, I’m just a few years from forty, so it’d be good to get a headstart on my midlife crisis!

chipotle: (Default)
2005-02-23 01:22 am
Entry tags:

CMS redux

Naturally, after complaining in detail on Friday, Textpattern 1.0rc3 came out on Saturday. And does it fix all of my problems? No, it’s broken in new ways. I’ll spare you the details.

Before the release I suggested, finally, that the developers should have been checking their work into the Subversion repository as they worked over the last few months. I was told—in these words, although not by any of the actual developers—that I and other “complainers” just didn’t understand the software development process. When another such complainer observed that none of the changes we were assured were being made safely out of all public sight could be tested, he was snapped at with “we’re all here testing the previous release—don’t you know what beta software is?” Furthermore, we were not so politely informed, there were virtually no other projects, closed or open source, with developers as communicative and releases as frequent, so what right did we have to complain anyway?

As you can probably tell, my septic tank had overflowed by this point. I knew there’d be little value in pointing out that, in fact, I am currently in a closed source beta test with much more frequent releases and communicative developers (for the Mac RSS reader NetNewsWire); that this is not unique even among commercial developers; that Textpattern’s approach in the last half of 2004 was fairly unique among open source projects, and not in a good way.

One of those other open source projects is WordPress, which released its most recent version less than a week ago. WP constantly updated its source code repository and produced fairly frequent “beta release” installation packages, and the developers somehow managed to both code and communicate during the same week. Textpattern’s loudest defenders would have you believe this feat is essentially impossible.

The really curious thing about WP 1.5, though, is that its new “theme” system is essentially a full template system, allowing the level of flexibility that it didn’t have compared to Textpattern back when I was first looking at systems to run Claw & Quill on. WP’s themes are, frankly, more obtuse than Textpattern’s, a PHP-HTML tag soup. But it works. In fact, “it works” is the main concept that kept cropping up all through my investigation of WP. Importing the export file from Movable Type? It just worked. (It was a minor nightmare in Textpattern.) Viewing the site after import with the default template? It just worked. Presto. In 45 minutes, I got farther with WP than I had in hours with Textpattern.

I still have a lot of “theming” to do on that site, and it may be a little ornery. And it doesn’t address some of the issues I could address by writing my own CMS, I know: WordPress, like Textpattern, is written in PHP, is dependent on MySQL, and is heavily tilted toward the needs of weblogs.

But it’d be a lot faster than rolling my own (or even than forking Textpattern).

And, hey, if I get lost in the templates, WP has pretty good documentation already.

chipotle: (Default)
2005-02-18 04:59 pm
Entry tags:

CMS blues

I’m going to indulge in a bit of geek ranting about Textpattern, the content management system I run Claw & Quill with and have been considering for a couple other sites.

I’ve said it before: I like Textpattern. From a design standpoint, it has a great elegance. Templates are XHTML with Textpattern-specific tags in a separate XML namespace, so the whole thing remains a well-formed XML document. Pages can use a library of template snippets. Plugins simply become new tags. Articles can be assigned both categories (like “fiction” or “poem”) and sections (separate page templates/style sheets, analagous to newspaper sections).

But lift behind the curtain... )
chipotle: (Default)
2005-02-03 11:00 pm
Entry tags:

Visiting Sunol

As I start this, I’m in a small town—no, a really small town—called Sunol. I gather the name is mostly heard in traffic reports thanks to a section of I-680 called the Sunol Grade, but what’s fascinating here isn’t traffic patterns—it’s that this feels like an isolated, rural town much farther away from the metro area than it is. Looking out the window of the Sunol Coffee House—an old building itself—I can see a tiny post office, two other buildings and a railway. Farther down main street in either direction are, well, maybe three more buildings.

Yes, this’ll probably be a little bit of a long lunch. I don’t feel guilty because this is a time when much of the rest of the department is out seeing “Meet the Fockers” as a group movie. If they’d been able to stick with their first choice of “House of Flying Daggers,” I’d have gone with them.

But I like finding places like this, and I’m reminded that when I was at There I found the East Bay Regional Parks web site and realized that district is just really honking big. I decided I wanted to go around visiting a few of those parks, but for the most part, I haven’t. Not that I can change that today—there are two nearby parks and I suspect I’ll give one a quick look, but it’s not going to be that long a lunch.

Naturally, my thoughts are on… templating systems. In addition to poking around a myriad of Python systems, I’ve come across the up-and-coming Ruby on Rails application framework (written as some might guess in the Ruby language), which is supposed to be great for what’s amusingly been dubbed “CRUD” applications: “Create / Read / Update / Delete,” the basic database operations. It’s certainly possible to write blogging/CMS software in such a framework, although it occurs to me that where it’d be really useful is… well, the application I’m working on for work. But they’re pretty firmly wedded to Perl where I am, so I’d need to find the Perl equivalent. (I’m also a little allergic to the constant drumbeat in the RoR community for a Mac text editor called TextMate, but that’s another issue.)

The annoying thing is the voice in my the back of my head saying: what would a content management system be like that didn’t have any templates? How could one be designed that’s still flexible and customizable that doesn’t use a template? The ideas that are bouncing around in my mind right now are for things that one might argue are still effectively templates, but I’m thinking of something that’s easier to manage and set up than the “XHTML with placeholders” approach.

chipotle: (Default)
2005-02-01 05:05 pm
Entry tags:

NADD

So I'm back from an unnecessarily big lunch at Pedro's Cantina and Grill in Santa Clara. Pedro's is a local chain (just two or three locations, I think), better than most chain Mexican restaurants, in a big, ornately beautiful building so authentic it transports you out of the technology park setting and makes you feel just like you're eating at Epcot. During a convention of Intel engineers.

But that's not what I'm thinking about. I'm thinking about--more projects. Because, y'know, I don't quite have a half-dozen other projects I'm poorly attending to.

So I'm musing about another one. )