Optimizing regular expressions

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. Read more…

Mar 26th, 2008 | Filed under Tips
Tags:

Extending Python with (almost) anything

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

Mar 24th, 2008 | Filed under Software
Tags: , ,

newLISP-mode updated

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

Changelog for 0.25

  • Added functions for sexp-cursor movement: newlisp-indent-and-move-next, newlisp-indent-and-move-back, newlisp-prev-opening-parens, newlisp-next-opening-parens
  • Improved newlisp-next-function, newlisp-previous-function

I made a few changes to his mode to make it suit me more:

  • Changed the symbol color from magenta to plum. I hate magenta.
  • Updated with symbols from 9.3.3
  • Added C-x e as binding to evaluate current list and move to the next (tuareg-style.)
  • Fixed a couple of invalid parameter lists in let bindings that were keeping newlisp.el from byte-compiling

You can get it here.

Mar 12th, 2008 | Filed under Software
Tags: ,

Threading in Django

Profitable use of threading in web development is rare, particularly when contending with Python’s global interpreter lock. There are a few notable exceptions to this. Read more…

Mar 7th, 2008 | Filed under Software

Variable-arity functions in Lisp

One of the handier features of modern functional languages like Erlang and OCaml is the use of unification to match arity against function definitions. The ability to define a function in terms of the type and number of arguments passed is both expressive and useful. Read more…

Feb 27th, 2008 | Filed under Programming