Christopher Lemmer Webber is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

Tag urself on lisp indentation style:

;; I'm afraid of passing 80 characters
(proc1
arg1 arg2
(proc2
arg1 arg2
(cond
[(foo)
(bar 'baz 'quux)]
[else
(beep boop 'bop)])))

;; Everyone has wide monitors these days anyway right?????
(proc1 arg1 arg2
(proc2 arg1 arg2 (cond [(foo) (bar 'baz 'quux)]
[else (beep boop 'bop)])))

Christopher Lemmer Webber @cwebber

I am, admittedly, the former even when I shouldn't be. But hey, it'll pay off if I ever get paid by the line of code.

Yesterday I saw someone's code though that passed 200 characters wide O_O

ยท Web ยท 0 ยท 1

@cwebber Option C: endlessly dithering over whether to break 80 chars or put the first arg below the function name, both of which feel slightly wrong

@cbowdon @cwebber Another option would be to have an automatic code formatter run prior to commit that will reformat to the agreed structure.

That way you can code how you want, but at the end of the day everyone's code spits out the same.

@cwebber
Here in ruby a nice rule is, one line per idea. Doesn't always work out, but, nice to work towards. You can get lost even in plain text if it's too wide.
A while back I went from 80 chars to 100. Happy to keep to that.

@cwebber I do that for regexes I've pasted in from elsewhere and feel bad about it.

@kevinmarks well, string-based regexes are mostly hopeless (but pervasive) anyway, so