unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nikita Karetnikov <nikita@karetnikov.org>
To: Cyril Roelandt <tipecaml@gmail.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 0/2] Add tools for sysadmins: htop and dfc.
Date: Sat, 31 Aug 2013 01:52:39 +0400	[thread overview]
Message-ID: <87sixqluc8.fsf@karetnikov.org> (raw)
In-Reply-To: 52210294.5060202@gmail.com

[-- Attachment #1: Type: text/plain, Size: 1535 bytes --]

> Yes. I never know what to do in such cases. Is there a document that
> contains these coding-style rules, such as the PEP8 for Python ?

The pretty-printing rule is described in SICP.  Search for “There is no
limit” [1].  However, that paragraph doesn’t say what to do when the
line is too long.

I’m trying to keep lines under 79 characters (as suggested in PEP8).  It
allows “to have several files open side-by-side, and works well when
using code review tools that present the two versions in adjacent
columns” [2].  I also find that short lines are easier to read.

I believe it’s OK to write

(proc very-very-very-very-very-very-long-argument
      a b c)

instead of

(proc very-very-very-very-very-very-long-argument
      a
      b
      c)

because this allows to display more lines on the screen.

Also, it may be a good idea to write

(very-long-procedure1
 argument1
 (very-long-procedure2
  argument2
  (very-long-procedure3
   argument3
   (...))))

instead of

(very-long-procedure1 argument1
                      (very-long-procedure2 argument2
                                            (very-long-procedure3 argument3
                                                                  (...))))

That said, you have to break the rules sometimes.

Should we mention this in the “packaging rules” section?

[1] https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-10.html#%_sec_1.1.1
[2] http://www.python.org/dev/peps/pep-0008/#maximum-line-length

[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]

  parent reply	other threads:[~2013-08-30 21:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-30 20:08 [PATCH 0/2] Add tools for sysadmins: htop and dfc Cyril Roelandt
2013-08-30 20:08 ` [PATCH 1/2] gnu: Add htop Cyril Roelandt
2013-08-30 20:50   ` Nikita Karetnikov
2013-08-30 20:38     ` Cyril Roelandt
2013-08-30 21:26       ` Ludovic Courtès
2013-08-30 20:08 ` [PATCH 2/2] gnu: Add dfc Cyril Roelandt
2013-08-30 21:28   ` Ludovic Courtès
2013-08-30 20:58 ` [PATCH 0/2] Add tools for sysadmins: htop and dfc Nikita Karetnikov
2013-08-30 20:37   ` Cyril Roelandt
2013-08-30 21:50     ` Ludovic Courtès
2013-08-30 21:52     ` Nikita Karetnikov [this message]
2013-08-31  9:32       ` Ludovic Courtès
2013-08-31 17:38         ` Nikita Karetnikov
2013-08-30 21:07 ` [PATCH 1/2 v2] gnu: Add htop Cyril Roelandt
2013-08-30 21:07   ` [PATCH 2/2 v2] gnu: Add dfc Cyril Roelandt
2013-08-31  9:24     ` Ludovic Courtès
2013-08-31  9:23   ` [PATCH 1/2 v2] gnu: Add htop Ludovic Courtès
2013-08-30 21:30 ` [PATCH 0/2] Add tools for sysadmins: htop and dfc Andreas Enge
2013-08-30 21:17   ` Cyril Roelandt
2013-08-31 15:51 ` Ludovic Courtès
2013-09-01 18:03 ` [PATCH 1/2 v3] gnu: Add htop Cyril Roelandt
2013-09-01 18:03   ` [PATCH 2/2 v3] gnu: Add dfc Cyril Roelandt
2013-09-01 19:50   ` [PATCH 1/2 v3] gnu: Add htop Ludovic Courtès

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=87sixqluc8.fsf@karetnikov.org \
    --to=nikita@karetnikov.org \
    --cc=guix-devel@gnu.org \
    --cc=tipecaml@gmail.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).