This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-24
Channels
- # beginners (10)
- # boot (14)
- # cider (80)
- # clara (1)
- # cljs-dev (19)
- # cljsrn (7)
- # clojure (284)
- # clojure-france (4)
- # clojure-italy (57)
- # clojure-poland (8)
- # clojure-russia (10)
- # clojure-spec (65)
- # clojure-uk (155)
- # clojurescript (156)
- # code-reviews (6)
- # copenhagen-clojurians (16)
- # cursive (10)
- # datomic (10)
- # emacs (13)
- # euroclojure (1)
- # graphql (4)
- # jobs (2)
- # lein-figwheel (3)
- # luminus (4)
- # off-topic (2)
- # onyx (42)
- # parinfer (23)
- # pedestal (1)
- # protorepl (8)
- # re-frame (34)
- # reagent (17)
- # ring-swagger (5)
- # timbre (24)
- # vim (72)
- # yada (1)
> However, I have found that, if I AOT compile all of zprint and the associated libraries (and use just minimal libraries), and use the right Java command line arguments (and caching techniques), that I can get a Clojure zprint filter to startup slightly faster than a Clojurescript zprint filter. And to do so in just under 1 second. Which isn't zero, but which is fast enough to be perfectly useful. > Moreover, as the amount of source to be formatted grows, the Clojure version runs considerably faster than the Clojurescript version. This seriously puts clojure on the tooling train again.
I have no more yet :( gotta benchmark it and test. But it makes a very compelling alternative to something like Julia or Go.
I'm considering hooking up clojure-neovim and AOT compiling it to check it starts fast, same for tools.nrepl.
@jebberjeb do you release neovim-client to a repo?
clojure.lang.ExceptionInfo: Could not find artifact neovim-client:neovim-client:jar:0.1.0 in clojars (
https://github.com/jebberjeb/clojure-socketrepl.nvim probably doesn't build 🙂
@dominicm should be good to go https://clojars.org/neovim-client
Now you too can mutate neovim from your REPL! Why you would want to is another issue 🙂
My thinking is that any piece of software isn't ever really complete without a REPL to modify it at runtime.
https://github.com/clojure-vim/neovim-client/blob/master/project.clj you're bringing in an old core.async version which doesn't work with latest specs 😞
I should seriously try feed this into that javascript java interpreter whilst I'm at it
@jebberjeb I can't actually get it to compile as is.
Caused by: java.io.FileNotFoundException: Could not locate neovim_client/nvim__init.class or neovim_client/nvim.clj on classpath. Please check that namespaces with dashes use underscores in the Clojure file name.
Yeah, leiningen does a terrible job of AOT. Boot did a better job, but I couldn't get neovim-client to aot though.
yep. Which speeds up the just nrepl build, but is now failing the neovim build again
Exception in thread "main" java.lang.ExceptionInInitializerError
at com.etsy.net.UnixDomainSocket.getJarPath(Unknown Source)
at com.etsy.net.UnixDomainSocket.<clinit>(Unknown Source)
at neovim_client.nvim$new.invokeStatic(nvim.clj:51)
at neovim_client.nvim$new.invoke(nvim.clj:51)
at io.dominic.test2bencode$_main.invokeStatic(test2bencode.clj:12)
at io.dominic.test2bencode$_main.doInvoke(test2bencode.clj:7)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at io.dominic.test2bencode.main(Unknown Source)
Caused by: java.lang.NullPointerException
at com.etsy.net.JUDS.<clinit>(Unknown Source)
... 8 more
Getting this with unix sockets, I notice they're recent-ish. Do you know if they work for others & I'm being daft or..?I'm guessing it doesn't work inside an uberjar because reasons. That's very unfortunate. 😞
(ns io.dominic.test2bencode
(:require [neovim-client.0.api :as nvim.api]
[neovim-client.nvim :as nvim]
[clojure.tools.nrepl :as repl])
(:gen-class))
(defn -main
"I don't do a whole lot ... yet."
[& [socket]]
(println "Hello, World!")
(let [client (nvim/new 0 "localhost" 7777)]
(nvim.api/call-function client "Foo"
[(with-open [conn (repl/connect :port 38517)]
(-> (repl/client conn 1000)
(repl/message {:op "eval" :code "(+ 2 3)"})
repl/response-values))])
(System/exit 0)))
Runs in 1.8s ^^ I would ofc be making this into a long-running process. But very awesome regardless.Thanks for your great library @jebberjeb