From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oS+jMKz9a2Fu6QAAgWs5BA (envelope-from ) for ; Sun, 17 Oct 2021 12:40:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aKPNK6z9a2GAWgAA1q6Kng (envelope-from ) for ; Sun, 17 Oct 2021 10:40:44 +0000 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 EF7B610EE0 for ; Sun, 17 Oct 2021 12:40:43 +0200 (CEST) Received: from localhost ([::1]:53106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mc3at-0002NM-3S for larch@yhetil.org; Sun, 17 Oct 2021 06:40:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mc3aN-0002NE-00 for help-guix@gnu.org; Sun, 17 Oct 2021 06:40:11 -0400 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]:38687) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mc3aK-0006M4-Vl for help-guix@gnu.org; Sun, 17 Oct 2021 06:40:10 -0400 Received: by mail-io1-xd2f.google.com with SMTP id d125so12921868iof.5 for ; Sun, 17 Oct 2021 03:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beadling-co-uk.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=DesxOEYuCQkyP5AGV0JkoYzDCT+XkPjsw8Q8bEpHpmc=; b=Tb8ykQlwHm0D/L8E7hHEPmaqCpHKGqBETO6aNJugpynVr9LQJEKJaPW5S6DddbOUkV uFCcHjXrRRowNWYddMkIGjLKk6a2b364aeFPvloCTFWAMXcneCs94kzh1XkrxK7DI8Xw wZXtVX93mtZ7vjC40jTtsOrRU7xsKN62rc7f9D0pZVNCZWsWmL8Z72wvHzMQKkdoE6ET LZ3ZNf79YBiRYbOx0l1vmssZ4Tkf5r00BjtMVZAPEhNI5ehNvKZDmWq4HAcp5bbsi1mC CJk5UGMqfKKRVzYQcht+sdSiYPBvm1Uj8UJJqRHi/JHDroHpfqTYOfUA79OTSmxgixl5 OYGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=DesxOEYuCQkyP5AGV0JkoYzDCT+XkPjsw8Q8bEpHpmc=; b=aswIV0yt4yAsu4tx8LNxiBZz9Atm/uwpHENmwcpiEanRz2lw9QKA6pjuRsfOsM+4HB 0IDyDBQi5VygUJe+3lgdJPHtHjjO82CbB2xR5TDsRSaO2OKqAHkS4qrYngds7y6BvlZv fKafaq2IogtkodOnyf4xIgu9FlVeX4AS9tW7jp8I2yx2hh9LxG3krQZQVfAElODvxVZa U/PkWAiPoFGF5cYuiM+hetC99elo1Kg9sii7MB7MymDPb4GZYO4IchZUIW0TeUG88nq7 76tkQEA6F4XcbwzpQ9wF76NwX4GoZaa5SEIMmuezBrm6/xOG1iwxliPfMQgzTydCSHil RaPg== X-Gm-Message-State: AOAM531RSyMF0ZIiZD2oPmfdqGGIthzEW1DEYJg6pYlgfKiNMVQWDl9T L7XSl+84wZSAoxKotp4Zyv5b6zkzFGYVYfCkp2UfhaDIui+fU4q9sZ74oQ== X-Google-Smtp-Source: ABdhPJwn315vc6dHeXL7Darx1aa5HmlUt191An0BY1JCPfoEOf9WN0F0dhE1zWtCRNt90eH3lIHeO3ZqeNVc4bbALBo= X-Received: by 2002:a6b:c503:: with SMTP id v3mr10499244iof.113.1634467206299; Sun, 17 Oct 2021 03:40:06 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Phil Beadling Date: Sun, 17 Oct 2021 11:39:55 +0100 Message-ID: Subject: Re: Loading Channels from a file To: help-guix Received-SPF: none client-ip=2607:f8b0:4864:20::d2f; envelope-from=phil@beadling.co.uk; helo=mail-io1-xd2f.google.com X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1634467244; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=p+n0p2F0R05eFO0DN6GbVqFchnkdYzaWFGQ/urAbTBY=; b=u8iZV4kIlR+W4FBSMsl2pQkIckZE71mMh1P5NukW/GTjB2pEfWPXYRP7t6f1BJEDumd7J+ oRq5fklgrf7vT5LXxPPmXgAhHTBOxMWlxVNMu+YFBNne8NNrMRcV30jcurrgF2pnzPJ9P/ O68K0ezBIy5IYzrG0JeTUTGG9OmteXFUeCC5LNfUFpgnwl/UG8PKNX5MiLwDh/Je1DWw7A IAPCaWY1p8qyd5Fn/J+QovTAsFIrFO4pWet7QrUwlmeeNkO5eWyuZEp0WQiXK0VUvVElk0 84GmPL5bmg7/EIgd5PNdCdVjQBFfwDssJ/07sdae6PB7LOEVXOR5AF0KnarNpA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1634467244; a=rsa-sha256; cv=none; b=sv3/hgrAGRMwhuqT+XoS6qS3HfOlhrlbjEzeRW04xZo7/KAk08CYzFyv86FdaReizqz+WZ BHuLe4DkwN7S/4iQ7/MV8lf0QvpzUx2NUS6Mo54AEUQTd2Ne/r43pfC1RhYK+EY0zOtrTL 7Cx4X/oxynfEggAexGKeBUgmVKq4nc3VIXlCKRCL50BK+E8qZ2UxRmXrs6bRMDa7yBBiHG 7yK1ex92mtwuBZfG5nM/yOWjFPZJ2wqb/KwAeP1sq4X2nnFB6NpLSyRJwcwEh5kEkdJiwA fiBn2dbcX7bl0jjoX+NPMvAUE0UMomvRhtYj0cCORzA4d0PwyU68VDDbHIjgTg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=Tb8ykQlw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=beadling-co-uk.20210112.gappssmtp.com header.s=20210112 header.b=Tb8ykQlw; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: EF7B610EE0 X-Spam-Score: -1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZVCCycm8xguJ To answer my own question somewhat see below - although I need to think a bit more my my original approach wasn't good enough - the problem I think it my own understanding of Guile! On Sat, 16 Oct 2021 at 22:24, Phil Beadling wrote: > Hi, > > (define my-channels2 (call-with-input-file (option-ref options 'channel > #f) read)) > > Instead of calling read on the file there is a function in (guix ui) called "load*" which will do the heavy lifting for you: (define my-channels (let ((file (option-ref options 'channel #f))) (load* file (make-user-module '((guix channels))))))