From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Christopher Lam Newsgroups: gmane.lisp.guile.user Subject: Re: Happy birthday, Guile! Date: Tue, 18 Feb 2020 13:38:37 +0000 Message-ID: References: <874kvq1syo.fsf@gnu.org> <50ca1e5e81fcd034f6ff19b4c51a7da5d1d5285e.camel@gnu.org> <87lfp2mitc.fsf@elephly.net> <874kvpd15f.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="64475"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Feb 18 14:39:29 2020 Return-path: Envelope-to: guile-user@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 1j4361-000GgV-2R for guile-user@m.gmane-mx.org; Tue, 18 Feb 2020 14:39:29 +0100 Original-Received: from localhost ([::1]:35144 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4360-0004Yn-4B for guile-user@m.gmane-mx.org; Tue, 18 Feb 2020 08:39:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48057) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j435g-0004Fk-7z for guile-user@gnu.org; Tue, 18 Feb 2020 08:39:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j435e-0006rE-R4 for guile-user@gnu.org; Tue, 18 Feb 2020 08:39:08 -0500 Original-Received: from mail-ed1-x536.google.com ([2a00:1450:4864:20::536]:45613) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j435e-0006qq-K2 for guile-user@gnu.org; Tue, 18 Feb 2020 08:39:06 -0500 Original-Received: by mail-ed1-x536.google.com with SMTP id v28so24816413edw.12 for ; Tue, 18 Feb 2020 05:39:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=13zRM4hl10sUmMt64TKq3esXrpdFBUbMMrU4uXd2EqE=; b=n/5pcQv00me4sIWw6Kf8Z8z20Eq4o/twtxqfHxUmLhrENf9pwfIzLogToGZkV/dpWd RLIJy0Fnyj63Uh2yXuR4QXA1MnYvxFjnB0duDGdrsd3xpXYoREwGe8ihycKAxkAZR58U l7Nbsei2wWszQs4hAQ6HkBp/ZatY09AMo75EQW+IfdFUmKoWyqxexd5HPutPs710ryXZ hkhI9T4fDfJkLNj1ARBqyska7Q5s53GZsq9aU3ib+sHfIVTFUGrhg/ijEsphzK2oCoNB sL/9je+wHX4A2aqbNZoUkJ6pjfVU9aZni2a5JWL2CgMBDq71zNwgXiGwqjPazkM2XXVX ytug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=13zRM4hl10sUmMt64TKq3esXrpdFBUbMMrU4uXd2EqE=; b=KxNvkqKEMkqP4HpH2kk23Xv4pxTqWazlWSIVQkf6KvYyoAi8gKrQh3w+uWuy31c+rz Bm/MZGnesytEqHE42j4mo8COXSJB19LN+u6IdMLX1msKZPbIzVS0Rmxt8jl7+Nti9BBs rKOFVjMWNYGGmYyApA2UXFO3lVMTxCx2vnVfNJcFYUaKqNPABLR3fmJRtckwNuPp7ML0 9uAdInIHG5IB1ysrhm1mpa1A15ChWaMof5fuWfD4BgZreN0YfdmxdPV84nKD4cOx9j0g f6yuC9GwNEqdV2qcVrt3kfYskUdG+0bTu9Q3LPF+8eVzAd3z/3q6FMq6q35RMx9WlTes Jb6Q== X-Gm-Message-State: APjAAAUcG/erD3dKKwtKUgQOkgoVAyMULTyHggvNtf0HuBnaMPp7ptFP Gdm3ce74r9Bo4EHtZTb8L+RJzffutWUWJauRzmWtvpMeaz0= X-Google-Smtp-Source: APXvYqzO/KfdGivmenuyqgrZZJRkKIqQ3Dsek/brVEEbCNeatof5Dbrn1xwsxqWSD62SpBtYCBac5y+xdikxzQG7o74= X-Received: by 2002:a50:9fce:: with SMTP id c72mr18610196edf.68.1582033144887; Tue, 18 Feb 2020 05:39:04 -0800 (PST) In-Reply-To: <874kvpd15f.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::536 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16205 Archived-At: A bit late, and perhaps not as sophisticated as some bigger modules here. Two functions defined as follows: nested-alist-set! nested-alist-get at https://github.com/Gnucash/gnucash/blob/1f83cfaf64d1cd3c8862b427dd043154f78= 0a772/gnucash/report/html-chart.scm#L37 Consider a nested alist describing unix file system (define lst (list (cons 'usr (list (cons 'bin "binary files") (cons 'games "g4m3s") (cons 'include (list (cons 'guile (list (cons '2.2 "old"))) (cons 'linux "da best"))))))) We can access a leaf node via (nested-alist-get lst '(usr include linux)) --> "da best", and set a leaf node via (nested-alist-set! lst '(usr include python) "boo"). This is probably easy to seasoned schemers, but still a nice pair of functions to use in modifying nested alists before conversion into json. On Mon, 17 Feb 2020 at 09:16, Ludovic Court=C3=A8s wrote: > Hi! > > Ricardo Wurmus skribis: > > > What do you think about adding these things to > > https://notabug.org/cwebber/guile-webutils/ ? This was once intended t= o > > be a collection of useful tools that come in handy when writing web > > applications. > > I didn=E2=80=99t know about guile-webutils but consolidating Web tools in= this > package sounds like a great idea! > > Ludo=E2=80=99. > >