From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christine Lemmer-Webber Newsgroups: gmane.lisp.guile.user Subject: Brainstorming Wisp and Guile for financial bookkeeping Date: Mon, 02 Oct 2023 13:05:16 -0400 Message-ID: <87v8bpeykp.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3790"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.5; emacs 28.2 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Mon Oct 02 19:15:06 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 1qnMVd-0000h4-N4 for guile-user@m.gmane-mx.org; Mon, 02 Oct 2023 19:15:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qnMVD-0003F5-CE; Mon, 02 Oct 2023 13:14:39 -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 1qnMVA-0003EX-G3 for guile-user@gnu.org; Mon, 02 Oct 2023 13:14:36 -0400 Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qnMV8-0004Hh-GN for guile-user@gnu.org; Mon, 02 Oct 2023 13:14:36 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 3B8DD32007BE for ; Mon, 2 Oct 2023 13:14:32 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 02 Oct 2023 13:14:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dustycloud.org; h=cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t=1696266871; x=1696353271; bh=Z3a0LGXbMWcKcWZ/e0ramye7G Jcuo9GUrO3dU8HPAbs=; b=cktn4R0p5qycgzAmWxRkCuJzuUZ42rsMJx+kekL1n HDA0bvJXHnvLd+h1YkaBQdHsRZpElmvCfSp4/YmIkzVMBzejzqsyeuE9qujaLOhq 0PiLzRQBCT0YIg0hsUAlJI7G/rcPF+sxiu6JwB1/irnOj3QMCHsP/G444nUB90Vv 9fJyRokYeHGv+//IbBm4sbtt6n5hcnrGlwKZBOlheIQrwbh3DevpznSXxJp75aLB Q8eG54K/9l05/mpMJ4ZMllsN16DuVgQvQyzEkuoImaRzzXzOyCkf3KBKdtMEMBQf 0wrcLeUNWB50KAW4IA+/U5IoOKW1P+ge7ESmO77vC2p7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1696266871; x=1696353271; bh=Z3a0LGXbMWcKcWZ/e0ramye7GJcuo9GUrO3 dU8HPAbs=; b=PhAngl42b8W6S3ElSULV6sYhYB1znGsaznun1itp4aVsnyp4uz8 kMIeLlZVM7W+NISzDwwhtxwPRxRJXr9S+3I+eM26eLijXHuaZjNtxf0aUVNwIbG3 sZrLG0rw03rpUJwUNHIi9Wtwz61meMHQGqYQGnTMyyJjF5F7XjawbKhodCi6iF8F SP9jA8JGhF5SBYGRM8viDdUALWqhLKJvFk/DTXM6tkRX0PpS+OFibqL4ROwFuqTO UBSJW9w6t9wktTSY9w/olINaQYyjiipB1xAfr4J2Gf88Zj7gD5yP38lrQUU65XDD 7qez55cLTalIGOEfUXvqoe6Ay3JxLCIMvdA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdelgdduudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpegfhffvufffkfggtgesthdtredttd ertdenucfhrhhomhepvehhrhhishhtihhnvgcunfgvmhhmvghrqdghvggssggvrhcuoegt figvsggsvghrseguuhhsthihtghlohhuugdrohhrgheqnecuggftrfgrthhtvghrnhepve fhudelteettdduhefgueefgeegffehfeetheejudfhjedvueejveetjeeiteffnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheptgifvggssggvrh esughushhthigtlhhouhgurdhorhhg X-ME-Proxy: Feedback-ID: i006446df:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 2 Oct 2023 13:14:31 -0400 (EDT) Received-SPF: pass client-ip=64.147.123.24; envelope-from=cwebber@dustycloud.org; helo=wout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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, LOTS_OF_MONEY=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:19209 Archived-At: This isn't actual software, it was just me looking at a pile of Beancount / Ledger files I've made over the years and thinking, "what if this was just a DSL on top of Guile?" And then I also thought: "what if instead of making a custom DSL, we just used Wisp?" Here's I think how you might write an entry: * 2020 03 30 "Starting balance" Assets:Retirement:IRA : USD 1321 84 Equity:OpeningBalance Which would translate to: (* 2020 03 30 "Starting balance" (Assets:Retirement:IRA (USD 1321 84)) (Equity:OpeningBalance)) If we wanted to make it look like Ledger/Beancount, it would look more like: 2020-03-30 * "Starting balance" Assets:Retirement:IRA 1321.84 USD Equity:OpeningBalance Actually, that's both valid Wisp and Beancount! You could parse this as: (2020-03-30 * "Starting balance" (Assets:Retirement:IRA (USD 1321.84)) (Equity:OpeningBalance)) Except... IEEE floating point numbers aren't great for financial things, so hence me thinking maybe you'd separate them (even though it looks very yucky). And I thought it would be nicer if the first thing was the constructor, and I figured I might make the dates separate fields, but you could switch most of these out in post-processing (with some risks over the floating point stuff... notably risks Ledger also takes, infamously). Here's another example of Beancount syntax for asserting a balance: 2020-01-03 balance Assets:Banking:Checking 7337.43 USD Yeah anyway you could read that in Wisp too. As for special fields, eg check numbers, keywords could work: * 2020 01 03 "Tangled Woodworking" "" #:check 1835 #:invoice 2853 Assets:Banking:Checking : USD -4075.00 Expenses:House:RepairsImprovements (* 2020 01 03 "Tangled Woodworking" "" (#:check 1835) (#:invoice 2853) (Assets:Banking:Checking (USD -4075.00)) (Expenses:House:RepairsImprovements)) or * 2020 01 03 "Tangled Woodworking" "" . #:check 1835 . #:invoice 2853 Assets:Banking:Checking : USD -4075.00 Expenses:House:RepairsImprovements (* 2020 01 03 "Tangled Woodworking" "" #:check 1835 #:invoice 2853 (Assets:Banking:Checking (USD -4075.00)) (Expenses:House:RepairsImprovements)) Those dots wouldn't be needed if Arne hadn't reversed agreeing with me that keywords should always be part of a previous expression without needing that dot foo ;) Anyway. Just a thought. I haven't written software for this. I have thought it could be nice to do my finances at the REPL though. :P Feel free to steal this idea, or not... - Christine