4 ms·
Lisp used to be the language for AI, could Clojure possibly steal the machine learning niche back from Python?
by seanmcdirmid 10y ago
Lisp used to be the language for AI, could Clojure possibly steal the machine learning niche back from Python?
- ofek 10y agoDefinitely never.
- iak8god 10y agoExplain?
- fnord123 10y agoThere is basically no foreseeable way for the state-change model of language adoption to see a palpable uptick in Clojure. Python is easier to learn. Python is more useful for data munging/cleaning (lower startup time, loads of input libraries). Python has a repl and eval so code-as-data/data-as-code is not an advantage for Clojure as it is over C-alikes. Python FFI is almost free to call into C so end-to-end performance is better than Clojure. Python has the better libraries for ANN (TensorFlow, Theano) and ML (sklearn). Of course, you can apply "arguably" to every statement in the previous paragraph but the evidence appears to bear it out.
- iak8god 10y agoI currently use Python much more than any other language and regularly advocate for its use as a learning language both for formal education and for self-teaching. That said, I don't think most of the below supports your assertion that "Clojure [could definitely never] steal the machine learning niche back from Python" > Python is easier to learn. I have not seen a learnability comparison between Python and Clojure as first languages. Python is definitely easier to learn as a second language if you're already a trained programmer coming from the C family. > Python is more useful for data munging/cleaning (lower startup time, loads of input libraries). Startup time is indisputable, but also barely matters for interactive programming. In Lisps and in Python, I usually just have a repl going for days at a time. The availability of libraries is not a "never" thing -- it's a "we'll see" thing. > Python has a repl and eval so code-as-data/data-as-code is not an advantage for Clojure as it is over C-alikes. You're conflating two different things that people like about Lisps here. Homoiconicity is a separate benefit from having a repl. And though I use it daily, I think Python's repl kind of blows. > Python FFI is almost free to call into C so end-to-end performance is better than Clojure. Python has the better libraries for ANN (TensorFlow, Theano) and ML (sklearn). Clojure is free to call into Java. And I'm sure there's a route to C if that small performance boost really makes a difference for what you're doing. Again, availability of libraries is an obstacle, but not a "definitely never" obstacle.
- fnord123 10y agoWell these are the hurdles that Clojure needs to get over. And it's not good enough that Python fails because R and Julia are competing with Python. So is Matlab. So to take the ML pole position, Clojure would need to gain traction beyond all of these. So I don't have a reasonable doubt when I say "Clojure will take not the machine learning niche from Python."
- iak8god 10y agoI don't think it's likely. The libraries are the real issue. It's not that they couldn't emerge, it's just that they're not likely to emerge out of the current situation.
- p1esk 10y agoActually, it would be even harder for Clojure to overtake Python: appearance of new ML libraries for Clojure is not enough. Look at Torch for example. It has been a well established library, and yet because it uses Lua, its future is bleak. PyTorch, on the other hand, is gaining popularity.
- leishulang 10y agoLisp was invented to produce AI. Machine learning is a better way to produce AI. So in a sense, Machine learning takes the needs for Lisp (in AI) away.
- TeMPOraL 10y agoLisp was invented by the guy who coined the term AI, not for AI. Its popularity in AI circles in the past stems from a) being developed by the same groups of people and b) being well-suited for symbolic computation; something that many mainstream langauges suck about to this day, even though it's nothing AI-specific. ML takes the needs for Lisp more-less in the same way Entity-Component-System architecture takes the needs for C++ and C# programmers...
- lispm 10y ago> Lisp was invented by the guy who coined the term AI, not for AI. Lisp was designed for AI programming. http://www-formal.stanford.edu/jmc/recursive/node1.html http://www-formal.stanford.edu/jmc/recursive/node1.html > A programming system called LISP (for LISt Processor) has been developed for the IBM 704 computer by the Artificial Intelligence group at M.I.T. The system was designed to facilitate experiments with a proposed system called the Advice Taker, whereby a machine could be instructed to handle declarative as well as imperative sentences and could exhibit ``common sense'' in carrying out its instructions. The original proposal [1] for the Advice Taker was made in November 1958. The main requirement was a programming system for manipulating expressions representing formalized declarative and imperative sentences so that the Advice Taker system could make deductions. So it was designed for the 'Advice Talker'. The AI domains were natural language processing and common sense reasoning.
- dragonwriter 10y ago> Lisp used to be the language for AI IIRC, when Lisp was a leading language for "AI", it was specifically a leading language for expert systems, not ML. Even to the extent that was due to language features being well-suited to the domain, there's still no real reason to expect that suitability to translate to the radically different approaches to AI today.
- TeMPOraL 10y ago> Even to the extent that was due to language features being well-suited to the domain, there's still no real reason to expect that suitability to translate to the radically different approaches to AI today. People these days use Python for ML, which is even less suited for the domain (and lacks the ability to re-suite itself), not to mention being significantly less performant than popular Common Lisp implementation. Our industry is strange :).
- mamon 10y agoPython is well suited for ML, just not in technical sense: it is a very simple language that's easy to use by people who have a strong academic background, but not much of programming experience (AKA: Data Scientists). Also it has a lot of numerical libraries (numpy, pandas)
- singingfish 10y agoML problems are those where people benefit from the assistance of thinking more like the computer does. Python helps people think more like the computer. (corrolary: although a very similar language, Perl helps the computer think more like you do).
- xapata 9y agoHave you played around with Numba (http://numba.pydata.org/ http://numba.pydata.org/)? It's speedy.
- ahaaaaaaa 10y agohttps://github.com/thinktopic/cortex https://github.com/thinktopic/cortex
- thom 10y agoVery unlikely. Incanter is basically dead, so I don't think Clojure is one of the go-to numerical computing platforms. Therefore I just don't see it getting the mind-share required to thrive for these sorts of applications. Besides, at the technical level AI in the age of Lisp was a very different beast than AI today. If you take Eurisko to be the apex of Lisp-based AI, it benefited from code-as-data, dynamism, creating and mutating more or less human digestible heuristics on the fly. AI today is linear algebra. Clojure/Java have perfectly good linear algebra libraries but there's nothing about the language that specifically lends itself to solving these problems. I'd certainly love to see a nicely done deep learning library in Clojure using lots of macros to give a succinct, and it probably even exists, but there are no fundamental advantages over Python. I've always felt some sadness that Clojure presented an extremely sensible way of programming in a multicore world, just as distributed and GPU computing began to take over for really heavy workloads. Personally I love the immutability anyway, and there's no denying those extra cores are _there_. Anyway, I love Clojure and it'd be great not to have to use Python (and especially R), but it's just not realistic.
- dragandj 10y agoIncanter is not the only game in town, FYI.
- iak8god 10y agoFor example? Not being snarky, just want to know what you'd recommend.
- thom 10y agoDragan has an excellent platform for Bayesian Data Analysis: https://github.com/uncomplicate/bayadera https://github.com/uncomplicate/bayadera I first learned about it while moaning about Incanter in previous Clojure threads! But I don't think it's broad enough (I realise it doesn't aim to be) to usefully capture enough mindshare that Clojure is a first-class citizen in the numerical computing space.
- dragandj 10y ago
- rbanffy 10y agoThe way we did AI in the 70's was well suited for Lisp. The way we do it now - with numeric-heavy techniques - isn't so much or, at least, isn't that much better than Python/scikit-learn. Lisp (and Clojure) is still great for exploratory programming (Python too, but Lisp allows you to dive deeper).