Zeroth Post!

A Usenet posting sent me to a short article by Edsger W. Dijkstra titled Why numbering should start at zero. Now, I have never used a programming language that wasn’t zero-indexed (like Fortran), but neither have I adopted the habit of numbering lists starting with zero. I think the difficulty I have with zero-indexing is… Continue reading Zeroth Post!

Voted Off the Planet

So I have been dropped from Planet Lisp, scarcely two months after being added. I wonder if that’s a record of some kind? Apparently, the maintainer found my tone too didactic and my knowledge too lacking. Fair criticisms both, but I meant no harm. I’m certainly not trying to set myself up as a Lisp… Continue reading Voted Off the Planet

Perl in Lisp 0.1

Hello, Lisp world! This is my first released Common Lisp code. Perl in Lisp is a Common Lisp interface to the Perl 5 API. It allows you to run a Perl interpreter embedded inside Lisp and evaluate Perl code. It does not require any C wrapper code — the API definitions are done with CFFI… Continue reading Perl in Lisp 0.1

The Naming of Namespaces

Or, How the Lisp-n Shall Inherit the Earth Humans like to name things. Like ourselves, Homo sapiens, Latin for “Primate that has taken leave of its senses.” Then there are engineers. Engineers like to name things too. Like SCSI, pronounced “scuzzy.” Or WYSIWYG, pronounced “wizzy-wig.” Or TTY, pronounced (I couldn’t believe this at first) “titty.”… Continue reading The Naming of Namespaces

The Only Data Structures You’ll Ever Need

Perl was the first programming language I really liked, the first language that made programming fun. Perl has three basic types: “scalars” for atomic values, arrays for ordered sets, and hash tables for unordered sets. (Yes, there are others, but those are the popular ones.) I quickly discovered that these three types can be combined… Continue reading The Only Data Structures You’ll Ever Need

JavaScript-like Objects in Ruby (or Lisp)

As part of my exploration of Ruby, I attended Francis Hwang’s presentation to the New York Linux Users’ Group. One feature that caught my interest in his talk was the OpenStruct class, which lets you assign values to arbitrary “slots” within an object. require ‘ostruct’ me = = "Stuart Sierra" me.net_worth = -500… Continue reading JavaScript-like Objects in Ruby (or Lisp)

Ruby: Python for Lisp Programmers

A popular game on comp.lang.lisp is comparing Lisp with Python. Lispers complain that Python has a crippled lambda and no lexical closures, and they hiss and boo whenever Python’s development tends in a non-functional direction. I’ve recently been playing with Ruby. Lo and behold, it has real lambdas, closures, and a generally more functional style.… Continue reading Ruby: Python for Lisp Programmers

Hello, Planet Lisp!

It’s great to be here, even if I am a little intimidated by the company. I’ll try to keep my writing interesting.

List Processing and the Efficiency of CONS

One big difference between Lisp and most other programming languages is its use of recursion instead of iteration. So while I was working on some text-parsing code, I fell in to this simple pattern: (defun process (list) (if list (cons (do-something (first list)) (process (rest list))))) Ah, the joys of Lisp-2. If do-something were actually… Continue reading List Processing and the Efficiency of CONS