How To Set Up A Light-Weight On-line Thesaurus For Vim Pt.II

09:00 Sat, 25 Feb 2012

Vim has support for a built-in thesaurus. However, it consumes memory and its auto-complete selection has issues. In Part I, I showed how to set up an on-line thesaurus. Here is how to build syntax rules that will colour the output.

Summary

This is the second post of two about a light weight way to implement a thesaurus. In Part I, I described how to set up a script that provides access to an on-line thesaurus. In this Part, I describe how to write a set of simple syntax rules to provide colour and highlighting for the output.

Here is a screenshot of the finished syntax rules (using dummy data):

syntax
highlighting screenshot

[continued...]

How To Set Up A Light-Weight On-line Thesaurus For Vim

08:02 Fri, 17 Feb 2012

Vim has support for a built-in thesaurus. However, it consumes a lot of memory, which you may not want for a feature you do not use much, and its auto-complete selection has issues. Here is how to set up an on-line thesaurus query that is light weight.

Summary

This is the first post of two (second here) about a light weight way to implement a thesaurus. It is great for what I need, which is the occasional use of a thesaurus for writing text such as this article. Once it is set up, you can forget about it and just use K whenever you want to look up a word.

A nice bonus or synergy of using an online source is that the website also returns a definition for the word, so it functions as a simple dictionary as well.

The second post (here) will deal with how to use Vim's built in syntax rule sets to provide highlighting and nice colours.


[continued...]

Tiling Window Manager

10:32 Tue, 04 May 2010

I would hazard a guess that almost all unix-like system users are using a desktop of some sort or another. KDE is very popular, along with Gnome, Fluxbox and so on. Some people like all the bells and whistles such as menus, fancy graphics, feedback via sounds, and beautiful backgrounds. Others prefer a utilitarian environment and don't want anything that gets in the way or slows the system down.

I'm in the latter group, probably because my hardware is invariably a few years old with not the latest and greatest graphics card. It's not such a big deal nowadays, but fancy graphics used to slow things down too much, and now I'm used to the leaner look. I'm a touch-typist too, so I like to keep my hands on the keyboard. It really slows me down and interrupts my chain of thought if I have to lift my hands to go and move the mouse. I'm not a point-and-click person and I invariably use keyboard shortcuts even when I'm using a fancy desktop.

I wonder how many people know that you don't need a desktop at all. Before you throw up your hands in horror at early memories of a single xterm in X11,
[continued...]

Categories: software

PHP Loathing

08:43 Fri, 12 Feb 2010

I've recently had to use PHP to do some work on this site. After using Python for a while and not having used PHP for a few years, I'd forgotten why I hate programming in it.

The documentation is appalling. I've been trying for two days1 to figure out how to do a very simple (you would think) thing: display the local time. The docs beat around the bush and tell you how to get time difference from GMT, how to format the date, etc, etc. All common vanilla stuff. But how do I simply show the freakin' time?

I've tried echo localtime(). Nope. Ok, how about echo localtime(time());. Nope, it's an array, for god's sake.

How about this helpful suggestion for the PHP developers. echo localtime(), called without parameters, should do just that, using locale timezone defaults, not return an array that presumably I then have format myself.


[continued...]

Categories: software, programming

Easy Charts and Graphs -- Use Google's Visualization API

08:25 Thu, 04 Feb 2010

Have you sometimes wanted to make a quick graph or a pie chart to display on your website? Decided it was too hard for the amount of effort and given up? There is a very simple solution that is remarkably easy. You can use Google's Visualization API to create the graphs for you with just a few lines of code.

Here is a screen shot of a very simple pie chart. Note the extra features such as a slice that pops out to identify it, a pop up with more information, and sorted columns in the table. These features come with it, you don't need to do anything.

google graph
example

The image shows a pie chart and a table. You can show either or both plus several other types of graphs. I think it looks professional and neat.

The graphs are generated using javascript and ajax, and the browser will go and load the Google javascript (which I guess could cause a small delay, though on my site it is less than a second). Here is the actual page from which the screen shot was taken. You will notice it is quite
[continued...]

Categories: software, python, internet

Kukkaisvoima Blogging Software

10:44 Sun, 20 Dec 2009

I wanted a simple light-weight personal blogging tool that lets me write in flat files. Like many others, I very much dislike editing text in a browser, especially anything more than a few lines. Browsers seem so overloaded with junk and javascript nowadays that their response time has crept up to several tenths of a second, very frustrating for a touch-typist who needs response times of around a tenth to catch errors 1. So, this tool needed to work with flat files that I could edit in vim and easily transfer up to the blog host.

As well, it needed to be light-weight. I can't see my blog ever running to more than a few hundred entries per year max. Tools like Wordpress et al are too heavy for me, in the sense that their processing slows things down by comparison.

Python would be good, I prefer it to PHP. I really like it, it is a great language.

Also, I wanted some simple things like categories and comments, and search would be nice too.

Originally, I had tried pyblosxom, but I found the lack of documentation
[continued...]

Categories: python, software, blogging