This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-26
Channels
- # announcements (4)
- # beginners (160)
- # boot (2)
- # calva (40)
- # cider (41)
- # clara (24)
- # cljdoc (2)
- # cljs-dev (99)
- # clojars (4)
- # clojure (71)
- # clojure-dev (9)
- # clojure-europe (4)
- # clojure-italy (2)
- # clojure-nl (19)
- # clojure-spec (97)
- # clojure-uk (103)
- # clojurescript (57)
- # core-logic (1)
- # cursive (15)
- # data-science (31)
- # datomic (24)
- # duct (1)
- # emacs (39)
- # events (7)
- # figwheel-main (14)
- # fulcro (44)
- # garden (7)
- # jobs (13)
- # juxt (1)
- # leiningen (29)
- # music (2)
- # nyc (4)
- # off-topic (37)
- # pathom (12)
- # re-frame (26)
- # ring (1)
- # ring-swagger (10)
- # shadow-cljs (35)
- # spacemacs (2)
- # specter (4)
- # test-check (67)
Newbie question: when you’re doing “REPL-driven development”, typing forms into a .clj file, sending them to the REPL, where do you store all these scratch / demo .clj files?
On the one hand, I don’t want them to be under ./src
, because all the def
forms I often use are evaluated when I do lein run
. I’d like to keep all the demo / scratch code separated from the “real code.” (Code that I knows works.)
On the other hand, I think Cursive needs them to be under ./src
in order to be sent to REPL. (Is this true?)
Where do y’all store these types of scratch files? (I heard that people use the “user” namespace? But can you store these under ./src
, too?)
Thank you for indulging my basic question!
You can create IntelliJ scratch files (Ctrl-Shift-N on a Mac) and cursive will send them to the repl correctly
some people use a "siderail" directory for stuff like that
I don't honestly know the origin of that as a word for this use
At the bottom of your Projects sidebar, there’s a section called Scratches and Consoles, containing a folder called Scratches, where all the scratch files live.
(which I didn’t know for a long time, and I had a ton of files there when I figured it out--apparently they’re IntelliJ-specific, not project specific, so I had them from every project I ever worked on.)
Whoa @alexmiller @manutter51. 🤯🤯🤯🤯 Wow. THANK YOU!!! Can’t wait to try it out!!!
Our group also has a convention of adding a personal
directory to a project, and each dev creates their own personal scratch file in there. The personal
dir shows up in the :source-paths
under the :project/dev
profile, but not under the :prod
profile, so we have access to them in dev but they don’t get included in the final build.
The personal
files all get checked in to source control, which I think is a net benefit, and sometimes leads to inadvertently sharing tribal knowledge.
@manutter51 "personal" directory. Fabulous idea. I just investigated the Scratches feature — all these files are stored in the IntelliJ config directory. I'll have to think about how I use this... I love the idea of putting these files into source control, along with the rest of the project. (I'll let you know what direction I end up going in. But I'll definitely be incorporating one of these approaches!) Thanks, all!
:thumbsup:
you've probably seen this already but the 2019.1 EAP with runtime jdk11 triggers this error on startup:
java.lang.ExceptionInInitializerError Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Provider PluginClassLoader[com.cursiveclojure.cursive, 1.8.1-eap3-2019.1] com.intellij.ide.plugins.cl.PluginClassLoader@15e50820
@manutter51 "personal" directory. Fabulous idea. I just investigated the Scratches feature — all these files are stored in the IntelliJ config directory. I'll have to think about how I use this... I love the idea of putting these files into source control, along with the rest of the project. (I'll let you know what direction I end up going in. But I'll definitely be incorporating one of these approaches!) Thanks, all!