I haven’t posted much about any of my projects for a some time. This is because I’ve spent the past few months squirrelling away on something new: a while ago I decided a good way to learn more about VHDL would be to write a parser/checker for it. I had a vague plan of using [...]
Archives for programming
Conky BBC weather
I’ve written a Ruby script called bbc-weather.rb that parses the BBC weather RSS for a particular location and formats the data for conky. Here’s an example: To use it insert the following in your .conkyrc: ${execpi 600 ruby /path/to/bbc-weather.rb 4197} This will refresh every hour. Replace 4197 with the number of your local weather station. [...]
Emacs commit message mode
Here’s a really trivial Emacs major mode for editing Git and Mercurial commit messages: commit-msg-mode.el. It works in basically the same way as the Vim mode, highlighting the summary line, help text, etc. To use it, put it on your load-path and add the following to your .emacs: (autoload ‘commit-msg-mode “commit-msg-mode” “Major mode for editing [...]
Cuckoo Hashes in Lisp
I’ve been learning about cuckoo hashing this evening and to help with that I’ve written an implementation in Common Lisp that others might find useful: cuckoo.lisp. It provides a package cuckoo which exports make-cuckoo-hash, cuckoo-insert, cuckoo-lookup, and cuckoo-delete which perform the obvious hash-table operations. The key feature of cuckoo hashes, if you haven’t come across [...]
Chicken SLIME now an Egg
The Chicken Scheme SWANK implementation I’ve been working on is now available from the main Egg repository. So now you don’t need to faff about with Git and can install it like any other extension using: chicken-install slime Follow the instructions on the Chicken Wiki to get it set up. I’ll be mirroring changes in [...]
List outgoing changesets in Git
I normally use Git for my personal projects but at work I use Mercurial. While I prefer Git overall, Mercurial has some nice commands that are missing from Git. One particularly useful one is hg out which prints the changesets in your local repository that are missing from the remote. Here is a simple script [...]
Chicken SLIME describe and apropos
The latest version of swank-chicken.scm now supports describe (C-c C-d d) and apropos (C-c C-d a) commands using the chicken-doc egg. Here’s an example: This apropos window works too: hit C-c C-d a, type a regexp, and a popup window will list the matching symbols; hit enter on the one you’re interested in and you [...]
Update to Chicken SWANK server
I’ve made some improvements to the Chicken Scheme SWANK server I posted previously. Thank you to all the people who emailed me about it! I’ve fixed several minor bugs and implemented some new features: The SLIME autodoc minor mode now works giving more detailed parameter hints. For example: Autodoc is not enabled by default so [...]
Scheme on TV
Here’s a collection of interesting Scheme videos you can watch instead of the usual Christmas TV: http://programming-musings.org/2009/12/23/scheme-lectures-mostly The Guy Steele Designing by Accident talk on the history of Scheme is really good (download the slides first). Watch the Gerald Sussman one too (it’s short!). Also, who doesn’t want to know the value of ((call/cc call/cc) [...]
Using SLIME with Chicken Scheme
Common Lisp programmers are blessed with the awesome SLIME development environment for Emacs; but sadly Schemers have nothing comparable. There are a few SLIME backends for various Schemes around, in varying states of completeness, but as far as I can tell none for my Scheme implementation of choice: Chicken Scheme. Therefore I present swank-chicken: a [...]
Posts