14 ms·
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
by erik14th 10y ago
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.
- edanm 10y agoThe "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).
- AnimalMuppet 10y agoCould you explain what you mean by the "base rate" popularity?
- czinck 10y agoI'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).
- edanm 10y agoPretty 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.
- adamnemecek 10y agoIt used to be the language for AI.
- mtrimpe 10y agoBecause 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.
- pjmlp 10y agoWell, 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.
- rbanffy 10y ago> even if a bit uglier That was very kind.
- AnimalMuppet 10y agoWouldn'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.)
- pjmlp 10y agoWell, 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.
- tmpLisp 10y agoLook https://youtu.be/bEOOYbscyTs?t=2151 https://youtu.be/bEOOYbscyTs?t=2151
- traviscj 10y agoLisp 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.
- eschaton 10y agoBack 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.
- coliveira 10y agoMost 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.
- goatlover 10y agoBut 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.
- pg314 10y agoSome/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.
- dreamcompiler 10y agoExactly. Without numpy, Python is orders of magnitude slower at numeric computation than Common Lisp. With numpy, it's faster because numpy is basically C.
- coliveira 10y agoNumerical libraries in Python are not implemented in the language itself. In typical Python fashion, they're just calling C and FORTRAN libraries.
- strongai 10y agoBefore 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.
- deleted 10y ago[deleted]
- Blackthorn 10y agoWell, 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.
- kbp 10y ago> 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.
- pg314 10y agoTo add to that, the transition from Python 2 to Python 3 is also an example of how not to evolve a language.
- markc 10y agoClojure 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
- samth 10y agoRacket 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/ http://docs.racket-lang.org/math/
- deleted 10y ago[deleted]
- rbanffy 10y agoOne 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.
- iLemming 10y agoI 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.