parinfer

seancorfield 2020-09-14T00:41:18.006500Z

Ah, I've been putting a nil at the end, to keep that closing paren in its place. Comma makes more sense.

seancorfield 2020-09-14T00:42:42.007800Z

Interestingly perhaps, @mauricio.szabo’s parinfer-plus for Atom, which I believe is based on a Rust implementation of parinfer, is not so aggressive about reformatting and leaves the trailing ) where you put it, so I haven't needed a "door stop" since I switched to that.

2020-09-14T00:59:57.010800Z

@seancorfield thanks for those tips. the comma has turned out to be more useful than i thought: * visually "pairing" things in map-like situations * corfield comma * cond form tweaking * parinfer work-around perhaps there are other places where it can be applied usefully too. ah, i have used it to "nudge" indentation for something like this: https://gist.github.com/sogaiu/2c0cdfc2193474679651f6fc8a3a49c0#file-terminals-cljc-L18-L23

pez 2020-09-14T05:48:29.011900Z

I've also seen people use the ignore marker to keep that last paren in place.

dharrigan 2020-09-14T05:53:09.012300Z

@sogaiu I use #_+) 🙂

dharrigan 2020-09-14T05:54:58.012500Z

i.e., <https://git.sr.ht/~dharrigan/startrek/tree/master/src/startrek/main.clj#L40> to line 58

2020-09-14T06:15:00.013300Z

@dharrigan thanks!

2020-09-14T06:15:59.014Z

the ignore / discard marker is a bit of an unfortunate choice for: https://github.com/sogaiu/alc.x-as-tests so i was looking for alternatives. the comma seems to be working out well so far.

2020-09-14T06:17:26.015100Z

@pez thanks for mentioning that. i guess i should consider whether i can make some adjustment in the code...

dominicm 2020-09-14T07:49:32.015800Z

Zig fmt uses a comma in a similar way actually. Interesting.

dharrigan 2020-09-14T07:52:30.016100Z

I may switch to using a comma too

dharrigan 2020-09-14T07:52:42.016400Z

there's no attachment to using #_+ :)

2020-09-14T08:40:16.018200Z

nice -- thanks for the feedback. (on a side note, i'm very much missing a comma-like construct (as well as discard) in the janet programming language -- though there are "long-strings" (somewhat like heredocs) and a splicing operator.)