logoalt Hacker News

jhayward • today at 6:33 PM • 1 reply • view on HN

It's fairly common in agentic work with lisps to use the OG of indentation-implies-parens, parinfer. https://github.com/parinfer

It's a little disappointing to not see a credit for it in parenmedic. The agentic interface looks interesting though.


Replies

chriswarbo • today at 7:09 PM

AFAIK parinfer requires a specific amount of indentation for each line. That's fine for those who don't mind its rules (and vibe-coders who never see the code anyway!), but it's an all-or-nothing approach, at the exclusion of anything else (like, say, this Sift tool).

I like parenmedic because it only checks relative changes compared to some previous line, i.e. one of:

- Indentation should be greater than the previous line (if some number of parens were left open)

- Indentation should be less than the previous line (if some number of parens were closed off)

- Indentation should be equal to that of the previous sibling (if there is one)

That's a lot more forgiving of different styles and tooling, whilst still being more informative than e.g. Emacs's `check-parens`.

EDIT: Based on the sibling comment I think I maybe misunderstood parinfer... https://news.ycombinator.com/item?id=50749574