parinfer

shaunlebron 2017-03-17T15:32:58.611377Z

@qqq: ha, you already understood that! but I guess you've been playing with it?

qqq 2017-03-17T15:35:39.685166Z

@shaunlebron : not in emacs, but in another cljs dev tool the one thing I do amire about this is as follows: sometimes when I try ti move things in/out, it's really hard via the AST ... but it's very clear in the world of spacing / indent -- and having it auto readjust based on indent is quite brilliant

đź‘Ť 1
qqq 2017-03-17T15:35:53.691438Z

some would call this "direct manipulation

shaunlebron 2017-03-17T15:44:29.920147Z

@qqq: which cljs dev tool?

qqq 2017-03-17T15:54:04.176104Z

@shaunlebron : nightlight / paren-soup

qqq 2017-03-17T15:54:28.186337Z

I wasn't playing with it to learn par-infer, I was playing with it since nightlight seemed like a great idea, and it just so happened that paren-soup is par-infer based

qqq 2017-03-17T15:54:45.193737Z

it's amazing how easy to learn to learn parinfer when you don't have emacs to fall back on 🙂

shaunlebron 2017-03-17T16:09:03.575314Z

nice! really glad zach added that

qqq 2017-03-17T16:16:40.764598Z

@shaunlebron : paren-soup was somewhat laggy for me at around 100-200 lines

qqq 2017-03-17T16:16:51.768724Z

how fast is parinfer? is it intended to run on every keystroke?

shaunlebron 2017-03-17T16:19:49.841737Z

the js implementation can process 3k lines in about 20ms

qqq 2017-03-17T16:20:18.853056Z

hmm, must ahve been something else then

shaunlebron 2017-03-17T16:20:23.855805Z

that’s about 50hz, so fast enough to run on every keystroke yeah

shaunlebron 2017-03-17T16:21:20.878372Z

my perf testing isn’t super accurate, I just throw a file at it and see how long it takes to process

shaunlebron 2017-03-17T16:22:08.897288Z

the atom plugin is pretty fast, and it only processes the top-most parent expression at the cursor, and processing is debounced

🚀 1
qqq 2017-03-17T16:28:13.045293Z

does 'debounced' mean 'throw into webworker' ?

shaunlebron 2017-03-17T16:44:30.435165Z

nah, it means to delay processing until you’re done typing for a certain number of ms

qqq 2017-03-17T16:46:45.489760Z

oh right, so it's onKeyPress: (1) if timer exists, reset it to BLAH ms (2) when timer counts down to 0, run parInfer

shaunlebron 2017-03-17T17:09:57.055624Z

right, good description