This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-06-25
Channels
- # announcements (2)
- # asami (16)
- # babashka (55)
- # beginners (27)
- # calva (14)
- # cider (5)
- # clj-kondo (16)
- # cljs-dev (22)
- # clojure (72)
- # clojure-europe (89)
- # clojure-nl (10)
- # clojure-uk (7)
- # clojured (1)
- # clojurescript (14)
- # community-development (4)
- # core-async (15)
- # emacs (10)
- # events (2)
- # fulcro (3)
- # graalvm (1)
- # graalvm-mobile (71)
- # helix (7)
- # honeysql (2)
- # introduce-yourself (1)
- # jobs-discuss (17)
- # juxt (3)
- # lsp (62)
- # malli (13)
- # meander (7)
- # off-topic (14)
- # pathom (54)
- # polylith (6)
- # re-frame (11)
- # releases (1)
- # sci (22)
- # sql (9)
- # tools-deps (84)
- # vim (37)
- # xtdb (18)
Using "sci" I have managed to successfully create a native image of my application, but when executed the application crashes. When the application is executed as a jar it does not crash.
Yes. I'll figure out how to post a gist. I've never done it before. Any link to how to "gist"?
@hairfire the reflection happens here: > at edpdl.platform_utils$index_of.invokeStatic(platform_utils.cljc:38)
so you could probably use (set! *warn-on-reflection* true)
in your code and solve it
IT WORKS!!!! BTW, in one instance of using my embedded C++ code generator program the input file contained 2,341 non-blank lines of "DSL" code, and produced 27,936 non-blank lines of C++ code, which is approximately 30% of the total non-blank lines of code for the entire embedded applicaiton.
Using Clojure, and now "sci", our team is saving MANY MANY hours of hand coding that we used to do!
Next is creating a native image for Windows. I assume I need to do that on Windows, right?
@hairfire I use appveyor for this. you can check one of my projects like babashka, clj-kondo or jet: https://github.com/borkdude/jet/blob/master/appveyor.yml
not sure if this works with closed source projects btw. Github actions may work for that, if you have a paid Github account, not sure
@hairfire Iโm glad you solved you problem, and glad to see lisp adoption, but to be honest i wonder why sci? i.e. weโre concatenating and printing strings in all various languages for decades, what alternatives did you consider/compare with?
Essentially I needed to create a compiler from a DSL to C++. My approach was to design a DSL that is easily transformed to valid Clojure. The valid Clojure, when evaluated, results in a big nested map, with Clojure acting as the syntax analyzer. I use Clojure's spec as the semantic analyzer. Next I use the powerful Clojure tools to transform, create and optimize the data structures needed for C++ code generation. The sci library comes in because I want a GraalVM native executable, which I couldn't get with regular Clojure evaluation of the DSL.