This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-24
Channels
- # aleph (1)
- # announcements (22)
- # atom-editor (11)
- # babashka (46)
- # beginners (60)
- # calva (44)
- # cider (18)
- # circleci (1)
- # cljdoc (12)
- # cljs-dev (5)
- # cljsrn (19)
- # clojars (3)
- # clojure (162)
- # clojure-dev (9)
- # clojure-europe (6)
- # clojure-italy (2)
- # clojure-losangeles (2)
- # clojure-nl (5)
- # clojure-spec (7)
- # clojure-uk (23)
- # clojureremote (1)
- # clojurescript (55)
- # community-development (14)
- # core-async (234)
- # cursive (14)
- # data-science (3)
- # datomic (32)
- # fulcro (5)
- # graalvm (20)
- # graphql (2)
- # hugsql (4)
- # jobs (11)
- # jobs-discuss (2)
- # joker (1)
- # juxt (3)
- # kaocha (1)
- # luminus (1)
- # off-topic (33)
- # pathom (3)
- # pedestal (1)
- # reagent (24)
- # remote-jobs (3)
- # shadow-cljs (38)
- # spacemacs (4)
- # specter (4)
- # speculative (54)
- # tools-deps (62)
- # vim (8)
- # vscode (14)
Has anyone been able to successfully generate native image using graalvm for a clojure app that uses postgres? I am using postgres -
[org.postgresql/postgresql "42.2.5"]
On running the agent for native image generation I get this huge list of error. Attaching a file.Perhaps, try this other postgres driver, I'd be curious to know if it compiles with native-client. https://github.com/impossibl/pgjdbc-ng
@U0524F6MV I removed
[org.postgresql/postgresql "42.2.5"]
and added
[com.impossibl.pgjdbc-ng/pgjdbc-ng "0.8.3"]
But I get an exception
Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:583).
org.postgresql.ds.PGSimpleDataSource
@ashwinbhskr There is an issue in the postgres jdbc repo here: https://github.com/pgjdbc/pgjdbc/issues/1189
I know not entirely related to GraalVM, but the logo for Babashka is funny: it is written ba-bash-ka, and if you remove bash, it yields baka, which sounds like the Japanese word for โstupidโ xD
So, just fyi (following up on the question above on Graalvm, native-image and the clj-http lib), it looks like I do need the bells and whistles of clj-http and clj-http-lite isn't enough. Client SSL certificate authentication seems to be either a bell or whistle. I still have a useful Clojure program that does what I want -- I was just hoping to make this util an easily distributable binary image. I'll try to find another util to try this out on.
Excited to see some activity at https://clojure.atlassian.net/browse/CLJ-1472!
I totally forgot mentioning GraalVM in the survey. I'll pay more attention next year
(def o (Object.))
(def mut (int-array 1))
(defmacro do-parallel [n]
(let [fut-bindings
(for [i (range n)
sym [(symbol (str "fut_" i))
`(future (locking o (aset mut 0 (inc (long (aget mut 0))))))]]
sym)
fut-names (vec (take-nth 2 fut-bindings))]
`(let [~@fut-bindings] ;; start all futures
(doseq [f# ~fut-names] ;; wait for all futures
@f#))))
(time (dotimes [_ 10000] (do-parallel 100)))
;; (println (aget mut 0)) ;; for checking correctness
(removed f argument and fixed unquote-splice for fut-bindings)does this change anything I care about?
ah, I think this is the jira editor messing with stuff
I had that