Tim Bradshaw: Measuring some tree-traversing functions
Planet Lisp
by
7h ago
In a previous article my friend Zyni wrote some variations on a list-flattening function, some of which were ‘recursive’ and some of which ‘iterative’, managing the stack explicitly. We thought it would be interesting to see what the performance differences were, both for this function and a more useful variant which searches a tree rather than flattening it. What we measured The code we used is here1. We measured four variations of each of two functions. List flattening All these functions use collecting to build their results forwards. They live in flatten-variants.lisp. flatten/implicit-st ..read more
Visit website
Tim Bradshaw: The absurdity of stacks
Planet Lisp
by
7h ago
Very often people regard the stack as a scarce, expensive resource, while the heap is plentiful and very cheap. This is absurd: the stack is memory, the heap is also memory. Deforming programs so they are ‘iterative’ in order that they do not run out of the stack we imagine to be so costly is ridiculous: if you have a program which is inherently recursive, let it be recursive. In a previous article my friend Zyni wrote some variations on a list-flattening function1, some of which were ‘recursive’ and some of which ‘iterative’. Of course, the ones which claim to be iterative are, in fact, recur ..read more
Visit website
Tim Bradshaw: Variations on a theme
Planet Lisp
by
7h ago
My friend Zyni wrote a comment to a thread on reddit with some variations on a list-flattening function. We’ve since spent some time thinking about things related to this, which is written up in a following article. Here is her comment so the following article can refer to it. Other than notes at the end the following text is Zyni’s, not mine. The reddit comment by Zyni First of all we all know that CL does not promise to optimize tail recursion: means that tail recursive program may generate recursive not iterative process. So recursive program in CL even if tail recursive is not safe on data ..read more
Visit website
Nicolas Martyanoff: Counting lines with Common Lisp
Planet Lisp
by
1w ago
A good line counting program has two features: it only counts non-empty lines to get a fair estimate of the size of a project, and it groups line counts by file type to help see immediately which languages are used. A long time ago I got frustrated with two well known line counters. Sloccount spits out multiple strange Perl warnings about locales, and most of the output is a copyright notice and some absurd cost estimations. Cloc has fourteen Perl packages as dependencies. Writing a simple line counter is an interesting exercise; at the time I was discovering Common Lisp, so I wrote my own ver ..read more
Visit website
Nicolas Hafner: Level Editor Update is Live!
Planet Lisp
by
2w ago
The first major update for Kandria is now live on all platforms! It includes the level editor, a modding system, some new sample levels, and bugfixes! Level Editor The level editor received a big overhaul and is now a lot more accessible. There's also official documentation now to help get you started and explain all the tools and shortcuts available. If you want to dig in, just update your game and navigate to Mod Manager > Create Mod, which should place you directly into the editor in a new world of your own! Sharing Mods You can play levels made by others and download them directly from ..read more
Visit website
Nicolas Hafner: Next Kandria Update on March 8th!
Planet Lisp
by
3w ago
Let's get the important news out of the way: the next major update for Kandria will launch on Wednesday, March 8th, at 15:00 CET. The update will include a number of improvements, new features, more content, and a community event! Level Editing The biggest part of the update is, no doubt, the polished level editor. The editor has always been a part of Kandria since release, but now it's nicely polished and much easier to use! I've also included documentation to make it much easier for you to get a handle on how the editor works and how to get started with using it. I'm very excited to see wh ..read more
Visit website
Tim Bradshaw: Two tiny Lisp evaluators
Planet Lisp
by
1M ago
Everyone who has written Lisp has written tiny Lisp evaluators in Lisp: here are two more. Following two recent articles I wrote on scope and extent in Common Lisp, I thought I would finish with two very tiny evaluators for dynamically and lexically bound variants on a tiny Lisp. The language The tiny Lisp these evaluators interpret is not minimal: it has constructs other than lambda, and even has assignment. But it is pretty small. Other than the binding rules the languages are identical. λ & lambda are synonums and construct procedures, which can take any number of arguments; quote quot ..read more
Visit website
Tim Bradshaw: Dynamic binding without special in Common Lisp
Planet Lisp
by
1M ago
In Common Lisp, dynamic bindings and lexical bindings live in the same namespace. They don’t have to. Common Lisp has two sorts of bindings for variables: lexical binding and dynamic binding. Lexical binding has lexical scope — the binding is available where it is visible in source code — and indefinite extent — the binding is available as long as any code might reference it. Dynamic binding has indefinite scope — the binding is available to any code which runs between when the binding is established and when control leaves the form which established it — and dynamic extent — the binding cease ..read more
Visit website
Nicolas Martyanoff: Custom Font Lock configuration in Emacs
Planet Lisp
by
1M ago
Font Lock is the builtin Emacs minor mode used to highlight textual elements in buffers. Major modes usually configure it to detect various syntaxic constructions and attach faces to them. The reason I ended up deep into Font Lock is because I was not satisfied with the way it is configured for lisp-mode, the major mode used for both Common Lisp and Emacs Lisp code. This forced me to get acquainted with various aspects of Font Lock in order to change its configuration. If you want to change highlighting for your favourite major mode, you will find this article useful. Common Lisp highlighting ..read more
Visit website
ABCL Dev: ABCL 1.9.1 "never use a dot oh"
Planet Lisp
by
1M ago
If one has been hesitating about using the latest ABCL because one "never uses a dot oh release", we have now sloughed off abcl-1.9.1 for  your appraisal from the depths of a Bear's long winter nap.  Now one can use the somewhat less buggy version of the Tenth Edition of Armed Bear Common Lisp, available, as usual, at <https://abcl.org/releases/1.9.1/> or (shortly) via Maven <https://search.maven.org/artifact/org.abcl/abcl/1.9.1/jar>. Please note that when running on openjdk17 and later runtimes, there is quite a bit of necessary fiddling with command line arguments to"op ..read more
Visit website

Follow Planet Lisp on Feedspot

Continue with Google
Continue with Apple
OR