Fork me on GitHub
#calva
<
2019-10-31
>
mattly03:10:03

@pez woo! it remembered to keep the repl in the main split pane!

metal 1
mattly04:10:23

btw, finally got off my keister and sponsored the project

❤️ 1
pez05:10:25

Thanks, @mattly!

pez06:10:14

The sponsorship program went online just a few days ago, so you are among the very first to sponsor me, btw. 😍

pez08:10:03

Psst, Calva-friends! I have good news. The Calva Team is now a gang of four, with @brandon.ringe agreeing to join more officially as a team member. Brandon has been a steady contributor, with feedback, and code, and advice for quite a while now. It is my great pleasure to announce this!

sheepy 2
🍺 2
naproxen10:10:32

Now I am using your new build pez. It works without problem and features works as expected so for. Btw is it possible to not have termial show up when we connent to repl.

naproxen10:10:19

I didn't see option for not opening repl windows on connect. It's not on changelog neither will it be available on next update or I failed to find ? 😄

Filipe Silva11:10:23

heya @pez, have you considered a slamhound-like feature in calva? https://github.com/technomancy/slamhound

Filipe Silva11:10:39

slamhound itself doesn't seem to work with clojure 1.10 (https://github.com/technomancy/slamhound/issues/99) nor with clojurescript (https://github.com/technomancy/slamhound/issues/96)

Filipe Silva11:10:44

the auto-namespace functionality sounds like a good fit for an editor extension though

Filipe Silva11:10:12

as it already contains the necessary information to act on it (current file path, repl access)

dominicm11:10:13

This can be found in the refactor-nrepl middleware

Filipe Silva11:10:36

really? is there a way to use it in calva?

Filipe Silva11:10:44

that'd be great

kstehn11:10:32

yes thats the reason why i stopped right know to add refactor-nrepl into calva started a branch a while ago but didnt add to much because with cljs/cljc i hit a wall

dominicm11:10:22

Hard problem to solve. Trin is promising. If someone was keen to pick up refactor I'm sure benedek would be open to that.

pez11:10:12

@m373h4n I think you failed to find. But it could also be that I failed to include it. Will check.

borkdude13:10:47

@dominicm maybe clojure-lsp can also do it? (not sure!)

pez14:10:32

I think that what we need is a common library for building (and preferably sharing) the AST across multiple use cases. Right now Calva builds several ASTs for the same text, and clj-kondo and clj-refactor also builds their own, in their own ways... It's a bit crazy and kittens die.

snoe14:10:19

yup, trin is a great idea.

borkdude14:10:38

> Right now Calva builds several ASTs for the same text Well, that's something within the scope of one project, seems like a good starting point 😉

borkdude14:10:52

@snoe maybe trin and clojure-lsp could join forces

snoe14:10:55

Yea, I'd be happy to convert lsp to it and contribute but I barely have the bandwidth for lsp.

pez14:10:58

> Well, that's something within the scope of one project, seems like a good starting point 😉 Fair enough. 😃 And we should consider trin for it.

borkdude14:10:13

cc @benedek

borkdude14:10:32

We have summoned you, benedek. Welcome. 👻

benedek14:10:03

just reading some of the history

benedek14:10:22

happy to hear that trin considered a good idea. had some time to work on it in September. more specifically on integrating it with cider-nrepl. but far from finished and not much time to work on it now unfortunately

benedek14:10:54

so trin is still very very early days

borkdude14:10:25

it would also be nice if people can build on @lee's rewrite-cljc so it will be compatible with CLJ and CLJS

borkdude14:10:41

We have summoned you, Lee. Welcome. 👻

lread14:10:08

hello there!

benedek14:10:35

i was keeping an eye on that but it seemed it is not yet ready to be used. maybe i got confused

lread14:10:43

oh rewrite-cljc. ya, I should release that sometime, eh?

borkdude14:10:50

if I'm not mistaking it's almost ready right Lee?

borkdude14:10:53

(no pressure!)

lread14:10:05

yeah, don't have many todos left.

lread14:10:23

but I keep getting distracted by other fun things. Too many fun things.

lread14:10:32

what's your timeline? are you ready to use it yesterday? or in a month? or?

borkdude14:10:20

I guess there's no deadline for any of these tools, but if there's no foundation, there's nothing to be built upon it 🙂

borkdude14:10:34

and everybody will make their own fork of rewrite-clj

lread14:10:58

ya... I guess that would be a bit sad.

borkdude14:10:02

clj-kondo has one, clojure-lsp has one, trin probably has one too

borkdude14:10:46

(ah trin still uses the original)

borkdude14:10:21

I'm not sure how clj-kondo could use rewrite-cljc though, as it has different needs (it doesn't rewrite, only analyzes) and quite some changes to it already

borkdude14:10:32

but for future rewriting-tools, I think that's the way to go

lread14:10:38

ok, after I finish up my current distraction, I'll hop back over to rewrite-cljc and work towards a release.

👍 4
borkdude14:10:11

if there is enough interest in clj-kondo on CLJS though, I would maybe incorporate bits of rewrite-cljc

lread14:10:07

ok, the need is there, I'll dive back in soon

borkdude14:10:48

even if it wasn't only about CLJC, it would be awesome if rewrite-clj had a future, because the original author doesn't respond anymore

lread14:10:00

yes, so true. I will be releasing under clj-commons...

borkdude14:10:57

❤️ ❤️ ❤️

borkdude14:10:07

I hope it will be compatible with graalvm too

borkdude14:10:36

if not, I'm willing to contribute to that

borkdude14:10:20

having low latency rewrite tools is super handy

☝️ 1
lread14:10:05

cool, @sogaiu was experimenting with graalvm-ability of rewrite-cljc, but did not get it going yet.

mattly14:10:41

I hate to say it but gofmt and prettier actually make writing go and js tolerable

Filipe Silva15:10:25

the formatting side of it is handled pretty well with zprint though

Filipe Silva15:10:36

you can even use it from npm

Filipe Silva15:10:58

"format": "zprint-clj -i \"./src/**/*.{clj,cljs,cljc,edn}\" -o ./ && zprint-clj -i \"./*.edn\" -o ./",

Filipe Silva15:10:08

(on a npm script)

Filipe Silva15:10:46

hmm I wonder if I could use rewrite-cljc for scaffolding

Filipe Silva15:10:44

e.g. in a shadow-cljs + re-frame project generating a lazy loaded feature area

Filipe Silva15:10:15

that'd need altering a few files plus making new ones with certain templated bits

sogaiu16:10:00

@lee yes, that's right -- not sure whether it will be faster to just from scratch again or to try to recreate the context. i'm not having success digging up our discussion which covered the commit from which building stopped working.

lread16:10:23

@sogaiu oh gee, me neither... I did recently fix a bug where I was using the wrong clojure reader in one spot. Could that contribute to graalvm-ability?

lread16:10:21

actually we could take this to #rewrite-clj if that makes more sense

borkdude16:10:54

@lee that can surely make a difference. using tools.reader/... vs tools.reader.edn/... can make things go bad with graalvm

lread16:10:18

oho! interesting.

borkdude16:10:25

tools.reader.edn/... guarantees absolutely no eval, resolve, etc. and that's what makes graalvm go crazy

borkdude16:10:37

because it probably also interacts with spec which has the locking issue

sogaiu16:10:41

i'm digging around here -- ah there's a build log of a run for a babashka that i tried to graft rewrite-cljc (one of the playground branches i think) on: https://pastebin.com/etSw2Q9z

pez19:10:36

@m373h4n, the setting is calva.openREPLWindowOnConnect. And I have added it to the changelog on dev.