parinfer

cfleming 2017-08-16T00:10:58.000051Z

@shaunlebron You asked the other day about the corruption problems with Cursive. I added a brain dump to the wiki about why this is hard: https://github.com/shaunlebron/parinfer/wiki/Problems-integrating-parinfer-into-Cursive

cfleming 2017-08-16T00:11:10.000153Z

Let me know if that would be better somewhere else, e.g. in an issue.

cfleming 2017-08-16T00:13:10.000047Z

The more I think about this, the more I think that I just need to notify the user when parinfer cannot be applied due to inconsistent formatting.

cfleming 2017-08-16T00:13:40.000055Z

That’s a very annoying UX, but it’s less annoying than having your code broken.

cfleming 2017-08-16T00:14:15.000167Z

And it implicitly means that users will only have to reformat their code when they actually want to modify a file, not just by looking at it.

shaunlebron 2017-08-16T00:15:11.000173Z

thanks for putting together, will look tonight

shaunlebron 2017-08-16T06:20:26.000012Z

that’s a lot of stuff

shaunlebron 2017-08-16T06:24:28.000186Z

this reminds me of when I was at stripe

shaunlebron 2017-08-16T06:25:48.000165Z

i once got some heat for taking too long to find a proper solution to a bug, when the solution was to just yank the feature I was trying to fix until it worked

✔️ 1
shaunlebron 2017-08-16T06:28:14.000054Z

this feels the same. this is obviously too hard to solve quickly, and it’s breaking people’s code for however long it’s been out.

shaunlebron 2017-08-16T06:29:08.000132Z

my gut is to pull it out until it works

shaunlebron 2017-08-16T07:02:55.000151Z

added some headers to make it skimmable if it will help anyone else dive in for ideas

cfleming 2017-08-16T10:40:07.000319Z

Right, and I think the tl;dr is that there is no fix for this in Cursive.

shaunlebron 2017-08-16T14:21:01.000468Z

the “comments as code” issue came up again: @dominicm https://github.com/status-im/status-react/commit/883b702fcba7d94b93828ccfaa6d6053100fe52d#commitcomment-23648790

😱 1
shaunlebron 2017-08-16T14:25:22.000570Z

a screenshot since the anchor link takes so long to load:

shaunlebron 2017-08-16T14:37:12.000060Z

on the one hand, it’s a given that incorrect indentation is going to mislead you about implied structure.

shaunlebron 2017-08-16T14:38:54.000490Z

on the other hand, if users setup their code so that they can safely uncomment lines without thinking, then it is parinfer that threw a fork in their process and will take the blame for the broken code

shaunlebron 2017-08-16T15:02:10.000782Z

it’s interesting because I never thought of Parinfer as breaking the UX of non-parinfer users

shaunlebron 2017-08-16T15:05:55.000199Z

I’m thinking that this feature needs to be in parlinter rather than parinfer

shaunlebron 2017-08-16T15:06:39.000323Z

it’s the function of parlinter to make collaboration between parinfer and non-parinfer users more possible

dominicm 2017-08-16T15:08:28.000329Z

Yeah. The UX of non-parinfer users is where it falls down for me in regular basis.

shaunlebron 2017-08-16T15:08:29.000462Z

it makes sense for parinfer users to see this:

(foo)
  ;; bar
but after parlinting before committing, it should be:
(foo
  ;; bar
  )

shaunlebron 2017-08-16T15:11:10.000178Z

i’m not yet sure if parlinter is acceptable for projects, but it seems like a middle-ground to have this process in parlinter without affecting parinfer users

shaunlebron 2017-08-16T15:12:02.000415Z

but it would only work if parlinter was adopted as pre-commit hook, which is probably asking too much

shaunlebron 2017-08-16T15:12:42.000072Z

err, not a pre-commit hook, just as a normal part of the CI process

shaunlebron 2017-08-16T15:13:02.000032Z

which doesn’t seem like a big deal to me anymore

shaunlebron 2017-08-16T15:15:17.000606Z

i’ll move forward with that unless objections

shaunlebron 2017-08-16T15:16:17.000492Z

a new parenAfterComment option that defaults to off in parinfer, and defaults to on in parlinter

dominicm 2017-08-16T15:27:37.000509Z

Oh, you mean failing in the CI process.

dominicm 2017-08-16T15:28:29.000512Z

So, this is probably obvious to you: Could parentAfterComment be turned on in parinfer?

shaunlebron 2017-08-16T15:50:33.000364Z

yeah, i wouldn’t hide the option

dominicm 2017-08-16T16:00:48.000294Z

@shaunlebron So with that option on, I would be able to edit files with the newline in?

mattly 2017-08-16T16:08:08.000487Z

kinda related to the above, idk if you saw this but: https://www.reddit.com/r/Clojure/comments/6treja/help_my_boss_is_forcing_me_to_use_emacs/

shaunlebron 2017-08-16T16:52:33.000780Z

@dominicm yes

shaunlebron 2017-08-16T16:52:55.000031Z

@mattly thanks, i didn’t see that

dominicm 2017-08-16T16:53:04.000111Z

What's the gotcha @shaunlebron?

shaunlebron 2017-08-16T16:53:15.000475Z

i’ll chime in about parlinter to see if that would work here

mattly 2017-08-16T16:54:23.000653Z

I've turned down offers from places that prescribe dev tooling

shaunlebron 2017-08-16T16:55:07.000252Z

i think linters are more and more accepted now

shaunlebron 2017-08-16T16:55:20.000069Z

i only built parlinter after prettier became successful

shaunlebron 2017-08-16T16:56:32.000138Z

to your point, I hope that linting can reduce the need for prescribed devtooling, if it’s just the formatting they’re worried about

dominicm 2017-08-16T16:57:08.000707Z

I've had to fight an emacs bias at JUXT.

dominicm 2017-08-16T16:58:18.000397Z

@shaunlebron I feel like there's a catch to the comment thing, is there?

shaunlebron 2017-08-16T16:59:17.000315Z

i kind of described it as “comment-reversibility” in the issue, but I’m not sure right now

shaunlebron 2017-08-16T16:59:42.000169Z

as a user it might be weird in some ways

shaunlebron 2017-08-16T17:00:22.000578Z

as the developer, it has some weirdness i have to work through, but I’m not sure it’s too bad from user perspective. i’ll have to look closer and let you know

dominicm 2017-08-16T17:17:39.000325Z

Okay 😛. I shall wait and see.

shaunlebron 2017-08-16T17:42:54.000619Z

@mattly thanks for linking that thread, i added a comment

mattly 2017-08-16T17:43:08.000231Z

ofc

mattly 2017-08-16T17:43:14.000084Z

I should've yesterday when I saw it