Live data from Hacker News

Dinosaur and Lisp

vito.sdf.org

61–70 of 97 posts

Re: Dinosaur and Lisp

#61
post #58

Earlier quoted context omitted.

Good luck reading Thomas Mann or Hermann Hesse in German... Any modern fiction. No chance.

rolls eyes Not German, Clojure. Clojure is pretty easy.

Really? You must be really good at Clojure. Then you can explain this:

    user=> (list 1 2 3)
    (1 2 3)
    user=> (list? (list 1 2 3))
    true
so (1 2 3) is a list.

    user=> (cons 0 (list 1 2 3))
    (0 1 2 3)
    user=> (list? (cons 0 (list 1 2 3)))
    false
(0 1 2 3) is not a list?

    user=> (list? '(0 1 2 3))        
    true
But then it is???

WTF?

Compare ELISP:

    ELISP> (listp (list 1 2 3))
    t
    ELISP> (listp (cons 0 (list 1 2 3)))
    t
and CL:

    CL-USER> (listp (list 1 2 3))
    T                                                                                                                                       
    CL-USER> (listp (cons 0 (list 1 2 3)))
    T

Re: Dinosaur and Lisp

#62
post #56
post #53

Earlier quoted context omitted.

Second tthis. The term Lisp in CS is like Romance in linguistics, it indicates a family of languages that belong to different similar but not identical cultures which contribute to them and yet still the languages come from a common ancestor and are more similar than not while at times not easily mutually comprehensible.

People who can speak German dialects can understand each other. Books written in some form of German can be understood by most readers. Same for English dialects. For Germanic languages this is not the case. English and German are both Germanic, but knowing German does not let me read English literature. Lisp is like English: a basic vocabulary, a basic syntax, basic semantics understood by all readers. I can look at…

English is such an oddball in the Germanic family that I'd count it an outlier. About 40% of its vocabulary is of Latin origin, and in sum about 60% of its vocabulary is made up of loan words. A couple years ago I submitted the "Uncleftish Behaviour" here [1], which demonstrates English with only germanic words.

[1] https://news.ycombinator.com/item?id=7671549

For the rest of the family, there's a lot of mutual intelligibility. And, a metaphor is a metaphor, no metaphor holds if you dig deep enough.

> A Lisp developer looking at Clojure code will understand very very little.

This is an assumption, not a fact. Java interop code and (recur) are a bit confusing in the first sight, but not undecipherable.

The prog lang that's most like English is C++: too many things are overtly overloaded, see phrasal verbs.

Re: Dinosaur and Lisp

#63
post #55

Earlier quoted context omitted.

Maclisp came from Lisp 1.5. Code was simply ported to Maclisp. Some Lisp 1.5 code runs mostly unchanged in CL. Maclisp shared code with Common Lisp. For a lot of stuff there was a single code base at MIT for several Lisp dialects, including Maclisp. After some time Maclisp development ended and sharing ended. For example the source code for the complex LOOP macro was at one time a single file for Maclisp, NIL, Lisp M…

Most of those things appear in scheme. Slightly different naming, but the same, more or less. To say that there's compatability between Scheme and CL, and no compatability with Racket is ridiculus: Racket has Scheme compatability modes. As for the language being called Lisp if it's Lisp, two of the examples you list in the "non lisp" category do so: Clojure's website claims it is a "dialect of lisp," and AIM-349 desc…

> AIM-349 describes scheme as "essentially a full-funarg LISP

That's long ago. That was kind of true in the mid 70s.

> and no compatability with Racket is ridiculus

CL has no Racket compatibility. Zero. Racket has no CL compatibility. Zero. Porting programs is a full rewrite.

> Clojure's website claims it is a "dialect of lisp,"

Best it is a new language, derived from Lisp and influenced by C++, C#, Common Lisp, Erlang, Haskell, Mathematica, ML, Prolog, Scheme, Java, Racket, Ruby.

'Dialect' in this case is the euphemism for 'fully incompatible' with 'random operator renames and shuffling functionality' where it kind of looked compatible.

> As make no mistake, all of these languages, from Common Lisp to Clojure to Scheme, are dialects.

Sure, but not of Lisp. Of those three, only Common Lisp is a Lisp dialect.

> They have the same origins, and they share many of the same ideas.

Less and less. As a starter: Clojure has no Lisp lists as basic data structure.

Re: Dinosaur and Lisp

#64
post #62
post #56

Earlier quoted context omitted.

People who can speak German dialects can understand each other. Books written in some form of German can be understood by most readers. Same for English dialects. For Germanic languages this is not the case. English and German are both Germanic, but knowing German does not let me read English literature. Lisp is like English: a basic vocabulary, a basic syntax, basic semantics understood by all readers. I can look at…

English is such an oddball in the Germanic family that I'd count it an outlier. About 40% of its vocabulary is of Latin origin, and in sum about 60% of its vocabulary is made up of loan words. A couple years ago I submitted the "Uncleftish Behaviour" here [1], which demonstrates English with only germanic words. [1] https://news.ycombinator.com/item?id=7671549 For the rest of the family, there's a lot of mutual intel…

Clojure borrows from C++, C#, Common Lisp, Erlang, Haskell, Mathematica, ML, Prolog, Scheme, Java, Racket, Ruby - according to Wikipedia.

I would guess that 10% of its operator names come from Lisp. Okay, that's a wild guess. Let's look at the special forms:

def-, if+, do-, let+, quote+, var-, fn-, loop-, recur-, throw-, try-, monitor-enter-, monitor-exit, ...

Around three from thirteen special forms have roughly the same name/meaning in Lisp.

Let's look at printing: pr-, prn-, print-, println-, newline-. None Lisp names, either they don't exist in Lisp under that name or they do something else. PR and PRN don't exist in Lisp. PRINT prints a newline before printing the object. PRINTLN does not exist in Lisp. NEWLINE is called TERPRI. Thus even for a simple thing as basic IO the API is different.

Re: Dinosaur and Lisp

#65
post #55

Earlier quoted context omitted.

...And I think we need to get rid of the idea that those differences necessarily precludes them from being Lisps. Because make no mistake, they are all Lisps. You said that they didn't share code, libraries, books, or community. First off, they do share community to some degree: there's a good bit of overlap between all of them. It's not all overlap, but there's plenty there. Second off, you know what other languages…

Maclisp came from Lisp 1.5. Code was simply ported to Maclisp. Some Lisp 1.5 code runs mostly unchanged in CL. Maclisp shared code with Common Lisp. For a lot of stuff there was a single code base at MIT for several Lisp dialects, including Maclisp. After some time Maclisp development ended and sharing ended. For example the source code for the complex LOOP macro was at one time a single file for Maclisp, NIL, Lisp M…

What is the point of this genealogy? What makes a language a Lisp is (i) natural and practical homoiconicity with sexps, (ii) automatic memory management and (iii) advanced interactive development features, including the REPL, the image, restarts and hot code loading. These are the features that distinguish it and make it an advanced tool. (i) is quite particular to it, (ii) is invented for it and (iii) is a big part of the power, and for me, Lisp means a language that has (i), (ii) and (iii) in one package. Otherwise whether or not it include code from Lisp 1.5 or allow effortless porting is not all that important. For the latter, most compilers are cross-platform anyways, so one can just grab a suitable binary tarball and get going.

Clojure fails at (iii), as it just propagates Java exceptions, but I don't think that is impossible to fix, so not a fundamental flaw. JVM is too heavy, and that is a problem for some. Otherwise, it's a well thought-out Lisp with a thriving community and some cool guys and a BDFL (i.e. Hickey).

Common Lisp excels at all the three of the items I listed, plus it's batteries included and has lots of libraries around. Also, it has a standard, so that you can develop on SBCL and deploy with Clozure CL or CMU CL. It's downside is there's some historical baggage and there are no DHH or Hickey or Torvalds in the community, which isn't a downside for me, even an upside.

Re: Dinosaur and Lisp

#66
post #65
post #55

Earlier quoted context omitted.

Maclisp came from Lisp 1.5. Code was simply ported to Maclisp. Some Lisp 1.5 code runs mostly unchanged in CL. Maclisp shared code with Common Lisp. For a lot of stuff there was a single code base at MIT for several Lisp dialects, including Maclisp. After some time Maclisp development ended and sharing ended. For example the source code for the complex LOOP macro was at one time a single file for Maclisp, NIL, Lisp M…

What is the point of this genealogy? What makes a language a Lisp is (i) natural and practical homoiconicity with sexps, (ii) automatic memory management and (iii) advanced interactive development features, including the REPL, the image, restarts and hot code loading. These are the features that distinguish it and make it an advanced tool. (i) is quite particular to it, (ii) is invented for it and (iii) is a big part…

Clojure has a primitive repl by default with lots of Java shining through. It has no image dumping. No restarts. Hot code loading is limited. Clojure even has no interpreter.

Re: Dinosaur and Lisp

#67
post #61

Earlier quoted context omitted.

rolls eyes Not German, Clojure. Clojure is pretty easy.

Really? You must be really good at Clojure. Then you can explain this: user=> (list 1 2 3) (1 2 3) user=> (list? (list 1 2 3)) true so (1 2 3) is a list. user=> (cons 0 (list 1 2 3)) (0 1 2 3) user=> (list? (cons 0 (list 1 2 3))) false (0 1 2 3) is not a list? user=> (list? '(0 1 2 3)) true But then it is??? WTF? Compare ELISP: ELISP> (listp (list 1 2 3)) t ELISP> (listp (cons 0 (list 1 2 3))) t and CL: CL-USER> (lis…

That's pretty screwed up, but having brain-damged function naming doesn't mean it's not lisp. And a few odd corners does not illegability make.

Re: Dinosaur and Lisp

#68
post #63

Earlier quoted context omitted.

Most of those things appear in scheme. Slightly different naming, but the same, more or less. To say that there's compatability between Scheme and CL, and no compatability with Racket is ridiculus: Racket has Scheme compatability modes. As for the language being called Lisp if it's Lisp, two of the examples you list in the "non lisp" category do so: Clojure's website claims it is a "dialect of lisp," and AIM-349 desc…

> AIM-349 describes scheme as "essentially a full-funarg LISP That's long ago. That was kind of true in the mid 70s. > and no compatability with Racket is ridiculus CL has no Racket compatibility. Zero. Racket has no CL compatibility. Zero. Porting programs is a full rewrite. > Clojure's website claims it is a "dialect of lisp," Best it is a new language, derived from Lisp and influenced by C++, C#, Common Lisp, Erla…

So scheme WAS a lisp, and now isn't? What changed that makes you think that?

And it had better not be nil/false equality. Even McCarthy says that was, if not a mistake, then an accident.

As for Clojure not having Lisp lists, its list implementation is... eccentric, but it DOES have lists.

Actually, scratch that, its list implementation, from a Lisp perspective is broken. Psychotically broken. But it DOES have one. Even if it's insane. What, will you say the same about newlisp lists?

For that matter, is Picolisp a Lisp?

Re: Dinosaur and Lisp

#69
post #66
post #65

Earlier quoted context omitted.

What is the point of this genealogy? What makes a language a Lisp is (i) natural and practical homoiconicity with sexps, (ii) automatic memory management and (iii) advanced interactive development features, including the REPL, the image, restarts and hot code loading. These are the features that distinguish it and make it an advanced tool. (i) is quite particular to it, (ii) is invented for it and (iii) is a big part…

Clojure has a primitive repl by default with lots of Java shining through. It has no image dumping. No restarts. Hot code loading is limited. Clojure even has no interpreter.

Need I mention that Lisp 1.5 had no restarts, and that image dumps are primarily a hack, and not at the core of lisp by a long shot?

Re: Dinosaur and Lisp

#70
post #63

Earlier quoted context omitted.

> AIM-349 describes scheme as "essentially a full-funarg LISP That's long ago. That was kind of true in the mid 70s. > and no compatability with Racket is ridiculus CL has no Racket compatibility. Zero. Racket has no CL compatibility. Zero. Porting programs is a full rewrite. > Clojure's website claims it is a "dialect of lisp," Best it is a new language, derived from Lisp and influenced by C++, C#, Common Lisp, Erla…

So scheme WAS a lisp, and now isn't? What changed that makes you think that? And it had better not be nil/false equality. Even McCarthy says that was, if not a mistake, then an accident. As for Clojure not having Lisp lists, its list implementation is... eccentric, but it DOES have lists. Actually, scratch that, its list implementation, from a Lisp perspective is broken. Psychotically broken. But it DOES have one. Ev…

> So scheme WAS a lisp, and now isn't?

EINE: Eine is not Emacs.

ZWEI: Zwei was Eine, Initially.

And, thus:

SWALANI: Swalani Was A Lisp, And Now Isn't.

A dialect waiting to be invented.

:)

What might be a recursive acronym for Scheme, though?

Oh, oh ... I just got one:

"Scheme Crams Hygiene into Every Macro Expansion."

Post reply on HN