top | item 31586836

(no title)

Deadron | 3 years ago

The tooling is far from simplistic to setup and the available options can be overwhelming. Its all the pain of the JS stack but with less easily available help and tooling that produces less helpful error messages.

discuss

order

didibus|3 years ago

I think the tooling nowadays is pretty simple to setup, but the information out there doesn't speak to that new simple way, so everyone starting is following something that pushes them to outdated tooling.

Install Java:

    brew tap homebrew/cask-versions
    brew install --cask temurin17
Install Clojure:

    brew install clojure/tools/clojure
Type `clj` at the command line and play with Clojure!

Now install VSCode and get the Calva plugin for Clojure from the marketplace.

That's it. You'll have autocompletion, jump to definition, code formatting and highlighting, linting, support for editor integrated REPL, debugger, etc.

Then you can run:

    clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.9"}' :as new
And now you can create new projects from various templates using:

    clojure -Tnew app :name myusername/mynewapp
This creates a new basic application project for example. Open it in VSCode and you can connect a REPL to it and start working.

wry_discontent|3 years ago

The errors are bad, but understandable in 99% of cases with a little experience (like 2-3 weeks).

And the stuff about the tooling is flat out wrong. The CLJS tooling is light years ahead of JS tooling in my experience. Maybe that was different back in the day, but shadow-cljs is seamless. Vastly superior to working with package.json/babelrc/postcssrc/webpack.config.js/etc/etc/etc

lenkite|3 years ago

If you are going to compare modern CLJS tooling against JS - you should also compare against modern JS tooling like esbuild/vitejs which operate at light-speed.

CraigJPerry|3 years ago

I don’t think it’s that

    $ npx nbb -e (println "Hello, world")
    Need to install the following packages:
      nbb
    Ok to proceed? (y)
    Hello, world
Or more comprehensively: https://clojurescript.org/guides/quick-start

Deadron|3 years ago

Your example is missing anything actually related to rendering a webpage.