unofficial mirror of gwl-devel@gnu.org
 help / color / mirror / Atom feed
* Comments on process template syntax
@ 2020-02-02 10:20 Ricardo Wurmus
  2020-02-02 23:30 ` Kyle Meyer
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Ricardo Wurmus @ 2020-02-02 10:20 UTC (permalink / raw)
  To: gwl-devel

Hi,

While looking at the examples at https://www.guixwl.org/beyond-started,
I found that process templates might be difficult to understand, and
that they have no pretty syntax.

--8<---------------cut here---------------start------------->8---
process: (list-file-template filename)
  name
    string-append "list-file-"
                  basename filename
  packages "gzip"
  inputs filename
  outputs
    string-append filename ".list"
  run-time
    complexity
      space 20 mebibytes
      time  30 seconds
  # { gzip --list {{inputs}} > {{outputs}} }
--8<---------------cut here---------------end--------------->8---

The first line is easy to understand for lispers but it might look weird
to people who come from other workflow languages or programming
languages.  This describes a procedure called “list-file-template” that
returns a process parameterized on the argument “filename”.

Nextflow has no concept of procedures that produce processes when given
arguments.  It does however have a concept of data streams that can be
fed into processes, which results in a process to be instantiated for
every element of the stream.  The stream may be created from a directory
containing files.

This implementation likely stems from the realization that the “template
case” is the most common case for processes.  Rarely ever is it
necessary to define a process that does *not* require parameterization
on its inputs.

Can we make the common case simpler and easier to understand?  (FWIW, I
intend to rename the “process:” macro to just “process” to remove
confusing syntactic noise, so anything about the first line may be
changed.)

--
Ricardo

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

end of thread, other threads:[~2020-02-08 12:35 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-02 10:20 Comments on process template syntax Ricardo Wurmus
2020-02-02 23:30 ` Kyle Meyer
2020-02-03  8:08   ` Ricardo Wurmus
2020-02-03 14:22     ` Kyle Meyer
2020-02-03 15:23       ` Ricardo Wurmus
2020-02-03 23:16         ` Kyle Meyer
2020-02-04  9:55           ` Ricardo Wurmus
2020-02-05  1:48             ` Kyle Meyer
2020-02-05 15:14               ` zimoun
2020-02-03  8:58 ` Roel Janssen
2020-02-03 12:07   ` Ricardo Wurmus
2020-02-03 12:56     ` Roel Janssen
2020-02-03 14:33       ` Ricardo Wurmus
2020-02-04 10:10         ` Ricardo Wurmus
2020-02-05  2:12           ` Kyle Meyer
2020-02-05 15:21           ` zimoun
2020-02-05 15:29             ` Kyle Meyer
2020-02-05 15:37               ` zimoun
2020-02-05 16:02                 ` Kyle Meyer
2020-02-05 16:23                   ` zimoun
2020-02-05 15:07     ` zimoun
2020-02-05 18:04       ` Ricardo Wurmus
2020-02-05 19:14         ` zimoun
2020-02-05 21:32           ` Ricardo Wurmus
2020-02-06 11:59             ` zimoun
2020-02-05 14:56   ` zimoun
2020-02-08 12:34     ` Ricardo Wurmus
2020-02-05 14:50 ` zimoun

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