News for hackers. Stuff that matters.
Re:Let over Lambda – Common Lisp Book (2008) by wirrbel on Wednesday March 06, 2019 @01:59AM (#19316866)
Worth a read because it is one the most condescending computing books I have ever read. While reading I got the impression that I read the text of a really immature fanboy in a web forum of the 2000s.

I hope the author has matured by now. Seriously, don't buy this book.

Re:Let over Lambda – Common Lisp Book (2008) by coldtea on Wednesday March 06, 2019 @05:35AM (#19317869)
Or, you know, the author knows his stuff and is deservedly condescending in an industry of trends and cargo cults.

As in arts and politics, some curmudgeons are needed in every field, if not for anything else, to show that there's another way than the mainstream.

(They don't have to be perfectly right either -- it's having a strong perspective that counts, nobody is 100% right anyway).

Re:Let over Lambda – Common Lisp Book (2008) by varjag on Wednesday March 06, 2019 @05:43AM (#19317903)
There are numerous great Lisp books by knowledgeable authors which have none of that attitude. Life is too short to read printouts of Usenet rants.
Re:Let over Lambda – Common Lisp Book (2008) by coldtea on Wednesday March 06, 2019 @07:32AM (#19318377)
Well, to each their own. For me life's too short to read authors walking on eggshells.

Of course for a technical book it's the technical content that matters -- whether it's presented politely or not.

Re:Let over Lambda – Common Lisp Book (2008) by varjag on Wednesday March 06, 2019 @10:45AM (#19319713)
In which way for example Siebel's PCL is "walking on eggshells"? On Lisp? PAIP? Am I super obtuse and missing some very obvious and important point they are tiptoeing around?

Even if one does really think it's important to convey they are presenting superior technology, it can be stated clearly and concisely without sounding corrosive.

Re:Let over Lambda – Common Lisp Book (2008) by letoverkappa on Wednesday March 06, 2019 @06:53AM (#19318203)
"Deservedly condescending" is not an actual thing that exists in the world.

The words you're looking for are "writes poorly."

Re:Let over Lambda – Common Lisp Book (2008) by coldtea on Wednesday March 06, 2019 @07:31AM (#19318373)
>"Deservedly condescending" is not an actual thing that exists in the world.

There's absolutely no rational reason for it not to be a thing.

"Politely condescending" might be a contradiction in terms, but some people just lend themselves to being treated condescendingly.

Same thing with how some people might deserve a sarcastic response -- sarcasm is not that remote from condescension.

Re:Let over Lambda – Common Lisp Book (2008) by astine on Wednesday March 06, 2019 @09:17AM (#19319039)
This is an ironically condescending statement.
Re:Let over Lambda – Common Lisp Book (2008) by mjaniczek on Wednesday March 06, 2019 @03:43AM (#19317326)
https://letoverlambda.com/index.cl/guest/chap6.html

Yeah, the sixth chapter sure bashes on Scheme a lot. :/

Re:Let over Lambda – Common Lisp Book (2008) by jhbadger on Wednesday March 06, 2019 @07:36AM (#19318394)
I always wonder if Common Lispers who bash Scheme know that Guy Steele (who also is the chairman of the Common Lisp standards committee) was the co-creator of Scheme.
Re:Let over Lambda – Common Lisp Book (2008) by eadmund on Wednesday March 06, 2019 @09:58AM (#19319341)
I can't speak for others, but I know that, and I think that it is consistent, rather than inconsistent, with my points 1) that Scheme is fine as an academic language and 2) Common Lisp is preferable for real programs.

Scheme's simplicity is awesome if you're implementing it; it's awesome if you're learning it; it's not so awesome if you're trying to actually use it. As LoL notes, it's dumb to throw away information in conditionals. As LoL also notes, hygienic macros are toys and DEFMACRO is generally what you really want. I'll add that having only a single namespace for variables, classes, functions, types, packages & everything else means that you end up having to be extremely verbose: foo, fooClass, fooFunc, fooType, fooPackage. call/cc is incredibly cool & powerful, but also really hurts efficiency in a way that I don't think is acceptable in a production system (it's fine, of course, in a teaching language, because the experience of understanding it is really useful). dynamic-wind is broken compared to UNWIND-PROTECT.

And on & on & on.

Steele also wrote the Java spec, and he wasn't wrong when he said 'We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp,' but I don't think in 2019 anyone thinks that his involvement with Java means it is anywhere near as good, powerful or acceptable a language as Lisp.

Re:Let over Lambda – Common Lisp Book (2008) by bjoli on Wednesday March 06, 2019 @04:08PM (#19322799)
This is uninformed and wrong.

You can implement defmacro in 8 lines of syntax case. The opposite is not possible. Anything you can do with defmacro is possible using whatever lower level macro facility available in scheme (be it based on syntactic closures, implicit/explicit renaming or syntax case).

The extra complexity of dynamic-wind is required because scheme supports call/cc. You can easily limit dynamic wind to be comparable to unwind-protect, but that would render continuations useless for other things than escapes.

The single namespace has roughly one one common consequence: having to name your lists lst, which is easy. Types and classes are by convention <type>.

Continuations are cool and useful, although full blown ones are ugly. Delimited continuations are making their way into some schemes. In guile they are used to build guile-fibers, which are really cool.

The only thing common lisp really brings is cross-implementation compatibility. Compared to <your favourite scheme> it is mostly a matter of taste and, compared to some implementations, maturity.

Re:Let over Lambda – Common Lisp Book (2008) by kazinator on Thursday March 07, 2019 @12:54AM (#19325854)
> You can implement defmacro in 8 lines of syntax case.

Even if that is so, that doesn't mean I want syntax-case. If I don't want syntax-case but do want defmacro, that requires a lot less code than implementing syntax-case (which I don't care for) and then eight more lines to get defmacro. (Are we talking with a defmacro that supports optional parameters, &environment? and how about macrolet? destructuring lambda lists)

Hygienic macros are basically wrong. A good way to express why they are wrong is by analogy. In visual art, as a joke, we can paint paintings that perpetrate deliberate errors of perspective: some feature obviously in a distant background reaches into the foreground in an incorrect way and overlaps or interacts with foreground objects.

There is precisely such an absurd situation between the lexical scope of a hygienic macro definition, and that of the macro call site.

The macro injects code into distant call sites, yet that code makes lexical references into the macro definition, like the silly character jumping out of an inner painting into an outer painting.

I don't ever want that; I don't want the code generating system (the macro) to be wrongly mixed up with the generated site. If the macro generates some symbol X, that should refer to an X definition that is lexically (or in any other manner) apparent at the call site, even if that is a bug. If I make that bug, I will own that bug.

I do want macro generated code to refer to a clearly defined set of run-time support symbols, if that is required, not coming from some random lexical scope enclosed in a macro definition, but from a global scope. Referring to a private scope of the macro definition is horribly wrong. That scope must completely die when the dust settles. It's not necessarily even on the same machine. When the macro is running and its scope is active, it's on some build farm. When the code is running, it's on a target system. Why would the target environment refer to the build environment?

No hacker interested in constructing practical systems from the ground up could have invented hygienic macros; they are an ironic joke coming from idle minds.

Re:Let over Lambda – Common Lisp Book (2008) by bjoli on Thursday March 07, 2019 @05:38AM (#19327010)
Having a macro in one module refer to bindings it has no idea about what they are seems nasty to me. I'd rather have hygiene and break it where I chose to. That seems less error prone.
Re:Let over Lambda – Common Lisp Book (2008) by kazinator on Thursday March 07, 2019 @01:24PM (#19330603)
That's just the thing. A macro calculates a datum. That datum doesn't refer; it's just a datum.

   (defmacro foo()
     '(a b c))
a, b and c do not refer here; they are in a quote.

Of course, more usually we use a backquote, and insert interesting things into the template. The non-inserted template parts are data, just like in a quote.

We don't know whether b and c will ever refer. a will refer to some operator or function at the expansion site, which determines the meaning of b and c. In any case, none of them refer to anything while they are still inside the macro.

Hygienic macros implement a scheme whereby the quote is removed, and, wee, the datum does refer to the surrounding environment even though it's still supposedly a datum that will be inserted elsewhere where it becomes code. Although this has a touted benefit (the hygiene), it has a nasty implementation.

Just think about what it takes to have a (list ...) expression in a macro template still refer to the global list function that is in scope at the macro definition, even though the expansion site has defined a local list. Somehow we have to "wormhole" around the shadowing definition to reach that list. Now let's think about it in the context of separately compiled modules. How about the requirement for a macroexpand function for debugging macros: will the output be understandable?

There is an obvious down-side. While we have made the macro expansion immune to local shadowing definitions, the macro is now susceptible to its own. If we redefine list around the macro, it's referring to the wrong one.

A non-hygienic macro doesn't have this problem:

   (defmacro foo ()
     (labels ((list () ...)))
       `(list ...,@(list ...))))
Here, when the macro is used, the generated code will likely refer to the correct list library function, not to the one in the macro. The unquote-spliced expression ,@(list ...) uses the local one. It's all clear. We know what is in the quote and what isn't.
Re:Let over Lambda – Common Lisp Book (2008) by bjoli on Thursday March 07, 2019 @05:06PM (#19333030)
I understand what you mean, but I am not sure I agree. As a macro writer i either want to depend on the local definition explicitly (using datum->syntax in syntax case or not renaming in an er-macro-transformer). I also don't want to accidentally alter behaviour of macros if I happen to shadow a binding. I have made a version of racket's for loops that depends on expansion to other macros (to be able to split the complexity in smaller chunks). Having that expand unhygienically would open the macro up to subtle errors.

I also don't have to re-export bindings that I happen to use (like a specialised let from srfi-71 that supports multiple return values) and not changing let for whoever imports my library or polluting their namespace.

Expanding the macro in guile makes it clear in the generated code where things come from a (let ...) in the generated code gets expanded to ((@@ (loops for-loops) let) ...), Which is easily debuggable.

I just don't happen to see what you are describing about hygiene as a problem. It is the behaviour I want as a macro writer and the vast majority of time as a macro user.

The only big problems with it are 1. The Implementation sucks. The concepts are quite easy to grook, but hard to implement. 2. The hygiene has some edge cases where it might not protect you if you are writing very complex macros gluing quoted syntax objects together.

Re:Let over Lambda – Common Lisp Book (2008) by mschaef on Wednesday March 06, 2019 @10:11AM (#19319433)
He was also heavily involved in Java.

"We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." -Guy Steele

https://news.ycombinator.com/item?id=2323963

Re:Let over Lambda – Common Lisp Book (2008) by lispm on Wednesday March 06, 2019 @10:14AM (#19319453)
I always wonder if Schemers who bash Common Lisp know that Guy Steele (the co-creator of Scheme) was also the chairman of the Common Lisp standards committee.
Re:Let over Lambda – Common Lisp Book (2008) by mruts on Wednesday March 06, 2019 @09:56AM (#19319315)
Well he also designed Java, so...
Re:Let over Lambda – Common Lisp Book (2008) by lispm on Thursday March 07, 2019 @06:04AM (#19327131)
That's new. Where did you get that information from?
Re:Let over Lambda – Common Lisp Book (2008) by PuercoPop on Wednesday March 06, 2019 @12:21PM (#19320674)
As others have noted its written in 'rant form' so its bound to happen. The weird thing is that it doesn't seem to bash on Perl at all! The Appendix on Editors bashes Emacs a lot too. Its an OK book _if_ you enjoy reading rants, but if you want to Learn Lisp, Practical Common Lisp or Land of Lisp are way better.
Re:Let over Lambda – Common Lisp Book (2008) by pepper_sauce on Wednesday March 06, 2019 @06:02AM (#19317987)
Good heavens! Not Scheme!
Re:Let over Lambda – Common Lisp Book (2008) by gekkonier on Wednesday March 06, 2019 @07:12AM (#19318287)
Hey! Why so angry! :-)
Re:Let over Lambda – Common Lisp Book (2008) by black-tea on Wednesday March 06, 2019 @02:15AM (#19316934)
I thought it was great, but I know it's not a book for snowflakes. When I hear someone say "this is right" or "this is wrong", I am able to effortlessly interpret this as "I believe this is right/wrong". It's just being efficient with language. I don't need people to add extra words for fear of offending me.

Maybe the author was immature. That's great. Let it remind you what it's like to be young and so excited about something that you'd write a book about it. This book is great.

Re:Let over Lambda – Common Lisp Book (2008) by varjag on Wednesday March 06, 2019 @03:21AM (#19317221)
I'm a long time Lisper myself but also couldn't get through this book. Maybe it's because am a snowflake, but my eyes rolled so often I was scared they'll get stuck in the up position.
Re:Let over Lambda – Common Lisp Book (2008) by P_I_Staker on Wednesday March 06, 2019 @06:17AM (#19318041)
This is a big problem I have with books in general. Inevitably, the author drones on about some bullshit, and the book gets thrown across the room, never to be picked up again.
Re:Let over Lambda – Common Lisp Book (2008) by jwhite on Wednesday March 06, 2019 @10:25AM (#19319540)
I agree.

Something that might be worth noting: two minutes of googling didn't turn up the author's age, but I recall seeing this photo on his website when I bought it some time after it was published in 2008: https://hcsw.org/contact.php

Here's a more up-to-date photo: https://hoytech.com/about

It's possible he was quite young when it was published. If that's the case, then I think the book is all the more a towering achievement. It's abrasive, and it smells a bit of 2000s forum fanboy discussions, but mature people should be able to read past the more opinionated parts and find the gems in the technical treatment.

Re:Let over Lambda – Common Lisp Book (2008) by coldtea on Wednesday March 06, 2019 @05:37AM (#19317876)
>I thought it was great, but I know it's not a book for snowflakes. When I hear someone say "this is right" or "this is wrong", I am able to effortlessly interpret this as "I believe this is right/wrong". It's just being efficient with language.

Or, as we used to call it: "It's all about having had a few conversations with actual people in the actual world".

Re:Let over Lambda – Common Lisp Book (2008) by damsdu78 on Wednesday March 06, 2019 @03:03AM (#19317133)
Do you think it is useful for a Lisp noob?
Re:Let over Lambda – Common Lisp Book (2008) by fiddlerwoaroof on Wednesday March 06, 2019 @03:27AM (#19317248)
This book is sort of a trap because some of the macros it defines make assumptions that are not guaranteed by the language specification: every once in a while, you’ll find people on IRC or similar asking for help with some of the examples from this book.

Also, IMO, the defmacro/g macro defined in this book would have been better defined as a reader macro than as a codewalking macro.

Re:Let over Lambda – Common Lisp Book (2008) by weavie on Wednesday March 06, 2019 @04:20AM (#19317479)
If I recall somewhere around SBCL 1.2 they changed the way the backquote worked (totally fine for them to do that as it wasn't specified in the standard..) which broke the Let over Lambda macro.

I think CCL still works.

The code here should fix the problems : https://github.com/thephoeron/let-over-lambda

Note, it's been a while since I looked at it so I could have some of the details wrong. The book is still well worth reading to help you understand the possibilities with a programmable programming language, but just bear in mind the various caveats..

Re:Let over Lambda – Common Lisp Book (2008) by lispm on Wednesday March 06, 2019 @04:09AM (#19317437)
> make assumptions that are not guaranteed by the language specification

I haven't read it, I have to confess. It would be useful if those assumptions were explicitly mentioned and explained in the book.

Some of the advanced macro stuff is easily outside of the standard and can be still useful, which for example lacks some of the environment features described in CLtL2.

Re:Let over Lambda – Common Lisp Book (2008) by dan-robertson on Wednesday March 06, 2019 @03:16AM (#19317192)
I think it’s a great second book. For a first I’ve always recommended Practical Common Lisp. I don’t know if that recommendation is still up to date.
Re:Let over Lambda – Common Lisp Book (2008) by js8 on Wednesday March 06, 2019 @05:16AM (#19317787)
I would recommend it to a Lisp enthusiast as a third after On Lisp. That's how I read it, anyway.

Many things in LOL are quite opinionated. I don't think it's a distillation of knowledge (like On Lisp), but rather an exploration how far you can take some things (macros).

Re:Let over Lambda – Common Lisp Book (2008) by qohen on Wednesday March 06, 2019 @07:14AM (#19318292)
As a reminder, Paul Graham's On Lisp is freely downloadable, in PDF or PostScript via links on this page at PaulGraham.com:

http://www.paulgraham.com/onlisptext.html

Re:Let over Lambda – Common Lisp Book (2008) by TurboHaskal on Wednesday March 06, 2019 @03:34AM (#19317282)
Re:Let over Lambda – Common Lisp Book (2008) by zeveb on Wednesday March 06, 2019 @10:13AM (#19319448)
Yeah, that's an excellent — and modern — guide.
Re:Let over Lambda – Common Lisp Book (2008) by black-tea on Wednesday March 06, 2019 @01:52PM (#19321479)
No, it's not. Others have suggested other great books for beginners, like Practical Common Lisp. You'll get the most from Let Over Lambda after you've already got a bit of experience with Lisp.
Re:Let over Lambda – Common Lisp Book (2008) by TurboHaskal on Wednesday March 06, 2019 @03:33AM (#19317275)
Definitely not. The book expands on pg's books and a prior read is recommended.
Re:Let over Lambda – Common Lisp Book (2008) by pepper_sauce on Wednesday March 06, 2019 @06:03AM (#19317992)
Read On Lisp before Let Over Lambda, but after a beginner book like Practical Common Lisp.