News for hackers. Stuff that matters.
Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @02:52PM (#14249400)
SICP uses Scheme, which is not Lisp. It was taught at an introductory level because some concepts of computation can be taught nicely with Scheme, up to making a compiler for another language (perhaps a "real" language in the student's minds?), but it doesn't actually teach you Lisp, and I imagine leaves a bad taste in many students' mouth at the nonsense no-for-looping-no-mutation they had to suffer through which isn't a requirement in Lisp (nor necessarily in Scheme). SICP doesn't even have something as quick to go through as e.g. this series http://malisper.me/2015/07/07/debugging-lisp-part-1-recompil... to get a feel for what it's actually like to work with Lisp.

Clojure has been very successful though it seems like your point #7 would apply more-so to it (since Lisp isn't as functional oriented) unless you mean crazy-in-production things like closures and mapping functions. =P I don't even think you can call all that many Clojure projects skunkworks ones, because the language is quite visibly successful. Something like https://www.ptc.com/cad/elements-direct/modeling you might call a skunkworks success for Lisp...

Re:Not Lisp again (2009) by pmoriarty on Tuesday May 02, 2017 @06:18PM (#14251141)
Not only does SICP use Scheme, but it uses a really old and primitive Scheme, so that's what a lot of students who've only had exposure to SICP think all Schemes are like -- almost a toy language. They usually have no idea what a modern, full-featured Scheme like Chicken Scheme or Racket is like: light years ahead of the Scheme used in SICP, with a rich ecosystem of libraries.
Re:Not Lisp again (2009) by amackera on Tuesday May 02, 2017 @03:21PM (#14249683)
"SICP uses Scheme, which is not Lisp." --- is that a "no true Scotsman" argument or do you just mean "Scheme is not Common Lisp"?
Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @03:44PM (#14249879)
I mean Scheme is not Common Lisp, and Common Lisp is Lisp. Both are "a Lisp" (as is Clojure), or perhaps "a dialect of Lisp", but it's questionable if that really means anything beyond s-exps and macros.
Re:Not Lisp again (2009) by openasocket on Tuesday May 02, 2017 @04:56PM (#14250500)
Why does Common Lisp get the distinction of being the "true Lisp" and not Scheme? Scheme precedes Common Lisp by almost a decade
Re:Not Lisp again (2009) by lispm on Tuesday May 02, 2017 @06:48PM (#14251374)
This Lisp I code is from 1959/60.

http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/rle_lis...

Page 101:

    DEFINE
    (((COLLAPSE,(LAMBDA,(L),(COND,((ATOM,L),(CONS,L,NIL)),
    ((NULL,(CDR,L)),(COND,((ATOM,(CAR,L)),L),(T,(COLLAPSE,
    (CAR,L))))),(T,(APPEND,(COLLAPSE,(CAR,L)),(COLLAPSE,(CDR,L))))))))
This is the Common Lisp version. Formatted, comma removed, DEFUN instead of DEFINE.

Other than that the code is unchanged. It still works in Common Lisp.

    (DEFUN COLLAPSE (L)
      (COND ((ATOM L) (CONS L NIL))
            ((NULL (CDR L))
             (COND ((ATOM (CAR L)) L)
                   (T (COLLAPSE (CAR L)))))
            (T (APPEND (COLLAPSE (CAR L)) (COLLAPSE (CDR L))))))

    CL-USER 191 > (collapse '(1 2 (3 4) ((5 6) 7)))
    (1 2 3 4 5 6 7)
Common Lisp is backwards compatible to Lisp I and Lisp 1.5 in many ways.

Code like that can be relatively easy ported to Scheme (naming and syntax is slightly different). There are examples which are more difficult. But generally simple (!) Scheme is not that far away from that old core.

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @05:17PM (#14250704)
Naggum has a pretty good answer for that, linked in the other comment branch: http://www.xach.com/naggum/articles/3224964049435643@naggum.... You could also argue based on things like Common Lisp can run LISP code from 1960 with a very small driver, or the general history of code porting and sharing, as done here: https://news.ycombinator.com/item?id=9387131#9404543
Re:Not Lisp again (2009) by openasocket on Tuesday May 02, 2017 @07:07PM (#14251517)
I read that answer, I didn't find it helpful on two points.

1. There's this really nice analogy about German and English languages, but it doesn't have any specifics. In particular, the crux of his entire argument is in this statement

> The two languages and their attendant communities have drifted so far apart that there is nothing of value in their intersection.

Which he simply states as fact without any sort of follow up or justification. And I disagree. Consider this Common Lisp snippet from Wikipedia computing the answer to the birthday paradox:

  (defconstant +year-size+ 365)

  (defun birthday-paradox (probability number-of-people)
  (let ((new-probability (* (/ (- +year-size+ number-of-people)
                               +year-size+)
                            probability)))
    (if (< new-probability 0.5)
        (1+ number-of-people)
        (birthday-paradox new-probability (1+ number-of-
  people)))))

Literally replace "defconstant" with "define" and "defun birthday-paradox (probability number-of-people)" with "define (birthday-paradox probability number-of-people)" and that's valid Scheme.

I'll readily admit they are two different languages, but pretending they are as different as C and Python or something is absurd.

2. Even if you convince me these two languages are so different, there's nothing here to convince me Common Lisp deserves the title of the "real Lisp" or "true Lisp". Scheme can also run LISP code from 1960 with a very small driver.

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @08:11PM (#14251958)
Is it that absurd? Where is Scheme's CLOS, condition system, built-in debugging framework, and batteries-included standard library? Type declarations? Dynamic scoping? Multi-methods?

Maybe Racket (or Chicken or Chez or Guile or...) has all of these things, Racket is pretty awesome, but those things aren't standardized, whereas I can get those things in Lisp regardless of if I use SBCL/Clozure/clisp/etc. Maybe it's closer to the difference between C (with a bunch of different compiler extensions) and C++ than C and Python, but it's a pretty big difference.

Ultimately I think the claim of Common Lisp being the "true Lisp" is simply that deciding such a thing was the whole point of Common Lisp. Without a standard, you're left with someone writing http://wiki.call-cc.org/eggref/4/multi-methods#examples (or http://wiki.call-cc.org/eggref/4/fast-generic) and someone else writing https://docs.racket-lang.org/multimethod/index.html and neither being able to share code with each other. Most code isn't as trivial as the birthday paradox.

Would you want to try writing a (R6RS) Scheme driver for that 1960 code and see how straightforward it is?

Where do you slot https://en.wikipedia.org/wiki/Dylan_(programming_language) ? Should it be in the running for "the true Lisp"? If not why not?

Re:Not Lisp again (2009) by openasocket on Tuesday May 02, 2017 @09:56PM (#14252431)
I agree they are pretty different languages, and you give some solid points as to why: CLOS, dynamic scoping, multi-methods, etc. My point was your link mentioned exactly none of those examples, in fact gave no examples at all, and so wasn't very convincing.

The second point that the argument that Common Lisp is the "true Lisp" because that's why it was made is a faulty syllogism. Just because that was their goal of creating Common Lisp doesn't necessarily mean that is the case.

And Common Lisp isn't the only language with a standard: Scheme had an IEEE standard less than a year after ANSI Common Lisp, and has several RnRS updates since then.

Long story short, I don't think any language should be considered the "true Lisp". Maybe the original Lisp, but even then only as a technicality. And trying to declare a language as the "true Lisp" comes off as a little insulting to related languages and a little bit arrogant. It implies, to a certain degree, that you look down on other languages as lesser, inferior, failed attempts to reach the true zen of Lisp. I'm sure you didn't mean it that way, but as a fan of Scheme (and Common Lisp too!) it reads that way.

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @10:53PM (#14252670)
Maybe there's no platonic ideal Lisp, and that's the problem, since the thing that makes programmers feel good is some vague sense that there is such an ideal. A sort of god. ;) On the level of communication and definitions though, it seems totally reasonable to me that if your goal as a community of all sorts of versions/dialects of Lisp is to unify into one standard, then you get to call your new unification the Lisp.

I see your point about arrogance, though I think the insulting tone could be turned around easily -- you have these Lisp-like languages that don't even have Lisp in their name nor a lot of Lisp's crucial features trying to appropriate/claim an inheritance on all the hard work and glory and name recognition that went into Common Lisp and its predecessors. Let them have their name. I'm a pretty big fan of Clojure (and do like what Racket is doing when I read up about it) but imagine trying to sell Clojure to an old Lisp hand with "it's like Lisp" and watching them type (inc "a") vs (1+ "a"). https://pastebin.com/kBfNvxei vs https://pastebin.com/hPB2cy1X and there's no contest. (You might win them over with further persistence but they'll probably be wondering where all their favorite parts about Lisp are in this so-called Lisp-like.)

Re:Not Lisp again (2009) by Volt on Tuesday May 02, 2017 @09:43PM (#14252382)
>Is it that absurd? Where is Scheme's CLOS, condition system, built-in debugging framework, and batteries-included standard library? Type declarations? Dynamic scoping? Multi-methods?

Does Lisp from 1960 have these things? Then I guess it isn't really Lisp?

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @10:24PM (#14252542)
How I see it, Lisp 1.5 was Lisp, but as time went on and many 'versions' of Lisp for different systems with different capabilities came into being, there was no longer really a singular Lisp. Then there was a great unification that spit out Common Lisp, and that became Lisp. So if Lisp 1.5 was released today as something new, it wouldn't be Lisp, but merely another Lisp-like. It's too different. No one today thinks that if you drop "Lisp" in a conversation you really mean Lisp 1.5. (Maybe if you write it as LISP...) It's either going to mean Common Lisp, or maybe a reference to the vague Lisp Family. I don't think Lisp will ever be synonymous with "Scheme".

Maybe you'd appreciate some Lisp history, to also answer your question about "what other dialect[s]"?

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

http://lispm.de/30ycltl

Re:Not Lisp again (2009) by Volt on Tuesday May 02, 2017 @11:14PM (#14252732)
I do know some of the history. I was just asking those questions as a challenge. Regarding the question of the other dialect, the parent used the term as a way of distancing Scheme from what I assume is the one true Lisp: Common Lisp. But the point the passage they had an issue with noted two dialects. The other, of course, being that one true Lisp.

The way I see it, the things that make Lisp "Lisp" are not exclusive to either one. One might say that the intersecting characteristics aren't interesting, but these characteristics are what Lisp is truly about.

SML and Caml are both ML. Haskell 98 and Glasgow Haskell are both Haskell. Dyalog APL and APL2 are both APL. And so on.

Re:Not Lisp again (2009) by openasocket on Tuesday May 02, 2017 @09:59PM (#14252445)
He was just giving those as examples of ways in which Scheme and Common Lisp differ. Which is a fair point. Of course it does raise the question: are those features essential attributes of the Platonic ideal that is True Lisp, or simply nice addons Common Lisp provides?
Re:Not Lisp again (2009) by Volt on Tuesday May 02, 2017 @10:59PM (#14252688)
Yeah, that's what I was getting at.
Re:Not Lisp again (2009) by lispm on Wednesday May 03, 2017 @02:55PM (#14258920)
No, but the Common Lisp of 1984 has much of the Lisp of 1960. It's backwards compatible in many ways.
Re:Not Lisp again (2009) by lispm on Wednesday May 03, 2017 @02:53PM (#14258906)
> Even if you convince me these two languages are so different, there's nothing here to convince me Common Lisp deserves the title of the "real Lisp" or "true Lisp"

It's the lineage of Lisps where Common Lisp is in, which is Lisp:

Lisp I, Lisp 1.5, Standard Lisp, Interlisp, Maclisp, New Implementation of Lisp, ZetaLisp, Spice Lisp, Common Lisp, Emacs Lisp, ISLisp, ...

Those are all compatible to some extent and share a common core. Code moved a lot along these dialects. Macsyma had been written in Maclisp, moved to Zetalisp, then to Common Lisp. Reduce was written in Standard Lisp and then was ported to Common Lisp (without adoption). Hemlock was written in Spice Lisp and moved to Common Lisp. LOOPS was written in Interlisp and then moved to Zetalisp and later Common Lisp. CLOS was written in Common Lisp and was moved to Emacs Lisp and ISLisp. Even much of Common Lisp was moved to Emacs Lisp. ISLisp can be implemented as a package in Common Lisp relatively easily (Kent Pitman did this to check that ISLisp is compatible and has nothing which is not 'easily' implementable).

It was also usual that some Lisp implementations ran multiple Lisp dialects side by side, sharing everything: data, memory, I/O, ... For example Interlisp-D had a Common Lisp implementation side-by-side with Interlisp. The Symbolics Lisp Machine ran Zetalisp and four variants of Common Lisp side-by-side.

Then there are a lot of derived languages which either have different syntax, different semantics, different data structures, etc.

Examples are Logo, MDL, Scheme, Racket, Dylan, ML, Clojure, Javascript and a bunch of other languages.

Scheme initially shared some code with Lisp. Dylan tried it with a Lisp transpiler, ML initially was written in Lisp, ...

> Scheme can also run LISP code from 1960 with a very small driver.

The old Scheme is relatively near the Lisp mainstream, the newer Scheme less and less. Twenty years ago there was some code sharing between Lisp and Scheme, now almost none.

For me there are two definitions of Lisp:

* the main line compatible and sharing Lisps

* the general abstract family of Lisp which share an undefine subset of a set of features: lists, s-expressions, lambdas, parentheses, ... But you can find lots of languages in the larger Lisp family which have only a rough subset of this, like Javascript or Logo.

Re:Not Lisp again (2009) by amackera on Tuesday May 02, 2017 @04:37PM (#14250335)
So when somebody says "I am going to write some Lisp now", in your mind they are always going to write Common Lisp?
Re:Not Lisp again (2009) by ScottBurson on Tuesday May 02, 2017 @03:25PM (#14249716)
I'm guessing the latter.
Re:Not Lisp again (2009) by icc97 on Tuesday May 02, 2017 @03:20PM (#14249669)
> SICP uses Scheme, which is not Lisp.

Wikipedia [0]:

> Scheme is a functional programming language and one of the two main dialects of the programming language Lisp.

[0]: https://en.wikipedia.org/wiki/Scheme_%28programming_language...

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @03:48PM (#14249908)
Keyword: dialect. But Erik Naggum, 2002 [0]:

> The "Lisp" Scheme is a dialect of is no longer the current meaning of "Lisp". It is somewhat like calling English a dialect of German because of ancient history that has since between invalidated by each of their separate evolution, Fahrvergnügen, Weltanschauung, Kindergarten, and Pennsylvania to the contrary notwithstanding. There is also a very limited value in talking about "Germanic languages" in terms of your actual ability to use any of the Germanic languags. You do not order the "vertebrate" in a restaurant, but generally choose between fish or bird or meat. In other words, there is a time when an abstraction and a commonality has completely ceased to be valuable.

[0] http://www.xach.com/naggum/articles/3224964049435643@naggum....

Re:Not Lisp again (2009) by abecedarius on Tuesday May 02, 2017 @04:31PM (#14250292)
I think Erik Naggum was a bit imperialistic in wanting 'Lisp' to mean Common Lisp. One nice thing Clojure did was to revitalize the Lisp-as-language-family meme.
Re:Not Lisp again (2009) by gizmo385 on Tuesday May 02, 2017 @04:22PM (#14250223)
I feel like there should be a "No True LISP" fallacy in CS...

It expresses pretty much all of the core principals of a LISP. If it looks like a LISP, thinks like a LISP, behaves like a LISP; then do you really gain anything by trying to separate from other LISPs?

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @05:14PM (#14250677)
Is Python a LISP? Is JavaScript a LISP? Is Java a LISP? What do you mean by LISP, by its core principles? What does a different set of core principles look like that lends itself to a different family? I threw in my vague classification above: sexps and macros. But you can have macros without sexps, and sexps without macros (lots of "toy lisp interpreters" do that), are they LISPs? Lastly one wonders why we don't go calling all these C-like languages ALGOLs. What do you gain by trying to separate from other ALGOLs?

Or less extremely, why don't we consider Python and Ruby to be the same family, or Java and C#? Those pairs are arguably more similar than the pair of Common Lisp and Scheme.

Re:Not Lisp again (2009) by jhbadger on Tuesday May 02, 2017 @10:02PM (#14252451)
Is Picolisp a Lisp? Is Newlisp a Lisp? Is Emacs Lisp a Lisp? Maybe it's because I first learned programming in the 1980s in BASIC, but I'm pretty used to the idea of programming languages having dialects. Apple ][s, Commodore 64s, and Atari 800s all supposedly were programmable in BASIC, but it didn't mean you could take a program written on one and expect to run it without changes on another.
Re:Not Lisp again (2009) by icc97 on Wednesday May 03, 2017 @05:04AM (#14254082)
Surely that's the whole point - it's a dialect, so it has the same core but not 100% so you have to translate some of it to get to the other.

The dialects of Dutch in Belgium contain completely different words and phrases - but the core is still Dutch.

But for large parts of the speech they are recognisably similar.

So I'd say yes all the lisps you mentioned are dialects of Lisp. You can't run one directly in the other, but they are reconisably similar programming constructs.

Re:Not Lisp again (2009) by icc97 on Wednesday May 03, 2017 @10:22AM (#14255860)
Sorry - I think I was just proving your point...
Re:Not Lisp again (2009) by dragonwriter on Tuesday May 02, 2017 @08:08PM (#14251938)
> Lastly one wonders why we don't go calling all these C-like languages ALGOLs.

Referring to the broad Algol-family isn't uncommon (well, at least, I do it quite a bit.)

> Or less extremely, why don't we consider Python and Ruby to be the same family, or Java and C#? Those pairs are arguably more similar than the pair of Common Lisp and Scheme.

Java and C# are frequently described as being part of a single close language family (much closer than the broad Algol-family; sometimes in an intermediate-breadth family that also includes ), and Ruby and Python are much less similar than Scheme and Common Lisp.

Re:Not Lisp again (2009) by lacampbell on Tuesday May 02, 2017 @07:40PM (#14251741)
Lastly one wonders why we don't go calling all these C-like languages ALGOLs.

We sometimes do though, don't we? Not that terminology, but I often see the people talking about "curly brace languages" or "C/C++/Java/C#".

Re:Not Lisp again (2009) by Jach on Tuesday May 02, 2017 @08:43PM (#14252128)
Sure, we see there's a grouping, and might identify it when trying to create a cluster, but it's not as pervasive as the Lisp Family meme. When Clojure came out, it was advertised as "a Lisp" (not "Lisp", but "a Lisp"). When Go came out, it wasn't advertised as "an ALGOL", or "a curly brace language". What makes so many programmers want to associate only good qualities with this floaty abstraction of "Lisp" (that isn't simply Common Lisp) such that the arguments over how Lispy Clojure/Scheme/EmacsLisp/whatever inevitably keep happening, such that things can advertise as "a Lisp" and get attention despite not having some pretty core Common Lisp functionality? The only other language I see something similar to that is with Python. Go programmers say it's like programming Python but loads faster and with type security, Nim programmers say it's like programming Python but loads faster and with type security, I may have even heard something similar from an OCaml user once, but you look at either of them and they're both missing key Pythonic features.

Edit: In hindsight at the end of the day I should have been more careful with the "Scheme is not Lisp" (at least I didn't say "Scheme is not a Lisp") comment...I'm only continuing these threads because I read the original submission pretty close to when it was posted and back then I only knew a bit of SICP, tried enough Lisp to duplicate some SICP examples, and was frustrated with the Lisp-2 syntax along with what I perceived as a REPL freakout on any error so I put Lisp aside. It would have been helpful for someone to tell me "Scheme is not Lisp" back then and get me to actually explore all that Common Lisp has to offer.

Re:Not Lisp again (2009) by Volt on Tuesday May 02, 2017 @09:44PM (#14252385)
What is the other dialect?