unofficial mirror of gwl-devel@gnu.org
 help / color / mirror / Atom feed
* GWL as a build-automation
@ 2022-06-05 22:21 Olivier Dion via
  2022-06-06  8:50 ` Ricardo Wurmus
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Dion via @ 2022-06-05 22:21 UTC (permalink / raw)
  To: gwl-devel

Hi,

I've been hacking around for the past weeks on a build system that uses
Guix.  The more I write it, the more I find similarities with what GWL
already does/provides.


So I'm thinking, one could easily do something like this for a simple
Guile project:

--8<---------------cut here---------------start------------->8---
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}}
  }
--8<---------------cut here---------------end--------------->8---

And this could also be done for other projects, e.g.:

--8<---------------cut here---------------start------------->8---
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}}
  }
--8<---------------cut here---------------end--------------->8---


I know that GWL focuses on scientific workflows, but I think that it can
go beyond its original goal.

Thoughts?

-- 
Olivier Dion
oldiob.dev



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: GWL as a build-automation
  2022-06-05 22:21 GWL as a build-automation Olivier Dion via
@ 2022-06-06  8:50 ` Ricardo Wurmus
  0 siblings, 0 replies; 2+ messages in thread
From: Ricardo Wurmus @ 2022-06-06  8:50 UTC (permalink / raw)
  To: Olivier Dion; +Cc: gwl-devel


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-06  9:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-05 22:21 GWL as a build-automation Olivier Dion via
2022-06-06  8:50 ` Ricardo Wurmus

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).