Fork me on GitHub
#rewrite-clj
<
2019-11-04
>
borkdude17:11:15

Yannick Scherer, the author of rewrite-clj, is alive. Proof: he just liked a post of mine on Twitter. https://twitter.com/xscys

aw_yeah 4
plexus20:11:43

FWIW I had a short email conversation with Yannick last year. I never met him but we have a mutual friend, I was doing stuff with rewrite-clj and was curious about the status. He wrote he wanted to get a few more things in, which he did, like better support for namespaced maps (although I believe it can still be improved.) He also wrote > Now, based on the already observed busy-ness I'd welcome anyone that would like to take the role of a co-maintainer. I will respond to PRs and issues eventually but I just cannot guarantee short latencies. So, yes, I'm all for more activity within the project but if I'm the sole maintainer I fear that frustrations will arise for all sides.

plexus20:11:36

I also floated the idea of someone else requesting Clojurists Together funding for working on rewrite-clj, which he thought was a cool idea. > It is an interesting idea and maybe this will make things more interesting for potential co-maintainers. Personally, I don't need financial incentives to work on OSS โ€“ at the moment it's a question of timing/energy, mostly influenced by my work situation (lots of early stage projects, new responsibilities, all that stuff).

plexus20:11:53

to me this would make a lot of sense, since so much tooling depends on it it would be a really good way to allocate some of that grant money

borkdude20:11:26

He has never responded to any Github issue or e-mail from anyone in this group (at least not since April 2019). At some point we worried that there was something wrong.

borkdude20:11:47

Meanwhile there are several forks of rewrite-clj around with various patches.

plexus20:11:48

my guess is he's just really busy with other stuff. maybe it's time to consolidate everyone's forks into clojure-commons

borkdude20:11:19

@lee is working on a .cljc port

borkdude20:11:24

which will be released under clj-commons

borkdude20:11:31

maybe he should do a CT if he's up for it

borkdude20:11:03

I've made changes to rewrite-clj that are specific to clj-kondo and probably not mergeable

plexus20:11:23

yeah I saw your monkey patch. You don't see a lot of those in Clojure ๐Ÿ™‚

borkdude20:11:40

it used to be a monkey-patch but now it's a vendored version with a patch

borkdude20:11:08

one thing I fixed was the namespaced map behavior (this was the monkey patch) but later I also changed how metadata is processed

borkdude20:11:18

because that was a common source of errors in clj-kondo

plexus20:11:47

my main frustration is that the zipper doesn't skip over uneval nodes

borkdude20:11:00

what if you want to rewrite it?

plexus20:11:35

then you use clojure.core/zip functions

lread22:11:06

hey @U07FP7QJ0, ๐Ÿ‘‹ ! One thing I did not really notice until digging into the rewrite-clj code is that you can instead use the * functions from rewrite.clj.zip to get at the raw zipper. For example down* is the raw version of down. Actually this is the only way to go if you have positional support enabled on your rewrite-clj zipper.

plexus20:11:06

the zipper skips over comments and whitespace, but not over uneval. uneval to me is just another syntax for a comment, so it's not very consistent.

borkdude20:11:44

right. I used to use the zippers on clj-kondo a bit, but after doing some performance tests I found that manually editing was way faster

sogaiu20:11:58

for some things it might be nice to not skip comments and whitespace...perhaps it's practical to consider configurable skipping?

lread20:11:55

yeah you suggested this many moons ago @sogaiu and I still think it is a good option. Weโ€™ll break a ton of code if we change default behaviour so an option makes sense.

sogaiu20:11:09

may be it can be considered if there is clojurists together funding ๐Ÿ™‚

pez20:11:13

What is an uneval node?

lread20:11:28

that took too long to type on my phone ๐Ÿ™‚

sogaiu20:11:28

i'm not sure i've seen the terminology used elsewhere -- i don't see it in the clojure source. there a close thing is the DiscardReader, so may be it could have been called a discard node?

borkdude20:11:35

I've been calling it uneval for a while now, but probably got it from rewrite-clj

lread22:11:13

As planned, I am diving back into rewrite-cljc and working toward a release. I'll post progress here as a device to (for sure, maybe, probably) keep myself from distraction. simple_smile I'll start with taking a look at getting tests running under graal. I've got existing graalifcations to use as a reference (thanks @borkdude!).

๐Ÿ‘ 8
snoe23:11:09

@lee is rewrite-cljc based on the clj or the cljs api? are there other changes/differences?

lread23:11:03

@snoe, there will be minor gotchas, but I am shooting for compatibility with both. Here's my current summary: https://github.com/lread/rewrite-cljs-playground/blob/master/doc/design/01-merging-rewrite-clj-and-rewrite-cljs.adoc

lread23:11:45

My intention is that it should be a drop in replacement for rewrite-clj and rewrite-cljs. Minor changes will be required for rewrite-cljs if you are using positional support.

lread23:11:28

Happy to hear any feedback or concerns from existing rewrite-clj and rewrite-cljs users.