Live data from Hacker News

The Idea of Lisp

dev.to

21–30 of 348 posts

Re: The Idea of Lisp

#21

I wonder why lisp isn't as popular as say python for AI, ML, and stuff. I see these fields as having a strong academic tone, and it feels like racket or clojure could be bigger when it comes to that.

It used to be the language for AI.

Re: The Idea of Lisp

#22

I wonder why lisp isn't as popular as say python for AI, ML, and stuff. I see these fields as having a strong academic tone, and it feels like racket or clojure could be bigger when it comes to that.

Because Common Lisp was the language for AI before the big AI-winter hit and it's now associated with approaches to AI that don't actually work.

Also a lot of the latest AI is hyper optimized data crunching on GPUs which isn't necessarily one of lisp's strengths.

Re: The Idea of Lisp

#23

I wonder why lisp isn't as popular as say python for AI, ML, and stuff. I see these fields as having a strong academic tone, and it feels like racket or clojure could be bigger when it comes to that.

Lisp was way more popular for classic AI for many many years, and possibly still is.

For machine learning, you want very fast matrix operations for the actual training/evaluation parts and very good data munging for the "get the data from this file/API/database to your ML library". The Python ecosystem is strong at both, which sets up a good feedback loop for even better libraries to be built on top.

That's my take, anyway.

Re: The Idea of Lisp

#24
post #3

Lisp was developed because McCarthy needed a tool for experimenting with AI. Found a video of McCarthy talking about AI: https://www.youtube.com/watch?v=Ozipf13jRr4 And if anyone cares, here is nice Shirt with McCarthy on it ;) https://www.teepublic.com/t-shirt/666689-john-mccarthy-lisp-... I think it should be mandatory for CS students to implement their own little Lisp using the building blocks McCarthy described!…

While ML was the meta language for a theorem prover. Funny how these were side effects.

And ML was originally written in Lisp.

https://github.com/theoremprover-museum/LCF77/tree/master/sr...

https://github.com/theoremprover-museum/HOL88/tree/master/sr...

Re: The Idea of Lisp

#25
post #2

The conditional expression or more specifically everything being an expression is my favorite thing about Lisp. I did not know that McCarthy pushed to add it to Algol which apparently today is the ternary operator for most languages. It is annoying that so many languages (C, Java, C#, etc) have both a conditional statement (if-else) and conditional expression (ternary ?:). Really the if-else should be an expression (…

If you like everything being an expression, check out tcl. A lot of ideas from lisp show up in tcl, especially the idea of everything as an expression. Tcl embodies this idea while also having the look of an algol-like language. Funny it can pull this off while having basically no syntax.

Re: The Idea of Lisp

#26
post #25
post #2

The conditional expression or more specifically everything being an expression is my favorite thing about Lisp. I did not know that McCarthy pushed to add it to Algol which apparently today is the ternary operator for most languages. It is annoying that so many languages (C, Java, C#, etc) have both a conditional statement (if-else) and conditional expression (ternary ?:). Really the if-else should be an expression (…

If you like everything being an expression, check out tcl. A lot of ideas from lisp show up in tcl, especially the idea of everything as an expression. Tcl embodies this idea while also having the look of an algol-like language. Funny it can pull this off while having basically no syntax.

TCL, while it has its warts, is a really cool language. I mean, it even basically has fexprs, something most Lisps put by the wayside years ago.

When you don't actually care about speed, you can do some pretty cool stuff.

Re: The Idea of Lisp

#27
post #2

The conditional expression or more specifically everything being an expression is my favorite thing about Lisp. I did not know that McCarthy pushed to add it to Algol which apparently today is the ternary operator for most languages. It is annoying that so many languages (C, Java, C#, etc) have both a conditional statement (if-else) and conditional expression (ternary ?:). Really the if-else should be an expression (…

Is there any literature on how to translate languages where everything is an expression to ones where it isn't, for example when compiling/transpiling to java? If/then can be translated to the ternary operator, but terms like try/catch are trickier.

Re: The Idea of Lisp

#28

I wonder why lisp isn't as popular as say python for AI, ML, and stuff. I see these fields as having a strong academic tone, and it feels like racket or clojure could be bigger when it comes to that.

Most algorithms currently labeled machine learning are different in nature from original AI algorithms. Nowadays there is big emphasis in numerical algorithms, while in the past AI was about symbolic computation -- which is the biggest strength of Lisp. If you only use numerical algorithms, you can use Python or even FORTRAN.

Re: The Idea of Lisp

#29

I wonder why lisp isn't as popular as say python for AI, ML, and stuff. I see these fields as having a strong academic tone, and it feels like racket or clojure could be bigger when it comes to that.

Before compute resources became essentially free, Lisp took up rather more memory on the then-constrained commodity hardware than other languages. I remember being in awe of one of our developers who had a whopping 96MB on his machine - this was in the mid 1990s.

Re: The Idea of Lisp

#30
post #6

Does anybody have a few examples of DSLs people make in a lisp (ideally clojure because I have worked with it a tad)? I've seen plenty of cases where people make a pseudo-dsl via optional arguments, but not seen this so-oft mentioned "yeah we just wrote a dsl for it because lisp" sort of deal.

Maxima CAS is implemented as a DSL on top of Common Lisp. It is one of the best environments for symbolic math (other than commercial products such as Mathematica).
Post reply on HN