In this post, I am going to show you how to write programs that are self-referential. By self-referential, I mean programs which are able to obtain their own source code without any external input. In other words, they won’t just … Read the rest
Author: malisper
Loops in Lisp Part 4: Series
This is part four of Loops in Lisp. Follow one of the following links for part one – goto, two – loop, or three – iterate).
One of the many advantages of programming in a functional style … Read the rest
Loops in Lisp Part 3: Iterate
This is part 3 of Loops in Lisp. For part 1 on how you can build any kind of looping construct you want out of just goto and macros, click here. For part 2 on Loop, click here.… Read the rest
Loops in Lisp Part 2: Loop
This is part 2 of Loops in Lisp. Click here to view the previous post on how you can build any iteration abstraction you want out of just goto and macros.
The loop macro is probably the most well known … Read the rest
Loops in Lisp Part 1: Goto
At its core, Common Lisp provides two primitives for performing iteration. The first of those primitives is recursion. Recursion is an amazing technique, but in this post I am going to focus on the other primitive goto.
Goto is extremely … Read the rest
Defmemo
In my last post I talked about memoization i.e. caching the results of a function. Memoization is a fairly common technique for optimization. It is common enough to warrant writing a macro that makes it easy to define memoized functions. … Read the rest
Or=
This post makes use of places. If you are unfamiliar with places, see my post Getting Places.
There are many cases where caching the results of a function (also called memoization), make a function much more efficient. For example … Read the rest
Zap
This post makes use of places. If you are unfamiliar with how places work, see my post Getting Places.
Many languages provide syntactic sugar for evaluating an expression involving a variable and assigning the result of that expression to … Read the rest
Getting Places
This post will serve as an introduction to writing macros that work with places. I will refer back to it whenever I examine a macro which deals with places.
Places are an incredible part of Common Lisp. In short, a … Read the rest
Defasm
This post is the second part of a two part series exploring the emulator cl-6502. If you haven’t read the first part exploring the implementation of addressing modes in cl-6502, you can find it here.
This post is … Read the rest