HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
guicho271828
macroexpand-dammit
Common Lisp2015–2015
guicho271828 / macroexpand-dammit

macroexpand-dammit

a portable code walker for Common Lisp by John Fremlin

2Distinct people
2Mentions
0Explicit recommenders
14GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

a portable code walker for Common Lisp by John Fremlin

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2015-03-28 12:03:52 UTC to 2015-03-29 07:13:41 UTC.

012015-03-28 12:00:00 UTC to 2015-03-28 13:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMar 28, 12:002015-03-28 13:00:00 UTC to 2015-03-28 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 14:00:00 UTC to 2015-03-28 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 15:00:00 UTC to 2015-03-28 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 16:00:00 UTC to 2015-03-28 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 17:00:00 UTC to 2015-03-28 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 18:00:00 UTC to 2015-03-28 19:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 19:00:00 UTC to 2015-03-28 20:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 20:00:00 UTC to 2015-03-28 21:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 21:00:00 UTC to 2015-03-28 22:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMar 28, 21:002015-03-28 22:00:00 UTC to 2015-03-28 23:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-28 23:00:00 UTC to 2015-03-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 00:00:00 UTC to 2015-03-29 01:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 01:00:00 UTC to 2015-03-29 02:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 02:00:00 UTC to 2015-03-29 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 03:00:00 UTC to 2015-03-29 04:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 04:00:00 UTC to 2015-03-29 05:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 05:00:00 UTC to 2015-03-29 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 06:00:00 UTC to 2015-03-29 07:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-03-29 07:00:00 UTC to 2015-03-29 08:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMar 29, 07:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 28, 12:002015-03-28 12:00:00 UTC2015-03-28 13:00:00 UTC101
Mar 28, 13:002015-03-28 13:00:00 UTC2015-03-28 14:00:00 UTC000
Mar 28, 14:002015-03-28 14:00:00 UTC2015-03-28 15:00:00 UTC000
Mar 28, 15:002015-03-28 15:00:00 UTC2015-03-28 16:00:00 UTC000
Mar 28, 16:002015-03-28 16:00:00 UTC2015-03-28 17:00:00 UTC000
Mar 28, 17:002015-03-28 17:00:00 UTC2015-03-28 18:00:00 UTC000
Mar 28, 18:002015-03-28 18:00:00 UTC2015-03-28 19:00:00 UTC000
Mar 28, 19:002015-03-28 19:00:00 UTC2015-03-28 20:00:00 UTC000
Mar 28, 20:002015-03-28 20:00:00 UTC2015-03-28 21:00:00 UTC000
Mar 28, 21:002015-03-28 21:00:00 UTC2015-03-28 22:00:00 UTC000
Mar 28, 22:002015-03-28 22:00:00 UTC2015-03-28 23:00:00 UTC000
Mar 28, 23:002015-03-28 23:00:00 UTC2015-03-29 00:00:00 UTC000
Mar 29, 00:002015-03-29 00:00:00 UTC2015-03-29 01:00:00 UTC000
Mar 29, 01:002015-03-29 01:00:00 UTC2015-03-29 02:00:00 UTC000
Mar 29, 02:002015-03-29 02:00:00 UTC2015-03-29 03:00:00 UTC000
Mar 29, 03:002015-03-29 03:00:00 UTC2015-03-29 04:00:00 UTC000
Mar 29, 04:002015-03-29 04:00:00 UTC2015-03-29 05:00:00 UTC000
Mar 29, 05:002015-03-29 05:00:00 UTC2015-03-29 06:00:00 UTC000
Mar 29, 06:002015-03-29 06:00:00 UTC2015-03-29 07:00:00 UTC000
Mar 29, 07:002015-03-29 07:00:00 UTC2015-03-29 08:00:00 UTC101

What Hacker News says

2 sources
The specific problem is that it's buggy. But the general problem is that it's a massive, fragile hematoma of duplication [ctrl-f "hematoma": http://people.engr.ncsu.edu/efg/517/f00/syllabus/annotations...], which makes the bugs buggier. A macroexpansion facility works more like a framework than a library. Each macro you define is basically a callback function triggered when the compiler sees a form with a particular symbol at the head. You want to be able to describe what should happen in particular situations you're interested in, without having to specify anything about other situations. A code walker spoils that separation of responsibilities because it has to reimplement large parts of a macroexpansion framework just to make it possible to add a few new features which are then used in conjunction with the original framework. The poten
Read the rest
tial for bug contagion is quite high, because any single bug's effects aren't localized to the few forms that make use of the extended functionality you've rigged up. This is tantamount to introducing a bug in the language implementation. If you're expanding something like (my-macro (... (my-other-macro))), a bug in your code walker can break the intermediate code. This might be acceptable if you're just using it to write a couple of one-off macros that don't trigger any weird corner cases and are only used in the same project in which they're defined. But if you're creating a general-purpose DSL like iterate that you intend for people to use in all sorts of situations you never anticipated, it's not. In fact, the same bug is more dangerous as part of a code walker than it would be as part of a Lisp implementation's internals. If it's in the implementation, at least it would show up consistently whether the vulnerable code is wrapped in your macro or not, making easier to identify, document, and manage the problem. And probably easier to get somebody to fix, because the implementation ought to be better maintained than the walker. These are not merely hypothetical concerns. Some projects already rely on macroexpand-dammit working in the quirky way it does; Masataro tried to have his improved version supersede the existing version on Quicklisp, but it broke some packages that were using it: https://github.com/guicho271828/macroexpand-dammit/pull/4#is... Sometimes I use those packages too, so instead of using his version with the fix I submitted, it's actually less of a headache for me to apply my fix using a wrapper package on top of the Quicklisp version, duplicating some of the code which itself duplicates what Lisp already does. The original duplication problem led to bugs which led to the need to load two separate implementations which led to a name clashing problem which justified additional duplication. Also, I tried to implement that same iter example using a similar trick before, and I see that your code generates the same mysterious output, at least on SBCL: ; compilation unit finished ; caught 1 fatal ERROR condition A fatal error during compilation, yet it clearly compiled and ran. What was the error? I don't know, it looks like something in the code walker muffled the details. Does it matter? Could it matter in any other scenario? Something about macroexpand-dammit doesn't play nice with the implementation, but we don't know what, why, or how, and it makes it more difficult to use the very language features that would normally help us find out. I think a lot of critiques of the "bipolar Lisp programmer" [http://www.lambdassociates.org/blog/bipolar.htm] are overblown, but in the case of these kinds of tools, they're justified. These kinds of techniques will always be restricted to obscure one-off software projects unless they're supported by core language features like what rntz and Masataro are proposing. The designs of macro systems are optimized for making it easy to make small tweaks to the language to fit the particular problem at hand. They're not quite as flexible as something like the MOP. If you try to use a facility designed for making small, local interventions in the language to write very general language extensions which themselves make broad, global interventions in the underlying system for making small, local interventions, you're gonna have a bad time.
In Not everything is an expression

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.