Fork me on GitHub
#cider
<
2018-04-27
>
manuel12:04:44

hi guys, question: is it already possible to switch to cider/piggieback as explained in the manual (https://cider.readthedocs.io/en/latest/up_and_running/)?

dominicm13:04:27

@manuel yep

manuel13:04:38

ok thanks, I'll try asap and come back if I have problems.

bozhidar13:04:45

Just see if @bhauman has cut a version of figwheel supporting it yet. He added recently support on master, but I don’t know if some stable release happened afterwards.

bhauman13:04:22

@bozhidar @manuel 0.5.16-SNAPSHOT

manuel15:04:00

fantastic, using latest snapshot from @bhauman makes everything work smoothly. Thanks again.

bhauman19:04:28

@bozhidar I'm going to do a bit of piggieback tweaking, specifically I'm going to respect some of the cljs repl-options like :caught :wrap

bhauman19:04:17

and I might add one called :caught-warning

bhauman19:04:23

@bozhidar also I think a huge win would be to parse file positions for cljs-compiler eval errors in a way that's helpful for cider.

bhauman19:04:24

I've already done the work for parsing file line column info from cljs compile syntax errors, and warnings

bozhidar19:04:27

Oh, yeah - that’d be amazing!

bhauman19:04:51

also JavaScript Env runtime errors could work as well

bozhidar19:04:17

Btw, in a similar line of thought - I was wondering what to do with https://github.com/clojure-emacs/cljs-tooling

bozhidar19:04:35

I haven’t given it much thought it a while, but it has served us well for completion and var info for quite a while. Is this still the best way to go? Should we fold this into orchard? Is someone using it outside of CIDER?

bhauman19:04:47

I'm using it!

bhauman19:04:56

I'd keep it as is

bhauman19:04:14

and add functionality to it

bhauman19:04:37

You are wanting a unified API for CLJS and CLJ?

bozhidar19:04:23

Yeah, this was the original plan, but it’s maintainers stopped working on the project and it remained with just 2 functionalities out of the many that were planned (originally it was planned to support everything CIDER needed to match the CLJ functionality).

bozhidar19:04:07

Well, I want the users to get a similar experience, an unified API would be a small bonus for me, but it’s not important. The underlying features, however, are quite important.

bozhidar19:04:27

I just don’t know how far can this approach of inspecting the compiler state get us - I’m assuming for many things eventually we’ll have to evaluate some code, the way we do for Clojure.

bhauman19:04:38

they really are different worlds

bozhidar19:04:19

I figured as much. 😄

richiardiandrea20:04:16

I have a WIP germ of a PR for porting cljs-tooling to self-host so I think it should stay

richiardiandrea20:04:42

Self-host has the cljs env available so that lib is awesome for lumo

richiardiandrea20:04:11

(just a data point)

clojer20:04:50

Adding a new library with , r a p crashes beginning with: cljr--get-error-value: Error in nrepl-refactor: clojure.lang.Compiler$CompilerException: java.lang.ClassNotFoundException: sun.misc.Launcher, compiling:(mranderson048/alembic/v0v3v2/dynapath/v0v2v3/dynapath/defaults.clj:29:3)

benedek20:04:45

Are you using java9 @clojer?

clojer20:04:00

Java 10 actually

benedek20:04:18

add proj dependency is not supported in java9 unfortunately because of the changed class loader hierarchy in java9

benedek20:04:31

Haha well since java9 then

benedek20:04:58

No workaround atm apart from downgrading to java8

clojer20:04:19

Great. Look like it’s Cursive then 😞

benedek20:04:22

I investigated this a while back and we need to rewrite the feature essentially for java9 and above

benedek20:04:03

Add project dep is the killer feature for you? ;)

benedek20:04:24

I mean rest of cider and clj-refactor should be fine with java9+

clojer20:04:25

Well, I watched someone on YouTube using it and I thought …. I must have that.

clojer20:04:03

Saves a lot of time not having to reload lein/repl.

benedek20:04:39

Haha ok. Fair. Apart from riding the edge what keeps you on java10?

clojer20:04:05

Learning new stuff. Always useful.

benedek20:04:13

I know i use it a lot specially on newish projects

clojer20:04:18

But my Clojure project is picking up steam so maybe I’ll just drop back to Java 8.

benedek20:04:46

Well as i said you have multiple OPTIONS: downgrade, use emecs wo / this particular feature, do PR for me ;)

clojer20:04:48

I’m no expert but isn’t the new frequency of Java updates going to pose problems for Clojure?

benedek20:04:59

And yeah cursive too

clojer20:04:23

This is where hosted languages become a pain.

clojer20:04:28

I imagine something like Kotlin having an easier time with Java upgrades.

benedek20:04:43

Don't think so. For prod projects the least as companies tend to be very conservative in upgrading. But don't think clojure as such has anything breaking in newer versions

benedek20:04:06

And then clojurescript is ofc a completely independent story

clojer20:04:23

Not so much breakage but not being able to take advantage of new features.

benedek20:04:49

This particular feature is a very specific corner case really

clojer20:04:17

I mean does Clojure 1.9 even take advantage of Java 8's lambdas?

benedek20:04:59

why should it?

clojer20:04:02

… or it’s stream API?

clojer20:04:50

I’m speculating but if Clojure functions were defined as Java 8 lambdas wouldn’t they gain something?

benedek20:04:57

I may be wrong here but clojure is a functional language from the beginning with lambdas, anon fns and the like. Also with immutability and lazy seqs

clojer20:04:15

As time goes by I also imagine there will be parts of the new SDK which are defined in terms of the new Java features making them inaccessible to Clojure if it’s based on Java 8, no?

benedek20:04:30

Java is catching up to all this in a sense (and all the stuff in scala ofc)

benedek20:04:47

Now it is possible that the clj complier could/can benefit from new java features if they go deep enough eg. to a bytecode level

clojer20:04:59

Although Clojure is functional, as you say, it’s implemented in Java classes as far as I’m aware and it’s creation predates Java 8 lambdas and streams so your typical Clojure function is probably a plain old Java class behind the scenes.

benedek20:04:43

perhaps i am no @reborg to know the compiler internals on a friday night ;)

clojer20:04:01

Hehe. Gotta go now. Cheers.

bozhidar22:04:15

@clojer Clojure targets Java 6(!!!), so it’s not taking advantage of anything introduced in Java 7+.

bozhidar22:04:43

@richiardiandrea Nice!

richiardiandrea22:04:02

it will be when finished 😅

bozhidar22:04:02

Lately I’ve been more interested in ClojureScript, therefore me wandering how we can improve the related libs.

richiardiandrea22:04:49

just because you never know how it is going to end up, I opened a WIP PR there

richiardiandrea22:04:02

(not working at the moment)