23:50 16 Feb 2010.
Updated: 00:57 17 Feb 2010
As a result of my porting over jEdit (Jython) macros to Vim, I now have a fair amount of (Python) Vim scripts, and have learned some things about how to set up those scripts. I’ll go through some of that below, and hopefully other people writing Python scripts for Vim will find it useful.
[more...]
20:05 14 Feb 2010
Over the last couple of weeks I’ve been hacking away on scripts to customize Vim, replicating the scripts I made for jEdit. I’m more or less done, and this blog post is being written in MacVim. This hopefully means that when I’m done with it I’ll be able to publish it from within Vim, the same as with jEdit.
[more...]
23:40 17 Jan 2010
I’m currently trying out Vim (again), and have made more progress this time, mainly due to Seth’s help. The key things that have made it better:
- :set hidden. Absolutely critical, this. Stops Vim from complaining when you try to switch buffers and your current buffer has unsaved changes.
- bufexplorer. Makes switching buffers a lot easier.
- A better Python syntax file. I didn’t like the defaults.
- My own indentation and syntax files for reStructuredText.
Really, though, the key first one was :set hidden. Before that I felt that I had completely misunderstood Vim’s file management model.
[more...]
15:56 10 Jan 2010
I upgraded this blog to WordPress 2.9 today, and it appeared to go entirely smoothly. Please let me know if you notice any breakage.
04:08 22 Dec 2009
Duke Nukem Forever is the vaporware king of games, a game that was promised for so long that its release was a punchline even in the late 1990s. At one point it and Daikatana were frequently compared to each other; Daikatana was also extremely late and ultimately a failure—but it came out in 2000.
Wired has a long look at what happened, and it seems fair to conclude that one of the problems was a lack of limits.
[more...]
08:06 20 Dec 2009
This article is an excellent overview of how near-future space combat might actually work, and also points out plenty of things that depictions of far-future space combat have gotten very wrong.
[more...]
16:04 10 Nov 2009
Mark Pilgrim, author of the excellent Dive Into Python, is working on Dive Into HTML5, and his draft chapter on HTML5 semantics is an excellent introduction to the advantages of the new HTML standard. It’s unfortunately quite far from becoming a real standard, but as a web developer, I’d like to see it happen as soon as possible.
I came across a contrasting Mark Pilgrim article that’s also worth reading: “Why do we have an IMG element?”, which goes over the history of that element in HTML, the objections raised at the time, and how it won out over alternatives.
23:28 30 Oct 2009.
Updated: 00:31 31 Oct 2009
15:03 15 Oct 2009
The Kardashev Scale is used to measure a civilization’s technology level, using the measure of its energy consumption—or, more accurately, the amount of energy the civilization can harness. In light of the ongoing computing/networking revolution, I’m curious about what percentage of our energy use is by data centers.
[more...]
12:05 24 Sep 2009.
Updated: 14:19 06 Oct 2009
It took me a while to get there, but I now have a working toolchain to automate going from an RTF file (or a Word document) to reStructuredText. The final link took the longest to find, and turned out to have been right there all along (no, I’m not going to turn this into a retelling of The Alchemist). But if you’re interested in how to get from Word to a sane format (like reStructuredText), this post will interest you.
[more...]
13:27 17 Sep 2009
The Robotics and Computer Vision Lab at Queen’s University Ontario has produced a working robotic system that can play pool. Called Deep Green, it appears to have an excellent understanding of geometry, although it’s not clear that it understands the rules of the game per se, or that it can do its own shot selection.
[more...]
23:48 02 Aug 2009.
Updated: 11:33 06 Apr 2010
I find in my use of Subversion that I often want to see a side-by-side list of files that aren’t under version control and files that have some other status. I also want these lists to be sorted alphabetically. Naturally, I ended up writing a Python script for this.
[more...]
23:15 28 Jul 2009
Last week I posted about my setup for going from reStructuredText to WordPress. It involved a shell script, some Python scripts, and the pbpaste and pbcopy commands. It worked, but it was a little on the convoluted side.
Now I have a slightly better process, and one that I will have used to publish this post.
[more...]
22:33 19 Jul 2009
I tend to care about word count in my writing. I’ve never been paid by the word, but nevertheless, it matters to me. From time to time I write fiction where I set the word count in advance, and then I try to hit it precisely. Even when that’s not the case, I just like to know how many words there are in a piece I’m writing. For this reason, a "word count" function is completely critical to me for whatever word processor or text editor I’m using to write.
jEdit has such a feature. It’s more or less the same as the one that I’ve been using in AbiWord, and in various word processors before that. But for quite some time I’ve wanted a better word counter. Since jEdit is now my application for all writing and I can script for it in Python, it was time to make the word counter I wanted.
[more...]
16:57 17 Jul 2009.
Updated: 17:52 18 Jul 2009
jEdit has long been my text editor of choice, and I’m using it more than ever now that I’m writing more or less everything in it. I’ve been waiting a while for 4.3 to come out, but overall I remain quite happy with it. I do occasionally wonder about switching to vim or Emacs, but jEdit’s generally been able to do whatever I wanted it to.
I haven’t done much scripting with it, though. I recently came up with some use cases for scripts—involving reStructuredText, naturally—but I was a little reluctant to do the scripting because it involves Java and I really want to keep my current focus on Python and JavaScript.
I was therefore rather happy to discover the existence of the JythonInterpreter plugin, which makes it possible to write macros for jEdit in Python.
[more...]
22:57 14 Jul 2009.
Updated: 23:13 28 Jul 2009
I wrote about moving my writing over to reStructuredText on Sunday, and since then I’ve moved both my morning pages and my blog writing to it. The latter proved more complicated, primarily because I wanted to make the process almost as easy as writing pseudo-HTML (which is more or less WordPress’ native format, and kind of mine, too, for the last several years). With some hacky wrangling, I’ve managed to set that up.
[more...]
23:54 12 Jul 2009.
Updated: 17:17 28 Dec 2009
I’ve written before about my wish for semantic word processing tools, and two years on I still haven’t found something that suits me. I think that WYMeditor has definite promise, but unfortunately the authors are aiming that at browser-to-server functionality, rather than in-browser standalone functionality. This isn’t such a major obstacle for me, but it is one of the reasons why I’m hesitant to move over to using a project that hasn’t reached version 0.5 yet.
[more...]
17:44 14 Jun 2009
Today I upgraded this blog to WordPress 2.8, a relatively smooth process. I ran into completely unrelated problems (hitting the process limit for my shell account) that derailed things for a while, but the WordPress upgrade itself was smooth.
I use Subversion to upgrade, first using
svn export --force http://core.svn.wordpress.org/tags/2.8/ .
in my development environment, seeing if things look okay there, then checking in the 2.8 changes to my own repository (the only niggly part because I neglected to clean the dev environment of changes before the export, so I had to look through things to see what was part of the upgrade), backing up my live database, and then checking the changes out to the live environment. It all looks fine, and hopefully will continue to function normally.
16:42 12 Jun 2009
I’ve been using Pylons (and, more recently, the Pylons-based TurboGears 2.0) for various projects for a while, and a few weeks ago ran into an annoying and specific problem: using Pylons via Apache made Pylons occasionally think it was running on a different port.
There’s a relatively easy answer to this, but until I was reading through TurboGears documentation, I didn’t find it.
[more...]
22:07 09 Jun 2009.
Updated: 19:42 11 Jun 2009
My brother is organizing what will hopefully become a regular web-centric Python meeting. The first meeting is planned for 18:00 Tue 23 Jun 2009 at the SF Public Library. I think a couple of speakers are lined up already, although I don’t have details on the talks. I’ll be there, and if you’re a Python developer with web interests, or a web developer into or curious about Python, you should attend too!
15:45 08 May 2009
I’ve been using Twitter for about three months now. I was fairly skeptical about it, but decided to try it out, and while I don’t think it’s now a completely essential tool, I do find it useful.
[more...]