Subject: [bug#49419] [PATCH 1/4] home-services: Add most essential home services

From: Maxime Devos <[email-masked]>
Date: Mon, 05 Jul 2021 17:47:25 +0200

Hi,

Andrew Tropin schreef op ma 05-07-2021 om 18:37 [+0300]:
> +       (if (file-exists? (he-init-file new-home))
> +           (let* ((port   ((@@ (ice-9 popen) open-input-pipe)
> +                          (format #f "source ~a && env"
> +                                   (he-init-file new-home))))
> +                 (result ((@@ (ice-9 rdelim) read-delimited) "" port))
> +                 (vars (map (lambda (x)
> +                               (let ((si (string-index x #\=)))
> +                                 (cons (string-take x si)
> +                                       (string-drop x (1+ si)))))
> +                            ((@@ (srfi srfi-1) remove)
> +                             string-null?
> +                              (string-split result #\newline)))))

Why are you using @@ here?  'open-input-pipe', 'read-delimited' and 'remove'
are exported variables, so you can just use @ instead of the magic evil @@
operator.

From the guile manual:

 -- syntax: @ module-name binding-name
     Refer to the binding named BINDING-NAME in module MODULE-NAME.  The
     binding must have been exported by the module.

 -- syntax: @@ module-name binding-name
     Refer to the binding named BINDING-NAME in module MODULE-NAME.  The
     binding must not have been exported by the module.  This syntax is
     only intended for debugging purposes or as a last resort.  *Note
     Declarative Modules::, for some limitations on the use of ‘@@’.

Greetings,
Maxime.