Fork me on GitHub
#parinfer
<
2020-09-14
>
seancorfield00:09:18

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

seancorfield00:09:42

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.

sogaiu00:09:57

@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

pez05:09:29

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

dharrigan05:09:09

@sogaiu I use #_+) 🙂

dharrigan05:09:58

i.e., to line 58

sogaiu06:09:59

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.

sogaiu06:09:26

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

dominicm07:09:32

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

dharrigan07:09:30

I may switch to using a comma too

dharrigan07:09:42

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

sogaiu08:09:16

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.)