This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-28
Channels
- # announcements (19)
- # aws (4)
- # babashka (17)
- # beginners (74)
- # biff (2)
- # calva (5)
- # cider (6)
- # clerk (14)
- # clj-kondo (12)
- # cljs-dev (3)
- # clojure (40)
- # clojure-dev (26)
- # clojure-europe (28)
- # clojure-nl (1)
- # clojure-norway (39)
- # clojure-sweden (1)
- # clojure-uk (4)
- # conjure (2)
- # docker (35)
- # emacs (24)
- # graalvm (15)
- # graphql (1)
- # gratitude (4)
- # holy-lambda (2)
- # hyperfiddle (8)
- # introduce-yourself (3)
- # jobs (3)
- # nrepl (2)
- # off-topic (9)
- # pedestal (8)
- # reitit (5)
- # releases (3)
- # remote-jobs (3)
- # yamlscript (1)
What's happened in the last 2 years around native image? Is it still finicky with not all Java constructs supported? Is there still no cross compilation? Is the paid Graalvm still there and locks certain optimizations behind it?
Hiya @U0K064KQV! GraalVM native image is getting smoother and faster with each release. Apparently, a native image can now be as fast as running on the JVM. There is still no cross-compilation. There are 2 versions of GraalVM: Oracle and Community. The Oracle variant (the one with optimizations) is now also free to use but has a different license than the Community variant. If you are more specific with your finicky Java constructs question, maybe someone can chime in with an answer.
I just remembered that things that were too dynamic, reflection, etc. was challenging.
And so like, I think borkdude had to rewrite certain libs to make them work with native-image
All reflection issues I've ran into are possible to mitigate, albeit somewhat annoying at times.
Bytecode modification on the fly cannot be supported, so modification of code via reflection, creating new classes etc cannot be done under native-image. It's called closed world assumption. I believe Oracle variant has support for profile guided optimization, which usually delivers slightly better results in production workflows. But for most utilities that we write here this is not that much of a value in my opinion.
ok it can even do dynamic proxies, but it has to have all usages covered... that's pretty impressive
When you say native image can be as fast. Does that even count cpu bound tasks that benefit a lot from JIT?
Also is there any good resources on inclusion of Python/JS libs in a Clojure project? When I looked in the past it had a lot of friction so I avoided it.