From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Daniel Tornabene Newsgroups: gmane.lisp.guile.user Subject: Re: Brainstorming Wisp and Guile for financial bookkeeping Date: Wed, 4 Oct 2023 18:29:09 -0400 Message-ID: References: <87v8bpeykp.fsf@dustycloud.org> <875y3mktdf.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14202"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Christine Lemmer-Webber , guile-user@gnu.org To: "Dr. Arne Babenhauserheide" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Oct 05 00:29:50 2023 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 1qoANJ-0003UG-RB for guile-user@m.gmane-mx.org; Thu, 05 Oct 2023 00:29:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qoAMu-0004c0-Um; Wed, 04 Oct 2023 18:29:24 -0400 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 1qoAMr-0004bj-Hf for guile-user@gnu.org; Wed, 04 Oct 2023 18:29:21 -0400 Original-Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qoAMp-0006Id-NZ for guile-user@gnu.org; Wed, 04 Oct 2023 18:29:21 -0400 Original-Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-52fe27898e9so566535a12.0 for ; Wed, 04 Oct 2023 15:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696458556; x=1697063356; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=se1LoXJ98E4ACsoQHSgOSfwT7W3qkXA/kVD1DGigrgQ=; b=ZBQ7AahWsi7jsoMfMV4xrosqQqEVPIfsSpmm9HBM5IjSpX1BFRi86V6S2ZEfu2uNRs 6N29mPpGNGPKn2URFHs5acRHz8RuHPaQHMsmB4nLHVe8RoFzt5Dtkt5q6Czf0JGGDR5g r09ZoiQjGxMTZuNkPIbxzlArQzt7RJQgDnnKPzcNsIB45Nu94XDpWp+m8KAewaggq2oO AJmu+CkH+66G3I7srzGV56S7rBp+VNIJdvbByIwSps2S/wV9t97qqyNYAwnL3edjtVya c0Ko06Bu4i414tkbv9HsIP89EmW49Y1foE8jIlcBE2lRXuj82/vozCEzv7KuTFN2d8LN zFsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696458556; x=1697063356; 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=se1LoXJ98E4ACsoQHSgOSfwT7W3qkXA/kVD1DGigrgQ=; b=Uf/2sN/cfbNF4oZcgaGNVmJDQzj90nRBJVf+wZkWwO1ggfsnzPYR3ekTJHfvu30VSv olg6sa0Z26ZZuQ8kj7YbgnTh2pTz429suVOth2Y4cLycOiwWPDUFvdUHj2FxwuI362GP V1ygGyHFhAJrApg66sRfWLK7BubnpmQPkpLLi+ubvgWbA1KlzUFTI3O8yptoR4WPoPep GKRFHM8Z1ZLa3jj9A6Z3Wz+PA/okDRNyZqdFs3uO+Ty5Cu1iMYecMfa4vFAKhgo/O6wz nGM4T+Urgfr2H10g5UARcZDDyRgoSD+Q6UnDmfyzFgTxzLbeJQHO3AsuRAGkUTFpY8se scXw== X-Gm-Message-State: AOJu0YzRp8A8lRNrzSEOxd1H1h87uTgUymMkDoho14JphPNmFD4BLq4p TXVgKo89ULd+ynFtflu6wYEsVURrn3oROh0WFnaWgcfTXLE= X-Google-Smtp-Source: AGHT+IGZF/4NTCYGssE8yX6fu6SRUgvqWSJD6R16qbFpvhVCraGjbFMkr2829GOTR4ql7iDCTdZ8b0Q72hrbg1NmXnw= X-Received: by 2002:a05:6402:1641:b0:52f:c073:9c37 with SMTP id s1-20020a056402164100b0052fc0739c37mr3071280edx.3.1696458556284; Wed, 04 Oct 2023 15:29:16 -0700 (PDT) In-Reply-To: <875y3mktdf.fsf@web.de> Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=d.t.peters777@gmail.com; helo=mail-ed1-x52b.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, LOTS_OF_MONEY=0.001, 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-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19232 Archived-At: sub'd! On Wed, Oct 4, 2023 at 4:47=E2=80=AFPM Dr. Arne Babenhauserheide wrote: > > Christine Lemmer-Webber writes: > > > 2020-03-30 * "Starting balance" > > Assets:Retirement:IRA 1321.84 USD > > Equity:OpeningBalance > > I wondered whether we could make this executable as it is, but for that > we=E2=80=99d have to create one procedure for every date. > > Since accounts have to be declared with something like > > account ArneBab:Assets:Autorenhonorar:epubli > > creating a proc per account would actually give us some compile-time > validation. > > import : ice-9 optargs > > > define USD 'USD > define-syntax-rule (account name) > define* (name #:optional value currency) > list (quote name) value currency > define (entry description > account-name1 value1 currency1 > account-name2 value2 currency2) > ;; do something useful > . description > > > define-syntax date > =CE=BB : x > syntax-case x : * > : _ * description account1 account2 > #' apply entry : cons description : append account1 account2 > > > define-syntax-rule : 2020-03-30 args ... > date args ... > > > ;; Missing piece: Running > ;; define-syntax-rule (the-date args ...) (date args ...) > ;; for each possible date. > > > > And actually implementing some state tracking =E2=80=A6 > > This already works (but only returns "Starting balance"): > > > account Assets:Retirement:IRA > account Equity:OpeningBalance > 2020-03-30 * "Starting balance" > Assets:Retirement:IRA 1321.84 USD > Equity:OpeningBalance > > > Best wishes, > Arne > -- > Unpolitisch sein > hei=C3=9Ft politisch sein, > ohne es zu merken. > draketo.de >