unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
To: raid5atemyhomework <raid5atemyhomework@protonmail.com>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: A new paradigm for modifying operating system declarations
Date: Tue, 5 Jan 2021 00:26:44 +0100	[thread overview]
Message-ID: <20210105002644.383d317a@interia.pl> (raw)
In-Reply-To: <ewUh5vMEW_m5K1m9xYSvxi0_o92wTXSO8pAoyBec8LDT45bZmrNXc6hPH4_3ZXWTyqe91NDltmJgH5mEDbpsu-A6Ar0vpDqky8F4kCrhlcI=@protonmail.com>

Dnia 2021-01-04, o godz. 15:38:38
raid5atemyhomework <raid5atemyhomework@protonmail.com> napisał(a):

> Hi guix-developers,

Hello.

> ```scheme
> (install-zfs
>   (operating-system
>     (kernel linux-libre-5.4)
>     ; ... other fields ...
>     ))
> ```

I don't like this way of nesting the OS declaration inside of any other
expression.
> 
> ```scheme
> (install-foo
>   (install-bar
>     (install-zfs
>        (operating-system
>           #;...))))

This makes it even worse.

> Which brings us back to the `decorate` form, which reduces nestedness:
> 
> ```scheme
> (decorate (install-foo
>            install-bar
>            install-zfs
>            operating-system)
>    #;...)

Better but still don't like it.
Can't we put the os declaration into a variable and then pass it to a
procedure?
Say:

> ```scheme
> (define OS
>   (operating-system
>     (kernel linux-libre-5.4)
>     ; ... other fields ...
>     ))
>
> (install-zfs OS)
> (install-foo OS)
> (install-bar OS)
> (install-something OS)
>
> ```

> Thanks
> raid5atemyhomework
> 

Jan Wielkiewicz



  parent reply	other threads:[~2021-01-04 23:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-04 15:38 A new paradigm for modifying operating system declarations raid5atemyhomework
2021-01-04 20:21 ` Taylan Kammer
2021-01-05  0:32   ` raid5atemyhomework
2021-01-05  6:12     ` Carlo Zancanaro
2021-01-05 10:01       ` raid5atemyhomework
2021-01-04 23:26 ` Jan Wielkiewicz [this message]
2021-01-05  0:46   ` raid5atemyhomework

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=20210105002644.383d317a@interia.pl \
    --to=tona_kosmicznego_smiecia@interia.pl \
    --cc=guix-devel@gnu.org \
    --cc=raid5atemyhomework@protonmail.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).