From: Daniel Tornabene <d.t.peters777@gmail.com>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
Cc: Christine Lemmer-Webber <cwebber@dustycloud.org>, guile-user@gnu.org
Subject: Re: Brainstorming Wisp and Guile for financial bookkeeping
Date: Wed, 4 Oct 2023 18:29:09 -0400 [thread overview]
Message-ID: <CAMo=-SBbyjVk7uB7aY8fF88XbyuknZs=RFKPfzOs2A2CwFjTjQ@mail.gmail.com> (raw)
In-Reply-To: <875y3mktdf.fsf@web.de>
sub'd!
On Wed, Oct 4, 2023 at 4:47 PM Dr. Arne Babenhauserheide <arne_bab@web.de>
wrote:
>
> Christine Lemmer-Webber <cwebber@dustycloud.org> 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’d 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
> λ : 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 …
>
> 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ßt politisch sein,
> ohne es zu merken.
> draketo.de
>
prev parent reply other threads:[~2023-10-04 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-02 17:05 Brainstorming Wisp and Guile for financial bookkeeping Christine Lemmer-Webber
2023-10-04 19:34 ` Dr. Arne Babenhauserheide
2023-10-04 22:29 ` Daniel Tornabene [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMo=-SBbyjVk7uB7aY8fF88XbyuknZs=RFKPfzOs2A2CwFjTjQ@mail.gmail.com' \
--to=d.t.peters777@gmail.com \
--cc=arne_bab@web.de \
--cc=cwebber@dustycloud.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).