From: Ricardo Wurmus <rekado@elephly.net>
To: Olivier Dion <olivier.dion@polymtl.ca>
Cc: gwl-devel@gnu.org
Subject: Re: GWL as a build-automation
Date: Mon, 06 Jun 2022 10:50:26 +0200 [thread overview]
Message-ID: <87wndu415p.fsf@elephly.net> (raw)
In-Reply-To: <871qw2ycnn.fsf@laura>
Hi Olivier,
> So I'm thinking, one could easily do something like this for a simple
> Guile project:
>
> process compile-guile-source (with dot-scm)
> package "guile"
> inputs : file dot-scm
> outputs : file : string-replace-substring dot-scm ".scm" ".go"
> # {
> guild compile --output {{outputs}} {{inputs}}
> }
>
>
> And this could also be done for other projects, e.g.:
>
> process compile-c-source (with dot-c)
> package "gcc-toolchain"
> inputs : file dot-c
> outputs : file : string-replace-substring dot-c ".c" ".o"
> # {
> gcc -c -o {{outputs}} {{inputs}}
> }
It is not entirely surprising to me that the GWL can express this,
because it has really simple abstractions: that of a process and that of
a workflow consisting of processes.
What I do find a little surprising, though, is that there is an apparent
need for declaring processes like this. The Scheme Shell (scsh), for
example, takes on a similar problem, but the abstraction is different;
less focused on inputs and outputs and instead more geared to
integrating Shell script idioms with plain Scheme.
Personally, I find the GWL too complex for mere process abstractions and
lacking in features that are common in Shell scripts. Notably, it punts
on improving the syntax of the command; it shrugs and just uses a string
to express the whole command (with a little variable interpolation).
Perhaps there is space for a different tool that takes lessons from the
GWL and Scsh alike, with a focus on command composition and shell
abstractions. Perhaps that tool already exists and is called Metabash:
https://github.com/artyom-poptsov/metabash
:)
--
Ricardo
next prev parent reply other threads:[~2022-06-06 9:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-05 22:21 GWL as a build-automation Olivier Dion via
2022-06-06 8:50 ` Ricardo Wurmus [this message]
2022-08-18 15:00 ` zimoun
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://www.guixwl.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wndu415p.fsf@elephly.net \
--to=rekado@elephly.net \
--cc=gwl-devel@gnu.org \
--cc=olivier.dion@polymtl.ca \
/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.
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).