From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Thompson, David" Newsgroups: gmane.lisp.guile.devel Subject: Re: Functional datatypes in Guile Date: Tue, 28 Feb 2023 11:04:36 -0500 Message-ID: References: <2682583.mvXUDI8C0e@t480s> <86bklenq75.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9906"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jessica Tallon , guile-devel To: pukkamustard Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Feb 28 17:05:30 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pX2Tq-0002Hr-2I for guile-devel@m.gmane-mx.org; Tue, 28 Feb 2023 17:05:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pX2TN-0001QZ-S0; Tue, 28 Feb 2023 11:05:01 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pX2TE-0001DP-0q for guile-devel@gnu.org; Tue, 28 Feb 2023 11:04:55 -0500 Original-Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pX2TB-00083P-Cp for guile-devel@gnu.org; Tue, 28 Feb 2023 11:04:51 -0500 Original-Received: by mail-qk1-x729.google.com with SMTP id p12so2721486qki.1 for ; Tue, 28 Feb 2023 08:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=worcester-edu.20210112.gappssmtp.com; s=20210112; t=1677600287; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=SPFxzvGNL2OwMjDsce00OYoz5YIgZ7CcD/etXPDCSHE=; b=PMw5TDNOX0yo4jJhvxTLAhr66YlOjWPYPsos8fLx4oX1gsEeZ1ZZF3E/yt9O0heTmy CYjcyK7NliVYXGvg2SaXtm0WzrY8WC+2h714IAjek2WzdS0Ha7Ss5CHl1Glni3jY1gCu eH452pE2SwdKRA67H/tL7pobPacR/SRddeOYZhRMSZobKRV+mb4t3UNL9xcu5Rapmc1W 9q9Ajo37sB4t4GYUT+ZT0s4E8bSRvc1RwYSbuyHWDIByEqAxhCNs89nPaKXYECedLtUI xyiQqsxYRpdGFwnQdDKB6X9ZAx5MTbzHd8z7ZIxwDDjy2qe3eso7M7/Rp8XoO9Blcyic 3CVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677600287; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=SPFxzvGNL2OwMjDsce00OYoz5YIgZ7CcD/etXPDCSHE=; b=Fk3zrt23LPpSwa2eBqDooIr37cfHfrwW8r9iq1q5syA6u++Ss6gXkRn8ReptiYPdvt pB5vKKB8Si4fzSwsBzbbqDh3AYbgybKn0SexGCK0r+s/AXMgUeJTRQ3uP+XV5/+ItkEU P7B95Kwv8JJXPrEo1h3IyIJRJjySVv9slKltVaWkM8f71NDbW01TgJqrWqyfI+LFHX55 qoAZa2q8zK5Y7LyjRLVWJuI17t0UT3S9BxMNzTp/X+zGQLm72uHVEkRn23tMnlVAVDoL JFAxTrFimppQSzlCSwxDyoeT8j2Dl6FGkKo39Kpgwadx8T5JjNsUsMim+uyEFTED52lc JbgQ== X-Gm-Message-State: AO0yUKXVOFp/AWo52KfKe/S8AKJqnUvFNhAYGQvXi0Rd4pbnuh5kum0n LSnWrBjE+BZwRcrWoYioHmNEWSDaPSswdAlJ4hCPCmbivjploQ== X-Google-Smtp-Source: AK7set8kwJBhvjRGP2uVTmJl4P4sqP84m8Ur3vjDu1uinlB2aTURpJlarlZXqAwzzAru6aadmUMA3YShTLyoGskNlJU= X-Received: by 2002:a05:620a:2994:b0:735:6357:c1ce with SMTP id r20-20020a05620a299400b007356357c1cemr5043193qkp.1.1677600287484; Tue, 28 Feb 2023 08:04:47 -0800 (PST) In-Reply-To: <86bklenq75.fsf@posteo.net> Received-SPF: pass client-ip=2607:f8b0:4864:20::729; envelope-from=dthompson2@worcester.edu; helo=mail-qk1-x729.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21760 Archived-At: Hi pukkamustard, On Tue, Feb 28, 2023 at 3:34 AM pukkamustard wrote: > > > I've been using SRFI-146 > (https://srfi.schemers.org/srfi-146/srfi-146.html) for functional > mappings. There's a Guile port: > https://inqlab.net/git/guile-srfi-146.git/ (also in Guix - > guile-srfi-146). Your Guile port of (srfi srfi-146 hash) looks really nice! A functional hash is the most important data structure for our needs at Spritely. Do you know if it's thread-safe (unlike vhashes)? Andy's fash implementation uses atomic boxes, for example. Also, what are your thoughts on read syntax? I find myself using alists more often than I probably should because the syntax is pleasant. (hashmap comparator 'foo 1 'bar 2) is... okay, but terse syntax for the common case of a hash with literal keys would be nice. For example, #hq((foo 1) (bar 2)) for a hash with keys compared with eq? Scheme is kind of odd for not having hash literal syntax. > I've previously used pfds (as mentioned by Maxime), but I've encountered > some nasty issues that are keeping me from using it again > (https://github.com/ijp/pfds/issues/5). Good to know about this issue, thanks! - Dave