3 ms·
Here is a question that I have about Clojure and its REPL. I have tried 3 times over a period of a year or so to get it to behave like a common lisp REPL and ev
by tgbugs 6y ago
Here is a question that I have about Clojure and its REPL. I have tried 3 times over a period of a year or so to get it to behave like a common lisp REPL and every single time I have hit a brick wall called project.clj and/or deps.edn (which open a terrifying black hole to maven). My simplest use case is to be able to call `(expt 2 10)` from a bare clojure install without leaving the repl. As far as I can tell it is impossible to achieve this. I finally gave up and wrote a gentoo ebuild to install the numeric tower just to see if it was possible [0]. What I learned was that I have no idea how clojure libraries interact with the JVM. `pomegranate` gets the closest but I'm still fairly certain that you can't install that from a repl without resorting to hackery [1]. I think I understand the tradeoff toward using project.clj and deps.edn to create sane and static environments for a project, but the friction is larger than nearly any other language that I have tried because you are practically forced to create a project structure in order to do anything.
0. https://github.com/tgbugs/tgbugs-overlay/blob/master/dev-java/math-numeric-tower/math-numeric-tower-0.0.4.ebuild https://github.com/tgbugs/tgbugs-overlay/blob/master/dev-jav...
1. https://github.com/clj-commons/pomegranate https://github.com/clj-commons/pomegranate
- lbj 6y agoJust install lein and do lein help new to see available templates. Or lein new myproject to get the framework for your own project. Then Cd into that folder and do lein run
- ghufran_syed 6y agoI agree that historically it’s been a bit complicated. On OSX you should be able to install using `brew install clojure/tools/clojure, the typing `clj` on the command line Or just use repl.it https://clojure.org/guides/getting_started https://clojure.org/guides/getting_started