unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luis Felipe <luis.felipe.la@protonmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: What's the meaning of the percent sign in variable names
Date: Wed, 05 May 2021 14:18:25 +0000	[thread overview]
Message-ID: <k9m4B4IqbnxDYIAnRUvF9Cgb79S9Wm4cdn-uXyY9uDcMR3PYSVJU5ufdaDk15fo1HbGJ3rcN0ffq4qiUtZon2eERVAPTH3oPl8nSuSge9_M=@protonmail.com> (raw)
In-Reply-To: <874kfipkhq.fsf@gnu.org>

Hey Ludovic :)

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, May 4, 2021 3:49 PM, Ludovic Courtès <ludo@gnu.org> wrote:

> Hi Luis!
>
> Luis Felipe luis.felipe.la@protonmail.com skribis:
>
> > Are all these constants (%base-packages, for example)? Is this a Guix
> > convention or does it come from Guile?
>
> To complement Leo’s answer… The ‘%’ convention comes from Guile, which
> may have borrowed it from other Schemes.

I did find uses of the percent sign in other Scheme code (e.g. http://science.slc.edu/~jmarshall/metacat/)but enclosing the whole name. For instance (Metacat-1.2/Metacat/constants.ss):

;; Default window sizes
(define %default-trace-width% #f)
(define %default-trace-height% #f)
(define %virtual-trace-length% #f)


> Initially, it was meant to
> read as “sys” (“system”), as can be seen in libguile, meaning that a
> percent-binding somehow belongs to “the system”: ‘%load-path’,
> ‘%make-void-port’, ‘%load-hook’, etc.

Ah, I see.

> In Guix it’s used with an extending meaning, typically for variables
> holding Guixy constants: ‘%base-packages’, ‘%setuid-programs’,
> ‘%desktop-services’, etc. I hope it makes some sense!

It does. Thanks for the explanation.






      reply	other threads:[~2021-05-05 14:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 14:22 What's the meaning of the percent sign in variable names Luis Felipe
2021-04-23 14:49 ` Leo Prikler
2021-04-24 13:29   ` Luis Felipe
2021-05-04 15:49 ` Ludovic Courtès
2021-05-05 14:18   ` Luis Felipe [this message]

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='k9m4B4IqbnxDYIAnRUvF9Cgb79S9Wm4cdn-uXyY9uDcMR3PYSVJU5ufdaDk15fo1HbGJ3rcN0ffq4qiUtZon2eERVAPTH3oPl8nSuSge9_M=@protonmail.com' \
    --to=luis.felipe.la@protonmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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).