News for hackers. Stuff that matters.
Re:Is Clojure dying, and what has Ruby got to do with it? by seanmcdirmid on Thursday May 25, 2017 @11:17PM (#14421770)
Lisp used to be the language for AI, could Clojure possibly steal the machine learning niche back from Python?
Re:Is Clojure dying, and what has Ruby got to do with it? by dragonwriter on Friday May 26, 2017 @01:51AM (#14422230)
> 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.

Re:Is Clojure dying, and what has Ruby got to do with it? by TeMPOraL on Friday May 26, 2017 @03:40AM (#14422536)
> 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 :).

Re:Is Clojure dying, and what has Ruby got to do with it? by mamon on Friday May 26, 2017 @05:28AM (#14422899)
Python 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)

Re:Is Clojure dying, and what has Ruby got to do with it? by singingfish on Friday May 26, 2017 @06:10AM (#14423014)
ML 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).
Re:Is Clojure dying, and what has Ruby got to do with it? by xapata on Sunday May 28, 2017 @09:08PM (#14436859)
Have you played around with Numba (http://numba.pydata.org/)? It's speedy.
Re:Is Clojure dying, and what has Ruby got to do with it? by thom on Friday May 26, 2017 @05:03AM (#14422820)
Very 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.

Re:Is Clojure dying, and what has Ruby got to do with it? by dragandj on Friday May 26, 2017 @05:34AM (#14422916)
Incanter is not the only game in town, FYI.
Re:Is Clojure dying, and what has Ruby got to do with it? by iak8god on Friday May 26, 2017 @11:32AM (#14424754)
For example? Not being snarky, just want to know what you'd recommend.
Re:Is Clojure dying, and what has Ruby got to do with it? by thom on Friday May 26, 2017 @01:43PM (#14425849)
Dragan has an excellent platform for Bayesian Data Analysis:

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.

Re:Is Clojure dying, and what has Ruby got to do with it? by dragandj on Friday May 26, 2017 @03:40PM (#14426607)
There is no direct replacement, because there are different libraries tackling different aspects of what you may need: high performance computations, data munging, distribution, probability stuff, ML, deep learning etc. Most are on github, some have websites and lists/communities. Google is your friend there. Most of them are still in heavy development, but other than cutting edginess, they do their things much better than incanter would do it (but I never found Incanter useful for beyond helloworld-ish programs even in its glory days so that's not a particularly high bar).
Re:Is Clojure dying, and what has Ruby got to do with it? by leishulang on Friday May 26, 2017 @01:16AM (#14422136)
Lisp 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.
Re:Is Clojure dying, and what has Ruby got to do with it? by TeMPOraL on Friday May 26, 2017 @03:44AM (#14422555)
Lisp 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...

Re:Is Clojure dying, and what has Ruby got to do with it? by lispm on Friday May 26, 2017 @11:44AM (#14424844)
> 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

> 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.

Re:Is Clojure dying, and what has Ruby got to do with it? by ahaaaaaaa on Friday May 26, 2017 @02:15AM (#14422294)
Re:Is Clojure dying, and what has Ruby got to do with it? by rbanffy on Friday May 26, 2017 @09:28AM (#14423832)
The 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).

Re:Is Clojure dying, and what has Ruby got to do with it? by ofek on Friday May 26, 2017 @12:05AM (#14421915)
Definitely never.
Re:Is Clojure dying, and what has Ruby got to do with it? by iak8god on Friday May 26, 2017 @01:10AM (#14422119)
Explain?
Re:Is Clojure dying, and what has Ruby got to do with it? by fnord123 on Friday May 26, 2017 @07:12AM (#14423227)
There 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.

Re:Is Clojure dying, and what has Ruby got to do with it? by iak8god on Friday May 26, 2017 @08:56AM (#14423668)
I 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.

Re:Is Clojure dying, and what has Ruby got to do with it? by fnord123 on Friday May 26, 2017 @10:26AM (#14424256)
Well 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."

Re:Is Clojure dying, and what has Ruby got to do with it? by iak8god on Friday May 26, 2017 @11:29AM (#14424732)
I 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.
Re:Is Clojure dying, and what has Ruby got to do with it? by p1esk on Friday May 26, 2017 @12:17PM (#14425121)
Actually, 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.