Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this complete? #3

Open
Immortalin opened this issue Dec 25, 2015 · 10 comments
Open

Is this complete? #3

Immortalin opened this issue Dec 25, 2015 · 10 comments

Comments

@Immortalin
Copy link

Hi! Is this complete?

@shaunlebron
Copy link

i think there might have been some hiccups due to porting the original clojure implementation. I think the new parinfer.js implementation will be much faster/simpler to port. Just a heads up.

@Immortalin
Copy link
Author

@shaunlebron any plans?

@shaunlebron
Copy link

I'm pretty sure anyone familiar with Emacs Lisp can step up and port parinfer.js in a day if they wanted to. The Python port was done just yesterday because it's easier to port now.

I'm not familiar with Emacs/Elisp, so I'm gonna leave it to someone who does. (cc: @edpaget, @dongcarl, @randre03)

@edpaget
Copy link
Owner

edpaget commented Dec 28, 2015

Nope this is not complete, though it does work-ish. I was attempting to rpc from node. I'll look at parinfer.js and see about porting that instead.

@ryepesg
Copy link

ryepesg commented Jan 1, 2016

Excuse my ignorance, but how it compares to adjust-parens plus aggressive-indent?.

I read some discussion here, here and here, but I'm still without a clue.

@randre03
Copy link

randre03 commented Jan 2, 2016

@ryepesg I suggest looking at @shaunlebron's original website on parinfer - http://shaunlebron.github.io/parinfer/, so you can see from many different perspectives what parinfer is. Doubt you'll find it is totally different but it might offer enough changes to your workflow to be of benefit...then again it might not. Compare it for yourself.

If you are unclear about the central idea behind it, the way I view it is that right now without parinfer I need tools, keystrokes, and a small amount of brainpower and memory to manage my parens and indentation when working with a LISP. With parinfer we swap the need for brainpower and keystrokes with an algorithm that makes certain inferences regarding either parens or indentation. Just as it can be very difficult to do maths with two variables, the inference algorithm cannot do its job if it must infer about both indentation and parens at the same time...so the developer makes this choice during each editing session. As @shaunlebron has written, we can think of this along the lines of Vim's modal editing. As a result, the only "keystrokes" the developer is charged with knowing is the one she/he defines to switch between paren/indentation mode and Tab - to adjust either the indentation or the parentheses, and that's all that is required. Therefore, instead of needing multiple packages - one for managing parens and one to manage indentation as well as needing to learn (or re-learn) or to clutter up the memory with dozens of formatting-related keysrokes, Parinfer allows you to rely on one package and two keystrokes to do the same job. Anything else it may do is just dessert.

@ryepesg
Copy link

ryepesg commented Jan 2, 2016

Great answer, thank you very much.

@shaunlebron
Copy link

@randre03 couldn't have said it better myself 👍

@edpaget
Copy link
Owner

edpaget commented Feb 16, 2016

Maybe it works now?

@gilch
Copy link

gilch commented Aug 8, 2016

I think the new parinfer.js implementation will be much faster/simpler to port. Just a heads up.
[...]
I'm not familiar with Emacs/Elisp, so I'm gonna leave it to someone who does.

The js version port to elisp has been done now: https://github.com/oakmac/parinfer-elisp

You could probably replace the library with that for your package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants