thank you. I will try clj-xchart first
re: rewrite clj and other comments — love those community and language. Thanks team!
@stopachka i'm also a rewrite-clj* user and think it is a fine alternative -- there is also: https://github.com/carocad/parcera (which i am also a user of)
I'm trying to launch a clj project from a main entry point using the instructions https://www.clojure.org/guides/deps_and_cli#_using_a_main, but am getting the following error
$ clj -X hello/run
Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-X (No such file or directory)
Full report at:
/tmp/clojure-8241978478714474545.edn
It looks like it's trying to find the file -X
. What am I doing wrong?Also tried with this deps.edn
{:paths ["src"]
:aliases
{:main {:exec-fn main/run}}}
and this main.clj
(ns main)
(defn run [opts]
(println "Hello, World"))
running clj -X:main
same resultWhat OS? What is the output of clj -Sdescribe
?
OS is Ubuntu, -Sdescribe is
$ clj -Sdescribe
{:version "1.10.1.483"
:config-files ["/usr/local/lib/clojure/deps.edn" "/home/joe/.clojure/deps.edn" "deps.edn" ]
:config-user "/home/joe/.clojure/deps.edn"
:config-project "deps.edn"
:install-dir "/usr/local/lib/clojure"
:config-dir "/home/joe/.clojure"
:cache-dir ".cpcache"
:force false
:repro false
:resolve-aliases ""
:classpath-aliases ""
:jvm-aliases ""
:main-aliases ""
:all-aliases ""}
I believe that is a version before the -X
option was implemented.
Oooh
🤦
Thanks, will try upgrading
No facepalm required -- the Clojure CLI tools have been going through a fair number of changes this past several months, so it is easy to have an older version that doesn't have all the latest features
Works fine now, thanks very much!
hi all, how can I get (in separate lines)
"hello
world"
instead of "hello world" while running (str "hello " "world").you need a newline character then. (str "hello" "\n" "world")
or just "hello\nworld"
@dpsutton I want to concatenate some strings and get result similar to JSON format as can be seen in this example, not all on one line
{
"name": "John",
"age": 30
}
(clojure.string/join "\n" ["your" "collection" "of" "strings"])
-> "your\ncollection\nof\nstrings"
which will have the newlines you want
or if you have a known list just put newlines in there with your str
call above
@dpsutton thanks so much, it is what I wanted
Hii, I was wondering if vim-fireplace is still relevant and usable or should I just migrate to neovim and vim-iced?
Yes, it's still very much relevant. I would suggest popping along to #vim and ask 🙂 I would encourage trying out vim-fireplace, vim-iced, conjure and see which one you like the best 🙂