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 ms0.migadu.com with LMTPS id IHBRN29+R2L/NQEAgWs5BA (envelope-from ) for ; Sat, 02 Apr 2022 00:36:31 +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 II75L29+R2KZIQEAG6o9tA (envelope-from ) for ; Sat, 02 Apr 2022 00:36:31 +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 88F4E3D6C0 for ; Sat, 2 Apr 2022 00:36:31 +0200 (CEST) Received: from localhost ([::1]:42548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1naPsc-0007wo-Mc for larch@yhetil.org; Fri, 01 Apr 2022 18:36:30 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naO3H-0001BQ-Qd for guix-devel@gnu.org; Fri, 01 Apr 2022 16:39:24 -0400 Received: from [37.120.193.124] (port=35584 helo=mail.cock.li) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1naO3G-0005M7-0B for guix-devel@gnu.org; Fri, 01 Apr 2022 16:39:23 -0400 Content-Type: multipart/alternative; boundary="------------P0kbECjtkMepCVEXB20o7UIx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1648844997; bh=M+ero8meNrXWtl5qLH7t7nOptwVbeBhpPMo0rIoRyKg=; h=Date:To:From:Subject:From; b=ZnXC4OeqrHqUSddZe1QtZa335PPxw50XA/qzzXZY4vWOXOD02R21cmZXlkFS6aCkX 1Siu6KQq8/nArHcUqzGzfEL5be4hTwxGbGgpspawEAvblzBHxQfQ6aEeMkmSgkSMys NVY9waVQ5X9Wd6mU39x3xlK38YiU+2jkXX2WlXCaZTPpgSHLU+TpDZ6V7xOAmnyxfX T16P0h1DDwjtxtpG2zdov/miN0o1+seCetNKI9sMr9AfU7YRDZENj9SMSlaRdY9lI/ RbiOHAKiIhIHyixYyHuYEbn8UdFnexgzxpy9GkPokrH2/l4hRf1a3+7TcIjvgpi51o NpO4OFUxaLnkA== Message-ID: Date: Fri, 1 Apr 2022 16:29:56 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: fr To: guix-devel@gnu.org From: Justin Veilleux Subject: Getting the name of file-like objects X-Host-Lookup-Failed: Reverse DNS lookup failed for 37.120.193.124 (failed) Received-SPF: pass client-ip=37.120.193.124; envelope-from=terramorpha@cock.li; helo=mail.cock.li X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, HTML_MESSAGE=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Fri, 01 Apr 2022 18:36:02 -0400 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=1648852591; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=tS0zyYnYfbfSF2HJ4e+8wcwpoIecFdWDvELZOOPQA2g=; b=O32EbtW2cX5u/g/RirNhjcHzO2JUVRm4IuuYZbZOLVy7Aee+Rnk/tqojMOZnnZ30tY2/b2 CFMEDChHktvJ1jpTiCYadEFjwOUTC5T5wOqQEBMns/BkDCo4OGJwWY4aKRbB4c1E5SJT+c mzL6nGR+XUxPukJdzckY6yuPT4BJRrN2Ess7x+7CsiVVz5iMTd532W4eAUjLQ6epgeNmtL rnR/DC7ESsX8YooHKk3T+eDjsuFAXgTdyhEl9ruooIs+05fYZZvvediuIpA+o13cf6us++ JY+RBrNEjWQDVQcokde/xgwR44nvNxZ+HPT0Y/EQUW6UnQkpT2S3uCmpPRm+CQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648852591; a=rsa-sha256; cv=none; b=YrSBCAJxj1ChLt3X7+1kIuWsLv/YqeAXIbwyQYm9i7uRgWKk3lFURQkf1ws6sb7PM4K780 pzTU5qKay7UjZCCpsL3fdoIH9JALH5i2kogeXm0QZEdyiypcW2hb5vORjLrStxb3MX1YHM gdeyoGlZvQK3PeLhWILioYBN0M+YiW74ILl2cxwCq18dmPudrWN5JvZVdQ7M2ZZZDvU95M GaIsKePxHvGCX1/ip/O8wO7NwBhl8m9UxC4R5RV0rid3vv7gWWDrfcxnVFSiPObq86pdcx 8WVKvAoTGlPlfhpN61VbiS7okgnlLzSFcg6HQZcOgG8M1dj+lg5PCnPVOzGJpA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=cock.li header.s=mail header.b=ZnXC4Oeq; dmarc=none; 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: -5.07 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=cock.li header.s=mail header.b=ZnXC4Oeq; dmarc=none; 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: 88F4E3D6C0 X-Spam-Score: -5.07 X-Migadu-Scanner: scn0.migadu.com X-TUID: hizGsx0I67R9 This is a multi-part message in MIME format. --------------P0kbECjtkMepCVEXB20o7UIx Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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? Cheers. --------------P0kbECjtkMepCVEXB20o7UIx Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit 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?

Cheers.

--------------P0kbECjtkMepCVEXB20o7UIx--