Tag Archives: Scheme

R7RS WG1 Update

Via Grant Rettke over at Wisdom and Wonder I found these slides from a talk at LispNYC by John Cowan on September 13. As readers from my old blog will recall, R7RS will be split into a “small Scheme” and … Continue reading

Posted in Programming | Tagged | Leave a comment

Scheme Versus Common Lisp

A lot has been written about Scheme versus Common Lisp and the subject has achieved holy war status much like that of the Emacs versus Vi crusades. I use and am happy with both. I like that Scheme is a … Continue reading

Posted in Programming | Tagged , | Leave a comment

The Common Lisp Loop Macro

I don’t like the CL Loop macro. I’m not alone on that; Paul Graham isn’t a fan either. On the other hand, Peter Seibel has a more positive view of them. That two accomplished and intelligent Lispers can disagree on … Continue reading

Posted in Programming | Tagged , | Leave a comment

A Practical Application of Gray Codes

Gray codes are a way of encoding a a sequence of integers {0, 1, 2, …, n} so that the binary representation of adjacent integers differs by only 1 bit. For example, the1 Gray encoding for the sequence {0, 1, … Continue reading

Posted in General | Tagged | 1 Comment

Expanding File Names in Guile

I really like Guile but one very annoying thing about it is that it doesn’t expand file paths. If you want to load a file outside the current directory you have to specify the complete path. Emacs has a very … Continue reading

Posted in Programming | Tagged | Leave a comment

Boolean Functions

Boolean functions are very simple. If B = {FALSE, TRUE } then a Boolean function of n variables has domain Bn and range B; that is f: Bn → B. This limits the number of possible functions. For example, there … Continue reading

Posted in Programming | Tagged | Leave a comment

Huffman Coding

Over at Harder, Better, Faster, Stronger, Steven Pigeon has a nice post on Huffman codes. He explains how Huffman codes operate and works through a pencil and paper example. Because he doesn’t give a real implementation and because the usual … Continue reading

Posted in Programming | Tagged | Leave a comment

Heaps and Priority Queues

In a previous post, I talked about FIFO queues and gave an implementation. Now I want to talk about another type of queue: the priority queue. In these queues every element has a priority and elements are removed from the … Continue reading

Posted in Programming | Tagged | Leave a comment

FIFO Queues in Scheme and Lisp

FIFO queues are a standard data structure that have many uses but they can be surprisingly difficult to get right. The standard implementation is an array with two pointers called front and rear. It’s the details of maintaining the pointers … Continue reading

Posted in Programming | Tagged | 3 Comments