Fork me on GitHub
#parinfer
<
2017-06-07
>
shaunlebron07:06:00

I made a major change to Parinfer last year and called it v2

shaunlebron07:06:43

the change was related to how to handle an unmatched close-paren

shaunlebron07:06:50

Chris thinks it was a mistake, and we’re having a minor debate about it here: https://github.com/oakmac/atom-parinfer/issues/76

shaunlebron07:06:13

i’d like to hear your opinion though @cfleming @sekao @bhurlow @doglooksgood (or others)

tianshu14:06:21

for now, leaving imbalanced state. I have to type close parens manually. before V2, I do the same. is there I missed something?

mattly16:06:25

I agree with Chris, the expected behavior is for auto-balancing

mattly16:06:57

maybe that's not something parinfer should be doing, maybe you should complement parinfer with an auto-close plugin

mattly16:06:56

I mean, I use it in Emacs alongside smartparens in strict-mode and paredit

mattly16:06:25

and anymore whenever I'm not in that environment something feels off

shaunlebron18:06:24

thanks guys, i’ll work on an implementation so we can see how it feels

shaunlebron18:06:22

@doglooksgood you have to type close-parens manually for both v1 and v2 in the case described. the new rules may prevent that

shaunlebron20:06:57

also, going to build a formatter to help use parinfer on teams: https://github.com/shaunlebron/parinfer/issues/132

dominicm22:06:15

Definitely make it a node script. Everyone has it now, and it's fast enough™

dominicm22:06:35

well, except in large projects I guess. In which case java is probably better.

dominicm22:06:22

I have noticed that zprint is quite slow against whole files from lumo. So maybe I should take back that idea 😛

shaunlebron22:06:47

prettier runs pretty fast, I’ll be looking how they do it

dominicm22:06:44

prettier is based on a paper: http://homepages.inf.ed.ac.uk/wadler/papers/prettier/prettier.pdf no idea if the speed comes from this

shaunlebron22:06:11

oh, i thought we were talking about node’s i/o

shaunlebron22:06:28

parinfer on node is lightning fast though

shaunlebron22:06:56

15ms per 3k lines?

shaunlebron22:06:28

can’t remember, but it’s fine

dominicm22:06:42

zprint is clojurescript (on lumo). So that might be it. But it was definitely a big pause for a single file. Like ~30s or so.

shaunlebron22:06:20

oh wow, I didn’t know about this, only heard of cljfmt

dominicm22:06:47

I've no idea why nvim parinfer doesn't feel fast on my machine then, it's a new laptop. Maybe something misconfigured, or it's using the clojure one still

shaunlebron22:06:38

maybe my benchmarks are off, atom-parinfer always felt fast to me, but it does limit itself to the parent expression

dominicm22:06:59

ah, I'm not sure if nvim parinfer does that 🙂

shaunlebron22:06:42

we’ll see, I’ll tag you for feedback when it’s ready

dominicm22:06:48

I've got some large real world projects which will enjoy some benchmarking

shaunlebron22:06:40

any ideas for the name of the cli command? @dominicm

dominicm22:06:40

Hmm. Something inside me feels cheesy, but parinfmt doesn't sound terrible.

shaunlebron22:06:38

I’d probably settle for parinfer-fmt if we’re going that direction

shaunlebron22:06:33

or parinfer-prettify or just parinfer