bloggo ergo sum

Category: Uncategorized

Dedicated window-buffer mapping with Emacs

I use CScope to navigate source code from within Emacs. It’s very, very useful and integrates will into Emacs. However, I’ve been wanting a way to control how cscope updates the buffer/window mappings as it locates search results for you. Sometimes, I like that CScope updates the buffer where I initiated the search to reflect [...]

pre-commit script for submodule hygiene

Our team at work is using git submodules to track re-usable code across projects, and it’s been pretty good so far, but we have hit minor snags along the way (such as the absence of a ‘git submodule rm’ command!). Another one is that using submodules adds a step to the sequence of things you [...]

submodule moment

Seems that new features and concepts appear in Git at such a steady pace that it’s difficult for the jargon to keep up. I don’t follow the git mailing list as closely as I should: it’s too high-traffic and I already don’t have enough time to do the work I have on my plate. Right [...]

Extended Git Submodule Status

At work I’m involved in some projects that will very likely make heavy use of submodules. The reason is that submodules make it very convenient to make use of a set of “common” code without a ton of duplication. We’re currently breaking our “common” code into packages that can be included in a project independent [...]

Lisp: no easy download

Over at LispCast, eric’s got a new post up called No easy download. In it he talks about the difficulty of being new to Lisp, wanting to learn, and not knowing where to start. He’s right. It’s way too hard – and I’d argue it’s one of the primary factors that hampers Lisp adoption. As [...]

Smarter Git Prompt

After posting my git prompt shell snippets, someone pointed out on news.YC pointed out my daftness. All you need is the following in your .bashrc: PS1 = ‘$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo “\[\033[00m\]{$(git branch | grep ^*|sed s/\*\ //)}”; fi)\$\[\033[00m\]‘

debugging macro snippet

I wish I could say I came up with the below, and I suppose I did, but I more or less gathered two or three techniques I didn’t come up with into a few lines to code to make a macro useful for debugging. Its primary merits are readable output and extreme ease of use. [...]

Picking up a Lisp

I’ve recently gone back to learning Lisp. I used it a little bit in graduate school to do some homework assignments in one of my algorithms class and learned some of the basics there, but since I started my professional career, I haven’t gone back to it at all until now. I got Paul Graham’s [...]

Useful Git Prompt

Here’s a snippet of bash script that I wrote to make my prompt tell me when I’m in a git repository and what branch I’m on. And to my pleasant surprise, the PROMPT_COMMAND mechanism will respect color codes, so if you have your branch listings in git colorized, it will be reflected in your prompt. [...]

More functional support in C++

Sutter just announced that C++0x will have support for lambdas and closures. It looks from the N2550 report that these things are motivated by a desire for some syntactic sugar to make using STL algorithms easier (which is understandable), but I hope this will lead to more first-class support for the functional programming paradigm. It [...]