From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id YKbtCzusSGKx3AAAgWs5BA (envelope-from ) for ; Sat, 02 Apr 2022 22:04:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uNoEBDusSGLz1AAAG6o9tA (envelope-from ) for ; Sat, 02 Apr 2022 22:04:11 +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 149D31A06E for ; Sat, 2 Apr 2022 22:04:10 +0200 (CEST) Received: from localhost ([::1]:43966 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1najyi-0007hh-UZ for larch@yhetil.org; Sat, 02 Apr 2022 16:04:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44656) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1najyY-0007f6-8a for guix-devel@gnu.org; Sat, 02 Apr 2022 16:03:58 -0400 Received: from [2a00:1450:4864:20::643] (port=37423 helo=mail-ej1-x643.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1najyW-0001GP-OY for guix-devel@gnu.org; Sat, 02 Apr 2022 16:03:57 -0400 Received: by mail-ej1-x643.google.com with SMTP id bg10so12452146ejb.4 for ; Sat, 02 Apr 2022 13:03:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=EBO7FWT8ZmEJt8IzCjyHA8uB0RqHH7QOipo4QaMC5Yg=; b=qXrzNQrKY55yetgL6/CIPVLbH1qVJDgBek9D3n0Vkvd56fcTpZgfBsau25AVRdKQ1l krpHs3kg/hrHD1qP0OsVKwBvAEXfhcOHYYh+Ldt7Dlu785+zuaAvJLfRdHuaSDYkES09 MV/Xlp4MezXmncchDeQeFGGOnw+5rO1+fKNVCKKKPph69wBWIvaGxW7dNTnqQ4ovkv3l YylTZQxqOq3Oae5w1MAs/uHiEfyOD5VPRi5VXal501/zl0anrEK/RJHo6LeIKNWqodCt PzNuSX/ILx+oifJw0sp1KTyPrSPjGSuiE11ZNZiaqC47RFddROcDS95xgI1qYZ70bzEn jkFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=EBO7FWT8ZmEJt8IzCjyHA8uB0RqHH7QOipo4QaMC5Yg=; b=2VjvTdipLXLdVr45uh0PX8d3tGVJ4/RxnXIToOLXKmXfyRY6sSsvRmEHjgcgsBK3o5 P+TWo9rxVLjymil1TVfqeLEb8p0UxYY4dqbUkL4Modi8R6UTMn8upBpDmHrnb8TJuO+y QEzfGqDvHWfh8zWvddeo4ML9pDD+7ThR5ny8TnlLhnDMOnvCsQYTiADSkZi4lQfFK7F4 lihS9MLlGdVFA2uDaoUbMLHDmRLvINk+kB/tz+r0Qrg4sDKWoKkCBOGcLZhT+yRfkJ34 BCIEG9e71QpIHvBebXE2Vbv2iTob4mzDtvYSQPQPgaiF5BdLY/tK3yUF0OKf1wc6W0uo fYDg== X-Gm-Message-State: AOAM531iOZ5RT9leRUyAoG3NCnkQmmDuVmWJS9KuLMTwfIDSS3D9xIox Aza9BWNOzp/TOonuwlBDGqx/Vz14ejU= X-Google-Smtp-Source: ABdhPJwgoO2Wm6dIvJGdQgOltc0rgiQ3UJKRjQMuy87LVWDiYwuMvJbpqSv6qiay6QqxcF2duNS50A== X-Received: by 2002:a17:907:270a:b0:6e4:86a4:9b09 with SMTP id w10-20020a170907270a00b006e486a49b09mr4975749ejk.23.1648929834966; Sat, 02 Apr 2022 13:03:54 -0700 (PDT) Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id 22-20020a17090600d600b006dfbc46efabsm2407710eji.126.2022.04.02.13.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Apr 2022 13:03:54 -0700 (PDT) Message-ID: <689e67dd833b3ab08fc8cd16706f82b989e46b2c.camel@gmail.com> Subject: Re: Getting the name of file-like objects From: Liliana Marie Prikler To: Justin Veilleux , guix-devel@gnu.org Date: Sat, 02 Apr 2022 22:03:53 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::643 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::643; envelope-from=liliana.prikler@gmail.com; helo=mail-ej1-x643.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648929850; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=EBO7FWT8ZmEJt8IzCjyHA8uB0RqHH7QOipo4QaMC5Yg=; b=dSVpEE2D4Y8QBfXP4n1c2hRPB7WUfOLPoisJDbQeDW9ipUk8YpCk6o78FTyoT+NAqtMMnw p0oLZHrZEbtE4KRAnTDRHm316owEvtT15nth2Pdfx4HUiIAljbOaPvhsSwOsIfKbZNIU+a QeApJY62FWIuZNvhtm13ukNz2Wr9m+wE9uMvL4oZDjEZZIRhgZ+XkhX6fZeHQc5FEXfPLd A510slsZXwgs2BiYqcY7PtezuyNx++OtuzQjazunfMbFmFM/v992wkWf8CgluXcUKTHB0y RooNzT3AYHf/Ymsva50hTfiCjK1U4dlJd4ATzIz/E7dYy2kZIffhbWetzI0HgA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648929850; a=rsa-sha256; cv=none; b=s/5XMYLHeAx5nngIufyUrN5fXPZX9pKqALP3CuDVu+4AAlsS+QfnHrKLi9NQ7yXKpyjVq0 LrxvZIVHFkDq1wXXe/qDjqlJE7sJuA9m6a4tg1ZeHjgmoewG+lSnCZZiZ7vo3PddMp5bP8 d+5WrYj90bHZrPA33fhGNDRZ6zYrB7SXhlVqyfwJnRFNa+6DPolKx9PQebPGSClOZEvw0u 5aOEZhzJ6PlW6o3eyADKQdanVBC93WbDWniIq+zNRQ6As4pxGpSbIgxWs3QX/PALJmYpbP riEfQzFzx2v5Kvt0qMzLLzb4IYVLNy0Z6U1/OYwVdd9Nw+LIi50MKFTX9LpTow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qXrzNQrK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -9.68 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qXrzNQrK; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 149D31A06E X-Spam-Score: -9.68 X-Migadu-Scanner: scn0.migadu.com X-TUID: 0MeS7gSFN90I Hi Justin Am Freitag, dem 01.04.2022 um 16:29 -0400 schrieb Justin Veilleux: >  Hi everyone. I'm currently writing a set of helper functions > (usually written using `computed-file`  which act on file like > objects to transform them in some way. > For instance, I have a `decompress` function which, given a file-like > object pointing to an archive, will return a computed file object > which it will decompress to it's output. >  Everything works very well, but I would like to be able to name the > `computed-file` objects something meaningfull. > ``` > (define (unzip f) >   (computed-file (string-append (name f) "-unzipped") >     #~(begin >         (system* (string-append #$unzip "/bin/unzip") >                  "-d" #$output >                  #$file)) >          #$out)) > ``` > Is there someting which ressembles the imaginary `name` function I > used above? Generally speaking, you'll have to speak to the store to achieve your goal. For a specific implementation, that fetches a file from a package (without building the package in question!), see package-file in (guix packages). Cheers