News for hackers. Stuff that matters.
Re:The Idea of Lisp by erik14th on Friday December 16, 2016 @09:22AM (#13193376)
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.
Re:The Idea of Lisp by traviscj on Friday December 16, 2016 @09:33AM (#13193448)
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 by eschaton on Saturday December 17, 2016 @02:20AM (#13199734)
Back then there weren't really ML libraries to speak of, you had to write your own. Though Symbolics did have a neural network tool and framework they sold.

And you could certainly do things like shuffle lots of data easily for more hardcore processing. For example, Symbolics didn't just have a Weitek floating point accelerator option for their systems, they had vector processing boards for them too that you could use from Lisp. (And even a GPU, the Framethrower, that did full-frame HD with 2D and 3D acceleration! S-Graphics is amazing for the time.)

Also, a lot of AI work back then was focused on symbolic processing. That's largely been eclipsed by the more math-heavy approaches these days but symbolic processing is still around, for example in tools like Cyc.

Re:The Idea of Lisp by Blackthorn on Friday December 16, 2016 @09:52AM (#13193587)
Well, it was. Specifically, Common Lisp was. But that language's standard was etched in stone in 1994 whereas languages like Python (where most deep learning user-facing code is done) continue to evolve.

I think Python really took off for that because it already had quality and widely-used libraries for writing the code in Python and doing the work in a more efficient place (numpy, scipy). Clojure has one of those for matrix multiplication but not much else there, and I'm not sure Racket has anything at all.

Re:The Idea of Lisp by kbp on Friday December 16, 2016 @10:20AM (#13193813)
> Well, it was. Specifically, Common Lisp was. But that language's standard was etched in stone in 1994 whereas languages like Python (where most deep learning user-facing code is done) continue to evolve.

This is an apples to oranges comparison. The Common Lisp standard hasn't been updated since 1994. The Python standard has not been written at all yet. Lisp and Python implementations both continue to evolve and be released.

Re:The Idea of Lisp by pg314 on Friday December 16, 2016 @01:54PM (#13195700)
To add to that, the transition from Python 2 to Python 3 is also an example of how not to evolve a language.
Re:The Idea of Lisp by samth on Sunday December 18, 2016 @01:14PM (#13206829)
Racket doesn't have simple interfaces to things like BLAS, but it does have quite good natively written libraries for matrix operations and other math-related things: http://docs.racket-lang.org/math/
Re:The Idea of Lisp by markc on Saturday December 17, 2016 @10:00AM (#13200927)
Clojure matrix libs:

    https://github.com/mikera/core.matrix
    https://data-sorcery.org/
    https://github.com/mikera/vectorz-clj
    http://neanderthal.uncomplicate.org/
    https://github.com/tel/clatrix
Re:The Idea of Lisp by rbanffy on Friday December 16, 2016 @11:02AM (#13194138)
One factor is that you can't just go to "$language.org" and download the canonical version of the language. There are many different and somewhat incompatible versions of the language for various platforms and multiple decades of books written for the various stages of the evolution of each competing implementation.

Lisp is incredibly malleable and this may have hurt it over the years.

Re:The Idea of Lisp by coliveira on Friday December 16, 2016 @09:41AM (#13193501)
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 by goatlover on Friday December 16, 2016 @01:51PM (#13195679)
But what makes Python any better at numerical algorithms than Common Lisp? It's not like CL is lacking in numeric support. It probably has superior numeric support than Python, actually.
Re:The Idea of Lisp by pg314 on Friday December 16, 2016 @01:57PM (#13195725)
Some/most Common Lisp implementation have better native support for numeric types than Python, but Python has a wealth of libraries like numpy that bind to optimised C/Fortran/assembly.
Re:The Idea of Lisp by dreamcompiler on Friday December 16, 2016 @04:17PM (#13196931)
Exactly. Without numpy, Python is orders of magnitude slower at numeric computation than Common Lisp. With numpy, it's faster because numpy is basically C.
Re:The Idea of Lisp by coliveira on Friday December 16, 2016 @06:22PM (#13197819)
Numerical libraries in Python are not implemented in the language itself. In typical Python fashion, they're just calling C and FORTRAN libraries.
Re:The Idea of Lisp by mtrimpe on Friday December 16, 2016 @09:31AM (#13193439)
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 by pjmlp on Friday December 16, 2016 @09:55AM (#13193602)
Well, actually *Lisp was a thing.

I think it is also a matter of culture, probably if the likes of AMD and NVidia cared, they could invest some money into making such languages run properly on GPGPUs, instead of leaving it to researchers alone how to target PTX and ROCm.

On the other hand something like C++17 would already offer many of the Lisp benefits, even if a bit uglier.

Re:The Idea of Lisp by AnimalMuppet on Friday December 16, 2016 @01:46PM (#13195631)
Wouldn't it be harder to get Lisp to run in a GPU, though?

Or perhaps my point is, wouldn't it be harder to get old-style (symbolic) AI to run in a GPU than ML-style AI? (If I understand correctly, the old style is a lot of walking data structures, and the new style is largely matrix operations. The latter seems like a much better fit for a GPU than the former.)

Re:The Idea of Lisp by pjmlp on Friday December 16, 2016 @01:58PM (#13195737)
Well, the Connection Machine was highly parallel.

Also the declarative way of programming in languages like Lisp, and also the macros, would surely allow for nice expressive DSLs.

So far I am only aware of companies exploring Haskell and F# support for GPUs, but I guess it is usually a matter of someone trying it out.

After all, there is FPGA tooling generation support for Clojure already,e.g. Piplin.

Re:The Idea of Lisp by tmpLisp on Friday December 16, 2016 @06:59PM (#13198022)
Re:The Idea of Lisp by rbanffy on Friday December 16, 2016 @11:03AM (#13194147)
> even if a bit uglier

That was very kind.

Re:The Idea of Lisp by tmpLisp on Friday December 16, 2016 @06:58PM (#13198016)
Data crunching on GPUs is a LISP strength. It runs code orders of magnitude faster than say python or c++. https://youtu.be/bEOOYbscyTs?t=2151
Re:The Idea of Lisp by kazinator on Friday December 16, 2016 @01:06PM (#13195294)
There was no "AI winter"; that's a myth. Well, or least a big exaggeration when used to explain why certain things are the way they are.

The main force which explains everything is the procession whereby mainframes were replaced by minis, were replaced by workstations, were replaced by microcomputers.

At each stage, the new wave of hardware started small, bringing in its own approaches, tools and languages. As each wave matured, certain software technologies made "the jump". Some didn't. Some made the jump, but their popularity was destroyed. Those approaches which started each wave had a certain edge, even if they were inferior. For instance, the BASIC language was very widely available on the first 8 bit microcomputers that burst onto the scene in the late 1970's, putting computing into the hands of non-institutional users for the first time. In computing ivory towers of that time, nobody considered BASIC viable at that time any more. Yet, because of this boost that BASIC received, riding the microcomputer wave, it still persists with us in the form of Microsoft's VB.

Lisp was very successful in the 1980's. However, it didn't run very well on microcomputers. If Lisp hackers wanted to make an application to sell on the mass market, the faced the prospect of their customers having to buy expensive workstations and minicomputers. So they did the obvious thing and re-wrote the logic in C or what have you, making it workable on an 8 Mhz PC with a meg of RAM. Once someone has "made it" by doing such a thing, they stop learning. Twenty five years later they are still telling the same story to new recruits about how they rewrote some Lisp thing in C to make it actually run, and made a business out of it, hence forget Lisp.

By the time the next wave of hardware gets to the point that it exceeds the previous generation in capacity and power, it's too late to try to revive most of the stuff that didn't make the jump. The people moved on to something else (or have even become irrationally permanent naysayers), plus other things have obviously changed in the world.

Lisp is doing very well all things considering, because of great expressivity and abstraction, machine independence and overall enduring value. Also, its adaptability: the ability to be reshaped into new dialects. Nothing that old has anywhere near the clout.

As far as the AI winter goes, basically the spiel is that certain funding money dried up for certain types of AI. Even if that is true, what does it tell us? That certain people were dependent on that type of money. They were dependent on it because their stuff only ran on institutional hardware; they were not able to wean themselves off the institutional teat and do something in the mass market. At least, not without changing toolchains.

Re:The Idea of Lisp by pjmlp on Friday December 16, 2016 @02:24PM (#13195972)
Imagine an alternative universe where AT&T was allowed to sell UNIX and charged the same price as other mainframe OSes, instead of a symbolic license price for universities.

I have a feeling that would have turned out quite different.

Re:The Idea of Lisp by strongai on Friday December 16, 2016 @09:41AM (#13193502)
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 by iLemming on Friday December 16, 2016 @07:41PM (#13198265)
I think Python gained its popularity when Google started using it. When one of the big companies - Google, MSFT, Apple, Amazon start using Clojure for their big projects - I believe it will become extremely popular.
Re:The Idea of Lisp by adamnemecek on Friday December 16, 2016 @09:28AM (#13193425)
It used to be the language for AI.
Re:The Idea of Lisp by edanm on Friday December 16, 2016 @09:28AM (#13193424)
The "base rate" popularity of Python is much higher than all those others. This leads (via many mechanisms) to Python being more popular than these others.

(The reason it's Python and not another popular language is another matter - I think for various reasons Python was a more popular language for scientific computing).

Re:The Idea of Lisp by AnimalMuppet on Friday December 16, 2016 @12:06PM (#13194727)
Could you explain what you mean by the "base rate" popularity?
Re:The Idea of Lisp by edanm on Saturday December 17, 2016 @06:23AM (#13200250)
Pretty much what czinck said.

Python is much more popular in general, which makes it more likely to be popular in any specific subfield, for various reasons:

1. More chance that people who decide to do anything in ML already use Python.

2. There's better existing support for various ML-related tasks in Python.

3. There's a larger audience available for ML-related things in Python, therefore people think it's more worthwhile to code things in it.

etc.

Re:The Idea of Lisp by czinck on Friday December 16, 2016 @12:39PM (#13195054)
I'm not the parent poster, but I'm pretty sure they're saying that because Python is more popular in general (the base rate) it's more popular in AI/ML/whatever circles because of better general support (more tutorials, more libraries, more people already know it before trying to use it for a specific problem).