News for hackers. Stuff that matters.
Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by lispm on Friday March 29, 2019 @07:45PM (#19526558)
> SICP is a great way to learn lisp

SICP is a book for beginner computer science students, with a focus on functional programming as base.

As a Lisp book it's not really good, since it covers only very little actual Lisp and uses only a core Scheme language.

There is literally nothing about macros in SICP. They are mentioned only in a few places (for example it is mentioned that DELAY would be implemented by a macro).

> The smug lisp weenie trope exists for a reason, and it's that the lisp community is too busy falling over themselves to prove how smart they are with arcane knowledge to give a shit about the experience beginners face

Since you ignore the large amount of literature, teaching & research on macros in the Lisp community, what you write is rather strange. Surprise: people teaching Lisp in the 60s already 'gave a shit about the experience beginners face'.

> I have an opinion on how best to teach macros. Maybe I'm wrong. Maybe it's not a good idea to extend SICP with macros, or maybe there's a better way, and I'd love to hear arguments in those directions. But correcting it by explaining how they're implemented in CL is absolutely baffling to me.

Lisp teachers usually taught macros in context of actual Lisp languages and actual usage examples. Personally I prefer that as a first approach, over trying to explain how to extend a toy implementation with some homebrew macro implementation.

Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by reitzensteinm on Friday March 29, 2019 @08:29PM (#19526757)
That's fine; I prefer the latter. Maybe I'm wrong. But if I am, it's not because I don't understand how macros are actually implemented in the real world, as everyone in this massive thread seems to assume.

I regret my initial comment, which was written in haste. Had I known the sheer volume of people that would jump out the woodwork to demonstrate their superior technical knowledge while avoiding the argument I was actually making, I'd have been a lot more careful about what I was trying to communicate (or more likely not have bothered, which would have saved us all a lot of time).

That is where the "smug lisp weenie" trope comes from, and it's real. I don't know what it is specifically about lisp that brings it out; I can't imagine having this discussion about C#, TCL or SQL.

Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by lispm on Saturday March 30, 2019 @01:22AM (#19527932)
People with a bunch of Lisp experience have responded to what you wrote and disagreed. That's all.
Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by reitzensteinm on Saturday March 30, 2019 @01:42AM (#19527983)
Like I said previously, I don't believe being an expert automatically makes you a good teacher. Based on the responses in this thread, I doubt anyone here is actually good at it.

Were I disagreeing technically, it would be a different matter and I'd have long ago hit the books to see where I fucked up. The combined lisp experience on this thread is at least an order of magnitude more than mine, and most of you are probably smarter than me to boot.

Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by kazinator on Saturday March 30, 2019 @12:04PM (#19530090)
If you tell students that Lisp macros are for delaying evaluation, you're a lousy teacher. Someone in the class will Google you out, send a few instant messages to a few others, and soon nobody will take your class seriously.

A good teacher is engaging and glib, and tells the right sorts of little lies at the right times to lead students through the steps of "Wittgenstein ladders"; but he or she can't be flat out wrong about the subject material.

Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by reitzensteinm on Saturday March 30, 2019 @05:27PM (#19531976)
Yeah, I'm not going to take teaching advice from a person that walked me condescendingly step by step through an example to point out an inconsistency that wasn't there because they misunderstood what I was saying. ¯\_(ツ)_/¯
Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by lispm on Saturday March 30, 2019 @04:14AM (#19528409)
and I doubt your claim, that extending a meta-circular toy interpreter with some remotely macro-like feature will help any Lisp beginner to understand Lisp macros.

There is already a bunch of good material out there, teaching the use of Lisp macros for both beginners and for medium-level users. Advanced-level users will find a lot of teaching&research in the Scheme literature/...

Paul Graham himself has written a good and well-known book on it. it does a good job explaining macros and their use. It's called 'On Lisp' and there is no need to replicate its content here.

Now we have gone full circle, again.

Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by reitzensteinm on Saturday March 30, 2019 @04:26AM (#19528442)
Yeah, there's no point continuing this discussion. Thank you for taking the time to reply in depth to my posts even though we could not find common ground.
Re:Lisp Macros, Delayed Evaluation and the Evolution of Smal... by lispm on Saturday March 30, 2019 @07:19AM (#19528877)
Excellent response. Thanks!