Author Archives: jcs

Playing with Common Lisp’s Compiler Macros

Back in April, Robert Smith of Symbo1ics Ideas wrote an excellent post on solving the m-of-n Boolean Circuit problem. The problem is nominally about building a boolean circuit having n inputs that returns TRUE if at least m of the … Continue reading

Posted in Programming | Tagged | Leave a comment

Two Elisp Challenges

I ran across a couple of nice interview questions and an interesting story over at Tanya Khovanova’s Math Blog. The two questions are: Given a list of integers from 1 to n but with one of the integers missing, write … Continue reading

Posted in Programming | Tagged , | 8 Comments

DOCUMENTATION-TEMPLATE

I’m just starting a Lisp project that, among other things, involves fiddling with dates. Working with dates isn’t particularly hard but it’s also not very rewarding. Oddly, Common Lisp doesn’t have any functions to format and manipulate dates. I certainly … Continue reading

Posted in Programming | Tagged | Leave a comment

Checking The Easy Cases First

Over the weekend, I was amusing myself with this problem from the always entertaining Programming Praxis. The problem is to partition the set {1, 2, …, 16} into two equally sized subsets such that The sums of the integers in … Continue reading

Posted in Programming | Tagged | 1 Comment

Troubleshooting Emacs Libraries

While trawling around the WikEmacs site today, I came across this page on troubleshooting that explained some commands that I wasn’t familiar with. The first two are helpful if you are trying to search out library problems. For example, if … Continue reading

Posted in General | Tagged | 1 Comment

TPK In Common Lisp

Yesterday I wrote about the Trabb Pardo Knuth algorithm and gave an implementation in Emacs Lisp. Elisp allows an nice implementation but was a bit frustrating because the Elisp interpreter handles overflows internally and never signals an overflow condition. Therefore, … Continue reading

Posted in Programming | Tagged , , | 2 Comments

The Trabb Pardo Knuth Algorithm in Elisp

The latest Programming Praxis Exercise is interesting. Back in 1973, Luis Trabb Pardo and Don Knuth published an algorithm that was meant to assess the power of a programming language. The algorithm was Ask for 11 numbers to be read … Continue reading

Posted in Programming | Tagged , | 4 Comments

The WikEmacs Elisp Cookbook

I stopped by WikEmacs today to see how the site was progressing. It looks pretty nice and has obviously seen some hard work by its contributors. Being me, I immediately went to the Emacs Lisp Cookbook to see how it … Continue reading

Posted in Programming | Leave a comment

And So It Begins

Tor/Forge, part of the Macmillan empire announced that they will start shipping their ebooks without DRM starting in July. This is the beginning of the DRM death spiral predicted by Charlie Stross (although he has tempered that prediction a bit … Continue reading

Posted in General | Tagged | Leave a comment

Decimalizing Latitude and Longitude

Xah Lee has reintroduced a challenge from last year. Given a string of latitude/longitude is degrees, minutes, seconds, write a function that returns them as signed decimal numbers. That is, “37°26′36.42″N 06°15′14.28″W” → (37.44345 -6.253966666666667) I remember looking at this … Continue reading

Posted in Programming | Tagged , | 2 Comments