This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-12-08
Channels
- # adventofcode (240)
- # beginners (87)
- # boot (4)
- # cider (27)
- # cljs-dev (20)
- # cljsrn (24)
- # clojure (365)
- # clojure-argentina (1)
- # clojure-brasil (4)
- # clojure-dev (12)
- # clojure-greece (65)
- # clojure-india (1)
- # clojure-italy (15)
- # clojure-japan (1)
- # clojure-losangeles (1)
- # clojure-madison (4)
- # clojure-poland (3)
- # clojure-russia (5)
- # clojure-spec (3)
- # clojure-uk (105)
- # clojurescript (27)
- # core-async (1)
- # core-logic (3)
- # cursive (61)
- # datomic (68)
- # devcards (4)
- # docs (27)
- # duct (67)
- # emacs (15)
- # events (1)
- # fulcro (8)
- # graphql (50)
- # lein-figwheel (1)
- # lumo (15)
- # numerical-computing (1)
- # off-topic (77)
- # om (3)
- # onyx (5)
- # parinfer (3)
- # planck (2)
- # portkey (5)
- # re-frame (4)
- # reagent (16)
- # ring (14)
- # rum (3)
- # shadow-cljs (17)
- # vim (1)
oh, that's a parameter -- that must be what (p) means
OK, here's something else: I am in the debugger and I clicked on a stack frame that's in Java with no source (part of Clojure)
but the place in the decompiled source isn't the right place
@echristopherson Hmm, that’s an IntelliJ issue I think.
I seem to remember being prompted to download source, but I don't remember if it was for Java or for Clojure. But either way, I always get decompiled classes
oh, that just downloads one source file?
I see that when I download the source, it shows the right source file, but it doesn't jump to line 397
Oh, OK. Java source does show up too.
Unfortunately it’s out of Cursive’s scope, that’s the underlying JVM debugger, but it seems odd.
I can't remember what the command is called that gives you a popup menu of things you can do with the current file -- like opening it in the navigator or the OS file manager
perfect! thanks
This seems like a nice IDE platform
Here's something I've wondered about IDEs with certain languages: when you put the function name before all the parameters -- instead of putting the receiver parameter before the function name as in Java -- how is completion implemented? Like, can you invoke a function completion without having already typed a function name, but somehow specify that you want to see all the functions that take a string as first param?
Oh wow. I see you have a fork of a project called riddley -- which is named after a book I like, that I was just reading about yesterday.
Re: completion, it’s tricky. Generally for vars it’s fairly easy since the available ones don’t depend on the first argument.
Cursive handles this by doing type inference, and allowing you to do (my-obj .myMet<complete>)
Oh, for Java objects
I was just thinking that
That will then autocomplete to (.myMethod my-obj|)
, only offering methods available for the type of my-obj
if Cursive can figure it out.
Otherwise if you just autocomplete (.myMeth<complete>)
then Cursive will offer all methods available on all imported classes, plus methods available in the types of any local variables that are in scope that it can figure out.
so... (my Clojure's kind of rusty...) (my-obj .myMethod) doesn't actually work in Clojure? It has to be transformed by the IDE?
So in a case like:
(let [list (ArrayList.)
iterator (.iterator list)
(.ne<complete>))
oh! right, I am rusty... I was forgetting about the dynamic typing
Hmm, I have .next as the fifth item
Oh, OK. I thought you were saying it would put the Iterator one at the type via inference.
I'm having trouble triggering it to move .myMethod to the front
just trigger a completion from (the-list .iter|) to (.iterator the-list)
So, one thing is that right now this will only happen in a standard code editor, and not the REPL editor.
Right. I tried in both places, figuring that might be true.
Since I'm not in a REPL now, maybe I need to use a let as you did, otherwise the code sense thing doesn't know the-list is an ArrayList?
With def.
I just tried let
ting it and it worked there.
You might want to make (. the-list iter|) complete also.