[ Content | Sidebar ]

Archives for January, 2011

Chicken SLIME now an Egg

January 22nd, 2011

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 the Chicken SVN to the existing GitHub repository so you can carry on using that if you like.

Since I last posted about this Christian Kellermann has submitted some great patches which improve the SLDB support allowing you to examine lexical scopes in the call chain. For example:

Hit enter or click on a frame in the backtrace that says “more …” and you will see a list of the lexical variables in that scope.

Colne Valley

January 9th, 2011

I went for a walk today in the Colne Valley. It’s a strange strip of land between West London and the M25 that can’t decide whether it wants to be part of the countryside or the city. It’s quite a nice part of the world anyway. Here’s where I went, from West Drayton – which you might remember I ended up in before – to Rickmansworth:

The weather was really nice and sunny for the first time in ages but not many people seemed to be out. Most of the time I was following the Grand Union Canal. Here it is just past West Drayton:

The fork you can see to the left is the start of the Slough Arm of the canal. A bit later on I saw some house-barges which have discovered a cunning method for making themselves look bigger than they are:

From here until Uxbridge it was all a bit dull with housing and industrial estates on either side. After that though there’s pretty woodland and lots of lakes. Actually, there’s probably more water than land. Apparently they are all former gravel pits that have been flooded. Here’s one at Denham Quarry:

From then on I was mostly following the Colne Valley Trail, which is helpfully sign-posted. After passing through Harefield the path went through some farmland and I came upon the curiously named Iron Fairy:

I like it very much: seems to be a sort of mini-crane. After that the path rejoined the canal and stayed on it until Rickmansworth. Just before there I met this strange mechanical fellow on the tow path:

Rickmansworth looked nice enough, although I didn’t spend long there. Getting back home was a bit of a trek: I had to get the Metropolitan line all the way into London and then the train out again. Unfortunately north-south train lines in the Thames Valley are pretty much non-existent.

So, to summarise, it’s a really good place to go walking if you live in the area. If you wanted to go further than the 10 miles or so I did then you could follow the canal to Watford. I took some more photos which you can see here if you’re interested.

List outgoing changesets in Git

January 8th, 2011

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 which does approximately the same thing for Git:

#!/bin/sh
for i in $(git push -n $* 2>&1 \
    | awk '$1 ~ /[a-f0-9]+\.\.[a-f0-9]+/ { print $1; }')
do
    git log --oneline $i
done

Store it as git-out somewhere in your PATH and you can use git out just like a regular Git command.

Muckle Flugga

January 8th, 2011

It’s a real place! Best name ever. Here it is:


View Larger Map

Chicken SLIME describe and apropos

January 2nd, 2011

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 will see the documentation.

Note for all this to work you will need to have the Chicken documentation installed – follow the instructions on the wiki.

Update to Chicken SWANK server

January 1st, 2011

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 you’ll need to add

(slime-setup '(slime-autodoc))

to your .emacs. It’s not perfect as it gets confused by symbols exported from Chicken modules (e.g. it does not work when the function has a module# prefix). Any suggestions on how to work around this would be appreciated :).

Several more SLIME commands are now implemented – e.g. C-x C-e and C-x C-r work as expected. Let me know if there’s a command you frequently use that doesn’t work. I’d love to have M-. supported but I can’t see a way to extract the required location information from Chicken.

Simple tab-completion of symbols now works too:

The problems with interrupts from Emacs I mentioned last time have now been fixed and you can easily break out of infinite loops using C-c C-c like this:

Follow the instructions in the last post to get started. If you’ve tried it already a git pull should be all you need. Note that the dependencies have changed slightly:

$ chicken-install fmt apropos symbol-utils

will install the required libraries.

Let me know if you have any questions or comments!