Posted in 29 August 2009 ¬ 01:36h.Rick
With a title like that, it’s not really clear where I intend to go with this post, but bear with me for a moment.
A couple of years ago, I got into functional programming, initially with Common Lisp (only a tiny bit), and then Scheme and Scala, a pinch of OCaml, and finally Clojure. One thing [...]
Read the rest of this entry »
Posted in 19 July 2009 ¬ 23:10h.Rick
TL;DR version: Modern browsers need to learn a lesson from Emacs and keyboard launchers and provide an interface for tab-switching that is keyboard search-as-you-type based. Firefox is the best browser to implement this on, since it is very extensible.
The Extensibility of Firefox
Mozilla recently hosted a Summer Design Challenge for 2009 that focused on “Reinventing Tabs [...]
Read the rest of this entry »
Posted in 9 July 2009 ¬ 07:39h.Rick
Here’s the thing about using commercial (proprietary) software: you are not buying software, or even software-as-a-service. You’re buying into an ecosystem. Let me quickly provide examples, rather than pontificating endlessly.
Take the iPhone. I really like the iPhone. A good friend of mine just bought a shiny new iPhone 3G S. She was moving from Verizon, [...]
Read the rest of this entry »
Posted in 8 February 2009 ¬ 09:43h.admin
One of Clojure’s biggest strengths is that it is backed by the JVM, and has good interoperability with the Java libraries. When I needed to implement a simulation with events that should be executed in order of their timestamp, I was immediately tempted to use Java’s PriorityBlockingQueue, since neither sorted-map nor sorted-set supported two events [...]
Read the rest of this entry »
Posted in 4 February 2009 ¬ 22:59h.Rick
Introduction
When I program, I sometimes am fortunate enough to see beauty emerge from what I do. I love programming because of this, but, enthusiastic as I am about it, I find that it is very hard to convey the essence of what I see to others, which often means that they cannot understand what I [...]
Read the rest of this entry »
Posted in 21 November 2008 ¬ 01:48h.Rick
Just ran across (via Proggit) an interesting blog post about Core War, a game I played a bit with on Linux a few years back in which programs compete for dominance inside a virtual machine. Very neat idea – you program an agent that will go and fight for you in a virtual world. Cool.
What [...]
Read the rest of this entry »
Posted in 25 October 2008 ¬ 23:21h.Rick
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 »
Posted in 23 October 2008 ¬ 01:08h.Rick
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 »
Posted in 14 October 2008 ¬ 20:39h.Rick
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 »
Posted in 11 October 2008 ¬ 13:31h.RickComments Off
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 »