Fork me on GitHub

I'm trying to organize a (conceptual) package as multiple Leiningen-based projects. I already have the two main ones: my server and client, based on Pedestal/Vase and the re-frame template with Figwheel; both using Cider/Emacs. I now need to create a small project of shared code -- initially just a few functions in a .cljc file, but I assume it will grow with time. What tooling should I use for this? Is there any sample template to get me started? What best practices do I need to follow so that changes to the shared code project will be exposed, as painlessly as possible, to my dev client and server?


@deg I'm not very familiar with releasing cljs and .cljc files, but perhaps leiningens "/checkouts" directory can help you there. If you symlink the common code project in /checkouts folder under the dependent project it will use it as dependency instead of clojars for example.


Thanks. That definitely seems like it will be one piece of the puzzle.


just be aware that to use checkouts, you first need to run lein install in the project accessed via checkouts


but after that, the project that has it checked out will see updates without you needing to repeat the lein install (at least, until you change the version number of the project)


in fact, since lein install is needed anyway, I skip checkouts, use lein install, and run load-file to access new definitions from the library as I edit it


i've got question i know it's subjective


i've watched a lot of clojure talks on youtube and some of them say that SICP book is extremely beneficial


this is my second time starting to read it


and it feels like i am forcing it. it puts so much strain on me


it's hard but when something is hard in a fun way - you think about it all the time trying to find solution it's fun it motivates you but this seems to be hard on like - oh thank got i dont have to think about it anymore


should i tryhard and force myself to read and study SICP? is it really worth it as people say it is?


lepistane: depends; what is your goal, and how much programming have you done? if you just need to get started with functional (lispy) programming, a much better 1st book is;oq=little+schemer&amp;aqs=chrome..69i57j0l3.7898j0j4&amp;client=ms-android-verizon&amp;sourceid=chrome-mobile&amp;ie=UTF-8 warning: it's almost unbearably cute, but it covers all the most important stuff very concisely. go to sicp after you read it.


One of the problems with a lot of these Scheme based books is that they focus on the wrong things, imo. Recursion vs iteration is good to know. And how to walk a tree is something that should be learned, but all that pales in comparison to immutable data.


So I'd focus more on immutability, and concurrency in Clojure, then move on to SCIP and little schemer if you want to branch out a bit


i think it depends on where you're starting from. i read (parts of) sicp before i came across the little schemer, but it was the latter that really made me understand not just recursion but common patterns in lispiness. immutability it a whole 'nother matter, imho. it's a lot more complicated than clojure folks make it sound.


actually i think immutability is on of the more arcane features of clojure. it's really a misnomer; it doesn't mean "no changes", it means "controlled changes".


@lepistane The book is hard going. I think the videos of the lecture series are much more approachable so perhaps try those for a first time through and then go back and read the book? (this page explains that the videos follow the 1985 edition of the book etc)


@seancorfield Thanks for that link - coincidentally, I found out about SICP last night. I'll be sure to check out the lectures if they're a good intro 🙂


I find these videos surprisingly comfy in an unusual way