This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (32)
- # beginners (27)
- # calva (4)
- # clojure (17)
- # clojure-australia (2)
- # clojure-europe (11)
- # clojure-spec (8)
- # clojure-uk (15)
- # clojurescript (8)
- # cursive (14)
- # datomic (12)
- # fulcro (36)
- # graalvm (3)
- # graphql (2)
- # jobs (1)
- # meander (1)
- # pathom (5)
- # pedestal (12)
- # re-frame (1)
- # reagent (1)
- # reitit (2)
- # testing (12)
- # vim (2)
What I always do when creating a new leiningen project is create it at the command line like you did, and then in IntelliJ, select File -> New -> Project From Existing Sources. That registers the project as a Leiningen project and loads all the dependencies, etc. If you didn’t do that, that might be why it’s giving you problems.
actually, just looking at the file tab, there was an option to add it as leiningen project, and that did the trick!
if I want to do web developement in clojure as soon as i finished the brave book, can I then better make a leiningen or a clojure-clj project ?
I personally just use clj and shadow-cljs. But getting familiar with leinigen is beneficial. Also for web dev have a look at: https://luminusweb.com/ And consider reading: https://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1680500821
Here's a small (server-side) web app that uses the Clojure CLI and
deps.edn: https://github.com/seancorfield/usermanager-example -- I would suggest making sure you understand how this works and that you can modify and enhance it yourself before trying to work with Luminus (or the Web Development book). Luminus is a lot of moving parts and uses a lot of different libraries. It's a huge step up from what you're currently working with in Brave&True.
My ideea was to start very small. A app with 3 routes and some json parsing and hiccup
and no problem to start this app very small. As I look at it Luminus seems to be overkill for this app
When I evaluate a line referencing a function, after changes were made to that function, those changes aren't being reflected when evaluating the line. Evaluating that function and then evaluating the line referencing it shows the changes. Why is that?
Yeah, so say I have a function that adds
2 to a provided number, then I realize it should be adding
3. I'll change that number to
3 inside of the function, evaluate a line referencing that function, and it'll still add
But if I evaluate the function and then evaluate the reference, that change will be reflected.
If it helps: Clojure is always compiled, even in the REPL, and compilation happens as you evaluate each top-level form. It's a good practice to get into to instinctively "eval top-level block" after every change you make to any function.
Funnily enough, I just gave a talk to the London Clojurians about this very topic... recording to be available soon!