unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bengt Richter <bokr@bokr.com>
To: Ryan Prior <ryanprior@hey.com>
Cc: Development of GNU Guix and the GNU System distribution
	<guix-devel@gnu.org>,
	Raghav Gururajan <raghavgururajan@disroot.org>
Subject: Re: Questionable "cosmetic changes" commits
Date: Thu, 3 Dec 2020 04:16:24 +0100	[thread overview]
Message-ID: <20201203031624.GA49345@LionPure> (raw)
In-Reply-To: <c6213a7d4dd4109cb7fb9dd6d12d5e97178f6075@hey.com>

Hi Ryan, Mark, et al,

On +2020-12-02 20:13:56 +0000, Ryan Prior wrote:
> Hi Mark!
> 
> On December 2, 2020, Mark H Weaver <mhw@netris.org> wrote:
> > We all have our own personal preferences of how best to indent scheme
> > code, but if more of us adopted the habit of needlessly reordering
> > fields and reindenting code of every package we touch, as one of us
> > seems to have done, it could get out of hand quickly.
> 
> I don't particularly hold any opinion about stylistic commits except
> that I prefer tools like gofmt, Python's Black and standard.js which
> enforce uniform code style, and would use such a tool for my Guile code
> if it exists.

Agree.
As Tobias points out, it exists inside emacs. But I like small independent
tools for specific things. Especially if they compose well.

> 
> I do think it's important to acknowledge that the commits written by
> Raghav were part of his internship and advised by his mentors who signed
> off on the commits, so it's not like these changes were unsolicited and
> materialized out of nowhere.

I find myself with schizophrenic sympathies here :)

On the one hand:
    1. Don't make unnecessary work for me.
    2. If it ain't broke, don't fix it.
    3. Mother appreciates help in the kitchen, but
       don't touch the fine crystal! (Mother: "That's precious,
       from your great grandmother, only for special occasions.
       You know what cut glass crystal like that is worth?"
       Smarty Kid: "Buying or selling?" :)
    4: At work, sign for janitorial services: DO NOT MOVE
       ANYTHING ON MY DESK!! (arrangement of untidy mess encodes
       part of my workflow state).
On the other hand:
    1. I habitually use emacs scheme-mode indenting as well as shell-script-mode,
       and find it a useful lens to reveal the meaning of the code, and my errors.
    2. I prefer to read pretty-printed code, and wouldn't mind if all
       submitted code automatically were canonicalized in a well-defined way.
       I use emacs indenting because it is right there when I am editing.
    3. NOT to canonicalize can obscure dumb errors, and that can be a smokescreen for worse.
    4. For code, it is the abstract syntax tree that matters (in telling the machine
       what to do), not cosmetics, but cosmetics matter in making info human-sensible.
In conclusion:
    1. I want the best of all worlds, so I always like to pick a la carte,
       unless the Chef is three-flowers-plus, or I am budget-constrained.
    2. I lean towards wanting a standard pretty-print canonicalization, if it doesn't make work for me ;)
    3. diff has options to ignore white-space differences, etc., so I wonder what tools need what options
       to ease Mark's pain, (until everything is canonicalized, when that pain should disappear anyway).
    4. Canonicalization should actually help make reviewing easier, and more effective, IWT.
    5. I would like better factoring of functionality, so that e.g. I wouldn't have to start emacs
       (I know, some never leave :) to canonicalize a file the way scheme-mode does. Unix philosophy?
       (E.g., don't give cat a new built-in option like -nA, but realize how easily it could compose with a factored-out
       scheme-source canonicalizer. Some of you could probably write a bash script to use emacs as a filter,
       but is that a sensible way to go? Probably, if you are a fluent hacker and you need a tool in a hurry,
       but not for deciding separate and separable distribution components.
       (I think I got my nostalgic ideas of components from Meccano kit from the '40s ;)
tl;DR:
   1. I vote for running all code to be submitted through a standard pretty-printing canonicalizer.
      It could even inject TODO stubs for missing synopses, and doc strings (as an option :)
-- 
Regards,
Bengt Richter


  parent reply	other threads:[~2020-12-03  3:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 18:55 Questionable "cosmetic changes" commits Mark H Weaver
2020-12-02 20:13 ` Ryan Prior
2020-12-02 21:27   ` Tobias Geerinckx-Rice
2020-12-02 22:22   ` Mark H Weaver
2020-12-03  3:16   ` Bengt Richter [this message]
2020-12-02 21:33 ` Hartmut Goebel
2020-12-04  2:08 ` Raghav Gururajan
2020-12-04  3:30   ` Ryan Prior
2020-12-04  3:58     ` Raghav Gururajan
2020-12-04 15:12       ` Danny Milosavljevic
2020-12-05  6:47       ` Mark H Weaver
2020-12-05  7:06         ` Mark H Weaver
2020-12-05 20:37       ` Raghav Gururajan
2020-12-05 21:54         ` Christopher Baines
2020-12-05 23:42           ` Bengt Richter
2020-12-20  7:07           ` Raghav Gururajan via Development of GNU Guix and the GNU System distribution.
2020-12-05 23:29         ` Cosmetic changes commits as a potential security risk (was Re: Questionable "cosmetic changes" commits) Mark H Weaver
2020-12-20  6:55         ` Questionable "cosmetic changes" commits Raghav Gururajan via Development of GNU Guix and the GNU System distribution.
2020-12-20  7:00         ` Cosmetic changes commits as a potential security risk (was Re: Questionable "cosmetic changes" commits) Raghav Gururajan via Development of GNU Guix and the GNU System distribution.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201203031624.GA49345@LionPure \
    --to=bokr@bokr.com \
    --cc=guix-devel@gnu.org \
    --cc=raghavgururajan@disroot.org \
    --cc=ryanprior@hey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).