This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-03
Channels
- # aws (1)
- # bangalore-clj (3)
- # beginners (3)
- # boot (9)
- # business (1)
- # cljs-dev (72)
- # cljsjs (7)
- # clojure (86)
- # clojure-austin (1)
- # clojure-belgium (4)
- # clojure-brasil (14)
- # clojure-conj (3)
- # clojure-dev (10)
- # clojure-italy (4)
- # clojure-poland (14)
- # clojure-russia (36)
- # clojure-spec (144)
- # clojure-uk (50)
- # clojurebridge (1)
- # clojurescript (160)
- # clr (2)
- # core-async (8)
- # cursive (56)
- # datomic (34)
- # devcards (3)
- # emacs (2)
- # ethereum (1)
- # events (3)
- # hoplon (21)
- # jobs (2)
- # leiningen (9)
- # luminus (3)
- # off-topic (1)
- # om (26)
- # onyx (42)
- # pedestal (29)
- # protorepl (1)
- # re-frame (43)
- # reagent (26)
- # rethinkdb (4)
- # ring-swagger (4)
- # spacemacs (5)
- # specter (4)
- # untangled (102)
- # vim (43)
- # yada (10)
Should I set an "if-let"-style macro to mimic resolution of "let"? Is that considered "close enough" to do the right thing?
Yes. The only issue is that the bound variable will be incorrectly available in the else clause.
Actually, after trying it out more carefully, it looks to me like maybe Indent of "0" works like functions do.
That might be true, actually, depending on whether I specified that "body" values should all be indented two spaces, or should all be aligned - I can’t remember off the top of my head.
Well, I think I've successfully got Cursive recognizing for indenting and resolution purposes the cond, if-let, when-let, and defnc constructs in my better-cond library. Thanks. Only issue remaining is that if I use the "rename" feature of require, Cursive doesn't recognize the new names (I filed an issue about this yesterday). I want to rename defnc as defn, so that's an issue for me, but for now I'll avoid renaming.
Yes, someone else reported a similar issue - I’ll look into that since I added support for that and I believe it has unit tests. Something may have broken though.
@kenny @bfabry BTW I just looked into the namespaced maps issue. Here’s how this works: nREPL has a middleware called pr-values
, which is responsible for converting values into strings to be passed back from the server to the client. This currently just calls pr
, and is supremely un-customisable: http://dev.clojure.org/jira/browse/NREPL-55
I checked that Cursive’s pretty-printing will happily pprint whatever is returned from that, so I may be able to customise this at some point.
After a little more investigation, I commented over here: https://github.com/cursive-ide/cursive/issues/1541#issuecomment-251011925
This might be a bad idea, but is there any way to run leiningen tasks from within cursive? I see there's a run external tool option when adding a new REPL config, but I haven't tried it with anything. Really it's just me being lazy so that I can run lein ancient
without having to open a command prompt on Windows, so it's about as low on the list of importance as it gets.
@shaun-mahood Yes, you can create a Leiningen run configuration.
Great, thanks! One more win for laziness.
@kenny I’ve fixed the source root outside of project root problem for the next EAP, so you should be good to do your boot magic when that drops.
@shaun-mahood I’ve actually considered integrating lein-ancient into Cursive, so you could just see the warnings in the IDE all the time, and perhaps fix them with a quickfix. I haven’t looked at what lein-ancient does in enough detail to know how feasible that is, though.
@cfleming: That would be kind of cool, not sure how much effort it would be worth though - seems like a nice bit of polish if you have nothing else to do 🙂
@shaun-mahood Well, that might not be for a while 🙂. But I’m planning some lein support upgrades using IntelliJ’s repo indexes, so it might fit nicely with that.
Is there a way to move back and forth from editor to REPL with keystroke? Is there a way to disable that ESC moves from REPL to editor ? (sometimes when I use ESC to stop the auto-complete in the REPL, it moves me back to the editor when that's not what I want)
there is a keybinding for focus on repl, I use that. I haven't found an equivalent 'jump back to editor' binding
anyone else having issues with reloading of transitive namespaces when using the “Sync files in REPL” action?
it will load the file that was changed, but not others that require it and are loaded in the REPL
@puzzler You can bind keys to jump to the editor and to the output pane, but there’s no way to disable ESC as the way to jump back. That’s a UI rule that is pretty hard and fast in IntelliJ, although it has some bad side effects (especially for Vim users).
The actions for REPL jumping are under Tools->REPL->Jump to REPL Editor and Tools->REPL->Jump to REPL Output Pane.
@spieden There’s a config item that controls that - have you unselected that somehow?
Settings->Languages & Frameworks->Clojure->Load out-of-date dependencies transitively
hmm, i do have that issue where lein deps can’t resolve due to the cred environment variables for my private repo not being used
Oh, one thing in your question - sync files in REPL will reload changed files in dependency order. It will not reload namespaces that depend on changed items, if they haven’t been changed themselves.
So that one doesn’t actually do anything for “Sync files”, since that will load all changed files anyway.
However for “Load file in REPL” it controls whether that file’s modified deps are loaded first.
I’m open to opinions as to whether namespaces that depend on changed files should also be reloaded.
ah so if i go back and “Load file” in my core namespace that will pull in everything that changed?
for when you get back: my use case is modifying the code of a persistent service and wanting to test the changes. i expected “sync files” to go up the dependency tree from the file i modified and load everything back to the core namespace. then i stop/start the service to clear the stale bytecodes from memory and test my changes with the fresh ones
if cursive could run a line of my choosing in the REPL after the sync this would be down to a single keystroke