This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-02
Channels
- # asami (5)
- # aws (16)
- # babashka (41)
- # babashka-sci-dev (44)
- # beginners (157)
- # biff (3)
- # cider (1)
- # clj-commons (1)
- # cljdoc (22)
- # clojure (7)
- # clojure-dev (5)
- # clojure-europe (13)
- # clojure-nl (1)
- # clojure-uk (1)
- # clojurescript (17)
- # core-typed (13)
- # cursive (14)
- # datascript (10)
- # events (1)
- # fulcro (2)
- # graalvm (2)
- # gratitude (1)
- # jobs (3)
- # lsp (229)
- # pathom (2)
- # pedestal (3)
- # portal (53)
- # re-frame (7)
- # remote-jobs (1)
- # spacemacs (14)
- # xtdb (6)
Was told I may have better luck here, so x-posting:
> Anyone know of good no-frills guides for getting a minimalist ClojureScript project up and running from scratch, that integrates well with IntelliJ/Cursive? I've been out of the CLJS game for a while and frankly what's out there from my searches is pretty confusing to me. I'd prefer to take a deps.edn
and/or shadow-cljs
route if feasible. Ultimate goal is to get a Reagent site going, if that changes anything
I’d recommend just using the Shadow documentation for the initial project setup, it’s what I use for my CLJS projects and it works well. I just use plain Shadow but it’s easy to combine with deps as well if you want to. Thomas is a Cursive user and is super responsive in the #shadow-cljs if you get stuck. Once you have the basic project set up then any Reagent tutorial should do, I think.
Thanks! I like that approach (avoiding deps.edn
), since my current goal is to minimize complexity. I think shadow-cljs pom
did the trick for getting Cursive to see Reagent properly
hi! how can I profile Clojure code via Intellij? I've tried to start a REPL using the intellij profiler, but it pops up a red window saying cannot patch configuration, as described in this ticket: https://github.com/cursive-ide/cursive/issues/2514 . Any hints/tips how to do profiling? thanks! (sorry for the repeated question, but got absolutely no reaction a week ago)
Hi. My advice does not specifically address your question, but may be helpful nonetheless: I recommend clj-async-profiler: https://github.com/clojure-goes-fast/clj-async-profiler Works great, very little hassle. There is also tufte, though you need to manually tell what to profile: https://github.com/ptaoussanis/tufte. Neither is specific to Cursive.
One small note: "Our" Clojure JVM containers running in the cloud (Azure Container Instances) are not able to use clj-async-profiler due to some kernel restrictions... So there profiling something "live" in production/stage we need to use tufte.
Cursive doesn’t have any explicit functionality for profiling, and I haven’t had a chance to look at that issue, sorry.
@U0567Q30W the issue is about allowing the intellij built-in profiler to cooperate with Clojure. Maybe there is only some small issue preventing the start of a cursive REPL with profiling and if that would work, cursive would gain profiling "for free"
@UGJE0MM0W thanks! Tufte I've tried but - as you say - manually adding all relevant functions is kind of a hassle. The clj-async-profiler looks good, I'll give it a try! thx
Curious if it is possible to use Cursive and Cider at the same time. In particular, is there a way to use the nrepl-refactor middleware with Cursive?
No, there isn’t, sorry. Cursive does allow you to define REPL commands which you might be able to hook up to refactor-nrepl, but I’m not aware of anyone having done it, and it’s likely tricky since it expects you to be using middleware.
Ah okay. I think I've got most of what I was after by starting the nrepl first with Cursive, and then connecting to that repl with Cider. Doesn't have the refactor middeware of course, but by hooking up clojure-lsp I get most of that functionality at the cost of ~ 2GB more RAM. Thank you for Cursive by the way, it has been very helpful! I learned both Clojure and Emacs at the same time. Took a bit to get everything going. I am very impressed with how much Cursive does for you out of the box. Great UX.