All right boys and girls, I'm all for quality releases and everything, but Cortex Reaver 0.2.0 is raring to go. Just gem upgrade to get some awesome blogging goodness.

I've been working a lot on Cortex Reaver lately, with several new features in the pipe. I'm using Vim for awesome syntax highlighting, refining the plugins/sidebar infrastructure, creating improved admin tools for long-running tasks (like rebuilding all the photo sizes) and fixing several bugs in the CRUD lifecycle. All that comes in a slick new visual style, including a new stylesheet/js compiler which makes page loads much faster (eliminating something like 20 external HTTP requests in the non-cached case). Finding time to really sit down and hack on CR has been tough lately with all the grad school/work stuff going on, but as new users are coming on board I'm motivated to keep improving.

I've migrated off its old, dying hardware onto a spiffy new Linode. So far it's going pretty well! My new blog engine, Cortex Reaver is also up and running.

Currently waiting for my flight to depart from PDX. The 15 inches of snow Nature dropped on us this week meant long waits for most people, but I was able to get through ticketing and security in about half an hour, and the MAX got me here just fine (though we passed a couple jacknifed semis on the way). Now all I have to do is make my connection through SeaTac in an hour. That... could be interesting.

I reorganized the photographs according to EXIF dates, where available. This should clear up the fact that I tend to go back in my archives and publish things months or years after they were taken. I'm not sure what to do about new material yet; I may let the front page see recently updated photographs, but put old photos in their temporal context, or leave them at the top of the stack for a few days then let them slide back.

Ruby on Rails is much, much, slower than I would like. It takes around .25 seconds to render the index page: about 10 times longer than Ragnar. I've alleviated the problem somewhat by switching to a Mongrel cluster with Apache's mod-balancer, but performance is still slow. I can't add any more foreign key constraints--pretty much every feasible relationship is locked down. I guess it's just down to ActiveRecord tuning, and figuring out how to make ERB run with any semblance of speed. Possibly memcached, too...

Anyway, sorry for the inexplicable downtime. Things are still moving around quite a bit.

Added ATOM feeds for journals, photographs, and a combined feed. Also added EXIF support to photographs, such that files with EXIF headers (those from about the last year or so) display some shot information as well.

Also, I caught bash programmable completion completing paths on remote servers over SSH. I was copying a file from the laptop to the server, hit tab to complete the directory on the server side… and it worked. That was quite surprising, when I realized that my ordinarily useless request had actually been carried out. Hurrah for bash making my life easier.

Had significant confusion yesterday night, when the tested and (so I thought) working code from the development machine threw strange exceptions on itself. The box claimed NoMethodError for Rational.reduce and Rational.to_f, both of which were quite clearly part of the standard library. Eventually realized that this was due to my custom Rational class, which has a very different interface from the standard library’s version. Changed RUBYLIB to not load my custom libraries, and it worked.

I rewrote my old, Perl-based blog engine in Ruby on Rails, which was a remarkably refreshing experience. The old Ragnar database converted over cleanly, and I think journals, comments, and photographs should all be in order. In the next few days, I'll work on bringing up projects, ATOM feeds, and other things the old site used to have.

After the last three months, I’ve come to the conclusion: Ruby is a wonderful language, and I don’t want to write code in Perl any more. I like Perl: it’s fast, powerful, and has a terrific community around it. If you wanted to run your television through a LEGO USB IR transceiver, yeah, there’s probably something in CPAN for that. However, I’m finding that the rocky syntax of Perl gets in the way of my thinking. I don’t want to use $hash_of_hashes->{'key'}->{'key2'} to get at at what should be a simple data structure. Using five special characters on a variable makes my code hard to understand, and makes it easier to cause bugs. It’s a good language, but Perl has its limits. After spending months writing clean, joyful code, I think that the Ruby language maps more closely to the domains of the problems I’m trying to solve.

There are a lot of things I like very much about Ragnar: it’s quite fast, extensively configurable, and compliant with web standards by design. XSLT transforms keep logic and presentation well separated, and the powerful query engine makes node-level logic simple. I plan to preserve the best aspects of this design, but refactor the code into a Ruby platform, separate node data taipus into a more traditional database schema for efficiency, and define a plugin architecture with callbacks for node lifecycle handling. For now, at least, I’ll avoid the temptation to use Rails for this project: I prefer XSLT, and working this way is more fun for me. :-)

It’ll be nice to have a new project.

Spammers have started breaking through the session check, so I’ve started filtering content for high URL density. If your legitimate message doesn’t get through, toss me a line so I can recalibrate the filter.

Update: More spam. They’ve switched to single-line links, tagged with [url]. There’s got to be a better way around this.

On a related note, what kind of questions does every english-literate person know the answer to?

I've added a check for a small session cookie when commenting. We'll see how well that works.

I've been getting hit with a flurry of blog spam from a large set of IPs. Looks like some sort of botnet. I've taken down commenting until I can write some countermeasures. :-/

I've written an Atom 1.0 feed for Ragnar. Other changes include a more organized system for passing metadata, improved image thumbnail layout, better cross-platform support, and new graphics. The administration interface still needs a lot of work, though.

Someone caused an interesting bug this morning: the input validation function doesn't check for weird character encodings (Hello, Korea...), which can be parsed and stored correctly but gunk up the XSLT processor. I've modified the node addition system to perform rigorous sanity checks on all incoming data. This has the added benefit of ensuring that your content is valid XML, so mistakes like tags which are closed out of order will be detected.

Work on Ragnar continues, but mostly behind the scenes. I’ve written a simple node management tool to edit their properties, a friendly interface for deleting nodes, and a node addition page generated from the defined data taipus. Doing this entailed a redesign of the CGI parser, so things feel a bit cleaner now. Finally, an XML export mode is the result of a more flexible output function–this makes designing templates much easier, and lets other programs access Ragnar data without scraping.

Adding text content is now much easier. The filter understands both plain text conventions and html formatting, but strips disallowed tags and attributes through HTML::Scrubber. This behavior is fully configurable, and works well for small comments and large bodies of text alike.

Currently I’m working on file uploads and a better way to define data taipus in the first place. Uploads need to be detected, matched to fields, stored, and a URL written to the database field to match–not an easy task with multipart encoding. Modification of the MySQL tables directly seems to be the best option, as the config file is straight SQL already.

I've finished the codebase for Ragnar, my new content management system. Things may be a little hectic around here while I fix bugs and add new functionality, but it should work out in the end. In the meantime, try out the new threaded comment system, and send me bug reports or suggestions for features.

Wonko just pointed out to me an incredibly easy way of including XPath expressions inside your XSLT templates, especially within tags that need to have dynamic content like images and links. The best method I’ve been able to come up with prior to this point is to add a custom attribute to the tag, like so:

<a> <xsl:attribute name="href"> <xsl:value-of select="link_edit" /> </xsl:attribute> Edit </a>

But there’s a much easier way to do it, if you don’t mind sacrificing some structure for readability. Just include the XPath expression for the value you want to include in braces, like this:

New server is up. It’s on a much faster line, and is a little more powerful than the server. Please update your links and bookmarks accordingly.

I'm re-writing my blog engine from scratch, and the project needs a name. Would anyone like to suggest one?

Copyright © 2017 Kyle Kingsbury.
Non-commercial re-use with attribution encouraged; all other rights reserved.
Comments are the property of respective posters.