Live data from Hacker News

Lispers

lispers.org

91–100 of 110 posts

Re: Lispers

#91
post #65

Earlier quoted context omitted.

I'm curious: does "Artificial Intelligence: A Modern Approach" by Russell and Norvig also belong to a long-gone era?

That book is in Python. The argument here was about using Lisp for AI.

By the way, what do you mean by "that book is in Python"?

I don't have the latest edition, but from this appendix http://aima.cs.berkeley.edu/newchapb.pdf I understand it's in pseudocode. And there is a python implementation online, but it's not the only one.

See also: https://news.ycombinator.com/item?id=1803815

Re: Lispers

#92
post #87
post #85

Earlier quoted context omitted.

That's a lot of points. A few of them are there in other languages (e.g. compilation, keyword arguments, etc.) but I can see that there are many points which I am not aware of in some other languages. Thanks for the detailed reply.

Many things (like compilation) are not that special, but having it in a dynamic (-> at runtime changeable) language with a lot of flexibility is slightly different.

Interesting. I think I've read about something like this in an article by Paul Graham - I think he said that Lisp is a language which can read and compile code at run time, and the other two combinations too (e.g. read and run at compile time, and so on). If this is what you meant, can you give a practical example of the use of compiling code at run time?

Re: Lispers

#93
post #88
post #84

Earlier quoted context omitted.

You can do that more efficiently with any ML language. > There's a reason GCC's internals often look like Lisp. Dude, that notation is not original to lisp...

> You can do that more efficiently with any ML language. So first you say Lisp is useless in compsci because of the existence of "rust, c and idris", and now its pointless to use it because of ML? > Dude, that notation is not original to lisp... Firstly: Have you actually looked at an MD file? [0] RTL is a Lisp dialect. Secondly: The first paper on S-Expressions appeared in November, 1997. McCarthy's first paper on w…

> So first you say Lisp is useless in compsci because of the existence of "rust, c and idris", and now its pointless to use it because of ML?

Idris and Rust are ML descendants and C helps you to learn the basics of low-level programming. Lisp on the other hand won't teach you anything. How hard is this to understand?

> Secondly: The first paper on S-Expressions appeared in November, 1997.

That was just a draft of an RFC which never got approved. S-Expressions are MUCH older - it's "Polish Notation" invented by Jan Łukasiewicz in 1924

> McCarthy's first paper on what would become Lisp in 1982.

Lisp was specified in 1958.

> I'm aware of no language, and can find reference to no language, that used that notation before Lisp did, so yes it is original to Lisp.

1. It's not about who used that notation but who invented it - not McCarthy; 2. that notation is practically useless for programming languages but they're good for ASTs.

Re: Lispers

#94
post #92
post #87

Earlier quoted context omitted.

Many things (like compilation) are not that special, but having it in a dynamic (-> at runtime changeable) language with a lot of flexibility is slightly different.

Interesting. I think I've read about something like this in an article by Paul Graham - I think he said that Lisp is a language which can read and compile code at run time, and the other two combinations too (e.g. read and run at compile time, and so on). If this is what you meant, can you give a practical example of the use of compiling code at run time?

If one develops a Lisp application, it is common to develop the application while it is running. This is enabled by a compiler available at runtime.

Re: Lispers

#95
post #8

What are some examples of open source Lisp projects and codebases whose features and elegance could have only been executed as well as they are in the language, or are just great codebases in general to study?

GNU Guix. It uses code staging a lot, which works best in a language in which you can trivially pass around code as data. It also demonstrates that Scheme is flexible enough to easily implement features that the language designers did not, such as monads and laziness. While both can be done in almost any language, I think that Scheme's macros allow for exceptionally seamless implementations.

> code staging

I'm trying to look up what this means. Do you have a link?

Re: Lispers

#96
post #94
post #92

Earlier quoted context omitted.

Interesting. I think I've read about something like this in an article by Paul Graham - I think he said that Lisp is a language which can read and compile code at run time, and the other two combinations too (e.g. read and run at compile time, and so on). If this is what you meant, can you give a practical example of the use of compiling code at run time?

If one develops a Lisp application, it is common to develop the application while it is running. This is enabled by a compiler available at runtime.

Got it, thanks. I was thinking it might be useful for certain kinds of cases only (maybe only certain advanced types of functions or use cases), but now I see that it is generally applicable, in the example you gave.

Re: Lispers

#97
post #93
post #88

Earlier quoted context omitted.

> You can do that more efficiently with any ML language. So first you say Lisp is useless in compsci because of the existence of "rust, c and idris", and now its pointless to use it because of ML? > Dude, that notation is not original to lisp... Firstly: Have you actually looked at an MD file? [0] RTL is a Lisp dialect. Secondly: The first paper on S-Expressions appeared in November, 1997. McCarthy's first paper on w…

> So first you say Lisp is useless in compsci because of the existence of "rust, c and idris", and now its pointless to use it because of ML? Idris and Rust are ML descendants and C helps you to learn the basics of low-level programming. Lisp on the other hand won't teach you anything. How hard is this to understand? > Secondly: The first paper on S-Expressions appeared in November, 1997. That was just a draft of an…

> Lisp on the other hand won't teach you anything. How hard is this to understand?

Difficult when the definitive compsci course, Structure and Interpretation of Computer Programs starts, and ends, with Lisp.

> S-Expressions are MUCH older - it's "Polish Notation" invented by Jan Łukasiewicz in 1924

No. Polish notation, as described by Łukasiewicz, is:

> I came upon the idea of a parenthesis-free notation in 1924

Polish notation has a strict set of precedence rules, and no parentheses. At all.

S-Expressions contain Polish notation, but is a superset that allows you to specify arguments in a less painful precedence than Polish notation, and with variadic arguments, which is not possible in Polish notation.

> that notation is practically useless for programming languages but they're good for ASTs.

Several decades of computer science disagree with you.

Re: Lispers

#98

The home page looks like a tombstone of Common Lisp with a bunch of epitaphs on it. On the other hand, the spirit of Lisp has successfully taken over the world. The modern Lisp is called JavaScript. I am perfectly aware of all the differences between Lisp and JavaScript and of the other languages that have influenced JavaScript (Self, Perl, Lua), but think of this: what made Lisp so great in the past? - automatic mem…

> functional, OO and imperative programming when needed Please tell me how to get a reasonable implementation of list or tree values in JavaScript, without resorting to Gödel encodings or gentlemen agreements not to query object identities. Now recall that functions are mappings from values to values. How are we supposed to express computation as function evaluation without a rich set of values to work with? That's h…

[deleted]

Re: Lispers

#99
post #20

Earlier quoted context omitted.

Paradigms of Artificial Intelligence Programming: Case Studies in Common Lisp http://norvig.com/paip.html

This book is very very very old. It basically belongs to an era when AI was mostly concerned with symbolic computation. AI nowadays has taken a whole different path with neural networks.

That path cannot replace the other path.

It's like "don't bother with differential equations; math is more into elliptic curves now".

The symbolic computation and its representations of knowledge and pattern matching and so on do things that number-crunching networks over big data simply don't.

Like for instance, get certain jobs done with little data: a compact encoding of specific knowledge.

Re: Lispers

#100
post #8

Earlier quoted context omitted.

GNU Guix. It uses code staging a lot, which works best in a language in which you can trivially pass around code as data. It also demonstrates that Scheme is flexible enough to easily implement features that the language designers did not, such as monads and laziness. While both can be done in almost any language, I think that Scheme's macros allow for exceptionally seamless implementations.

> code staging I'm trying to look up what this means. Do you have a link?

"Code staging" is a phrase that is used around people who are allergic to the word "macro", because they associate it with #define, or "Excel macro".
Post reply on HN