From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6Ik2FlbCnWKFlwAAbAwnHQ (envelope-from ) for ; Mon, 06 Jun 2022 11:01:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GDFAFVbCnWJomwAAG6o9tA (envelope-from ) for ; Mon, 06 Jun 2022 11:01:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7DBFBE769 for ; Mon, 6 Jun 2022 11:01:08 +0200 (CEST) Received: from localhost ([::1]:43332 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ny8bj-0004G9-4j for larch@yhetil.org; Mon, 06 Jun 2022 05:01:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36672) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ny8bB-0004Fr-KU for gwl-devel@gnu.org; Mon, 06 Jun 2022 05:00:38 -0400 Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21036) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ny8b9-0000O2-FI for gwl-devel@gnu.org; Mon, 06 Jun 2022 05:00:33 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1654506024; cv=none; d=zohomail.com; s=zohoarc; b=D9AZj1JUBm01MxiRzHA5qYAs+mHPfI3cFE9T4kPCznkWXZdHGDTMC3OrC6PWW+0V0vwg1LxAxPsuR27+waE4CpOyWGYDGbv5z8gnFgWeOc8eOxs2zwlvFcLKG7BfDdhG6rwuvcpwPOHPCp4k7wUQI7wLzamAl5FyBSs6tOJqFsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654506024; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=LuV2UynmeX8N7+SwXyuegMVuapN39Iiq2BrkhmYBGbc=; b=I7fKHy+CMJ9Tg7rEAxPFWFjctF5CfQwsRl0GoFCxQZGtmBJuYKwWhuAFNorel2SApGOxsm2HxnzTitI/0aZd3YzeWChP0H9oKcqNGjNKszt1kiIx4JEncGUAIXVeSxrP/27ujZEYiuqaQedxcb1u/xeTk+kqHmAbblrSLkPTsh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1654506024; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Message-Id:Reply-To; bh=LuV2UynmeX8N7+SwXyuegMVuapN39Iiq2BrkhmYBGbc=; b=GK1busqZJQFLOzpAfduGZSb9RFMKcT7/D3iQW1T0v0nB6LnLHxq5jSHfF0tBExFf ppX2X88YWtVX12JMI09Y4AXwMSndtVdXK3xG+XK9vVw24PegA1O4qjt6l6HsVK1Agf1 6nuUS2u+LBGzn81foy1WADA7MoaSbpzdJrR36Fzs= Received: from localhost (251-108-142-46.pool.kielnet.net [46.142.108.251]) by mx.zohomail.com with SMTPS id 1654506021936359.5638946618801; Mon, 6 Jun 2022 02:00:21 -0700 (PDT) References: <871qw2ycnn.fsf@laura> User-agent: mu4e 1.6.10; emacs 28.1 From: Ricardo Wurmus To: Olivier Dion Cc: gwl-devel@gnu.org Subject: Re: GWL as a build-automation Date: Mon, 06 Jun 2022 10:50:26 +0200 In-reply-to: <871qw2ycnn.fsf@laura> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Message-ID: <87wndu415p.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.50; envelope-from=rekado@elephly.net; helo=sender4-of-o50.zoho.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: gwl-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1654506069; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LuV2UynmeX8N7+SwXyuegMVuapN39Iiq2BrkhmYBGbc=; b=szNpFT8PKn4xGUF4LPe1ZqNgdl5wC/wxBs+TaYyyAeUV+ps5slc7xMJcw1edkJ60jJCbEe Y5N6yKJ1QhdQ+VxY2g96K5wldXbJvvu0jwpBdn/xHg+7+FC6UCgRyPoiICT972HPuo4S1g Frs6Ge0wO2dzWQgH8LQ47Ru905NH+UkEo/LJm/rjz2VdNiAzJ1oIqQXpuQSV6W4uXUaiaT bJY0q2XeXv+8dhta4MGbgWZIjmiVROEH35CDlYz0hlOT4ZIdGZR9pGqRu78JEXeFkqHPXj VQgo8ay1hSPDmB7F1R6K8aaJIcxYPJPuM85a6vbju8B1N2HoLShtCj0mJmar5w== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1654506069; a=rsa-sha256; cv=pass; b=IcLMaAq21fFD3TiTcBg0uizHBtmW8l9sSa/f7ZNPzRs91MYoro1a4pyXipaRQvLSB2oVhs fd/BdQrRNPVMrm6Y7xxom1/FtsRx2sLADLimTa5Ns4MEnAF4Dlgw914RAQ5oX92QyLNv9P RkKWqy43bIzLywd0P64q/vH9EW4ksrIV5IliRI+XLhSe/ba4QwwS/4NqHScd/6jygFqgo9 6xkIJhPYFeG4B3rOC8VPuUb1UgnqCI9cj4s9sv767xW3n38ozLfcZFx6zCgDfzwZvSuVv9 3sRQHDRqZ2TXBgQCHsmZ6UlGlg3O8oGXvsix/46tE1KwJlds/t3Gq3E8egM8WA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=GK1busqZ; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.81 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b=GK1busqZ; arc=pass ("zohomail.com:s=zohoarc:i=1"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of "gwl-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="gwl-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7DBFBE769 X-Spam-Score: -9.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: mUsaNSGn0GOI 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