Fork me on GitHub
#parinfer
<
2017-03-09
>
qqq11:03:22

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

qqq11:03:31

It seems like a complete paradigm shift.

qqq11:03:45

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 ?

qqq11:03:52

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

dominicm11:03:08

@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.

dominicm11:03:22

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

qqq11:03:36

but you do use parinfer?

qqq11:03:47

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

qqq11:03:53

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

dominicm11:03:21

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

dominicm11:03:15

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

shaunlebron16:03:24

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

shaunlebron16:03:00

@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.

shaunlebron16:03:45

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

qqq16:03:11

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

qqq16:03:18

reading design.md in detail now

qqq16:03:59

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

shaunlebron16:03:24

in a nutshell yes

qqq16:03:41

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

shaunlebron16:03:24

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

shaunlebron16:03:34

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

shaunlebron16:03:48

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

shaunlebron16:03:46

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

shaunlebron16:03:08

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

qqq16:03:51

oh, parinfer assumes people don't want to memorize 10 different vim-like hot keys? 🙂

shaunlebron16:03:23

ha, those are great, and that’s how I started

shaunlebron16:03:39

but not everyone is like us in that regard

qqq16:03:20

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

shaunlebron16:03:39

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

qqq16:03:13

what did you find lacking in paredit?

shaunlebron16:03:46

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

shaunlebron16:03:20

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

shaunlebron16:03:10

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

qqq16:03:25

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

qqq16:03:30

but I apprecaite this helpful discussion 🙂

qqq16:03:10

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

shaunlebron16:03:31

right on! 🙂

shaunlebron16:03:12

i want there to be tools for both people!