News for hackers. Stuff that matters.
Re:Why did Clojure gain so much popularity? by pron on Friday April 26, 2019 @04:59AM (#19755778)
> So I need to switch to exotic JVMs to get better performance?

Depends what you mean by "better". HotSpot is optimized for peak performance (which is higher than that of other Lisp runtimes), and to suit the needs of server-side development. Other VMs target other uses -- fast startup, embedded etc.

> If the JVM would be a better match, then Lisp implementations on it would have a better start-up time - like most Lisp runtimes have.

It's already a better match, because that's what most Lispers prefer. If you mean it could be even better than it is, then I agree. I also agree that it's not the best match for, say, Racket. Now, it's perfectly fine if you prefer Racket over Clojure, but most people prefer Clojure to Racket, partly because overall the runtime gives them more of what's most important to them. Would it be cool if the JVM had more features that would allow it to be a better match for Racket? Sure.

> Does the number matter

Yes, because Clojure is the most popular Lisp, the features it has are probably the ones most important to Lispers.

> Things like 'no TCO' in the JVM are no question of the number of people using it, it's simply a fact.

Yes, but how much not having TCO matters can be answered by popularity. That people use Clojure much more than they use Lisps on runtimes with TCO suggests that other things matter to them more.

> neither currently nor in the near future

Currently, no. Near future -- probably. I'm the technical lead for that project, and it's very likely that delimited continuations would arrive soon (in fact, you can already build the prototype today, and early access builds will be available in a couple of months).

> Now the usual arguments about TCO are ...

Well, as it's being addressed only now rather than, say, 10 years ago means that it's not a top priority, but judged to justify some reasonable effort at this point in time.

> TCO is not supported by the JVM, while this capability is a part of many other runtimes.

True, but the fact remains that the totality of capabilities of the JVM is considered more attractive by more people than that of most other runtimes.

> That's all great, but I don't develop huge backbones all the time.

I am not saying that you, personally, should definitely use the JVM, only that it seems that the JVM is a great platform for many languages, including Lisps, and that the use cases it targets are very desired.

> Your original claim was this ...

I believe I also said that I mean capabilities for the domain HotSpot targets. Obviously, other things may be more attractive for, say, embedded software.

> It currently provides no TCO at all.

There are other things it doesn't provide. But by comparing capabilities I did not mean one by one, but the totality of those of one runtime vs. those of the others.

> It's not about what I need, it's that capabilities like extending the IDE on the fly are still not available in an IDE like IntelliJ - why? After downloading a plugin, it wants to restart the IDE. Something which a typical Lisp system on a Lisp runtime brings for free, because of its capabilities.

No, that capability is definitely there. I'm guessing the IDE authors just didn't think it's worthwhile to use. NetBeans, for example, doesn't require a restart after downloading plugins (or, rather, rarely does).

Re:Why did Clojure gain so much popularity? by lispm on Friday April 26, 2019 @06:41AM (#19756142)
> I'm the technical lead for that project, and we're very likely to have continuations soon.

What relationship have continuations to making Java exceptions resumeable?

> But by comparing capabilities I did not mean one by one, but the totality of those of one runtime vs. those of the others.

Not sure how you compare a totality, other than actually having a list and compare them one by one.

My feeling: you make a claim, but you have never used one of the Lisp runtimes like Allegro CL and you simply don't know what they provide and when it comes to specific capabilities, they are not important to YOU, because JVM users don't use them - given that they have no choice.

The JVM isn't the predominant enterprise platform because it is the best Lisp platform. Very few people in companies care whether it runs Lisp well or not. People have chosen it as their platform for their niche language, because of its domination in the specific enterprise market - not because it is technically or capability-wise a good platform for their niche language. Actually even though the JVM now exists for a long time, none of the dynamic languages have their best / most performant / dominant implementations on the JVM. Not Smalltalk, not Lisp, not Scheme, not Python, not Ruby, ...

Re:Why did Clojure gain so much popularity? by pron on Friday April 26, 2019 @09:26AM (#19757181)
> What relationship have continuations to making Java exceptions resumeable?

We don't want resumable exceptions for Java. But if you want to implement a Lisp that has them on the JVM, you'll be able to use continuations for that.

> but you have never used one of the Lisp runtimes like Allegro CL and you simply don't know what they provide and when it comes to specific capabilities, they are not important to YOU, because JVM users don't use them - given that they have no choice.

I have never used Allegro, and, as I said, some capabilities that are important to some people may be missing on the JVM. But it seems that most Lispers prefer what the JVM has to offer, which is high performance, low-latency GC, low-overhead monitoring, and a huge ecosystem.

> not because it is technically or capability-wise a good platform for their niche language.

True, but most people don't care about what's good for their language, they care about what's good for their program (and users). It seems like more people prefer Lisp on the JVM, even if they have to give up some features (and they'll need to give up fewer features with Loom).

> Not Smalltalk, not Lisp, not Scheme, not Python, not Ruby, ...

Python and Ruby are actually most performant on the JVM nowadays. Look up TruffleRuby and GraalPython. They're just very new. Even TruffleJS is almost as good as V8.

Re:Why did Clojure gain so much popularity? by lispm on Friday April 26, 2019 @10:26AM (#19757838)
> We don't want resumable exceptions for Java.

So the Java libs I'd have to use would not support them. Not so great.

> I have never used Allegro

So the totality of your opinion of the JVM being better for Lisp comes from exactly what knowledge? Oracle marketing?

> But it seems that most Lispers prefer what the JVM has to offer, which is high performance, low-latency GC, low-overhead monitoring, and a huge ecosystem.

You mean Clojure users recruited from Java? I have never seen many Scheme, Common Lisp, Javascript, Julia, ... users on the JVM.

> Python and Ruby are actually most performant on the JVM nowadays. Look up TruffleRuby and GraalPython. They're just very new. Even TruffleJS is almost as good as V8.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Really? Looks to me that it's not particular fast.

  [GraalVM CE, Java 1.8.0_202] on darwin
  Type "help", "copyright", "credits" or "license" for more information.
  Please note: This Python implementation is in the very early stages,
  and can run little more than basic benchmarks at this point.
Haha, basic benchmarks, okay. Size '178939568' okay.

Probably the largest Python implementation in the world...

Re:Why did Clojure gain so much popularity? by pron on Friday April 26, 2019 @11:08AM (#19758283)
> Not so great.

Well, resumable exceptions are not so great... We really don't want them in Java (remember that Java is a language originally designed by Lispers).

> So the totality of your opinion of the JVM being better for Lisp comes from exactly what knowledge? Oracle marketing?

I've used Racket (and PLT Scheme before it) quite a bit (I was a Schemer when Java barely even existed), and Guile, and, of course, Clojure. Also, Oracle marketing is quite terrible.

> You mean Clojure users recruited from Java? I have never seen many Scheme, Common Lisp, Javascript, Julia, ... users on the JVM.

I started using Scheme in the mid-nineties. Unfortunately, I haven't seen many Scheme and Common Lisp users anywhere. Clojure is the first in over three decades to be used on any noticeable scale in industry. There are plenty of people that run JS on the JVM (probably ten times all non-Clojure Lispers), and Julia is still new.

> Really? Looks to me that it's not particular fast.

It's very fast. Here's some benchmarks with early prototypes: http://thezhangwei.com/documents/oopsla113-zhang.pdf

Beats PyPy.

Re:Why did Clojure gain so much popularity? by lispm on Friday April 26, 2019 @01:35PM (#19759935)
> Well, resumable exceptions are not so great...

I thought they are?

> We really don't want them in Java (remember that Java is a language originally designed by Lispers).

Who of the Oak team were Lispers? Not even Gosling has ever seen or used a competent Lisp implementation - he wrote a 'Mock' Lisp without lists ;-) for an Emacs written in C on Unix. One of his many projects. Stallman later implemented a slightly better Lisp using Goslings C code as a start.

> I've used Racket (and PLT Scheme before it) quite a bit (I was a Schemer when Java barely even existed), and Guile

None of them have especially interesting runtimes. Racket now gets a new runtime based on Chez Scheme from Cisco. Chez Scheme is actually great. You should have studied that. Well, source code is now available from Cisco. It has a nice AOT native compiler.

> I started using Scheme in the mid-nineties. Unfortunately, I haven't seen many Scheme and Common Lisp users anywhere

You were too late. SUN had its own Lisp offerings in the 80s. Like DEC/DIGITAL, IBM, Apple, HP, Apollo, Texas Instruments, Xerox, ...

Re:Why did Clojure gain so much popularity? by pron on Friday April 26, 2019 @04:06PM (#19761306)
Yes, I know Chez Scheme, and I know about the excitement around Lisp in the 80s, and now Clojure is giving Lisp a bit of a resurgence. I assure you that Lisp still has fans in the Java team today. I also know about various cool features in various runtimes -- we monitor the field closely and learn from everyone, but as those who've built the most successful programming runtime in the history of computing, which is also one of the most successful and capable Lisp runtimes in the history of computing, and also made not one but several breakthroughs in JIT compilation, garbage collection and low-overhead monitoring, the Java team knows a thing or two, as well, especially about which features have a big impact.