Create/update function for CLSQL
posted on 05/09/08 at 2:51 p.m. | no comments

Django has a very handy model method in its database library called get_or_create, which either creates a new record using the keyword arguments passed as field values or gets a record using the arguments passed. Here is a simple way to implement a similar function in lisp.

newLISP to get Cilk-style concurrency
posted on 04/03/08 at 1:12 p.m. | no comments

Multi-processing in newLISP can be a chore. All processes must be directly known to any others that will be accessing shared memory, which must be synchronized using semaphores. A new development release of newLISP (9.3.7) will change all that by adding Cilk-style primitives.

Optimizing regular expressions
posted on 03/26/08 at 2:43 p.m. | no comments

We lispers generally look down our noses at regular expressions. Regular expressions are ugly. They are not expressive. However, they are a reality of programming. When used with care, they can express complex text patterns concisely.

Extending Python with (almost) anything
posted on 03/24/08 at 2:42 p.m. | no comments

Among the various methods of extending Python about which I have written, Python 2.5's ctypes module is possibly the easiest.

newLISP-mode updated
posted on 03/12/08 at 3:07 p.m. | no comments

Tim Johnson has updated his emacs newLISP-mode. I've added a few customizations and posted them in projects.