Fork me on GitHub
#clojure-uk
<
2019-05-16
>
danm08:05:43

👋:skin-tone-2:

practicalli-johnny08:05:24

Next few talks for the London Clojurians may include the following * Clojure and GraalVM (idea stage) * How to talk to your REPL - exploring prepl (working title, speaker acquired) * Introduction to deep learning with MXNet and Clojure (idea stage) * unleashing vim for Clojure development (idea stage - how to use vim effectively for closure dev) Any thoughts on the interest of these talks, things you would like to see them cover, other topics you would find interesting?

Aleksander10:05:43

they all sound exiting!

folcon14:05:25

This looks great @jr0cket =)… Practical usage with repl and workflows always interest me! GraalVM would also be interesting from a Lambda context as I’ve been looking into that area :)…

dharrigan09:05:34

vim for the win! 🙂

dharrigan09:05:53

I managed to get a simple clojure app to run with graalvm (19.0.0)

dharrigan09:05:56

worked well enough 🙂

alexlynham09:05:33

clojure and graal I’m super interested in b/c of the lambda use case

maleghast09:05:44

What's the big deal with Graal..? Is it just__ startup, or is performance across the board considered better?

practicalli-johnny09:05:01

GraalVM is very important to Oracle and the will be a lot of convergence between it and OpenJDK development in the future. GraalVM has a bit of catching up to do though, but the investment is there. GraalVM is multi-language and can be distributed via native images so can run on many OS'es. And yes, apps that are converted to GraalVM native images tend to have very fast start up times, so useful for CLI tools, containers (Heroku, Docker) and possibly even as lambda / Serverless computing. Whether an application is overall more performant involves many aspects on top of the build process. There is also a new open source benchmark dashboard that will help understand performance dynamics.

dominicm10:05:06

Graalvm is faster for many workloads, especially the EE, but native-image is not

maleghast09:05:24

@jr0cket - Are you preparing all of these yourself..? *boggle*

practicalli-johnny09:05:14

@maleghast yes, I'll be doing all the talks as everyone else is too shy 😁 This is of course a big fib... I am sure you knew that already Oliver is doing the repl prepl talk... I would be happy to have anyone speak on the other topics (otherwise you may get me)

practicalli-johnny09:05:01

GraalVM is very important to Oracle and the will be a lot of convergence between it and OpenJDK development in the future. GraalVM has a bit of catching up to do though, but the investment is there. GraalVM is multi-language and can be distributed via native images so can run on many OS'es. And yes, apps that are converted to GraalVM native images tend to have very fast start up times, so useful for CLI tools, containers (Heroku, Docker) and possibly even as lambda / Serverless computing. Whether an application is overall more performant involves many aspects on top of the build process. There is also a new open source benchmark dashboard that will help understand performance dynamics.

dharrigan09:05:47

I think the thing about Graal, isn't about graal per se, it's being able to run without a JVM, i.e., faster startup. As we know, historically, the JVM has had a bad rap for it's startup time, and thus other languages (rightly or wrongly) are gaining more traction (i.e., go) simply because things compile to a single executable and can be run without anything else. If Graal helps Java, Scala, Clojure, Kotlin etc.., to "catch-up" in that aspect, then that can only be a good thing 🙂

dharrigan09:05:29

Whether or not that is appropriate for the use-case in hand, depends.

dharrigan09:05:32

I think graal itself may be the long-term replacement for hotspot...

3Jane10:05:15

That, and also (for me) the hope of making it easier to sell non-Java teams on Clojure 😄

alexlynham10:05:43

the future of most apps will be on-demand compute/execution so anything based on the JVM needs a way of running w/a fast start-up if it wants to be a serious contender to ‘just using go’ or ‘just using node’

alexlynham10:05:54

*will probably be

practicalli-johnny11:05:22

Anyone have recommendations for food companies, other than pizza, that can provide food for events?

practicalli-johnny11:05:39

I just noticed that Humus Bros has folded, that's a real shame

dharrigan11:05:14

Not familiar with the area, so can't really offer any recommendations.

danm12:05:48

Does Graal actually significantly reduce the startup time of Clojure? My understanding was that AWS had done a lot of work to minimise the JVM startup time in Lambdas, but that Clojure's additional time on top of that still made it mostly not an option there. I would assume Graal would suffer the same problem

dominicm20:05:53

Native image basically launches your main and then snapshots memory, so start-up is massively improved. Graalvm does not have any improvements afaik.

danm12:05:59

Also it's still a VM, so what makes it faster than the standard JVM?

practicalli-johnny12:05:55

Graal native image builds can makes the startup like a native application to the OS. Its still early days yet, but this approach could take away much of the JVM start time and hence improve that of Clojure. Start up times are probably the least interesting feature though. I dont see Grall native images as a benefit to development workflow speeds at the moment, but then I don't restart my repl very often and when I do its quick enough for me. You could also use a minimum profile JVM and/or ahead of time compilation to also reduce startup time and in the short term this may provide similar or better results. As with everything else, performance is a constraint and its dynamics come from a range of factors. Of course you can still write very bloaty code and it wouldn't matter what you did 🙂

dharrigan12:05:34

Here's a very simple adhoc micro benchmark, same program:

dharrigan12:05:43

% time java -jar target/palindrome-0.1.0-SNAPSHOT-standalone.jar "foo"
false
java -jar target/palindrome-0.1.0-SNAPSHOT-standalone.jar "foo"  1.27s user 0.09s system 238% cpu 0.569 total

dharrigan12:05:41

(a moment...)

dharrigan12:05:56

% time ./target/palindromes "foo"
false
./target/palindromes "foo"  0.00s user 0.00s system 87% cpu 0.001 total

dharrigan12:05:10

1.27s vs 0.0 seconds 🙂

dharrigan12:05:13

seems like a win to me 🙂

rickmoynihan14:05:11

yeah GraalVM native compilation is looking pretty great if you need to ship a native binary… though there are I believe big limitations for some apps like no reflective calls. However Graal’s also I think more interesting from the perspective of truffle… where a language implementer need only implement a naive interpreter for their language using the truffle framework, and they’ll instantly get a compiled language with state of the art GC and VM support for free. The difference this can make looks to be huge, for example Ruby on Truffle was I believe about 14x faster than MRI / JRuby… though don’t quote me on that.

👍 4
alexlynham14:05:40

just saw out the corner of my eye and was like…

😂 20
rickmoynihan15:05:02

The tech to do the above is pretty amazing, and meta beyond belief… partial evaluation of a self specialising interpreter to yield an optimizing compiler for the said language with great performance.

rickmoynihan15:05:06

Supposedly called Futamura projections… which I just read as Futurama projections not-sure-fry

not-sure-fry 8
rickmoynihan15:05:22

From wikipedia: > 1. Specializing an interpreter for given source code, yielding an executable > 2. Specializing the specializer for the interpreter (as applied in #1), yielding a compiler > 3. Specializing the specializer for itself (as applied in #2), yielding a tool that can convert any interpreter to an equivalent compiler > Furthermore, applying the tool in #3 to itself yields the tool itself, so it is a Quine. 🤯

rickmoynihan16:05:39

ugh… does anyone know of an alternative to jvisualvm that works with adoptopenjdk-12?

practicalli-johnny17:05:19

So https://visualvm.github.io/ doesnt work with adoptopenjdk-12. Good to know, I was about to upgrade to 12

rickmoynihan17:05:58

it doesn’t — see #clojure looks like you might be able to build master of visualvm though

practicalli-johnny17:05:25

not sure if https://renaissance.dev/ will do what you need, but may be worth a quick look - its new but open source and helping with GraalVM development team with optomisations

rickmoynihan17:05:14

that looks like a benchmarking suite

rickmoynihan17:05:47

to test perf of vms with a common baseline 😞

practicalli-johnny17:05:56

thought it might have profiling, but mis-read, it seems more aimed at helping you improve profilers. My bad. Good luck wth virtualvm.

rickmoynihan17:05:33

haha easily done 🙂

rickmoynihan17:05:53

thanks for caring though 🙂

otfrom17:05:13

:hugging_face:

rickmoynihan08:05:18

ok so I’ve given up… and am just doing the profiling on java 8

rickmoynihan16:05:42

or do I need to buy a copy of yourkit?

jasonbell16:05:58

@rickmoynihan Is there much hanging off JRuby these days? I know Embulk is but talking the maintainers a few weeks ago I think they’ll move away from it eventually and away from RubyGems for the plugins.

rickmoynihan16:05:59

not sure what you mean? You mean are people using it these days? I don’t really know… when I used it it was a very decent ruby implementation once it had warmed up. I suspect it’s still quite a lot faster than MRI… gems with native deps were a problem, but usually the work arounds were ok. But I don’t follow the community anymore.

jasonbell16:05:43

Is anyone using JRuby is what I meant, I should have been clearer.

rickmoynihan16:05:36

looks like it still gets quite a lot of development

rickmoynihan16:05:15

some of the contributors seem to be TruffleRuby contributors too… so Oracle etc are still putting some bets on it

rickmoynihan16:05:43

(TruffleRuby at least)

jasonbell16:05:02

👍 Promising then.

dominicm20:05:37

I'm using it, for asciidoctor