This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-08-22
Channels
- # announcements (13)
- # babashka (22)
- # beginners (22)
- # biff (17)
- # calva (6)
- # clerk (20)
- # clj-kondo (25)
- # clj-together (5)
- # clj-yaml (20)
- # cljdoc (16)
- # cljs-dev (1)
- # clojure (42)
- # clojure-brasil (1)
- # clojure-europe (26)
- # clojure-nl (6)
- # clojure-norway (24)
- # clojure-turkiye (3)
- # clojure-uk (5)
- # clojurescript (37)
- # core-async (7)
- # core-logic (2)
- # datalevin (7)
- # datomic (43)
- # events (2)
- # fulcro (7)
- # gratitude (1)
- # hyperfiddle (7)
- # java (7)
- # jobs (3)
- # lsp (4)
- # off-topic (16)
- # pathom (18)
- # polylith (1)
- # portal (27)
- # reitit (4)
- # releases (3)
- # shadow-cljs (47)
- # tools-build (14)
- # tools-deps (16)
- # yamlscript (11)
I've minimally ported YAMLScript to Clojure enough to try to take it to the next step of using GraalVM to compile it (combined with SCI) into a libyamlscript.so shared library, that in turn will be bound as module to python and shipped to PyPI as yamlscript.py (a yaml loader to load dynamic (scripted with ys clojure)). The ported code is here: https://github.com/yaml/yamlscript/tree/clojure/clojure I'm looking for advice on using graalvm and also bundling sci...
> I'm looking for advice on using graalvm and also bundling sci. For a general impression of GraalVM + Clojure you can look here: https://github.com/clj-easy/graal-docs For using SCI + GraalVM: This is a simple example: https://github.com/borkdude/jayfu
but you can also look at https://github.com/borkdude/jet which is a pretty simple project that uses SCI + GraalVM
Thanks @U04V15CAJ!
(I'm in those channels too)
Is there a preferred FFI library for clojure. I want to swap out the snakeyaml usage for libfyaml. The result would need to work with graalvm.
I have used SWIG before, and it is annoying to use except for C/C++ libraries with a small API
In general, you are stuck with JNI until Java 21 releases, which in case you can use #C02EEAUHSJJ
note that the moment you use native libraries in clojure it becomes annoying to even just make an uberjar, since you would have to bundle a shared library for every [os architecture]
tuple you intend to support
e.g. using sqlite jdbc driver in clojure already bloats a jar by some 20 MB because of all the ways [windows mac linux freebsd solaris]
and [x86 amd64 arm32 arm64 ppc ppc64 s390x mips ...]
can mix together. you can cleverly exclude some of these libraries from your uberjar (but know it comes at the cost of dropping support for some platform out there)