Planet Lisp
224 FOLLOWERS
Planet Lisp is a metablog that collects the contents of various Lisp-related blogs.
Planet Lisp
6d ago
Earlier this year, I started working through the online book Ray Tracing In One Weekend (Book 1). I have been following along with it in Common Lisp, and I have been extending it all from 3-dimensional to n-dimensional.
I reproduced 4-dimensional versions of all of the book images which you can see on my weekend-raytracer github page.
Here is the final image. This is a 250-samples-per-pixel, 640x360x10 image plane of three large hyperspheres (one mirrored, one diffuse, one glass) atop a very large, diffuse hypersphere. Also atop this very large hypersphere are a bunch of smaller hyperspheres o ..read more
Planet Lisp
2w ago
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.." — Brian W. Kernighan.
I'm a sucker for sage advice much as anyone else, and Kernighan is certainly right on money in the epigraph. Alas there comes a time in programmer's career when you just end up there despite the warning. It could be that you were indeed too clever for your own good, or maybe the code isn't quite yours anymore after each of your colleague's take on it over the years. Or just sometimes, the pr ..read more
Planet Lisp
3w ago
Unfortunately, I managed to delete my WordPress database at a time when the most recent backup I had was from 11 years ago.
So… I will hopefully get some newer information uploaded again sometime.
But, most of my content is gone ..read more
Planet Lisp
3w ago
For the past two years Charles Zhang and I have been working on getting my game engine, Trial, running on the Nintendo Switch. The primary challenge in doing this is porting the underlying Common Lisp runtime to work on this platform. We knew going into this that it was going to be hard, but it has proven to be quite a bit more tricky than expected. I'd like to outline some of the challenges of the platform here for posterity, though please also understand that due to Nintendo's NDA I can't go into too much detail.
Current Status
I want to start off with where we are at, at the time of writin ..read more
Planet Lisp
1M ago
This post is somewhat prompted by a recent blog post by vindarel, about Common Lisp's various built-in equality predicates. It is aleo related to Marco Antoniotti's CDR 8, Generic Equality and Comparison for Common Lisp, implemented by Charles Zhang; Alex Gutev's GENERIC-CL; and Henry Baker's well-known 1992 paper on equality.
Let me start by summarizing those designs. CDR 8 proposes a generic equaity function equals, and a comparison function compare. These are both CLOS generic functions intended to be user-extended, though they also have some predefined methods. equa ..read more
Planet Lisp
1M ago
My friend Rui was interviewed about Lisp and how we use it at SISCOG. The original interview is in Portuguese but you can read a translation via DeepL below:
SISCOG Engineering: get to know this cutting-edge Portuguese company
Find out how Lisp continues to drive innovation at SISCOG. Interview with Rui Patrocínio, Scheduling Team Leader at SISCOG
#1 How did you first get to know the Lisp programming language?
When I joined Técnico in 1999, the programming language taught in Introduction to Programming was Scheme, which is in the Lisp family. The curriculum closely followed the MIT 6.001 cours ..read more
Planet Lisp
1M ago
Common Lisp has various equality functions: =, eq, eql, equal, equalp, string-equal, char-equal... but what are the differences?? We tell you everything, with examples.
As usual, this is best read on the Common Lisp Cookbook (a new page added on August, 2024). This is where it will get the updates.
In short:
= is only for numbers and equal is the equality predicate that works on many things.
you can’t overload built-in operators such as = or equal for your own classes, unless you use a library.
when you manipulate strings with functional built-ins (remove-if, find...) and you are surprised to ..read more
Planet Lisp
1M ago
Common Lisp’s pathname system has many problems. Here is proposal to make the situation a little better in one respect. This is not a general fix: it’s just trying to solve one problem.
The problem
The underlying problem is that on many platforms pathnames which ‘look like’ they contain wildcards are perfectly legal pathnames to the filesystem. So, on Unix & related systems [foo].* is a legal filename. On these platforms wildcard handling is generally implemented in a library, or often in multiple semi-compatible libraries1.
CL then has two problems:
there is no portable way to construct ..read more
Planet Lisp
1M ago
Like many programmers, I have programming hobbies, and one them is implementing new, usually simple, programming languages. While implementing languages can be a deep rabbit hole to fall into, there's something uniquely satisfying about building (and using!) one's own languages.
This journey often begins learning how to break down ("tokenize") source code into its smallest meaningful parts, and then parsing these tokens into trees of expressions (abstract syntax trees, or ASTs) representing semantic units of computation. Significant error checking and optimization are typically necessary as w ..read more
Planet Lisp
2M ago
In the heat of the summer (the coolest summer of the next ones), it is never a good thing to get an email from Xach telling you that "something does not compile on SBCL". In this case the issue was the usual, fascist STYLE-WARNING, that prevented a clean build on Quicklisp.
The fix was relatively easy, but it lead to a number of extra changes to properly test the fix itself.
Bottom line, a new version of HEΛP is available at helambdap.sf.net. Soon in Quicklisp as well.
Stay cool, hydrated and enjoy.
(cheers ..read more