Fork me on GitHub

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.

parrot 1
agata_anastazja (she/her)20:01:37

actually, just looking at the file tab, there was an option to add it as leiningen project, and that did the trick!


for the future, you can right click on project.clj or deps.edn files and import it


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: And consider reading:


clj; back or front -end, or both?


Here's a small (server-side) web app that uses the Clojure CLI and deps.edn: -- 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.

👍 1

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

Scott Meyers22:01:41

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?


can you be a bit more specific what "changes were made to that function" means?

Scott Meyers22:01:32

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 2.

Scott Meyers22:01:44

But if I evaluate the function and then evaluate the reference, that change will be reflected.


right. you need to reevaluate the function


until you reevaluate it with 3, the function exists but with the value of 2.

Scott Meyers22:01:15

Cool, thank you! Just taking some getting used to on my part.


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!

Scott Meyers23:01:53

Awesome, that does help! I'll keep an eye out for the recording.