News for hackers. Stuff that matters.
Re:Is Clojure dying, and what has Ruby got to do with it? by virtualwhys on Thursday May 25, 2017 @03:28PM (#14419492)
Clojure's not dying, but it's also not thriving[1].

I think it will continue on as a solid niche language for the foreseeable future, but it's highly unlikely that the language will grow by leaps and bounds barring some must-have innovation in the Clojure language and/or ecosystem that gets the tech world to take it more seriously.

There are so many options these days that it's tough to stand out from the crowd. Clojurescript, while interesting, is a dime-a-dozen with Elm, Purescript, Scala.js, Typescript, etc. all on offer, and with static types to boot. Also, Lisp itself is a tough sell, mainstream adoption isn't in the cards without a major paradigm shift.

[1] https://trends.google.com/trends/explore?q=%2Fm%2F0_lcrx4,%2...

Re:Is Clojure dying, and what has Ruby got to do with it? by swannodette on Thursday May 25, 2017 @03:58PM (#14419716)
I don't really have anything to say about your other points, but the only comparable compile-to-JS tech in your list to ClojureScript is Scala.js. The other options assume you don't see significant value in using the same programming idioms across client and server.
Re:Is Clojure dying, and what has Ruby got to do with it? by virtualwhys on Thursday May 25, 2017 @04:32PM (#14419937)
The point is that most server languages these days compile to javascript. OCaml has Bucklescript, Haskell has GHCJS, Kotlin and Rust compile to JS, etc.

Clojurescript and Scala.js are probably the most mature, but getting developers to make the switch when their server language is not Clojure or Scala is an uphill battle. Case in point: I find Bucklescript to be absolutely amazing (generated binaries on par with size of hand written JS) but Scala.js is a better fit since I've been writing Scala for 6 years.

Re:Is Clojure dying, and what has Ruby got to do with it? by swannodette on Thursday May 25, 2017 @04:38PM (#14419964)
That's exactly what I'm saying. You don't choose ClojureScript or Scala.js haphazardly, you're already using Clojure or Scala. Thus it doesn't make sense to lump them into choices that are primarily client-centric like Elm or PureScript.
Re:Is Clojure dying, and what has Ruby got to do with it? by amelius on Friday May 26, 2017 @04:07AM (#14422640)
Also, WASM is just around the corner, which will probably make this a non issue.
Re:Is Clojure dying, and what has Ruby got to do with it? by lilactown on Thursday May 25, 2017 @05:52PM (#14420434)
As someone who chose ClojureScript over many of the other compile-to-JS languages without using Clojure on the server, I disagree.

Especially if ClojureScript could become more attractive than (or at least have a real solid standing amongst) Elm/PureScript/etc., I could see that being a big boon to Clojure development as well.

Re:Is Clojure dying, and what has Ruby got to do with it? by spiralganglion on Friday May 26, 2017 @12:58PM (#14425501)
With CLJS on Node booting up as fast as it does, I can envision a world where CLJS is vastly more popular than CLJ, since it's able to deliver a class of experience prohibited by the slow JVM startup. All the other common criticisms are shared by both CLJ and CLJS, so there's a chance that, eventually, CLJ only has the startup time as a knock against it, and CLJS has no such shortcomings. (Ignoring, of course, "Lisp is weird".. don't get me started.)

That all said, I think all 'piles-to-JS language bets are off in the face of WASM.

Re:Is Clojure dying, and what has Ruby got to do with it? by dragandj on Friday May 26, 2017 @03:52PM (#14426676)
There are also things that clj has and cljs doesn't have and this is the top-class virtual machine. lots of us really appreciate JVM, and are not impressed at all by node, and especially its ecosystem.
Re:Is Clojure dying, and what has Ruby got to do with it? by spiralganglion on Wednesday May 31, 2017 @01:13AM (#14450556)
That just depends on your background. For a bunch of us folks who come from a non-JVM background, we could say the same about Java. Really, Java and JS are the two biggest language communities in the world, with phenomenal feats of engineering in their runtimes, and a whole host of things to complain about. Since CLJ and CLJS are tied in this regard, I still think the startup time is the only differentiable factor in my proposed hypothetical future.
Re:Is Clojure dying, and what has Ruby got to do with it? by ledgerdev on Saturday May 27, 2017 @03:35AM (#14429284)
So nice to hear someone else say this, and I feel the same about CLJS.

And yeah WASM is looking pretty promising (threads/gc/efficiency), and a CLJ like language that targets it directly would be so interesting for the very long term future.

Re:Is Clojure dying, and what has Ruby got to do with it? by spiralganglion on Wednesday May 31, 2017 @01:09AM (#14450541)
To the best of my knowledge, there's no GC in WASM.
Re:Is Clojure dying, and what has Ruby got to do with it? by dragonwriter on Thursday May 25, 2017 @04:11PM (#14419788)
While not on the list above, there are certainly others like Opal (Ruby in js)
Re:Is Clojure dying, and what has Ruby got to do with it? by nurettin on Friday May 26, 2017 @12:47AM (#14422052)
I've used Opal for client-side validation of a server-side game's rules. (player makes a move on the client, game rules are played out, just the move is sent to server and server plays the same move again using the same game class)

That said, it wasn't a breeze to work with. The compiled object's properties were hard to access. I actually had to serialize it to json

Re:Is Clojure dying, and what has Ruby got to do with it? by ufmace on Thursday May 25, 2017 @04:04PM (#14419752)
I'm a Rubyist and don't know much Clojure, but that sounds pretty reasonable. I'm not sure if Ruby would have taken off if it wasn't for Rails. AFAIK, Rails pushed forward a lot of new ideas in web development and really brought Ruby into the mainstream. Going by that comparison, I would think it'd be hard for Clojure to really catch on without a revolutionary framework that you need it to work with, which may be tough to pull off considering that it's all on the JVM.
Re:Is Clojure dying, and what has Ruby got to do with it? by mirekrusin on Thursday May 25, 2017 @04:33PM (#14419945)
Rails was definitely responsible for Ruby going mainstream, without it, it would slide below Python.

More than that: I think that combination of TextMate and Rails brought a huge number of web devs from Windows to MacOS as well. I remember around maybe 2005/6 people were switching from Intel based Windows to, at that time, PowerPC based Macs (transition to Intel was about to happen) just to use TextMate and Rails - image how huge change it was for developers - and they did it and liked it. Good times.

Re:Is Clojure dying, and what has Ruby got to do with it? by pmontra on Friday May 26, 2017 @03:02AM (#14422429)
It has always been a pain to develop with Ruby on Windows, especially if targeting a Linux server. Gems that don't build on Windows, little help because almost everbody is on a Mac, Linux or a Linux VM on Windows. I knew many people that switched to a Mac because of that. They didn't want to manage a Linux desktop, which was more painful to do than today and with some glitches even today. I switched to Ubuntu instead and I'm still there. Emacs instead of TextMate, which was really big at the time.
Re:Is Clojure dying, and what has Ruby got to do with it? by ufmace on Saturday May 27, 2017 @05:37PM (#14432082)
That's pretty much how I've found it. Ruby works fine on Windows, until you hit a gem version that doesn't build. It usually works all right if you can stay a few Ruby versions behind and carefully pick the gems you use, but it'll likely fall apart if you try to collaborate with anyone using Mac or Linux, updating to the latest Ruby and gems and grabbing any gem they feel like.

Although now, there's WSL on Windows 10. Ruby works great on that for me, every version, every gem. It's kinda like the equivalent of Wine, so it just sits there and doesn't hog resources like a VM.

Re:Is Clojure dying, and what has Ruby got to do with it? by juliend2 on Thursday May 25, 2017 @07:57PM (#14421025)
I was one of them. I was doing some web design/frontend at that time (2005-2006), and the whole Ruby on Rails movement seemed so different, easy to learn, and yet quite productive. And you could develop on a Mac (!!!. Windows XP was my OS at that time). All the rails screencasts I saw featured TextMate, on a Mac. And so the first ActionScript gig I did was to pay for my shiny new Mac Mini.

Looking back to it, it seems like a stupid cargo cult effect, but Rails is the main reason I switched to the Mac since then.

Re:Is Clojure dying, and what has Ruby got to do with it? by faitswulff on Thursday May 25, 2017 @08:27PM (#14421184)
Ditto, thanks to my first job, and I don't regret it, either. Despite recent software hitches, Mac OS has been far and away a superior experience for development than when I was trying to run RailsInstaller on my Windows machine.
Re:Is Clojure dying, and what has Ruby got to do with it? by bluedino on Monday May 29, 2017 @08:27PM (#14442288)
I know for me the combination of RoR and the MacBook Pro caused me to never look back
Re:Is Clojure dying, and what has Ruby got to do with it? by moxious on Thursday May 25, 2017 @09:17PM (#14421436)
It's not really clear to me why, but lisps keep trying and keep dying. Best guess is that in the end, syntax really does matter and lisp just doesn't have enough of it.

Whether it's scheme or clojure or arc, every once in a while a new lisp comes along, and they never make it. This through decades and generations of programmers.

Re:Is Clojure dying, and what has Ruby got to do with it? by hobofan on Friday May 26, 2017 @03:24AM (#14422494)
My (half-serious) take on this is that LISPs are too easy. A lot of little things that are hard in other languages are easier in LISP, which results in you writing the code yourself instead of pulling in a library some else wrote. This greatly reduces both the need and offering of a package manager which usually plays an important role in establishing a ecosystem and community in other languages.

In all seriousness, I think that package managers play a big role in the success of modern languages, espcially if the package managers are there from the beginning. As far as I'm aware Clojure was the only attempt at a LISP where a package manager was included from the beginning.

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.