Archive for the ‘Programming’ Category

Using refs in Clojure to Scope State

I mentioned a couple of posts ago about a technique for scoping state I used when I programmed in Scheme more often than I do now.  As I’ve been picking up Clojure as my hacking language of preference, I was surprised to find that it doesn’t support the same idioms.  In Clojure, any variables referenced [...]

Read the rest of this entry »

Fine Grain Scoping in Scheme With Let

In Java, there are four scopes: public, package friendly, protected and private.  These are useful, but rather coarse.  It would be nice to be able to specify a variable that was only visible to a select set of methods.  For example, suppose you wanted to develop a counter that could not be modified without being [...]

Read the rest of this entry »

Creating Executable Jars With Clojure

Clojure is a superb new-ish lisp for the JVM that is quickly becoming my preferred hacking playground.  As with any new language, as soon as you write anything worthwhile, you want to figure out how to distribute it.  In Clojure’s case, even though Clojure is functional and is dynamically compiled, the process of creatng an [...]

Read the rest of this entry »

Trying to figure out if there is anything in the canonical definition of streams (lazy lists) that says that you need to keep the initial elements of the stream after use (if, for example, you’re recursing down the list and the head elements are getting garbage collected). Can streams be used as iterators when traversed [...]

Read the rest of this entry »

Emacs Uptime

Since I tend to work in Emacs no matter what computer I’m using, I got curious after reading Steve Yegge’s latest post about XEmacs instability what exactly my uptimes are on all my Emacs sessions (I use GNU Emacs, but I was still curious). This is some elisp I threw together to answer that question. [...]

Read the rest of this entry »

Treehouse, et. al.; How the Internet is Fundamentally Misused

Tad Williams had vision. He wrote an epic saga whose events unfolded in a hyper-connected world. In this Otherland of virtual realities existed an undernet, a virtual reality operated by those who populated it – it was an elusive place, a metaverse called Treehouse whose entrance was almost unlocatable – but it was owned by [...]

Read the rest of this entry »