This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-09
Channels
- # beginners (22)
- # boot (80)
- # cider (6)
- # cljs-dev (5)
- # clojure (190)
- # clojure-berlin (5)
- # clojure-dev (24)
- # clojure-italy (14)
- # clojure-russia (70)
- # clojure-spec (39)
- # clojure-uk (82)
- # clojurescript (121)
- # clojurewest (1)
- # core-logic (2)
- # cursive (25)
- # datascript (186)
- # datomic (33)
- # dirac (266)
- # emacs (9)
- # gsoc (4)
- # hoplon (37)
- # immutant (34)
- # instaparse (22)
- # jobs (4)
- # juxt (6)
- # lambdaisland (2)
- # leiningen (1)
- # liberator (1)
- # luminus (5)
- # lumo (28)
- # off-topic (9)
- # om (23)
- # onyx (26)
- # other-lisps (1)
- # parinfer (39)
- # pedestal (45)
- # proton (1)
- # protorepl (10)
- # re-frame (18)
- # reagent (4)
- # ring-swagger (8)
- # rum (4)
- # specter (13)
- # test-check (14)
- # testing (1)
- # unrepl (164)
- # untangled (10)
- # yada (14)
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 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.
@qqq I used to, but my co-workers get annoyed by https://github.com/shaunlebron/parinfer/issues/92 this a lot 😛
@qqq: most people use indent mode, which is pretty aggressive about keeping parens balanced
@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.
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
@shaunlebron : lol, I just realized you're the author of parinfer
@shaunlebron : so all of indent mode is: (1) kill trailing parens (2) infer trailing parens based on indenting ?
in a nutshell yes
I must be missing something. Paredit has a bunch of barf / slurp / convolute / replace / ... functions. Lispy also has those. ParInfer has two modes.
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
it turned out that these kinds of things are blocked when done inside nested single-line expressions
(i.e. close-parens present in the middle of a line, not at the end)
if you’re wondering why parinfer does not have hotkeys for these advanced transform ops, you may not be the target audience
target audience is newcomers who would never use Lisp if paredit was the only way to manage parens
ha, those are great, and that’s how I started
but not everyone is like us in that regard
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
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
i worked at a company that was actively fighting cljs adoption because it was a lisp
and it’s the reactions you can guage from people learning that you have to learn all this stuff to use it
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
@shaunlebron : got it, alright, 'm going to stick with lispy
I'm the exact opposite of "easy learning curve" ; I want to memorize key combos so it looks like Im playing the piano
right on! 🙂
i want there to be tools for both people!