Fork me on GitHub
#cider
<
2018-10-30
>
narendraj912:10:38

Is there a good talk on why Emacs is a great environment for Clojure development?

aisamu12:10:10

Parens of the dead convinced me on the emacs part

narendraj912:10:11

Parens of the Dead is amazing! Just watched the first video!

bozhidar12:10:00

Not sure if it’s a good talk, but there is a talk.

bozhidar12:10:31

The general arguments supporting the use of Emacs start around 26:00, but I think the whole talk can be useful to you.

bozhidar12:10:13

This talk by @plexus is pretty good as well https://www.youtube.com/watch?v=O6g5C4jUCUc

agigao13:10:09

Hey there, I'm doing kind of data analysis in Clojure and would love to print output in a separate repl frame, any suggestions how can I accomplish it?

practicalli13:10:06

@chokheli not quite sure what you are trying to do, but you can have two frames open that show the same REPL buffer. Then you can scroll in one while keeping the other at the prompt. Or you can evaluate code in the src file and send the results to the REPL. The cider-eval-pprint-last-sexp will show a separate buffer window (not the REPL or your src file) with a pretty printed result of an evaluation (`C-c C-p`) Have you also looked at the cider-inspector? http://www.cider.mx/en/latest/miscellaneous_features/#value-inspection https://practicalli.github.io/spacemacs/evaluating-clojure/inspect.html

dpsutton13:10:50

it looks like the bump of cljs-tooling from 0.2.0 to 0.3.0 broke info of vars in the same ns. Not sure where to lodge this ticket. cider-nrepl or cljs-tooling

richiardiandrea14:10:37

Answered the ticket, I can look into that just need more info. Sorry!

dpsutton14:10:04

happy to look into it as well. I just saw that you did a massive amount of work for self-hosted is all

richiardiandrea18:10:05

hello folks, I am trying to debug the issue above live from a REPL, how are the cider-nrepl deps inlined again? I am trying to require cljs-tooling

plexus20:10:50

anyone seen these guys before when doing tab completion?

1. Unhandled java.lang.IllegalArgumentException
   No matching method forEach found taking 1 args for class
   java.util.stream.ReferencePipeline$Head

            Reflector.java:  127  clojure.lang.Reflector/invokeMatchingMethod
            Reflector.java:  102  clojure.lang.Reflector/invokeInstanceMethod
                 utils.clj:  168  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/list-jdk9-base-classfiles
                 utils.clj:  150  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/list-jdk9-base-classfiles
                 utils.clj:  179  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/all-files-on-classpath
                 utils.clj:  173  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/all-files-on-classpath
                 utils.clj:  188  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/classes-on-classpath
                 utils.clj:  181  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.utils/classes-on-classpath
namespaces_and_classes.clj:  102  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.sources.namespaces-and-classes/candidates
namespaces_and_classes.clj:   75  cider.inlined-deps.compliment.v0v3v7-20180916v111245-2.compliment.sources.namespaces-and-classes/candidates
                  Var.java:  393  clojure.lang.Var/invoke

plexus20:10:17

also what the heck, seems those inlined-deps lines get hidden? I see them when copy pasting, but they're not visible in Emacs...

plexus20:10:24

this is on clojure 1.10.0-RC1

dpsutton20:10:04

@plexus are you talking about them being hidden in the stacktrace viewer in CIDER?

dpsutton20:10:17

if so hit "all" to prevent CIDER from hiding middleware errors

plexus20:10:15

thanks, that's good to know, but it doesn't fix the error itself. Seems there's an incompatibility with Clojure 1.10, as it works when I switch to 1.9. I'll file an issue.

dpsutton20:10:12

looks like it is with compliment. i believe he wanted more testing before finishing a release

dpsutton20:10:26

also include your java version with the ticket. i suspect that's the issue

dpsutton20:10:31

are you on 11?

dominicm20:10:07

There's newer Clojure 1.10 versions I think. This may be related to some other bugs that have been reported.

dpsutton20:10:37

there's another rc, then a beta after this one, yes?

plexus20:10:48

Java 10, Clojure 1.10-RC1 which is the most recent release https://mvnrepository.com/artifact/org.clojure/clojure

plexus20:10:48

ok, that's not confusing at all

dpsutton20:10:03

lol ¯\(ツ)

plexus20:10:44

still the same on beta4 though

dpsutton20:10:59

and which version of java?

plexus20:10:18

;; CIDER 0.19.0snapshot (package: 20181024.1017), nREPL 0.4.5
;; Clojure 1.10.0-beta4, Java 10.0.2

dpsutton20:10:47

can you easily change java versions?

dpsutton20:10:03

i thought java 10 was best ignored at the moment? focusing on 8 and 11

dpsutton20:10:10

(not a huge java person though so i'm not sure)

plexus20:10:17

funnily enough this java comes in a package called openjdk-11...

plexus20:10:22

ii  openjdk-11-jre-headless:amd64                10.0.2+13-1ubuntu0.18.04.2                  amd64        OpenJDK Java runtime, using Hotspot JIT (headless)

plexus20:10:31

apparently ubuntu decided to package openjdk 10 and call it 11... https://dzone.com/articles/installing-openjdk-11-on-ubuntu-1804-for-real wth?

plexus20:10:59

installing 11 now...

plexus20:10:42

still there on Java 11

vigilancetech20:10:41

basic "hello world" example for shadow + hoplon + electron (w/reload) (w/rock solid cider nrepl connection): https://github.com/vigilancetech-com/shadow-hoplon-electron

plexus20:10:04

@vigilancetech cool stuff, did you mean to post this in #announcements perhaps?

vigilancetech20:10:36

yeah, I could do that. Think this is a bad place?

vigilancetech20:10:35

it seemed like kind of a big deal to get these three married + cider (as REPLing in boot has been somewhat of a headache lately)

dpsutton20:10:43

it might appeal to a wider audience 🙂

plexus20:10:03

I see, I didn't immediately see the link to CIDER based on your description

dpsutton20:10:19

(in addition to the people here I mean)

richiardiandrea20:10:54

I think it is not the Java version, I am running on old Java but against 1.10.0-alpha8 and I see the warnings

plexus21:10:22

it definitely has something to do with the clojure version, as it doesn't happen on clojure 1.9

plexus21:10:36

trying to dig into it, seems to error happens in some gnarly reflective calls

dpsutton21:10:10

i've heard some of these crop up by adding overload methods so we get ambiguous calls and die

dpsutton21:10:24

not sure if that's what is happening here of course but just one thing i've heard can cause this

dpsutton21:10:35

which is why i suspect java 11

dpsutton21:10:45

can you try in clojure 1.8?

dpsutton21:10:09

oh it doesn't happen in 1.9 sorry

dominicm21:10:53

Clojure changed it's reflection code.

dominicm21:10:10

#clojure-dev will be more help 😊

bozhidar21:10:45

Ping @alexyakushev about the compliment issues.

dpsutton21:10:35

he's asking in #clojure-dev right now

bozhidar21:10:38

We’ve got a bit of filtering code here and there to hide the inlined deps. It’s not pretty, but there aren’t many alternatives either.

plexus21:10:00

Ghadi gave me some more tips in a PM, seems hinting the target of forEach to be a java.util.stream.Stream does the trick

plexus21:10:27

any pointers on testing CIDER with my local version of compliment?

bozhidar21:10:49

@plexus Yeah. Just lein install compliment and then lein installl cider-nrepl.

bozhidar21:10:58

That’s how I just stuff like this myself.

dpsutton21:10:22

There's a build.sh script for cider nrepl to do the deps correctly

plexus21:10:25

seems I had to do a make install because of the inlined compliment, but now it's working

bozhidar21:10:38

You don’t really need to isolated the deps, but if you want to, there’s a build.sh script in cider-nrepl that wraps the lein commands.

plexus21:10:39

will push a patch to compliment, yay 🙂

bozhidar21:10:54

./build.sh lein install

plexus21:10:07

so make isn't meant for direct consumption? are these release scripts documented somewhere?

dpsutton21:10:40

I think the read me has a section. I followed it this morning

plexus21:10:58

you are absolutely right...

richiardiandrea21:10:27

I think I will need to do the same for fipp, I see the same warnings

plexus21:10:58

in my case it was an error, not a warning, but I think the warnings might mean you'll be in trouble with future versions of java

plexus21:10:50

the issue here was that the object .forEach was being called on was a instance of a private inner class (`ReferencePipeline$Head`). Because the class is private Clojure refused to find a method that we could access. By type hinting it to its public interface the issue goes away, because in that case the reflector is skipped entirely. (at least that's my understanding)

dpsutton21:10:57

I'm sure ghadi will make this all clear in his talk in North Carolina

richiardiandrea21:10:14

it is actually core.rrb (for node?) which is writing stuff

richiardiandrea21:10:36

not really up to date with the latest contrib libs 😄

plexus22:10:37

just running into this now as well, apparently on Java 11 fipp just errors out

mathpunk22:10:54

I've discovered that if I send something to the repl from the buffer, and it's something that causes an error, then sending forms no longer sends a concluding <RET>. I have to switch to the repl and hit enter myself. My guess is that it's something to do with ansi(?) codes? Like the character for "make this text angry and red" somehow messes up subsequent commands?

mathpunk22:10:10

1) Is that plausible? 2) What should I do about it?

dpsutton22:10:32

that is a super interesting bug @mathpunk

dpsutton22:10:06

can you create an issue with how to trigger it? like how you send it to the repl (insert last form), whatever, and even a sample form that triggers it for you

dpsutton22:10:24

i can help you look into it and help you dig if you like

richiardiandrea22:10:02

can it be related to the Text read-only problem with the send?

mathpunk22:10:47

I'm filling out an issue now --- examining closer, I've discovered that sending the ns works, sending the full buffer works, but send-function, send-region, and send-last-sexp have this behavior

dpsutton22:10:17

that is super neat

dpsutton22:10:27

bad for you but maybe the fix will be interesting 🙂

mathpunk22:10:43

hm.... I'm not quite sure how to get the relevant system info tho

mathpunk22:10:32

;; CIDER 0.19.0snapshot (package: 20181021.830), nREPL 0.2.12 ;; Clojure 1.9.0, Java 1.8.0_192 ^--- suffices?

mathpunk22:10:38

may my suffering provide amusement 😛

michal23:10:21

hi. out of my curiosity, what's the "preferred" way to hot-load dependency with cider (or clj-refactor, if possible)? I tried to dig in refactor-nrepl issues and the only tip I found was non-existent https://nrepl.readthedocs.io/en/latest/usage/#hot-loading-dependencies

michal23:10:03

seems like cljr-hotload-dependency ends up with user-error: Temporarily disabled due to make the middleware run with Java 10.

michal23:10:54

in worst case, is there any alternative way to hot-load dependency in a project based on tools.deps?