articles filed under lisp

In defense of newLISP
posted on 07/15/08 at 10:25 a.m. | |

newLISP receives an unexpected level of hostility from lispers. Languages like Arc and newLISP share an enmity from the assumption that these languages are in some way attempting to unseat Common Lisp. This is not the case.

Profiling a Lisp application
posted on 07/01/08 at 4:28 p.m. | |

Profiling is one of the most important steps in writing software. Once a package is written, profiling greatly helps to identify bottlenecks and inefficiencies by showing how an application spends its time. How to profile a lisp application is a common question among those new to lisp. Luckily, profiling lisp is simple with emacs and slime.

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

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.

Variable-arity functions in Lisp
posted on 02/27/08 at 2:36 p.m. | |

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.

Wrapping a C library in lisp (part 2)
posted on 07/03/07 at 7:53 p.m. | |

Once the library has been defined and loaded into the Lisp image, work can begin on defining C routines in Lisp.

Before that can be done, however, a note for those who do not know C...

Wrapping a C library in lisp (part 1)
posted on 07/02/07 at 2:06 p.m. | |

One of the more significant difficulties I face when developing Lisp applications is the apparent lack of generally compatable database libraries for the various lisp dialects. CLSQL is a nice solution, but it does not get along well on OSX, my development OS, or with CLISP, which is the primary lisp dialect I have available on my host...

Using CFFI, we can fairly easily create mappings for the most important MySQL C api functions. This entry will walk through the process of importing the library; future entries will go one to defining a few of the most basic routines for our lisp image.

Evolving lisp
posted on 06/07/07 at 8:58 p.m. | |

Paul Graham notes that, "A popular recipe for new programming languages in the past 20 years has been to take the C model of computing and add to it, piecemeal, parts taken from the Lisp model, like runtime typing and garbage collection." This is what has made Python such a wonderful, elegant, and concise language. Why say with iteration what can be done in one easily readable line with a list comprehension?

Macros
posted on 05/23/07 at 8:30 p.m. | |

A common point of confusion for lisp beginners is the macro. Few lispers can resist the opportunity to expound the beauty and elegance of the macro. However, as with many lisp concepts, most explanations are outside the range of the hobbyist's experience.

Lisp: where to start
posted on 05/13/07 at 1:06 p.m. | |

When I first set out to learn lisp, I was faced with an intimidating number of choices. Which implementation of lisp should I choose? Common lisp? Scheme? I went with common lisp. Which common lisp? SBCL? MCL? Gnu clisp? Yeesh. This is enough to scare most lisp rookies off. Here is some advice: start off with Gnu clisp. It's available for most architectures, it's free, it has decent documentation online, and it's easy to install.