Felix Crux

Technology & Miscellanea

Tags: , ,

The rexiv2 library crate (available on crates.io) for Rust provides read and write access to media file (mainly photo) metadata in the Exif, XMP, and IPTC formats. Many file formats are supported, including of course JPEG, PNG, TIFF, XMP sidecar, some camera raw formats, and various others.

You can view the documentation here, get the source code, and report bugs or contribute code.


Tags: , , ,

When I was first introduced to Django, I found it so pleasant to work with, and so productive, that I ended up accidentally creating this site. I still stand by this first impression, and I still recommend and promote Django whenever I get the chance.

But sometimes it just isn't the right tool for the job. For a site like mine, which has essentially no dynamic content whatsoever, and is infrequently updated, it doesn't really make sense to keep up with the treadmill of updates, both to Django itself, and to the supporting infrastructure like the PostgreSQL database that sits behind it. Static HTML pages would be simpler to maintain, and, as an added benefit, load faster.

However, I didn't want to give up on some of the key parts of Django that really made my life easier. The templating system, for example, meant that I could tweak the look of the site and have changes consistently propagated across all pages, without manually updating each one. The automatic generation of RSS feeds was another nicety I didn't want to lose.

I therefore put together a system that allows me to retain the key benefits of Django, while producing an end result that is in fact a whole bunch of static HTML pages. It's called Transcribe, and it currently powers this site and a couple of others that I maintain.


Tags: ,

I recently remembered that I hadn't yet cleaned up and done an “official” public release of my pdfmunge utility. It's a little Python script that I wrote about a month ago to help me deal with PDFs more effectively on my eBook reader. If you're lucky enough to own a big-screened Kindle DX, you can stop reading now. The rest of us have to deal with reflowing the text of PDFs in order to bring them up to a legible size on tiny screens. Of course, most PDFs don't take kindly to being reflowed, and if they contain any kind of technical diagrams, source code, or images, you're pretty much out of luck. That's where pdfmunge comes in.


Tags: , ,

Hector is a Literate Haskell implementation of Weizenbaum's ELIZA program.

ELIZA is more or less the original “chatterbot”. Implemented by Weizenbaum in the mid-1960s to demonstrate how seemingly “intelligent” behaviour could be mimicked by very simple pattern-matching, it shocked even him with how much ordinary people were taken in by the illusion. It is probably best known in conjunction with its DOCTOR script, which allows it to act like a Rogerian psychotherapist (a version of this can be invoked in the Emacs text editor with “M-x doctor”). One user was reportedly so affected by the program that he requested that Weizenbaum give him some privacy to discuss his issues with the doctor!

The program works by simple pattern matching. The user's input is checked against a list of pre-defined patterns, and if there's a match, a corresponding output is returned. Eliza also has some facilities for extracting content from the input and using it in the reply (e.g. “I need a vacation” might result in “How would you feel if you got a vacation?”). The final bit of finesse is a rudimentary memory, so that it can bring up past topics again if it doesn't know what to say (Hector does not do this).

Hector is a Haskell reimplementation of a very similar system. It is written in a “literate” style, and should be simple to follow along with. Hector is not a doctor like Eliza — instead, he's more of a grizzled old programming veteran, having got his start feeding punchcards into a mainframe in his undergraduate years. He can't help you with relationships or inferiority complexes, but he'll be happy to discuss your programming problems with you.