From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qIdqENin/WBJPwAAgWs5BA (envelope-from ) for ; Sun, 25 Jul 2021 20:05:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id oB70C9in/WDAZAAAB5/wlQ (envelope-from ) for ; Sun, 25 Jul 2021 18:05:12 +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 3348E8AF3 for ; Sun, 25 Jul 2021 20:05:11 +0200 (CEST) Received: from localhost ([::1]:51158 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7iUw-0007R5-8i for larch@yhetil.org; Sun, 25 Jul 2021 14:05:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37136) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7iUo-0007Qa-49 for guix-patches@gnu.org; Sun, 25 Jul 2021 14:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m7iUn-0003Jr-SZ for guix-patches@gnu.org; Sun, 25 Jul 2021 14:05:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m7iUn-0002pd-P5 for guix-patches@gnu.org; Sun, 25 Jul 2021 14:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49280] [PATCH v2 1/3] gnu: racket: Update to 8.2. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 25 Jul 2021 18:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Leo Prikler , 49280@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 49280-submit@debbugs.gnu.org id=B49280.162723628410854 (code B ref 49280); Sun, 25 Jul 2021 18:05:01 +0000 Received: (at 49280) by debbugs.gnu.org; 25 Jul 2021 18:04:44 +0000 Received: from localhost ([127.0.0.1]:49351 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7iUW-0002p0-2d for submit@debbugs.gnu.org; Sun, 25 Jul 2021 14:04:44 -0400 Received: from mail-qt1-f178.google.com ([209.85.160.178]:38648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7iUU-0002ol-DR for 49280@debbugs.gnu.org; Sun, 25 Jul 2021 14:04:43 -0400 Received: by mail-qt1-f178.google.com with SMTP id h10so5469264qth.5 for <49280@debbugs.gnu.org>; Sun, 25 Jul 2021 11:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=iJFM6kngEE4zGv4axQ8kWzLIHlq/EI9vRkoZ+nDl3/U=; b=SYYsD9t5GZIUQMn2kkC5zq6HIwpiS7zqcavVbKyPwEFZ9oQOUyGX8yiooLsqIzG1Gy 5tckbaGUlg8ygufomIiOEWrtjoXqX8+Ma0ksplrFXL8j0IIU1dLXLKhiuJjyhPLhRQQC hRnLWw0GMVR7btbDbVcYDQtcIFtrilj0zEBwoVpuLwsX/AdqHDJV8oVK/1cocLLpKxOv BARcmLOWrSEA7kZ3FOy/SmVJ5YISTavuCZYkafJBrX9LS0LSDh1/5S4pDQ/Pm1aoy0rc yaq0Y3xqbIwi8cGO07Jbed2AJCP+p1OP7B4sRX5g+NADClBQbdmBgoRi5ancd2FuYsll U0hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=iJFM6kngEE4zGv4axQ8kWzLIHlq/EI9vRkoZ+nDl3/U=; b=n/o73mkGq7yp2t1aSMBgK/mg98t/zLpxxvv2RtMQSdg2VR6w0IDHBbyh9CLOQWXbiR gADqTkkomgcVDdwPYnWmxciG+SKtdMmfIxsg7j6M61N+o6HAGEboc3yye6+d956hLIS0 IY6PDnOom6kMQygmO7Vix/KZonzXAoPi7x5IdUgdFqVjnImqiJ4dcj9+3ne5+zuKsJd9 mAYSbKYH4zKnLr4MOmtH3BJSTCGl9FdWQVomsVmsYph1ORJ9NnQgmFSqvEua81uQPkIk nbU8AT84LJUJjVo+ThzMTkPPYG94fSt5rddJsfbIco0qw3uPKyHr5ncTV4r6vcTf28BD wbyg== X-Gm-Message-State: AOAM532QCIinM6K1qRDiK21gCSMurbZHQFpqSZuqDKxJmZDC+ntRQ4Vh UCpzSiNnjYK39/UJu2H4bQY7VHso6ZLlzoaBlb8= X-Google-Smtp-Source: ABdhPJxsR61mv0b6QGob3MDJg3HkqaAFkyu53nWZnxc68LWXuZRcrXOkBxRpKf8AnFg7vvOPAI57vA== X-Received: by 2002:a05:622a:44b:: with SMTP id o11mr7925981qtx.271.1627236276973; Sun, 25 Jul 2021 11:04:36 -0700 (PDT) Received: from [192.168.45.37] (c-73-125-89-242.hsd1.fl.comcast.net. [73.125.89.242]) by smtp.gmail.com with ESMTPSA id c1sm2613204qtj.36.2021.07.25.11.04.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 25 Jul 2021 11:04:36 -0700 (PDT) References: <270db91e-24f6-2754-7164-d0406aeebc60@philipmcgrath.com> <20210719063143.788661-1-philip@philipmcgrath.com> <552707abf1fdcba6de34fbb5a5466dea31c8417a.camel@student.tugraz.at> <95998dae5aec25fed80dd1e5a3808167796282ae.camel@student.tugraz.at> <94d8a86a-dca6-46a5-0c5e-fd82a6cd6397@philipmcgrath.com> <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> From: Philip McGrath Message-ID: Date: Sun, 25 Jul 2021 14:04:35 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <45fc43e2ceba9e6a711fe1bb99320875f2b45f44.camel@student.tugraz.at> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627236312; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=iJFM6kngEE4zGv4axQ8kWzLIHlq/EI9vRkoZ+nDl3/U=; b=c/UDbd/Wfb63Xwaa8Ls4j7jKOal72s2cO+mBvGsQIg2hCd4vkoX/vZ7Dvb793X6OdqA5yz 8tHfPLZx806m3roM7Pqj1lPmG1W/0/JiNbCkJ869+4YSBbN6BXv0L+f3kHq2wrbz78ANwO nhsuGHeJfPSbmvHf+aBUcM+nB/uUR9mS0mPIa0KZF3i0wqYvjjIgNLsrIGDe5dsNRQ57Zk PkjL+tGsUo3L23h5/cAtaBvlGaApsKEQzNoKnycduVxmnA+fTkTV9pD6bjwh4o9Gig499W zV4ZEgf1CnPIsu6AVOVHFf2QOsrEvcjNoa32k/48CjuvDtbL3126fPv/8AgWmQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627236312; a=rsa-sha256; cv=none; b=m7tM5tjY+ard/MuBHnedTThdCPAhQFpNirOO03BiOXws006QhhcScAlucXsKPSX51KSy/u TfiqwwZlSe7nYOcEdG0ON2/aBbHHyR6LzLSMPDwW6u4oNUL2HEjEkcsdamPJGhHrqs3AuL Hdk27kqyQ8Rxq+WMDYRRAg0vtbs7HNtEGS51bO3vEp1S1b7T9nQQ/i5prM3byuGp+uE9ED ZHaOsu/GidQ79ci8q2C+sGTQlGo0fre5ZfGbrii6Nc7UI3qi1SsJk8KP4t33Fwp88GeSqr TcclUqx2cKn61bKuXDZ8eXM/MU3B536j/gTtU4+KRhCRajHK3q8ihWillVIprw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=SYYsD9t5; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=philipmcgrath.com header.s=google header.b=SYYsD9t5; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 3348E8AF3 X-Spam-Score: -1.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: fxs33vIiyXgh Hi, On 7/25/21 9:03 AM, Leo Prikler wrote: >> On 7/19/21 2:31 AM, Philip McGrath wrote: >>> + (add-before 'configure 'initialize-config.rktd >>> (lambda* (#:key inputs #:allow-other-keys) >>> - (chdir "src") >>> + (define (write-racket-hash alist) >>> + ;; inside must use dotted pair notation >>> + (display "#hash(") >>> + (for-each (match-lambda >>> + ((k . v) >>> + (format #t "(~s . ~s)" k v))) >>> + alist) >>> + (display ")\n")) >>> + (mkdir-p "racket/etc") >>> + (with-output-to-file "racket/etc/config.rktd" >>> + (lambda () >>> + (write-racket-hash >>> + `((lib-search-dirs >>> + . (#f ,@(map (lambda (lib) >>> + (string-append (assoc-ref >>> inputs >> lib) >>> + "/lib")) >>> + '("openssl" >>> + "sqlite")))) >>> + (catalogs >>> + . (,(string-append >>> + " >>> https://download.racket-lang.org/releases/" >>> + ,version >>> + "/catalog/") >>> + #f)))))) >>> #t)) > This is perhaps a somewhat noobish question, but why must we use dotted > pair notation here? To me personally, reading '(a . (b c)) is > confusing as it could more clearly be written as '(a b c). Is this a > Racket convention? Yes, the Racket reader requires that hash table literals use dotted pair notation, e.g. #hash((a . (b c))(d . 2)). (Additionally, hand-written Racket would often use square brackets for the key–value pairs.) I think it's ultimately for historical reasons, but there are various subtleties: under `quasiquote`, for example, the value position can contain `unquote`, but the key position cannot. Of course, that doesn't necessarily mean the Guile code must use dotted pairs, but, at least as a Racketeer, I found writing these s-expressions with a bit of a "Racket accent" helped me to remember that this code is generating Racket. > To attempt a better summary: Specifying `#f' will allow Racket to > search for user-specific libraries etc. (in > $XDG_DATA_HOME/racket/$RACKET_VERSION) in addition to "system-specific" > libraries stored in $HOME/.guix-profile, am I correct? > > If so, then yes, doing that is absolutely fine (you could compare it to > how Emacs users can still install stuff via ELPA). Yes, that's a much better summary. (Pedantically, the user-specific path could be different, depending on the configured installation name and other things.) The other issue is that I believe *not* specifying `#f` for `racket-minimal` would break the build of `racket` starting in the second patch, when the main distribution becomes a layer chaining to `racket-minimal`. At least, it broke some examples of layered installation I tried, which is how I figured out I'd done the wrong thing in . If that were the only issue, there might be some other workaround, but it's worth bearing in mind, particularly because the problems caused by buggy "config.rktd" files can be subtle and easy to miss. -Philip