[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gwl-devel] what colour should the bikeshed have?

From: Ricardo Wurmus
Subject: [gwl-devel] what colour should the bikeshed have?
Date: Fri, 21 Jun 2019 15:14:18 +0200
User-agent: mu4e 1.2.0; emacs 26.2

Hello there,

recently we changed some <process> field names (“package-inputs” and
“data-inputs”) and I thought that maybe we should talk about the
“procedure” field.

Currently, a process might look like this:

  process: greet
    packages "hello"
    procedure '(system "hello")

Or like this:

  process: sleep
    packages "coreutils"
    procedure # bash {
      echo "Sleeping..."
      sleep 10

I think “procedure # bash {” is a bit long for a very common use case.
Since “# bash {…}” is special syntax implemented with a reader macro I’m
not sure if or how we can do better.

I think we might be able to do this:

  process: sleep
    packages "coreutils"
    # bash {
      echo "Sleeping..."
      sleep 10

…if we somehow rewrote the reader macro to expand to the full field
definition, or if we changed the “process:” macro to expect a bare code
snippet at the end without the need for a field assignment, though this
would not be possible (or too ugly) in plain Scheme.

But even if we can’t do that, maybe we could just replace
the very long “procedure” with the much shorter “run”:

  process: sleep
    packages "coreutils"
    run # bash {
      echo "Sleeping..."
      sleep 10

Obviously, this would work fine in plain Scheme.

What do you think?  Is it worth trying / doing?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]