parinfer

qqq 2017-03-09T11:39:22.266287Z

I get paredit; I get lispy. I don't get what parinfer does.

qqq 2017-03-09T11:39:31.267404Z

It seems like a complete paradigm shift.

qqq 2017-03-09T11:39:45.269104Z

So there's two modes? One where it trusts the () and indents my code, and another where it trusts the indents and infers the ()'s ?

qqq 2017-03-09T11:39:52.269898Z

So there's no longer an attempt to balance the ()'s ?

qqq 2017-03-09T11:40:03.271173Z

@dominicm : ^^

dominicm 2017-03-09T11:41:08.279047Z

@qqq As I recall. Pretty much, yeah. One mode will indent all relevant code when you start smacking the space bar. (e.g. it will shift along the contained maps of a list). The other is for moving parens.

dominicm 2017-03-09T11:41:22.280811Z

I personally didn't find myself in indent mode very much

qqq 2017-03-09T11:41:36.282426Z

but you do use parinfer?

qqq 2017-03-09T11:41:47.283804Z

I watched the gifs, tried it in emacs, and found it very unsettling

qqq 2017-03-09T11:41:53.284841Z

I'm used to ()'s always being balanced

dominicm 2017-03-09T11:46:21.318590Z

@qqq I used to, but my co-workers get annoyed by https://github.com/shaunlebron/parinfer/issues/92 this a lot šŸ˜›

dominicm 2017-03-09T11:48:15.331813Z

Now I use vim-sexp primarily. But I do miss the ease of parinfer.

shaunlebron 2017-03-09T16:02:24.266151Z

@qqq: most people use indent mode, which is pretty aggressive about keeping parens balanced

shaunlebron 2017-03-09T16:10:00.391390Z

@qqq: indent mode is a realization that all those ))))]]}) at the end of a line could be inferred from the indentation of the next line.

shaunlebron 2017-03-09T16:15:45.487576Z

thatā€™s the core idea, but a lot of details had to be worked out. I document them here: https://github.com/shaunlebron/parinfer/blob/master/lib/doc/design.md

qqq 2017-03-09T16:16:11.494832Z

@shaunlebron : lol, I just realized you're the author of parinfer

qqq 2017-03-09T16:16:18.497008Z

reading design.md in detail now

qqq 2017-03-09T16:20:59.577119Z

@shaunlebron : so all of indent mode is: (1) kill trailing parens (2) infer trailing parens based on indenting ?

shaunlebron 2017-03-09T16:21:24.584672Z

in a nutshell yes

qqq 2017-03-09T16:22:41.605360Z

I must be missing something. Paredit has a bunch of barf / slurp / convolute / replace / ... functions. Lispy also has those. ParInfer has two modes.

shaunlebron 2017-03-09T16:25:24.649310Z

when first playing with the idea of indent mode, I realized that sometimes adding or removing parens would auto-result in things like pareditā€™s barf/slurp/splice/wrap

shaunlebron 2017-03-09T16:26:34.669533Z

it turned out that these kinds of things are blocked when done inside nested single-line expressions

shaunlebron 2017-03-09T16:26:48.673399Z

(i.e. close-parens present in the middle of a line, not at the end)

shaunlebron 2017-03-09T16:27:46.689438Z

if youā€™re wondering why parinfer does not have hotkeys for these advanced transform ops, you may not be the target audience

shaunlebron 2017-03-09T16:29:08.714336Z

target audience is newcomers who would never use Lisp if paredit was the only way to manage parens

qqq 2017-03-09T16:29:51.726802Z

oh, parinfer assumes people don't want to memorize 10 different vim-like hot keys? šŸ™‚

shaunlebron 2017-03-09T16:30:23.736906Z

ha, those are great, and thatā€™s how I started

shaunlebron 2017-03-09T16:30:39.741757Z

but not everyone is like us in that regard

qqq 2017-03-09T16:31:20.754251Z

yeah, my progression has been: paredit: wow, this is cool lispy: wtf ... an implicit mdoe in vim? I can't believe this works then I someone pointed me at parinfer, and I couldn't figure itout

shaunlebron 2017-03-09T16:32:39.778287Z

i spent a year without using any tool, then I discovered vim paredit and used that for a year, a year later the parinfer idea happened

qqq 2017-03-09T16:33:13.787855Z

what did you find lacking in paredit?

shaunlebron 2017-03-09T16:33:46.797605Z

i worked at a company that was actively fighting cljs adoption because it was a lisp

shaunlebron 2017-03-09T16:34:20.807659Z

and itā€™s the reactions you can guage from people learning that you have to learn all this stuff to use it

shaunlebron 2017-03-09T16:36:10.837289Z

paredit isnā€™t lacking in anything, but the time to learn is a barrierā€”a barrier not very difficult to cross, but a lot of people simply won't

qqq 2017-03-09T16:37:25.858552Z

@shaunlebron : got it, alright, 'm going to stick with lispy

qqq 2017-03-09T16:37:30.859982Z

but I apprecaite this helpful discussion šŸ™‚

qqq 2017-03-09T16:38:10.870826Z

I'm the exact opposite of "easy learning curve" ; I want to memorize key combos so it looks like Im playing the piano

shaunlebron 2017-03-09T16:38:31.877277Z

right on! šŸ™‚

shaunlebron 2017-03-09T16:39:12.888542Z

i want there to be tools for both people!

ā¤ļø 1