Re: bean-identify, bean-extract, bean-file

2024-10-29 Thread Martin Blais
+1 to that


On Tue, Oct 29, 2024 at 3:05 PM Jason Crews (the1gofer) <
jason.cr...@gmail.com> wrote:

> At this point I think it's wiser to just write a script on my own
>
> Jason Crews
>
> On Tue, Oct 29 2024 at 11:52 AM, Petr Beránek 
> wrote:
>
>> Hi,
>>
>> pipx is useful if you just want to install beancount and fava as
>> standalone, isolated apps. However, if you want to implement your own
>> importers or plugins (e.g. using frameworks like beangulp or
>> beancount_reds_importers), then you need to install beancount, beangulp
>> etc. as libraries (to be able to import from them), typically via pip.
>>
>> In my current setup, I installed beancount (and all related packages) in
>> a virtual env (using pipenv). I installed fava via pipx as a workaround for
>> its incompatibility with the latest version of beancount, and thought, that
>> installing everything via pipx might be the easiest option for newcomers -
>> which may not be the case. Sorry for the confusion.
>>
>>
>> Best regards,
>> Petr
>>
>> Dne út 29. 10. 2024 16:54 uživatel Martin Blais  napsal:
>>
>>> Oh I see you mean the importers.
>>> Here is an example setup:
>>> https://github.com/beancount/beangulp/tree/master/examples
>>>
>>>
>>>
>>> On Tue, Oct 29, 2024 at 11:50 AM Jason Crews (the1gofer) <
>>> jason.cr...@gmail.com> wrote:
>>>
>>>> Parser… a way tool to parse csv.
>>>>
>>>> Jason Crews
>>>>
>>>> On Tue, Oct 29 2024 at 8:26 AM, Martin Blais  wrote:
>>>>
>>>>> I'm not sure what you mean by a "parser" but when you install
>>>>> Beancount using pip it should install a `bean-check` tool which you can 
>>>>> use
>>>>> to validate your input file. You can then use beanquery and/or Fava to get
>>>>> reports out of it.
>>>>>
>>>>>
>>>>> On Mon, Oct 28, 2024 at 8:27 PM Jason Crews (the1gofer) <
>>>>> jason.cr...@gmail.com> wrote:
>>>>>
>>>>>> I'm trying to figure out how to use the parsers with bean count, and
>>>>>> I can't seem to get any of these to work.
>>>>>>
>>>>>> If I have to make a guess, it's probably because they have been
>>>>>> depreciated, but I'm not sure.
>>>>>>
>>>>>> once I have a parser, how do I run it in Beanocunt?
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "Beancount" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to beancount+unsubscr...@googlegroups.com.
>>>>>> To view this discussion visit
>>>>>> https://groups.google.com/d/msgid/beancount/b6677c76-b132-4813-ad29-a64a731f458cn%40googlegroups.com
>>>>>> <https://groups.google.com/d/msgid/beancount/b6677c76-b132-4813-ad29-a64a731f458cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>> .
>>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Beancount" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/beancount/C0whnaQplXk/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> beancount+unsubscr...@googlegroups.com.
>>>>> To view this discussion visit
>>>>> https://groups.google.com/d/msgid/beancount/CAK21%2BhOVTDKExa68dt2O%2BhYScso%2BENY%2B%2B8%2BZ-JPo4B68LTnePA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhOVTDKExa68dt2O%2BhYScso%2BENY%2B%2B8%2BZ-JPo4B68LTnePA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Beancount" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to beancount+unsubscr...@googlegroups.com.
>>>> To view this discussion visit
>>>> https://groups.google.com/d/msgid/beancount/m2umhw2w.efd99844-780b-4bd5-9871-4a2d41dafb3c%40we.are.superhuman.com
>>>> <htt

Re: bean-identify, bean-extract, bean-file

2024-10-29 Thread Martin Blais
Oh I see you mean the importers.
Here is an example setup:
https://github.com/beancount/beangulp/tree/master/examples



On Tue, Oct 29, 2024 at 11:50 AM Jason Crews (the1gofer) <
jason.cr...@gmail.com> wrote:

> Parser… a way tool to parse csv.
>
> Jason Crews
>
> On Tue, Oct 29 2024 at 8:26 AM, Martin Blais  wrote:
>
>> I'm not sure what you mean by a "parser" but when you install Beancount
>> using pip it should install a `bean-check` tool which you can use to
>> validate your input file. You can then use beanquery and/or Fava to get
>> reports out of it.
>>
>>
>> On Mon, Oct 28, 2024 at 8:27 PM Jason Crews (the1gofer) <
>> jason.cr...@gmail.com> wrote:
>>
>>> I'm trying to figure out how to use the parsers with bean count, and I
>>> can't seem to get any of these to work.
>>>
>>> If I have to make a guess, it's probably because they have been
>>> depreciated, but I'm not sure.
>>>
>>> once I have a parser, how do I run it in Beanocunt?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion visit
>>> https://groups.google.com/d/msgid/beancount/b6677c76-b132-4813-ad29-a64a731f458cn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/b6677c76-b132-4813-ad29-a64a731f458cn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Beancount" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beancount/C0whnaQplXk/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> beancount+unsubscr...@googlegroups.com.
>> To view this discussion visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhOVTDKExa68dt2O%2BhYScso%2BENY%2B%2B8%2BZ-JPo4B68LTnePA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhOVTDKExa68dt2O%2BhYScso%2BENY%2B%2B8%2BZ-JPo4B68LTnePA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/m2umhw2w.efd99844-780b-4bd5-9871-4a2d41dafb3c%40we.are.superhuman.com
> <https://groups.google.com/d/msgid/beancount/m2umhw2w.efd99844-780b-4bd5-9871-4a2d41dafb3c%40we.are.superhuman.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPKVYmovgrgB3GN%2BMCne9M%2BTByhD9Yv8%3D_fy%2BVYc-Hu5Q%40mail.gmail.com.


Re: bean-identify, bean-extract, bean-file

2024-10-29 Thread Martin Blais
I'm not sure what you mean by a "parser" but when you install Beancount
using pip it should install a `bean-check` tool which you can use to
validate your input file. You can then use beanquery and/or Fava to get
reports out of it.


On Mon, Oct 28, 2024 at 8:27 PM Jason Crews (the1gofer) <
jason.cr...@gmail.com> wrote:

> I'm trying to figure out how to use the parsers with bean count, and I
> can't seem to get any of these to work.
>
> If I have to make a guess, it's probably because they have been
> depreciated, but I'm not sure.
>
> once I have a parser, how do I run it in Beanocunt?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/b6677c76-b132-4813-ad29-a64a731f458cn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOVTDKExa68dt2O%2BhYScso%2BENY%2B%2B8%2BZ-JPo4B68LTnePA%40mail.gmail.com.


Re: Beancount v3 upgrade documentation

2024-10-27 Thread Martin Blais
The C++ rewrite is now on the ice (source is preserved in branch cpp, a
nice new parser essentially /shrug).




On Sun, Oct 27, 2024 at 12:52 PM Lover O'Bean  wrote:

> Thanks, Martin.  This addresses some confusion that I have had about which
> "C++ Rewrite" features were included in to the released v3.
>
> On Sunday, October 27, 2024 at 1:25:21 AM UTC-4 t...@cyrius.com wrote:
>
>> I haven't found any good Beancount v3 upgrade documentation, so I
>> start collecting some notes. Maybe this can be put into Google Docs
>> and improved upon.
>>
>> # Changes in v3
>>
>> * Several tools were split into separate projects:
>> * [beanquery](https://github.com/beancount/beanquery/): lightweight SQL
>> query tool.
>> * [beangulp](https://github.com/beancount/beangulp): import framework
>> for beancount. This is the evolution of beancount's `beancount.ingest`.
>> * [beancount2ledger](https://github.com/beancount/beancount2ledger):
>> converter from beancount to ledger.
>>
>> * bean-report was deprecated in beancount v2 and has been removed in
>> beancount v3.
>> * [beanquery](https://github.com/beancount/beanquery/) is the preferred
>> way to query beancount data.
>> * [Fava](https://github.com/beancount/fava) is a web UI to interact with
>> beancount journals.
>>
>> * The beancount syntax has been made more flexible:
>> * Currencies
>> * Single-character currency names are now supported
>> * A leading slash is now allowed (e.g. `/FOO`)
>> * The limitation for currency names to be 24 characters long has been
>> dropped
>> * Flags
>> * Any of the A-Z characters are now valid flags
>>
>> # Notes about beancount tools
>>
>> ## beangulp
>>
>> * beangulp is compatible with beancount v2 and v3
>> * The upgrade to beangulp requires a number of changes from beancount's
>> `beancount.ingest` framework:
>> * bean-extract no longer exists as a standalone script. You can [convert
>> your config file to a callable script](
>> https://github.com/beancount/beangulp/issues/127), as demonstrated in
>> [import.py](
>> https://github.com/beancount/beangulp/blob/master/examples/import.py).
>> Call with `--help` to see arguments.
>> * Importers have to migrate from the `beancount.ingest` namespace to the
>> `beangulp` namespace
>> * Look at [beangulp examples](
>> https://github.com/beancount/beangulp/tree/master/examples) and
>> [docstests](
>> https://github.com/beancount/beangulp/tree/master/beangulp/tests) for
>> some examples
>> * Optionally, importers can be moved from the old
>> `beangulp.ImporterProtocol` interface to the new `beangulp.Importer`
>> interface, which allows to implement some new features.
>>
>> ## beanquery
>>
>> * beanquery is compatible with beancount v2 and v3
>> * beanquery has a lot of improvements over the older bean-query in
>> beancount v2. Documentation is being worked on (Daniele, is there something
>> to link to; or "look at source code" for now?)
>> * The [query history moved](
>> https://github.com/beancount/beanquery/issues/207) from
>> `~/.bean-shell-history` to `~/.config/beanquery/history`. If you want to
>> preserve your query history, please move the file.
>>
>> ## Fava
>>
>> * Fava is not compatible with beancount v3. This is [currently being
>> worked on](https://github.com/beancount/fava/pull/1859).
>>
>> ## beancount2ledger
>>
>> * Currently not tested with v3.
>>
>> # Upgrade considerations
>>
>> * The beancount syntax has become more permissive rather than more
>> restrictive, so no changes to beancount journals should be required.
>> * beangulp and beanquery are compatible with both v2 and v3, so you can
>> migrate to these tools before switching to v3.
>> * There is no drop-in replacement for `bean-report`. Please migrate to
>> beanquery and the BQL query language.
>>
>> --
>> Martin Michlmayr
>> https://www.cyrius.com/
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/f7291180-4a49-4383-83ea-b65181ac5c19n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPGu_nrnR1W4bXgFMUAVHkc-sC%2Bh-pbRoNdvGGVr_9R_w%40mail.gmail.com.


Re: Wrote a plain-text budgeting tool with beancount converter (minibudget v0.1)

2024-10-22 Thread Martin Blais
Added to contrib list.
Thanks for sharing Frank


On Tue, Oct 22, 2024 at 10:25 AM Frank Davies  wrote:

> I've been using beancount for my personal finances for about 6 months, and
> will probably start to use it for business finances in the future.
>
> But I wanted a budgeting tool that fit in with the plain-text paradigm,
> and beancount has no native budgeting feature. I used a spreadsheet for a
> while but quickly wanted something more custom than wrangling formulas and
> sheet layouts.
>
> So I wrote one. It has a beancount converter using bean-query to allow
> comparing real spending (from beancount) against planned spending (which
> the tool is more built for).
>
> Github repo is here: Minibudget v0.1
> 
>
> Hope this is useful to someone else! Feel free to post in the github
> issues or reply here if you have suggestions, bugs, etc.
>
> Best,
> Frank
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/627d21bb-3cf6-4b00-bfbd-78234722b0b5n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNkpqE4OfFfg5c6c84AGekeR15qXMN6_CkrJXQ3jxmHgg%40mail.gmail.com.


Re: How to track complementary hotel stay

2024-10-19 Thread Martin Blais
Income:Rewards? Income:FreeStuff? You choose. Seems like it could be income
to me.


On Sat, Oct 19, 2024 at 3:40 PM Ken Mankoff  wrote:

> I stayed in a hotel. There was a problem. They gave the room with no
> charge. I'm curious how people might track this, if at all. I could leave
> it out entirely. But it's nice to know what a vacation would have cost,
> which is why I track flights booked with airline miles for example. Is this
> Income:Gift? It doesn't seem like income. Any suggestions?
>
> Thanks,
>
>   -k.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/a636a880-b9e4-42de-bd87-1fdafc68e7abn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM5JkEGwe%2B11M4w8DzYMiyKpO8jpnCfJ1fviAgcATU8sw%40mail.gmail.com.


Re: Installing beanount on mac

2024-10-12 Thread Martin Blais
bean-report and bean-web are gone.
Deprecated, removed from the 3.x line.
(Search the mailing-list)

On Sat, Oct 12, 2024 at 4:21 PM Jason Crews (the1gofer) <
jason.cr...@gmail.com> wrote:

> Hello Everyone,
>
> I've tried installing bean count on a m1 macbook, and a m2 mac mini, and
> haven't had much luck.  The documentation seems pretty old, so I'm not sure
> what to try.
>
> I tried installing with
>
> sudo -H python3 -m pip install beancount
>
> and
>
> sudo -H python3 -m pip install git+
> https://github.com/beancount/beancount#egg=beancount
>
> which didn't work both giving me the error message
> /Library/Frameworks/Python.framework/Versions/3.8/bin/python3: No module
> named pip
>
> I then tried
>
> sudo -H python3.9 -m pip install beancount
>
> which seemed to finsih without errors.  I'm even able to use bean-check.
> However, using bean-report --help or web-bean both give the follwoing
>
> zsh: command not found: bean-report
>
> and
>
> zsh: command not found: web-bean
>
> Googling either of those has no results.
>
> I also tried brew install beancount, even though that's not in the
> documentation, and nothing changed.
>
> Any suggestions?   I've been experimenting with ledger and like it, but
> would like the better features found in bean count.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/2f077dec-2064-4d31-bf90-a3aec6b94deen%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNiLog7w-vjJvBaXP3FXWPZ%3DLy%3DbHWSz-%3D_oCKCQ4ygrA%40mail.gmail.com.


Re: The Beancount Podcast

2024-10-06 Thread Martin Blais
On Sun, Oct 6, 2024 at 1:56 PM Eric Altendorf 
wrote:

> On Sun, Oct 6, 2024 at 08:13 Martin Blais  wrote:
>
>> On Sun, Oct 6, 2024 at 7:17 AM Chary Chary  wrote:
>>
>>> Martin,
>>>
>>> realistically, this is mind blowing! Also, the podcast was spot on about
>>> beancount, a very good introduction in any case. (the only thing I noticed,
>>> is that  in the middle the female and the male characters swapped for a
>>> while their roles of being an banecount advocate and a sceptic).
>>>
>>
>> They're also a bit too enthusiastic all the time.
>>
>>
>> In few years machines will be creating movies, better than Hollywood
>>> (definitely cheaper)!
>>>
>>
>> I'd be surprised at the rate this is going if this isn't already going H1
>> 2025.
>>
>>
>> Coming back to beancount, I am just wondering: is it possible to download
>>> there an old source code of bean-query and related documentation and then
>>> the new source code of beanquery and then to ask it to update the old
>>> documentation to match the new source code?
>>>
>>
>> I'd love to be able to say "translate all of this to Rust" (or C, or
>> whatever) and even have a crappy but working implementation (with tests) of
>> the entire code that I can fix up and refactor.
>>
>
> I’ve been doing a lot of dev lately with Aider + Claude.  The tech is
> moving this direction but it’s not there yet.
>
> One shortcoming is the models and frameworks have a limited scope.
> They’re good at reasoning about one function or file at a time.  They start
> to struggle on multifile coordinated changes and entire codebase rewrites
> are well beyond scope.
>

At the pace things are going I can easily imagine that this might flip at
some point and the models will have larger scope than a single human could
(not sure about reasoning but who knows). A bit like what happened in
solving various games.


The other is the models are much better at python and JavaScript than
> rust.  Part of this I think is the nature of Rust’s type, ownership, and
> lifetime rules which are complex, and you want the model to do some tool
> use with the rust analyzer rather than hallucinate what it thinks makes
> sense.  Another is I guess less rust training data.  A third is the long
> tail of rust crates and versions thereof — again the models need some
> explicit representation of which version of which crate is in use and then
> code to that API rather than hallucinate a vague memory of how to use
> libraries for the task at hand.
>
Regards.
>>>
>>> On Saturday, October 5, 2024 at 4:48:08 PM UTC+2 bl...@furius.ca wrote:
>>>
>>>> Okay, not really.
>>>>
>>>> But I uploaded the Beancount intro to NotebookLM (Deep Dive) this
>>>> morning and generated this:
>>>>
>>>> https://notebooklm.google.com/notebook/16555495-485e-4977-9e3d-d853e0719c07/audio
>>>>
>>>> Here's one built from the cookbook documents:
>>>>
>>>> https://notebooklm.google.com/notebook/3e24b1e4-400d-4921-956e-572f73839505/audio
>>>>
>>>> FYI these aren't real people.
>>>> I honestly don't know what to think about it.
>>>> It's a bit all over the place in terms of relevance and fluffy and in
>>>> ways and wrong too in bits but it's also kind-of amazing at the same time.
>>>> Undoubtedly the least time-efficient way to consume this information
>>>> though.
>>>> But it's amazing that this is possible.
>>>>
>>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/30393d9b-e24e-4eaa-ba42-fd7807045be8n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/30393d9b-e24e-4eaa-ba42-fd7807045be8n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhP81s%2BvTTtaihk-y3-n9fD9G2

Re: Example workflow for beangulp for beancount 3?

2024-10-06 Thread Martin Blais
On Sun, Oct 6, 2024 at 6:46 AM Daniele Nicolodi  wrote:

> On 02/10/24 05:02, Eric Morgan wrote:
> > My workflow with beangulp is that I have a script that runs import.py
> > for each bank
>
> Why one script for each bank? The framework is written with the intent
> of allowing multiple types of transactions sources to be processed at
> the same time.
>

+1
I hadn't seen "for each bank", but indeed, just put all your importers in
the same script.

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN60s2V%2BXAUvVaFGJmuDjc585Wk51Yn-CAJF2qf9_ZP%3Dw%40mail.gmail.com.


Re: The Beancount Podcast

2024-10-06 Thread Martin Blais
On Sun, Oct 6, 2024 at 7:17 AM Chary Chary  wrote:

> Martin,
>
> realistically, this is mind blowing! Also, the podcast was spot on about
> beancount, a very good introduction in any case. (the only thing I noticed,
> is that  in the middle the female and the male characters swapped for a
> while their roles of being an banecount advocate and a sceptic).
>

They're also a bit too enthusiastic all the time.


In few years machines will be creating movies, better than Hollywood
> (definitely cheaper)!
>

I'd be surprised at the rate this is going if this isn't already going H1
2025.


Coming back to beancount, I am just wondering: is it possible to download
> there an old source code of bean-query and related documentation and then
> the new source code of beanquery and then to ask it to update the old
> documentation to match the new source code?
>

I'd love to be able to say "translate all of this to Rust" (or C, or
whatever) and even have a crappy but working implementation (with tests) of
the entire code that I can fix up and refactor.


Regards.
>
> On Saturday, October 5, 2024 at 4:48:08 PM UTC+2 bl...@furius.ca wrote:
>
>> Okay, not really.
>>
>> But I uploaded the Beancount intro to NotebookLM (Deep Dive) this morning
>> and generated this:
>>
>> https://notebooklm.google.com/notebook/16555495-485e-4977-9e3d-d853e0719c07/audio
>>
>> Here's one built from the cookbook documents:
>>
>> https://notebooklm.google.com/notebook/3e24b1e4-400d-4921-956e-572f73839505/audio
>>
>> FYI these aren't real people.
>> I honestly don't know what to think about it.
>> It's a bit all over the place in terms of relevance and fluffy and in
>> ways and wrong too in bits but it's also kind-of amazing at the same time.
>> Undoubtedly the least time-efficient way to consume this information
>> though.
>> But it's amazing that this is possible.
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/30393d9b-e24e-4eaa-ba42-fd7807045be8n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP81s%2BvTTtaihk-y3-n9fD9G2PQ0ozT45-NzOE37hNw_w%40mail.gmail.com.


Re: Example workflow for beangulp for beancount 3?

2024-10-05 Thread Martin Blais
What's not ideal about it?
(Seems fine to me.)

On Tue, Oct 1, 2024 at 5:02 PM Eric Morgan 
wrote:

> My workflow with beangulp is that I have a script that runs import.py for
> each bank
>
> #!/usr/bin/env python3
>
> from importers.some_bank import importer as some_bank
> import beangulp
> importers = [
> some_bank.Importer(),
> ]
> hooks = []
> if __name__ == "__main__":
> ingest = beangulp.Ingest(importers, hooks)
> ingest()
>
> The script then copies the imported files to an folder for imported files.
>
> I'm sure this workflow is not ideal. Is there any repo that showcases a
> better workflow when using beangulp?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/1a984943-6ff9-4dc0-b0cc-31a1e879dd0fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNVA%3D5QH%3DZw%3D3r%3DjHp32oSBUG5x%3DLH-eS7%2ByFj9TaaXkA%40mail.gmail.com.


The Beancount Podcast

2024-10-05 Thread Martin Blais
Okay, not really.

But I uploaded the Beancount intro to NotebookLM (Deep Dive) this morning
and generated this:
https://notebooklm.google.com/notebook/16555495-485e-4977-9e3d-d853e0719c07/audio

Here's one built from the cookbook documents:
https://notebooklm.google.com/notebook/3e24b1e4-400d-4921-956e-572f73839505/audio

FYI these aren't real people.
I honestly don't know what to think about it.
It's a bit all over the place in terms of relevance and fluffy and in ways
and wrong too in bits but it's also kind-of amazing at the same time.
Undoubtedly the least time-efficient way to consume this information though.
But it's amazing that this is possible.

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO%2BH07Gkq38PRQVCCigbGiFzp6MV28tjyGsPvjFq7UaTA%40mail.gmail.com.


Re: OFX - not worth the time investment?

2024-10-04 Thread Martin Blais
On Fri, Oct 4, 2024, 15:13 Red S  wrote:

> A couple things to add:
>
>- the goal of reds-importers is to simplify and fully automate your
>ingest. It is definitely not wedded to, not does it prefer the ofx format
>or any other format in particular. Quite the opposite: it make it easy to
>use any file format, and add your own. csv (and tsv, xls) is well supported
>because of its ubiquity, as are xml, json, and pdf
>- if you’ve used IBKR, they’re awesome in allowing complete
>customizability over the reports, including the file format. Here is
>an example
>
> 
>Beancount importer for it. And to boot, they let you download it via a REST
>API
>
> .
>Well documented, and very straightforward to setup. I can only hope other
>institutions follow suit
>
>
Don't hold your breath

>
>
> ​
>
> On Thursday, October 3, 2024 at 4:32:09 PM UTC-7 Red S wrote:
>
> Anectodally speaking, here’re some banks that I know of that support it as
> of today:
>
>- alliant
>- ally
>- becu
>- capitalonebank
>- chase
>- citi (direct download supported)
>- etrade (direct download supported)
>- fidelity (direct download supported)
>- morganstanley (direct download supported)
>- target
>- techcubank
>- vanguard
>
> And again, anecdotally, here are the banks that removed support for it in
> the last couple years:
>
>- amex
>- discover
>- schwab
>
> Ofx was introduced in 1997. In the tech world, that is old. It will
> eventually go away. But nobody knows when the remaining institutions will
> remove support for it.
>
> So how should one approach ofx when writing importers? Here’s my two cents:
>
> 1) For me, the interesting question is not “should I invest time into
> setting up an ofx import” as much as it is “how can I setup my import
> system for adaptability so swapping out a file format for another is easy?”
>
>- Consider also that the download method and the file format are only,
>say, 20% of your import system with respect to setup effort and complexity
>
> 2) Consider your alternatives. Here’s an example of development times
> (this is unscientific, and the relative times are more important than the
> absolute numbers):
>
>- ofx: 5mins
>- csv: 1-2 hours
>-
>
>some_other_format (json, xml): 2-4+ hours
>
>In addition, Non-ofx formats unfortunately have a lot of
>downsides
>
> 
>.
>
> 3) Don’t confuse direct downloads with ofx. Some banks have pulled support
> for direct downloads, but continue to support ofx if you download them
> manually from their website. An example is Chase.
>
> Summary: setup ofx today when you can. There’s no downside to doing so
> IMHO as it’s low effort. Focus on building a robust ingest system where
> changing file formats is an easy, small part.
>
> And finally, what does the future hold?
>
>- Europe is ahead of the US/North America: finance.ec.europa.eu
>
> 
>- The US is doing something about it as well. See federalregister.gov
>
> ,
>though so far, despite mentioning “consumer access” here and there. it
>seems to be somewhat focused on “third party access.”
>
> ​
>
> On Saturday, September 28, 2024 at 2:40:41 PM UTC-7 chri...@gmail.com
> wrote:
>
> I've been using beancount for about 2 years now, and in the last month
> I've started looking more closely at the External Contributions
> .
> I decided to try reds-importers, and pretty quickly discovered a few things:
>
>1. ofxhome.com is gone.
>2. ofx.chase.com doesn't work anymore ("Name or service not known")
>3. FDX is a new thing, and does not appear to be friendly to
>open-source accounting tools like beancount.
>
> For those that have used OFX for a long time - is it slowly going away?
> Are there alternatives that facilitate automatic downloads?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/e79be64d-a5b4-4320-91fd-18d7298cb1c8n%40googlegroups.com
> 

Re: Question regarding handling of donor information in beancount for a small non-profit

2024-09-28 Thread Martin Blais
Just use a metadata field with a unique id per client
and maintain a spreadsheet with all the details,
just join the two with a script.
You can extract that metadata using queries or a script.


On Thu, Sep 26, 2024 at 5:27 PM Rick F  wrote:

> Hi.. I work at a small non-profit organization and am looking at whether
> any of the PTA apps out there (ledger, hledger or beancount primarily) can
> be used to handle our accounting needs or not. One big area that I'm having
> difficulty with is tracking donations that we receive with (hopefully) full
> contact info so we can pull reports at year-end of person X's donations are
> ... blah blah blah (report info).
>
> I found someone's prior work associated with Ledger (using lots of tags)
> for much of what I'm after but still nothing that allows me to track donor
> information aside from a simple name.
>
> After reading through the docs for beancount, I'm hoping that there's a
> way to use meta-data to help with this perhaps..?
>
> I was hoping someone here that knows beancount way better than I do could
> give me the 50,000ft answer of whether this will be like pushing a boulder
> up hill or not.. Thanks much!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/30808cf2-ce0f-42b3-88a7-b822c51d0cf4n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPTDieC%2Bs3B2s0XJ1eitP38UeUTZd%2BLv%2BOTB2W%2B7wSh%2Bw%40mail.gmail.com.


Re: Are there any plans to migrate beangrow and fava to v3?

2024-09-12 Thread Martin Blais
On Thu, Sep 12, 2024 at 6:41 PM Red S  wrote:

> This is the only related issue
>  I could find at Fava’s
> github page. Perhaps making a request over at github might get their
> attention?
>
> I might be mistaken, but Beangrow looks like it could use perhaps use a
> maintainer and active contributors.
>
+1 to that.
I haven't used it myself since 2021.



> Curious, have you tried running it to see if it works with v3 right now?
>
>
> On Wednesday, September 11, 2024 at 5:05:15 PM UTC-7 Eric Morgan wrote:
>
>> Since v2 is not very much maintained longer, I'd like to move to v3. I'm
>> currently using fava and beangrow in a project. Are there any plans to move
>> those over to v3 anytime soon?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/0853e8e8-c452-44ce-86e9-03e08e1e7de9n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMxRmM9tCuzBb2EmYaOtjkG825PhzknbOs1uV9rtQGwzg%40mail.gmail.com.


Re: Current status of beancount et.al.

2024-09-10 Thread Martin Blais
- Switch to 3.x, no effort will be put on 2.x anymore
- bean-report and bean-web are deprecated, use beanquery and fava instead
- other tools have been moved to their own repo (in the beancount org on
github)
Very little time for maintenance these days, always welcoming patches.




On Tue, Sep 10, 2024 at 7:16 AM Alexander Lazarević 
wrote:

> Hi!
>
> I've been doing my personal accounting with beancount for about a year
> now. It helps me to get an overview of my financial status and I would like
> to utilize it further.
> Until now I'm using Beancount 2.3.6, which comes packaged for manjaro/arch.
> Now I saw that there was a release of Beancount 3.0.0 on PyPi. So is it
> recommended to switch to that version now? Will I have to make adjustments
> to my beancount ledger file? What is the recommended way to install
> Beancount 3.x (to get all the "expected" tools)?
>
> What I did was this:
>
> pipx install beancount
> pipx install beanquery
> pipx install beanprice
>
> Or maybe it is recommended to directly install the packages from github?
>
> What I'm missing is bean-report for example (there is now beanreport
> package). But maybe it is part of another package I'm not aware of.
> What about bean-price? Since the google/yahoo APIs are not available for
> free anymore, is it required to get a paid subscription for any API with
> bean-price? Or is there a way to use the free Frankfurter API to get the
> exchange rates published by the European Central Bank with bean-price?
>
> Sorry if this has been answered already, but I'm just catching up on the
> mailing list.
>
> Regards, Alex
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAMPYxdmC0nbNyhuBZgN7QqRVjvaeOuqRiRVvd4ySN%2Bkt-SGoKg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMomfWFRh_0%2BkG7pVEsnJYT_x0TfFgNC3iTOXTMigHqtQ%40mail.gmail.com.


Re: new version of beanquery

2024-09-08 Thread Martin Blais
Yep, Dan's been doing a great job with beanquery!

On Thu, Sep 5, 2024 at 12:55 PM Chary Chary  wrote:

> Dan,
>
> thanks! it is clear.
>
> beanquery has definately made a big step forward!
>
> On Thursday, September 5, 2024 at 6:19:37 PM UTC+2 dan...@grinta.net
> wrote:
>
>> On 05/09/24 17:08, Chary Chary wrote:
>> > I have been looking at the latest version of beanquery as well as
>> > messages here and as far as I understand, the only currently available
>> > beanquery document is quite out of date with the new features.
>>
>> Yes, writing documentation is high on the to-do list.
>>
>> > since we have a single table of data, we replace the table name in FROM
>> > by a filtering expression which applies over transactions, and the
>> WHERE
>> > clause applies to data pulled from the resulting list of postings:
>> >
>> > SELECT , , …
>> > FROM 
>> > WHERE ;
>> >
>> > Both filtering expressions are optional. If no filtering expressions
>> are
>> > provided, all postings will be enumerated over. Note that since the
>> > transactions are always filtered in date order, the results will be
>> > processed and returned in this order by default.
>>
>> This was the old way of doing things, indeed, and it is still supported.
>>
>> However, it turns out that splitting the row filtering into an
>> entry-filter and a posting-filter is unnecessary and it complicates both
>> the understanding and the implementation.
>>
>> > As far as I can see, there are more than one tables available now (not
>> > only postings)
>>
>> Correct.
>>
>> > Now the FROM statement needs to contain table, but preceded by #
>> >
>> > e.g.
>> >
>> > select date, narration from #transactions
>> >
>> > If FROM is omitted, then it is assumed to be FROM #postings
>>
>> Correct, but incomplete. Using a entry-filter expression is still
>> supported for backward compatibility. Backward compatibility is the
>> reason why table names in the FROM clause need to be prefixed with "#":
>>
>> > posting has also all the transaction information, but it is called
>> entry
>> > there
>>
>> It is called entry because there is an "entry_meta()" function that is
>> equivalent to "entry.meta[]" and I wanted a similar name. Other names
>> considered where "transaction", "txn", and "parent", I thought the
>> latter was particularly interesting because it can be generalized to
>> apply to all objects contained in another. If there is strong preference
>> for another name, it is very easy to add an alias and eventually
>> deprecated the less favored name.
>>
>> > So,
>> >
>> > select date, account, narration
>> >
>> > Gives the same result as
>> >
>> > select entry.date, account, entry.narration
>> >
>> > Question: why is it done like this? What is the reason to have
>> > transaction information (e.g. date ) both in posting as well as in
>> > posting.entry?
>>
>> Just backward compatibility. The old way of doing things will be
>> deprecate and eventually removed to make the data model more consistent
>> and "orthogonal". However, the capability of accessing fields of
>> structured types in beanquery has only beed recently (compared to how
>> much time I can dedicate to the project) introduced, and before starting
>> to emit deprecation warnings I want to have some documentation in place,
>> and I haven't had time to work on the documentation. Thus for now we
>> live with the duplication.
>>
>> > Question: is it correct, that it is still not possible to create
>> > queries, which join tables with each other like in traditional SQL?
>>
>> Implementing joins is also very high on the to-do list, but it has not
>> been done yet. I would like to implement joins as part of a refactoring
>> of the beanquery evaluation engine, and big plans tend to be put aside
>> when there is not enough time to dedicate to them...
>>
>> > Say for every posting I want to list an account as well as the date the
>> > account was open.
>> >
>> > select #postings.account, #accounts.open where #postings.account =
>> > #accounts.account
>> >
>> > I know above does not work, but is something like this possible?
>>
>> In this specific case you can use a specialized function that fetches
>> the information you are after:
>>
>> SELECT account, open_date(account) FROM #postings
>>
>> There are several similar function in BQL that have been introduced to
>> work-around limitations of the query engine. Funnily, some of the
>> refactoring that would make the query engine more flexible is
>> complicated by keeping support for these features. But I think backward
>> compatibility is more important and we have been striving to maintain
>> it, unless there were strong reasons for not doing so.
>>
>> Cheers,
>> Dan
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d

Re: Unrealized gains

2024-09-06 Thread Martin Blais
- this plugin is gone
- make sure you have recent price declarations
- compute it using beanquery sql or a script


On Fri, Sep 6, 2024, 10:59 Dennis  wrote:

> Hello everyone,
>
> I just tracked all my ETF purchases over the last years and wanted to see
> my unrealized gains.
>
> The documentation suggests to use a plugin:
>
> plugin "beancount.plugins.unrealized" "Unrealized"
>
> source:
> https://beancount.github.io/docs/trading_with_beancount.html#reporting-unrealized-pl
>
> However, that plugin doesn't exist anymore. Is there an alternative?
>
> Note, I'm using Beancount v3 as it was suggested to be used by new users
> in another mail thread here.
>
> Best,
> Dennis
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/d73c920e-6219-41f0-ba9f-7f84eec07f93n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO-s%3DJMFzLUwPaPkH_BAT890UTgGhnybZHJz88dGNVx0Q%40mail.gmail.com.


Retirement planning

2024-09-04 Thread Martin Blais
[This is a bit adjacent in topic to Beancount - skip if not interested in
forward projections.]

Today I saw what I thought was a pretty interesting retirement planning app
on this video:
https://www.youtube.com/watch?v=mMLd3FuOdkM
If you scroll forward you'll see a demo of a multi-page app with a number
of pages and a lot of customizations.
The purpose of the app / website is to make an as detailed as
possible forward plan and simulation of future expenses during retirement.
(I wonder if it's developed in-house or white-labeled across multiple other
CFPs.)

In a sense, a much more sophisticated and personalizable version of this
simple projection:
https://engaging-data.com/will-money-last-retire-early/

I don't think it would be very hard to come up with a version of this in a
single spreadsheet, especially for a single scenario / individual.
(I thought this would be interesting to some here.)

If you have interesting links on retirement planning feel free to continue
on this thread.

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM%3DDSNZxky_cPCSOOasbTgyVFiN7vSiT_dMZeaBtwHuXg%40mail.gmail.com.


Re: Odd behaviour with currency conversion

2024-08-29 Thread Martin Blais
I think it would be reasonable to create a function like that and insert it
into the environment of a custom beanquery you build for yourself, or
perhaps just make a script.




On Thu, Aug 29, 2024, 18:04 DK  wrote:

> Thanks, the 10.00 fixed the rounding issue.
>
> In regard to the main issue. So I already use implicit_prices, but I
> wasn't aware of unique_prices. It indeed helped me identify some bugs
> caused by the import from GnuCash (or should I say, by GnuCash itself),
> where I'd have transaction like
>
> ```
> 2024-01-01 txn "Something"
>   Account1 10 EUR @@ 10 USD
>   Account2 10 EUR
> ```
>
> So the conversion is not needed. I removed these, and now flipping the
> initial transaction order, works correctly. I can't live with unique_prices
> on all the time, due to the fact that in real life, market prices are not
> unique per day (in fact, I had two ESPP batches that I sold on the same
> day, but one was sold at 313 USD while the other at 313.5 USD, hence
> unique_prices was complaining about it). But it, nevertheless, helpful to
> turn it on once in a while in order to identify bugs like this.
>
> This brings me, however, to another question. I conduct business in
> various currencies, but I have to file my tax reports in EUR. For some
> transaction, like the one above, I have explicit conversion rate. I bought
> a service for 10 USD, but my bank took 9.32 EUR based on their conversion
> rate. Hence, I'm obligated to report a loss of 9.32 EUR. I don't want the
> convert function to go and look at the closes rate on that date, I would
> like to have a function that converts the cost based on the price attached
> to a transaction, if there is one. If there is none, then I need to use ECB
> rate for that day in my reports. It would have been nice to have a convert
> function like that. On the other hand, maybe it's not the intended purpose
> of beancount, and instead I should get the original values to a python
> script and process them myself in the desired output for the tax
> authorities.
>
> Thanks for help!
>
> On Wednesday, August 28, 2024 at 2:09:06 PM UTC+2 char...@gmail.com wrote:
>
>> On Wednesday, August 28, 2024 at 9:06:04 AM UTC+2 DK wrote:
>>
>> I recently switch to beancount, and I'm trying to set it up for both my
>> personal finances, and for my business.
>>
>> Consider the following transaction:
>>
>> ```
>> 2024-08-01 txn "Some Service" ""
>> invoice: "xxx"
>> Assets:Wise:EUR   -9.32 EUR @@ 10 USD
>> Expenses:MyComp:Operating:Software   10 USD
>> Expenses:Misc:USD
>> ```
>> I purchased some service from a US company for 10 USD, but my Wise bank
>> account was charged with 9.32 EUR (The Expenses:Misc:USD is there because
>> apparently this transaction, as is, does not balance and is missing
>> 0.01 USD, or close to that, but that's a different issue).
>>
>>
>>
>> I think Martin considers this to be a bug, but you can work around it by
>> putting  10.00 instead of 10
>>
>> 2024-08-01 txn "Some Service" ""
>> invoice: "xxx"
>> Assets:Wise:EUR   -9.32 EUR @@ 10.00 USD
>> Expenses:MyComp:Operating:Software   10.00 USD
>>
>> check:
>>
>>
>> https://colab.research.google.com/drive/1laDSOEdxMC2b9yo3zX8e-gxyomM5Zuqm?usp=sharing
>>
>>
>>
>>
>> ```
>>
>>  Ideally, if I run the report now, I should get the same value, but I
>> don't! Instead, I get 10 USD as the value for the position, but the
>> converted cost of the position is now *8.46 EUR*, and even though it has
>> a price of 0.93 EUR attached to it.
>>
>>
>> This is because the  beanquery *convert *function is not using the
>> implicit convertion rate of the transaction (10 USD @@ 9.32 EUR), but the
>> price, derived from the latest price directive, which you have staying
>> elsewhere.
>> It kind of makes sense, because  when converting from one currency to
>> another you want to use an official rate, not the one used by a
>> specific merchant for a specific purchase.
>> you can use the implicit_prices
>> plugin
>> though.
>>
>> """This plugin synthesizes Price directives for all Postings with a price
>> or
>> directive or if it is an augmenting posting, has a cost directive.
>> """
>> Even with the   implicit_prices
>> plugin
>>  however,
>> you still can get a situation, that on a specific date you may have
>> different prices, but the convert function will use only one of it per day.
>>
>> To hunt such problems, there is  a unique_prices.py
>> 
>> plugin
>>
>> In addition all of them are combined in the pedantic.py
>> 
>>  plugin
>>
>>
>>
>>
>> I tried to play with all kinds of parameters in t

Re: Strategy for multi currency

2024-08-25 Thread Martin Blais
+1 to that

On Sun, Aug 25, 2024, 19:12 Dmitry Kudryavtsev  wrote:

> Thanks. I slept on it and I think it makes sense to create a subcategory
> for expenses in each country, the same way as "Income:US:Salary" and
> "Income:UK:Salary" is shown as an example in the documentation. This allows
> to have proper separation between the two countries. On the other hand, on
> expenses such as travel, I think it makes sense to have on category, such
> as "Expenses:Travel:Flights", that can hold transactions in multiple
> currencies.
>
> On Sunday, August 25, 2024 at 9:39:54 AM UTC+2 bl...@furius.ca wrote:
>
>> In my ledger i've let these accounts have multiple currencies and do a
>> conversion in one or the other when reporting / computing balances.
>>
>> On Sat, Aug 24, 2024, 23:41 Dmitry Kudryavtsev  wrote:
>>
>>> Recently I made a relocation. This means I now live with two main
>>> currencies.
>>>
>>> Before relocating, I used currency as a name for the leaf account. So if
>>> I had a bank account BankA that held both EUR and USD, I’d have two account
>>> BankA:EUR and BankA:USD.
>>>
>>> However, since most of my expenses were made from my main currency, I
>>> usually recorded that in that currency, even when traveling, since the bank
>>> usually did the conversion of which I didn’t care. So my income/expense had
>>> one level, let’s say Expenses:Groceries.
>>>
>>> Now I have more than 10 years worth of financial data in my main
>>> currency and I’m wondering how to move forward. I could let Groceries have
>>> expenses in two currencies, but in GnuCash I adopted the currency name as a
>>> leaf for most income/expenses as well, so I’d have Groceries:USD and
>>> Groceries:EUR.
>>>
>>> Is this a good model for starting with beancount, or I should just let
>>> income/expenses contain multiple currencies?
>>>
>>> Thanks!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/CAEzdkV9ZWWVET9FgUQuHBX-%3DnoriruTi6Tu%3DKeTy_O0P1VDhYA%40mail.gmail.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/ea5897f1-071a-42b4-b431-7e7a6e4b3639n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPhWoueS1Cp2RgTeNbjLwZW%3D6j146xkccaHrcdCB-%2BGYQ%40mail.gmail.com.


Re: Strategy for multi currency

2024-08-25 Thread Martin Blais
In my ledger i've let these accounts have multiple currencies and do a
conversion in one or the other when reporting / computing balances.

On Sat, Aug 24, 2024, 23:41 Dmitry Kudryavtsev  wrote:

> Recently I made a relocation. This means I now live with two main
> currencies.
>
> Before relocating, I used currency as a name for the leaf account. So if I
> had a bank account BankA that held both EUR and USD, I’d have two account
> BankA:EUR and BankA:USD.
>
> However, since most of my expenses were made from my main currency, I
> usually recorded that in that currency, even when traveling, since the bank
> usually did the conversion of which I didn’t care. So my income/expense had
> one level, let’s say Expenses:Groceries.
>
> Now I have more than 10 years worth of financial data in my main currency
> and I’m wondering how to move forward. I could let Groceries have expenses
> in two currencies, but in GnuCash I adopted the currency name as a leaf for
> most income/expenses as well, so I’d have Groceries:USD and Groceries:EUR.
>
> Is this a good model for starting with beancount, or I should just let
> income/expenses contain multiple currencies?
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAEzdkV9ZWWVET9FgUQuHBX-%3DnoriruTi6Tu%3DKeTy_O0P1VDhYA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOQ_QDtqP9WU%2BHSq7Dw1OZ5ba66FZ_w0iPES5DwJY9Jcw%40mail.gmail.com.


Re: Changing booking methods over time

2024-08-21 Thread Martin Blais
On Wed, Aug 21, 2024, 17:34 Eric Altendorf  wrote:

> Thanks, makes sense.
>
> Re-serializing the data structures after parsing/booking seems
> reasonable.  That's not something Beancount currently can do, is it?
>

Not in there nice way I envision.
You could sort of hack by finding the locations of the cost basis inputs
using the metadata stored on the parser directives (which are close to an
ast) and insert they missing cost basis as strings. Ugly.


Aside from the comments issue, it seems this shouldn't in principle be
> difficult to do?
>

I wouldn't call it difficult but the parser's output has to be extended to
store all of the comments and whitespace in between the stuff that matters.



> Since my pipeline is mostly automated I haven't been using comments
> (instead putting extra info in metadata tags for the code to read) so I
> don't mind comments being lost.
>

I suspect most people do a nontrivial amount of writing their beancount
file by hand.




> On Tue, Aug 20, 2024 at 11:28 PM Martin Blais  wrote:
>
>> On Wed, Aug 21, 2024, 00:51 Eric Altendorf 
>> wrote:
>>
>>> I'm struggling to come up with the right workflow for filing capital
>>> gains taxes each year.
>>>
>>
>>> I have too many lots for manual lot selection to be feasible, so I rely
>>> on automatic booking.  However, the method I picked when I started filing
>>> my taxes a few years ago may no longer be what I want to use.
>>>
>>> One option would be to run parsing and booking for the older
>>> transactions, and somehow persist the booking decisions.  AFAIK, this isn't
>>> currently possible with Beancount but it doesn't seem too difficult in
>>> practice.
>>>
>>
>> I think if you bake in all the cost basis numbers explicitly the booking
>> method doesn't get invoked. It's only there you resolve closing postings
>> with a missing cost basis. In that way if you replaced your inputs to have
>> an explicit cost basis you can cement the old decisions (which I think you
>> have to, because they've been declared to the irs)
>>
>>
>>
>>
>>> Another option would be to create sub-accounts for each account, per
>>> year (or whatever time period), since then I can assign per-account booking
>>> methods for each year.  This doesn't require any changes to Beancount, but
>>> it makes my accounts messier and requires synthetic transfers from one
>>> year's account to the next.
>>>
>>
>> Agreed, that's a bit ugly. Better might be too define your own booking
>> method, that is dependent on time. That would require changing beancount to
>> at least allow registering custom booking methods or to extend its default
>> way to specify them by adding date ranges where they're applied. I'm not
>> against it in principle but it's unclear if the additional complexity is
>> worth it.
>>
>>
>>> Finally, another option is to implement a new virtual booking method
>>> that dispatches to a particular booking method based on the date of the
>>> transaction.  This is kind of easiest but seems the ugliest.
>>>
>>
>> I wrote my answer above before I read this paragraph and it sounds like
>> the same idea. I think that is the most elegant, because it reflects what
>> were trying to do accurately: change the booking method over time.
>>
>> If it was easy to rewrite the input to insert the cost basis numbers that
>> would be the nicest solution imho because you wouldn't have to maintain
>> older versions of algorithms. Imagine for example a case where there was a
>> bug in the booking method and you declared these amounts to the irs. It
>> wouldnt be great to have to maintain the buggy code to be reapplied
>> historically. This is why I think in a new parser we want to treat the
>> input a little more like a database with update capability, where we can
>> parse, make some modifications - insert the cost basis - and produce a new
>> file with them changes but that otherwise keeps everything else the same
>> including comments.
>>
>>
>>
>>> any thoughts?
>>>
>>> eric
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount

Re: Changing booking methods over time

2024-08-20 Thread Martin Blais
On Wed, Aug 21, 2024, 00:51 Eric Altendorf  wrote:

> I'm struggling to come up with the right workflow for filing capital gains
> taxes each year.
>

> I have too many lots for manual lot selection to be feasible, so I rely on
> automatic booking.  However, the method I picked when I started filing my
> taxes a few years ago may no longer be what I want to use.
>
> One option would be to run parsing and booking for the older transactions,
> and somehow persist the booking decisions.  AFAIK, this isn't currently
> possible with Beancount but it doesn't seem too difficult in practice.
>

I think if you bake in all the cost basis numbers explicitly the booking
method doesn't get invoked. It's only there you resolve closing postings
with a missing cost basis. In that way if you replaced your inputs to have
an explicit cost basis you can cement the old decisions (which I think you
have to, because they've been declared to the irs)




> Another option would be to create sub-accounts for each account, per year
> (or whatever time period), since then I can assign per-account booking
> methods for each year.  This doesn't require any changes to Beancount, but
> it makes my accounts messier and requires synthetic transfers from one
> year's account to the next.
>

Agreed, that's a bit ugly. Better might be too define your own booking
method, that is dependent on time. That would require changing beancount to
at least allow registering custom booking methods or to extend its default
way to specify them by adding date ranges where they're applied. I'm not
against it in principle but it's unclear if the additional complexity is
worth it.


> Finally, another option is to implement a new virtual booking method that
> dispatches to a particular booking method based on the date of the
> transaction.  This is kind of easiest but seems the ugliest.
>

I wrote my answer above before I read this paragraph and it sounds like the
same idea. I think that is the most elegant, because it reflects what were
trying to do accurately: change the booking method over time.

If it was easy to rewrite the input to insert the cost basis numbers that
would be the nicest solution imho because you wouldn't have to maintain
older versions of algorithms. Imagine for example a case where there was a
bug in the booking method and you declared these amounts to the irs. It
wouldnt be great to have to maintain the buggy code to be reapplied
historically. This is why I think in a new parser we want to treat the
input a little more like a database with update capability, where we can
parse, make some modifications - insert the cost basis - and produce a new
file with them changes but that otherwise keeps everything else the same
including comments.



> any thoughts?
>
> eric
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0u6rD3MErQGhRvhV5v9YbtrF4%2BUWa1PphECfXAtcniy-g%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN94Jjp_-gjHXhOoSzGMdkeR_U8LAZFG9GpKayii-hpcw%40mail.gmail.com.


Re: Automatically combining trade transactions

2024-08-20 Thread Martin Blais
It depends on your goal. Do you want to represent all the execution details
in your ledger or are you okay with a summarization that is slightly
inaccurate but whose final result numbers are the same?

TD actually does this within its systems: depending on where you are
getting the data from - thinkorswim vs. its website, and now its Schwab
website which has yet different results - you will get one or the other, I
think the website gives you a single summarized execution and thinkorswim
had the individual executions. Another example of a discrepancy: if you but
a t-bill with an accrued coupon amount to pay, on the website this will be
reflected accurately but downloading from thinkorswim you won't see the
accrued amount reflected.
Instead they patch it up with some adjustment later on. This means some of
the balances are temporarily incorrect. I've encountered these issues when
importing data in Johnny.

I think if you have correct groupings of these related executions it's
totally fine to summarize them. Because the Beancount balances operate on a
day time resolution you wouldn't even have temporarily inaccurate balances.
But then you wouldn't have the execution detail. In Johnny I keep all the
detail, in Beancount I don't.





On Wed, Aug 21, 2024, 00:28 Eric Altendorf  wrote:

> Let's say you're importing transactions from a broker.  Further imagine
> that a trade you made had been split into a large number of transactions
> for execution.  They're all at nearly the same time, with nearly the same
> price, and for very small lots.
>
> What would be the recommended way to combine these into one transaction in
> Beancount?  Is there a plugin?  Would it make more sense to do in
> the importer?
>
> eric
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0sMup8aEtdTQqvZOjYCnbV-S_NjE_70uwy-%2B1sZSCg5KQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP2QhC91yjJ6GER%2B%2BGnfOjiwTUUsjNhOSz50OzuQkRfBw%40mail.gmail.com.


Re: Round-Tripping guarantee and a pad directive

2024-08-18 Thread Martin Blais
It's possible there's a bug.

The newer implementation I had started in C++ was better in that way. I
think when I restart this I should make the output of the parser contain
even the comments and be able to be edited and used to regenerate the file,
and the output of the interpolation and booking (which runs on that data
structure) will be a distinct data structure with no syntax whatsoever.
This will be better defined. Right now it's just using this set of Python
objects that are the same between the parser's output and the final output,
with different sets of guarantees... that's not great.


On Sun, Aug 18, 2024 at 3:26 PM Chary Chary  wrote:

> Martin,
>
> correct me if I am wrong, but I think the beancount's *pad *directive
> conflicts with the *Round-Tripping guarantee*, the way it is described
> here:
>
> https://docs.google.com/document/d/1QftxNvQPdH-MikMBHupftU6F4IsNZP5FlFh1LCbVgk8/edit#heading=h.qs8b7mcsjj82
>
> *In particular, Beancount offers the guarantee that the output of the
> printer should always be parseable and should result in the same data
> structure when read back in. (It should be considered a bug if that is not
> the case.)*
>
> I think it may be worth mentioning this in the documentation
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/0873ad88-48d7-4694-b7cf-3317599b3b9bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN127vz5y03ejeKvBWGKf-ma2Tagjw%2B6xpQnRwDnix6GQ%40mail.gmail.com.


Re: please add Isabekov contributions re beancount on jupyter to Beancount-Contributions

2024-08-18 Thread Martin Blais
I do this type of thing using custom scripts, but there's always a large
amount of special cases such that once I'm done it feels like more than
half the code is not applicable to other users so I don't bother sharing
it. I have my own pivot table script for example.  Maybe an example like
this is the best way to share this.



On Sun, Aug 18, 2024 at 12:08 PM Chary Chary  wrote:

> Martin,
>
> thanks!
>
> I think what makes Isabekov's contribution special is the fact, that he
> puts a bridge from beancount to Jupyter notebooks and pandas. Taking into
> account all the ecosystem of tools, developed for Python in relation to
> data visualization and analysis, I think think this has a very big
> potential, especially amount the ones involved in data science.
>
> The fact that VScode supports, Jupyter, python and has a plugin for
> beancount allows one to effectively create own custom version of Fava.
>
> On Saturday, August 17, 2024 at 5:46:15 PM UTC+2 bl...@furius.ca wrote:
>
>> Done. Thanks for bringing it up.
>> (There are so many related things on github and beyond that not all of
>> them can be added to that doc.
>> I try to add as many relevant things as I can as I come across them.
>> Feel free to suggest more.)
>>
>> On Thu, Aug 15, 2024 at 12:12 PM Chary Chary  wrote:
>>
>>> Martin,
>>>
>>> can I suggest, that you would add the Isabekov contributions regarding
>>> beancount on jupyter to the  Beancount-Contributions
>>> 
>>> doc
>>>
>>> I don't think they are mentioned now
>>>
>>> https://github.com/isabekov/beancount-multiperiod-reports?tab=readme-ov-file
>>>
>>> https://www.isabekov.pro/multiperiod-hledger-style-reports-in-beancount-pivoting-a-table/
>>>
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/792be883-69bd-4416-84ce-17bb9cba2892n%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/244c7b40-bad3-4704-922c-51261644566dn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOGs3Lfjx2Zfps9k4mdUWgpr55PEjP9JAYBgpkUZq6tnA%40mail.gmail.com.


Re: please add Isabekov contributions re beancount on jupyter to Beancount-Contributions

2024-08-17 Thread Martin Blais
Done. Thanks for bringing it up.
(There are so many related things on github and beyond that not all of them
can be added to that doc.
I try to add as many relevant things as I can as I come across them.
Feel free to suggest more.)

On Thu, Aug 15, 2024 at 12:12 PM Chary Chary  wrote:

> Martin,
>
> can I suggest, that you would add the Isabekov contributions regarding
> beancount on jupyter to the  Beancount-Contributions
> 
> doc
>
> I don't think they are mentioned now
>
> https://github.com/isabekov/beancount-multiperiod-reports?tab=readme-ov-file
>
> https://www.isabekov.pro/multiperiod-hledger-style-reports-in-beancount-pivoting-a-table/
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/792be883-69bd-4416-84ce-17bb9cba2892n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPT08k866yCkQaHjy%3D82SpE3EYhBYxusqCNeonN%2B258nw%40mail.gmail.com.


Re: Confused about failure to balance

2024-08-13 Thread Martin Blais
What's the booking type of account Assets:BAR?
What's the content of the inventory or Assets:BAR just before this gets
applied?

On Tue, Aug 13, 2024 at 10:26 PM Eric Altendorf 
wrote:

> I'm getting a failure to balance validation error, and I can't quite
> figure out why.  Here is (a sanitized version of) what I'm getting from
> beandoctor:
>
> ** Unbooked Transaction 
>
> 2020-01-01 * "Trade 412.47 BAR for 200 FOO"
>   Assets:FOO   200 FOO {19.62 USD}
>   Assets:BAR   -412.47 BAR {} @ 10.41 USD
>   Income:CapGains
>
> ** Transaction 
>
> 2020-01-01 * "Trade 412.47 BAR for 200 FOO"
>   Assets:FOO   200 FOO {19.62 USD, 2019-01-01}  ;  ...
>   Assets:BAR   -412.47 BAR {10.41 USD, 2019-01-01} @ 10.41 USD  ;  ...
>
> How can this not balance?  I have a price for the acquired asset and a
> cost for the disposed asset and a capgains account to catch the difference.
>
> Note: I am working with my locally tweaked version of the booking code.  I
> don't see how my changes would affect this case, but if y'all agree the
> above should book, then I'll go debug my diffs more closely.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0vPC%3DS86jFMAa9o5dJ2cnNfH1uqExJS9u1_yOkAUUPCSA%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMS-egFgyKG6UmvD%2BeHp4nY-TvU0MZ1feJzt3pQiaNDEg%40mail.gmail.com.


Re: Debugging install & `make test` failure

2024-08-11 Thread Martin Blais
Great explanation, and thank you.
(I have to admit that feels like a lot of "magic" compared to the
reasonable, simple, old school way of doing things.)



On Sun, Aug 11, 2024 at 2:42 PM Daniele Nicolodi  wrote:

> On 11/08/24 06:27, Eric Altendorf wrote:
> > This is mentioned on another thread, but I'm raising it again here with
> > a report from a hermetic environment.
> >
> > To reproduce the failure:
> >
> > mkdir beancount-install-test
> > cd beancount-install-test/
> > git clone https://github.com/beancount/beancount
> > 
> > python -m venv beancount-venv
> > source beancount-venv/bin/activate
> > cd beancount
> > python -m pip install -e .
> > python -m pip install pytest
> > make test
> >
> > produces a bunch of ninja temp file errors
>
> This is because the meson-python editable wheel support re-compiles the
> project when it is imported. This requires all the build tools for the
> project to be installed in the Python environment. However, by default,
> pip created a throw-away environment for building the wheel where the
> build tools are installed. The throw-away environment is deleted as soon
> as the editable wheel is installed, and the build tools with it. This is
> the reason why the meson-python documentation on editable wheels
>
> https://mesonbuild.com/meson-python/how-to-guides/editable-installs.html
>
> recommends to switch off this feature passing the --no-build-isolation
> command line option to pip. This requires to install the build tools
> required by the project, in the case of beancount this is meson-python,
> meson, and ninja.
>
> > I also tried:
> > python -m pip install ninja
> >
> > but I get the same failures after that.
>
> The failure you get after that is similar, but not the same. These
> failures are due to the unusual way pytest uses to import the test code.
>
> The last pytest major release does not work with a project that has the
> test modules located alongside the source code but not installed in the
> wheel. The only solution I've found for this is to install the test
> modules. I'll prepare a PR to do this for beancount too.
>
> Cheers,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/46c3f40b-11ad-43b3-b83f-c89185942017%40grinta.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOj-KW2zf07uQP3%3D73A%3DczWNYrtyt3gdwpfDner2i_z-w%40mail.gmail.com.


Re: Debugging install & `make test` failure

2024-08-11 Thread Martin Blais
I couldn't reproduce precisely your error (thanks for precise and hermetic
steps).
However, bringing up your setup with venv, I'm seeing other problems that
are related.
For example, overriding PYTHONPATH, I was unable to import the *_test.py
files (!?)
I traced it down to some library called _beancount_editable_loader that
seems to mess with importing and it installed in the venv.
You'll find it here:
beancount-install-test/beancount-venv/lib/python3.12/site-packages/_beancount_editable_loader.py
It looks like something that is generated by the meson build.
(I don't know more than that, but it messes with the imports somehow,
probably via the pth file)
Maybe Daniele will know - he setup the Meson build - I still work the "old
skool" way (make build, make test, from repo, with PYTHONPATH).

This modification to your steps will work:


mkdir beancount-install-test
cd beancount-install-test/
git clone https://github.com/beancount/beancount
python -m venv beancount-venv
source beancount-venv/bin/activate
cd beancount
python3 -m pip install -U pip
python3 -m pip install setuptools
python3 -m pip install regex click python-dateutil pytest
make build
make test









On Sun, Aug 11, 2024 at 12:27 AM Eric Altendorf 
wrote:

> This is mentioned on another thread, but I'm raising it again here with a
> report from a hermetic environment.
>
> To reproduce the failure:
>
> mkdir beancount-install-test
> cd beancount-install-test/
> git clone https://github.com/beancount/beancount
> python -m venv beancount-venv
> source beancount-venv/bin/activate
> cd beancount
> python -m pip install -e .
> python -m pip install pytest
> make test
>
> produces a bunch of ninja temp file errors of the form:
>
> 
> ERROR beancount/utils/test_utils.py - FileNotFoundError: [Errno 2] No such
> file or directory: '/tmp/pip-build-env-o10kn_dq/normal/bin/ninja'
> ERROR beancount/utils/test_utils_test.py - FileNotFoundError: [Errno 2] No
> such file or directory: '/tmp/pip-build-env-o10kn_dq/normal/bin/ninja'
> !!! Interrupted: 79 errors during
> collection !!!
> == 79 errors in 2.82s
> ==
> make: *** [Makefile:150: test] Error 2
>
> I also tried:
> python -m pip install ninja
>
> but I get the same failures after that.
>
> There seems to be something very weird with some of the dev mode
> dependencies.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0t%2BO0ji%2B8AzEv7T2_dqsWGR4F%2BCCtjYzayVrMuTXqDW6A%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP%2BAwBQM_Zw0WNDAFOmsp%3DnVoTnUx_dT6GW4dTZVH52kA%40mail.gmail.com.


Re: beancount/ops/holdings.py missing from v3?

2024-07-29 Thread Martin Blais
I'm sure there's code that does the same thing.
It's been so long... I can't remember.

On Mon, Jul 29, 2024 at 11:11 PM Rahul Kuchhal  wrote:

> I was using some functions from holdings.py (e.g.
> holdings.get_final_holdings()) in my custom Python scripts. Any chance
> there is a replacement available in v3 for holdings.py?
>
> On Mon, Jul 29, 2024 at 10:05 PM Martin Blais  wrote:
>
>> I can't quite recall - it's been a *long* time - but I think I refactored
>> this away.
>> I'm not sure if you can install both.
>> I'm sure you can do something with virtualenv though.
>>
>>
>> On Mon, Jul 29, 2024 at 10:04 PM Rahul Kuchhal  wrote:
>>
>>> I noticed beancount/ops/holdings.py does not exist in v3 branch:
>>> https://github.com/beancount/beancount/tree/v3/beancount/ops
>>>
>>> but it exists in v2 branch:
>>> https://github.com/beancount/beancount/tree/v2/beancount/ops
>>>
>>> And seems like because of that it is missing from beancount python
>>> package.  Is it gone for good from v3? Is it possible to install beancount
>>> v2 and v3 python packages on osx?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/a69f7e8f-d59c-4217-9713-8dd71d45c197n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/a69f7e8f-d59c-4217-9713-8dd71d45c197n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Beancount" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beancount/x_fbS5WZRh8/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhPODmnDCw0hp%3DBym-zSZGHRnNS_MOCyiv-Ez4rHQuMueA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhPODmnDCw0hp%3DBym-zSZGHRnNS_MOCyiv-Ez4rHQuMueA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAH3pih6mr7G%3DR6KbGiQ45%3DZHpxFJ4vBHkFc9XGS_ptoqoiwr3g%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAH3pih6mr7G%3DR6KbGiQ45%3DZHpxFJ4vBHkFc9XGS_ptoqoiwr3g%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP_NzPbeDW92EdqXcGanWE1eMdq7TkV-HsCPyRx47qgrw%40mail.gmail.com.


Re: Lazy Beancount: a guide and repository to bootstrap Beancount experience

2024-07-29 Thread Martin Blais
Thanks for sharing!
Added to contrib doc


On Mon, Jul 29, 2024 at 1:12 PM Vasily M 
wrote:

> Hi all,
>
> First of all, thanks for the great software!
>
> I've been using Beancount for over a year now and over time moved most of
> financial stuff I've been previously doing in various spreadsheets, to
> Beancount.
> I've been very satisfied with how the whole process went, eventually
> covering all my needs. But throughout I used some of the approaches not
> mentioned or recommended anywhere so I decided to write a guide to
> potentially shorten this or similar path for others.
>
> In particular, the first hypothesis I tested in Beancount was using the
> pad and balance directives to manually track total balances of the accounts
> at regular points in time (that was covered by a spreadsheet I created
> before). That worked, and then I started to look into importers, beangulp,
> then later beancount-import to fill the gaps in high-level numbers. As well
> as that I tried to reuse other existing plugins to solve other common
> problems / answer questions with the data.
>
> When I put it all together in an attempt to share config/approach I ended
> up with this repository: https://github.com/Evernight/lazy-beancount (and
> the guide at https://lazy-beancount.xyz/). It takes what worked for me
> and puts it together in a Docker container that can be launched with a
> single command.
>
> Most of the functionality is provided by already existing Beancount
> libraries and tools but there's some original code like the
> https://github.com/Evernight/beancount-valuation plugin or UIs on top of
> it all (could possibly be Fava plugin but it's separate for now for the
> simplicity of prototyping).
>
> Hopefully it turns out to be useful for others as well. Please let me know
> if you have any feedback :)
>
> Cheers,
> Vasily
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/d824a27e-f477-4760-ba6a-bdefeda29d3an%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNZQZEpxjFtAFsL3wGs2e-4jjHWm0apHXm1395%3DAOFyKw%40mail.gmail.com.


Re: beancount/ops/holdings.py missing from v3?

2024-07-29 Thread Martin Blais
I can't quite recall - it's been a *long* time - but I think I refactored
this away.
I'm not sure if you can install both.
I'm sure you can do something with virtualenv though.


On Mon, Jul 29, 2024 at 10:04 PM Rahul Kuchhal  wrote:

> I noticed beancount/ops/holdings.py does not exist in v3 branch:
> https://github.com/beancount/beancount/tree/v3/beancount/ops
>
> but it exists in v2 branch:
> https://github.com/beancount/beancount/tree/v2/beancount/ops
>
> And seems like because of that it is missing from beancount python
> package.  Is it gone for good from v3? Is it possible to install beancount
> v2 and v3 python packages on osx?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/a69f7e8f-d59c-4217-9713-8dd71d45c197n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPODmnDCw0hp%3DBym-zSZGHRnNS_MOCyiv-Ez4rHQuMueA%40mail.gmail.com.


Re: Beancount txn parser/writer in Emacs Lisp

2024-07-25 Thread Martin Blais
If it exists, I'm not aware of it.
I'm all for it.


On Thu, Jul 25, 2024 at 5:06 PM TRS-80 
wrote:

> Hi friends,
>
> Over the past years, I have implemented some hacky bits and pieces of a
> txn parser and a writer in Emacs Lisp, and I was thinking about pulling
> them together into something coherent and proper and maybe even
> publishing it at some point.
>
> However I have a bad habit of re-inventing wheels, so I thought I might
> ask if something like this exists already?  I had a look at
> https://plaintextaccounting.org, as well as searching this mailing list,
> but all I found were some parsers written in Rust and some attempts at a
> tree-sitter based parser for Beancount (which seemed to be so far
> WIP/incomplete, near as I could tell).
>
> It may be a wrong-headed approach, but I prefer to work on my books[0]
> in Emacs, and I prefer to write my own text manipulation tools in Emacs
> Lisp (generally speaking).
>
> Any feedback would be welcomed.
>
>
> [0] Actually, I do almost everything in Emacs.  :D
>
> --
> Cheers,
> TRS-80
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/87le1pw59a.fsf%40isnotmyreal.name
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMnK-VzzbxdWcdEcDCWg4guSr%3DpziJT6-2nrkq4MSoSxw%40mail.gmail.com.


Re: v3 installation, testing, docs

2024-07-22 Thread Martin Blais
All errors above addressed.  The .io site will be updated eventually.

On Wed, Jun 26, 2024 at 11:58 PM Martin Blais  wrote:

> Thanks for pointing out doc updates need Eric, I'll fix those when I can
> find some time.
>
> On Tue, Jun 25, 2024 at 4:25 PM Eric Altendorf 
> wrote:
>
>> Oh, I forgot, I think I mentioned this before, but the v2 install doc:
>> https://beancount.github.io/docs/installing_beancount.html
>>
>> links to a supposed v3 install doc at this url:
>> https://beancount.github.io/docs/installing_beancount_v3.md
>>
>> however that's a 404.
>>
>> On Tue, Jun 25, 2024 at 1:22 PM Eric Altendorf 
>> wrote:
>>
>>> https://github.com/beancount/beancount?tab=readme-ov-file
>>> still says v3 is unstable and kinda suggests using v2 as the "current"
>>> stable version.  I recommend making it clearer that v3 is the default
>>> current version to use now, and remarking that some 3rd party systems (e.g.
>>> fava) may require use of the old otherwise deprecated v2.
>>>
>>> That page also links to this document for installation instructions:
>>> http://furius.ca/beancount/doc/install
>>> but this is also for v2.  Is there a v3?
>>>
>>> It also links to this as canonical documentation:
>>> https://beancount.github.io/docs/
>>> which also has these installation instructions, which reference v2:
>>> https://beancount.github.io/docs/installing_beancount.html
>>>
>>> One comment is that I think these are confusing for new users (it was
>>> certainly confusing to me when I first arrived here whether v2 or v3 was
>>> recommended, and I frequently found myself accidentally referencing docs
>>> for the wrong version)
>>>
>>> Second is a question, for me specifically right now I'd like to revisit
>>> my cost-basis PR, which means I'd like to get beancount set up in dev mode
>>> where I can make changes and run the test suite.  What's the right way to
>>> do this?
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAFXPr0u5LET3DUMyTntrZ3XX2oc7PMRAZ5tzUipOzJS-4K33Tw%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAFXPr0u5LET3DUMyTntrZ3XX2oc7PMRAZ5tzUipOzJS-4K33Tw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPaEEVE07iATDAx%2B_uVicZhhXKKU82Ma%2B0znLLJwpmuAw%40mail.gmail.com.


Re: v3 installation, testing, docs

2024-07-21 Thread Martin Blais
On Tue, Jun 25, 2024 at 4:23 PM Eric Altendorf 
wrote:

>
> Second is a question, for me specifically right now I'd like to revisit my
> cost-basis PR, which means I'd like to get beancount set up in dev mode
> where I can make changes and run the test suite.  What's the right way to
> do this?
>

set PYTHONPATH
"make test"
"make lint"

Old skool :-)

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM8fiP0MU06er%3DiCv-HsED37xSt5J3m-e-hdq-E5t3Lag%40mail.gmail.com.


Re: Advice on alternative accounting system for trading (including daytrading)

2024-07-07 Thread Martin Blais
BTW, related to trading inputs, here's an odd idea I had: to support a
table/CSV-like syntax in Beancount itself.
A set of accounts would have to be configured for a block, and the columns
would dictate which accounts the numbers in columns are booked for.
This would provide a pretty compact yet still readable syntax for more
dense sets of transactions.
Just a thought,


On Sun, Jul 7, 2024 at 4:45 PM Chary Chary  wrote:

>
>
> On Thursday, July 4, 2024 at 3:12:56 AM UTC+2 Fang-Pen Lin wrote:
>
>  I haven't spent too much effort on this end yet, but I built
> beanhub-import and open-sourced it a while back, and I think it could help
> your case a little bit on the importing part:
>
> https://github.com/LaunchPlatform/beanhub-import
>
> It's a rule-based beancount import engine designed to act like a data
> pipeline system. As long as you can export your trading records as a CSV
> file or any other machine-readable format, you should be able to build your
> own beanhub-extract 
> extractor class to help read the transactions from the file. I envision you
> can write beanhub-import rules to ingest your trading records like this:
>
>
>
> So, the *beanhub-import *seems to be another tool in the family of *beangulp
> *and *red's importers*
>
> https://groups.google.com/g/beancount/c/X7BkR7sHmHk/m/o1-hNWjpCAAJ
>
> I haven't experimented yet with any of these tools but as I see one of the
> unique features of your tool are
>
>
>- *Auto-update existing transactions* - When you update the rules or
>data, corresponding Beancount transactions will be updated automatically.
>- *Auto-move transactions to a different file* - When you change the
>rules to output the transactions to a different file, it will automatically
>remove the old ones and add the new ones for you
>
>  Am I correct?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/7fd78b28-53ad-4d1d-ae95-8f2dd38f0307n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPFHcwz2Fw10Z%2BvGWppogk4NZ-i85DT8Lm81kdqFDCUxA%40mail.gmail.com.


Re: How to record a stock split?

2024-06-26 Thread Martin Blais
This is indeed one of the solutions written about in the past.
https://docs.google.com/document/d/1SC_q_t8TkLdPxglb2qcpG8q4wVe0VP-XU35FTI0ICRA/



On Thu, Jun 27, 2024 at 12:13 AM Eric Altendorf 
wrote:

> if i were doing this i think i'd look into using a different symbol for
> pre and post split.  it just feels cleaner to think of the pre-split shares
> as being a fundamentally different thing than the post-split.  not sure how
> hard it would be to keep price fetching working, and suppress realization
> of cap gains.
>
> On Wed, Jun 26, 2024 at 8:57 PM Martin Blais  wrote:
>
>> Beancount does not deal with splits explicitly.
>> This means that the time series of your price will have a jump at the
>> time of the stock split.
>> Building this properly is out of scope and I've found it not worthwhile;
>> there are many more corporate actions it would have to take into account,
>> e.g., spinoff of shares and that's worthy of building in something that
>> serves market data, but not super important in an accounting system.
>>
>>
>>
>> On Wed, Jun 26, 2024 at 9:38 AM Brian Lalor  wrote:
>>
>>> Alright, I see.  Thank you.
>>>
>>> If it’s not already obvious, I’m quite naïve about trading. Given that
>>> most (if not all?) historical price records seem to have been retroactively
>>> updated for all cumulative splits (ie
>>> https://finance.yahoo.com/quote/NVDA/ shows the 2024-02-14 closing
>>> price as 73.90 USD), is there any reason not to just update the original
>>> transaction in my ledger?
>>>
>>> —
>>> Brian Lalor (he/him)
>>> bla...@bravo5.org
>>>
>>> On Jun 22, 2024, at 9:34 PM, Martin Blais  wrote:
>>>
>>> 2024-06-02 * "NVDA 10:1 stock split" ""
>>> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14}
>>> Assets:Stocks:NVDA 2*10 NVDA {733.09/10 USD}
>>>
>>> You don't realize gains on a split
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Sat, Jun 22, 2024 at 8:42 PM Brian Lalor  wrote:
>>>
>>>> Like this?
>>>>
>>>> 2024-06-02 * "NVDA 10:1 stock split" ""
>>>> Assets:Stocks:NVDA
>>>>   -2 NVDA {733.09 USD, 2024-02-14}
>>>> Assets:Stocks:NVDA
>>>>   20 NVDA {109.633 USD}
>>>>
>>>>
>>>> But that doesn’t balance.
>>>>
>>>> —
>>>> Brian Lalor (he/him)
>>>> bla...@bravo5.org
>>>>
>>>> On Jun 22, 2024, at 8:16 PM, Martin Blais  wrote:
>>>>
>>>> You bought your NVDA at 733.09 not 1096.33, that's what you have to
>>>> provide in the cost for the -2 leg.
>>>> The docs are correct.
>>>>
>>>>
>>>> On Sat, Jun 22, 2024 at 5:32 PM Brian Lalor  wrote:
>>>>
>>>>> I know this has been discussed a few times, but the docs are still
>>>>> incorrect and I’m unable to find a complete example.  I’m using beancount
>>>>> v2 because Fava’s not been updated for v3, yet.
>>>>>
>>>>> NVDA recently split 10:1. I previously purchased 2 shares:
>>>>>
>>>>> option "operating_currency" "USD"
>>>>>
>>>>> 2024-02-14 open Equity:Opening-Balances
>>>>>  USD
>>>>>
>>>>> 2024-02-14 open Assets:Cash
>>>>>  USD
>>>>> 2024-02-14 pad Assets:Cash Equity:Opening-Balances
>>>>>
>>>>> 2024-02-14 open Assets:Stocks:NVDA
>>>>>   NVDA
>>>>> 2024-02-14 commodity NVDA
>>>>>
>>>>> 2024-02-14 * "Buying some NVDA" ""
>>>>> Assets:Stocks:NVDA
>>>>>  2.00 NVDA {733.09 USD}
>>>>> Assets:Cash
>>>>>
>>>>> 2024-05-31 balance Assets:Stocks:NVDA
>>>>>2 NVDA
>>>>> 2024-05-31 balance Assets:Cash
>>>>>  0.00 USD
>>>>>
>>>>> The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and
>>>>> my Fidelity account confirms that I have 20 shares.  Per the docs[1], I
>>>>> would do (I think):
>>>>>
>>>>> 2024-06-02 * "NVDA 10:1 stock split" ""
>>>>> Assets:Stocks:NVDA
>>>>>-2 NVDA {1,096.33 USD}
>>>>&g

Re: v3 installation, testing, docs

2024-06-26 Thread Martin Blais
Thanks for pointing out doc updates need Eric, I'll fix those when I can
find some time.

On Tue, Jun 25, 2024 at 4:25 PM Eric Altendorf 
wrote:

> Oh, I forgot, I think I mentioned this before, but the v2 install doc:
> https://beancount.github.io/docs/installing_beancount.html
>
> links to a supposed v3 install doc at this url:
> https://beancount.github.io/docs/installing_beancount_v3.md
>
> however that's a 404.
>
> On Tue, Jun 25, 2024 at 1:22 PM Eric Altendorf 
> wrote:
>
>> https://github.com/beancount/beancount?tab=readme-ov-file
>> still says v3 is unstable and kinda suggests using v2 as the "current"
>> stable version.  I recommend making it clearer that v3 is the default
>> current version to use now, and remarking that some 3rd party systems (e.g.
>> fava) may require use of the old otherwise deprecated v2.
>>
>> That page also links to this document for installation instructions:
>> http://furius.ca/beancount/doc/install
>> but this is also for v2.  Is there a v3?
>>
>> It also links to this as canonical documentation:
>> https://beancount.github.io/docs/
>> which also has these installation instructions, which reference v2:
>> https://beancount.github.io/docs/installing_beancount.html
>>
>> One comment is that I think these are confusing for new users (it was
>> certainly confusing to me when I first arrived here whether v2 or v3 was
>> recommended, and I frequently found myself accidentally referencing docs
>> for the wrong version)
>>
>> Second is a question, for me specifically right now I'd like to revisit
>> my cost-basis PR, which means I'd like to get beancount set up in dev mode
>> where I can make changes and run the test suite.  What's the right way to
>> do this?
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0u5LET3DUMyTntrZ3XX2oc7PMRAZ5tzUipOzJS-4K33Tw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOygtTSfVGAuFeMN203L2L_Ye75j2zZCA1PWEHEeV3pFA%40mail.gmail.com.


Re: How to record a stock split?

2024-06-26 Thread Martin Blais
Beancount does not deal with splits explicitly.
This means that the time series of your price will have a jump at the time
of the stock split.
Building this properly is out of scope and I've found it not worthwhile;
there are many more corporate actions it would have to take into account,
e.g., spinoff of shares and that's worthy of building in something that
serves market data, but not super important in an accounting system.



On Wed, Jun 26, 2024 at 9:38 AM Brian Lalor  wrote:

> Alright, I see.  Thank you.
>
> If it’s not already obvious, I’m quite naïve about trading. Given that
> most (if not all?) historical price records seem to have been retroactively
> updated for all cumulative splits (ie
> https://finance.yahoo.com/quote/NVDA/ shows the 2024-02-14 closing price
> as 73.90 USD), is there any reason not to just update the original
> transaction in my ledger?
>
> —
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> On Jun 22, 2024, at 9:34 PM, Martin Blais  wrote:
>
> 2024-06-02 * "NVDA 10:1 stock split" ""
> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14}
> Assets:Stocks:NVDA 2*10 NVDA {733.09/10 USD}
>
> You don't realize gains on a split
>
>
>
>
>
>
> On Sat, Jun 22, 2024 at 8:42 PM Brian Lalor  wrote:
>
>> Like this?
>>
>> 2024-06-02 * "NVDA 10:1 stock split" ""
>> Assets:Stocks:NVDA
>> -2 NVDA {733.09 USD, 2024-02-14}
>> Assets:Stocks:NVDA
>> 20 NVDA {109.633 USD}
>>
>>
>> But that doesn’t balance.
>>
>> —
>> Brian Lalor (he/him)
>> bla...@bravo5.org
>>
>> On Jun 22, 2024, at 8:16 PM, Martin Blais  wrote:
>>
>> You bought your NVDA at 733.09 not 1096.33, that's what you have to
>> provide in the cost for the -2 leg.
>> The docs are correct.
>>
>>
>> On Sat, Jun 22, 2024 at 5:32 PM Brian Lalor  wrote:
>>
>>> I know this has been discussed a few times, but the docs are still
>>> incorrect and I’m unable to find a complete example.  I’m using beancount
>>> v2 because Fava’s not been updated for v3, yet.
>>>
>>> NVDA recently split 10:1. I previously purchased 2 shares:
>>>
>>> option "operating_currency" "USD"
>>>
>>> 2024-02-14 open Equity:Opening-Balances
>>>USD
>>>
>>> 2024-02-14 open Assets:Cash
>>>USD
>>> 2024-02-14 pad Assets:Cash Equity:Opening-Balances
>>>
>>> 2024-02-14 open Assets:Stocks:NVDA
>>> NVDA
>>> 2024-02-14 commodity NVDA
>>>
>>> 2024-02-14 * "Buying some NVDA" ""
>>> Assets:Stocks:NVDA
>>>2.00 NVDA {733.09 USD}
>>> Assets:Cash
>>>
>>> 2024-05-31 balance Assets:Stocks:NVDA
>>>  2 NVDA
>>> 2024-05-31 balance Assets:Cash
>>>0.00 USD
>>>
>>> The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and
>>> my Fidelity account confirms that I have 20 shares.  Per the docs[1], I
>>> would do (I think):
>>>
>>> 2024-06-02 * "NVDA 10:1 stock split" ""
>>> Assets:Stocks:NVDA
>>>  -2 NVDA {1,096.33 USD}
>>> Assets:Stocks:NVDA
>>>  50 NVDA {109.633 USD}
>>>
>>> bean-check fails, however:
>>>
>>> nvidia_split.beancount:24:  No position matches
>>> "Posting(account='Assets:Stocks:NVDA', units=-2 NVDA,
>>> cost=CostSpec(number_per=Decimal('1096.33'), number_total=None,
>>> currency='USD', date=None, label=None, merge=False), price=None, flag=None,
>>> meta={'filename': 'nvidia_split.beancount', 'lineno': 29})" against balance
>>> (2.00 NVDA {733.09 USD, 2024-02-14})
>>>
>>> Explicitly using the lot in that transaction fails, too:
>>>
>>> 2024-06-02 * "NVDA 10:1 stock split" ""
>>> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
>>> Assets:Stocks:NVDA 20 NVDA {109.633 USD}
>>>
>>> The error is:
>>>
>>> nvidia_split.beancount:24:  Transaction does not balance: (726.4800
>>> USD)
>>>
>>>2024-06-02 * "NVDA 10:1 stock split" ""
>>>  Assets:Stocks:NVDA  -2.00 NVDA {733.09 USD, 2024-02-14} @ 1096.33
>>> USD
>>>  Assets:Stocks:NVDA 20 NVDA {109.633 USD, 2024-06-02}
>>>
>>> So it seems the price of 1096.33 is being ignored an

Re: How to record a stock split?

2024-06-22 Thread Martin Blais
Your price annotation is incorrect (the price on that date woudl be
different), don't include it, it'll insert the wrong price in the price
database.


On Sat, Jun 22, 2024 at 10:16 PM fin  wrote:

> Brian Lalor wrote:
> > I know this has been discussed a few times, but the docs are still
> incorrect and I’m unable to find a complete example.  I’m using beancount
> v2 because Fava’s not been updated for v3, yet.
> >
> > NVDA recently split 10:1. I previously purchased 2 shares:
> >
> > option "operating_currency" "USD"
> >
> > 2024-02-14 open Equity:Opening-Balances
>USD
> >
> > 2024-02-14 open Assets:Cash
>USD
> > 2024-02-14 pad Assets:Cash Equity:Opening-Balances
> >
> > 2024-02-14 open Assets:Stocks:NVDA
> NVDA
> > 2024-02-14 commodity NVDA
> >
> > 2024-02-14 * "Buying some NVDA" ""
> > Assets:Stocks:NVDA
>2.00 NVDA {733.09 USD}
> > Assets:Cash
> >
> > 2024-05-31 balance Assets:Stocks:NVDA
>  2 NVDA
> > 2024-05-31 balance Assets:Cash
>0.00 USD
> >
> > The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and
> my Fidelity account confirms that I have 20 shares.  Per the docs[1], I
> would do (I think):
> >
> > 2024-06-02 * "NVDA 10:1 stock split" ""
> > Assets:Stocks:NVDA
>  -2 NVDA {1,096.33 USD}
> > Assets:Stocks:NVDA
>  50 NVDA {109.633 USD}
> >
> > bean-check fails, however:
> >
> > nvidia_split.beancount:24:  No position matches
> "Posting(account='Assets:Stocks:NVDA', units=-2 NVDA,
> cost=CostSpec(number_per=Decimal('1096.33'), number_total=None,
> currency='USD', date=None, label=None, merge=False), price=None, flag=None,
> meta={'filename': 'nvidia_split.beancount', 'lineno': 29})" against balance
> (2.00 NVDA {733.09 USD, 2024-02-14})
> >
> > Explicitly using the lot in that transaction fails, too:
> >
> > 2024-06-02 * "NVDA 10:1 stock split" ""
> > Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
> > Assets:Stocks:NVDA 20 NVDA {109.633 USD}
> >
> > The error is:
> >
> > nvidia_split.beancount:24:  Transaction does not balance: (726.4800
> USD)
> >
> >2024-06-02 * "NVDA 10:1 stock split" ""
> >  Assets:Stocks:NVDA  -2.00 NVDA {733.09 USD, 2024-02-14} @ 1096.33
> USD
>
>
>   I write those as (but I also include a label):
>
>   Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 733.09 USD
>   Assets:Stocks:NVDA 20 NVDA {73.309 USD, 2024-02-14}
>
>
>   IMO the basis and purchase date of this lot should not be changed by a
> split.
>
> $ hld
>
> Account Units  Currency  Cost Currency  Average Cost
> Price  Book Value  Market Value
> --  -    -  
> -  --  
> Assets:Cash -1,466.18   USDUSD
> -1,466.18 -1,466.18
> Assets:Stocks:NVDA  20.00  NVDAUSD 73.31
>  1,466.18
> --  -    -  
> -  --  
>
>
>
> >
> > So it seems the price of 1096.33 is being ignored and I’m trying to
> purchase 20 shares at 109.633 USD using 2*733.09 USD and the “gain” of
> 363.24 USD per share is being lost.
> >
> > What is the proper way to reflect a stock split?
> >
> > Thanks,
> > Brian
> >
> > [1]:
> https://beancount.github.io/docs/trading_with_beancount.html#stock-splits
> > —
> > Brian Lalor (he/him)
> > bla...@bravo5.org
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/q4dkkk-f7i.ln1%40anthive.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMMfgLiTZ%3D5aRZgsQ6SRvaymf_tY3r9jB%2BmWpuUkc89iQ%40mail.gmail.com.


Re: How to record a stock split?

2024-06-22 Thread Martin Blais
2024-06-02 * "NVDA 10:1 stock split" ""
Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14}
Assets:Stocks:NVDA 2*10 NVDA {733.09/10 USD}

You don't realize gains on a split






On Sat, Jun 22, 2024 at 8:42 PM Brian Lalor  wrote:

> Like this?
>
> 2024-06-02 * "NVDA 10:1 stock split" ""
> Assets:Stocks:NVDA
>   -2 NVDA {733.09 USD, 2024-02-14}
> Assets:Stocks:NVDA
>   20 NVDA {109.633 USD}
>
>
> But that doesn’t balance.
>
> —
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> On Jun 22, 2024, at 8:16 PM, Martin Blais  wrote:
>
> You bought your NVDA at 733.09 not 1096.33, that's what you have to
> provide in the cost for the -2 leg.
> The docs are correct.
>
>
> On Sat, Jun 22, 2024 at 5:32 PM Brian Lalor  wrote:
>
>> I know this has been discussed a few times, but the docs are still
>> incorrect and I’m unable to find a complete example.  I’m using beancount
>> v2 because Fava’s not been updated for v3, yet.
>>
>> NVDA recently split 10:1. I previously purchased 2 shares:
>>
>> option "operating_currency" "USD"
>>
>> 2024-02-14 open Equity:Opening-Balances
>>USD
>>
>> 2024-02-14 open Assets:Cash
>>USD
>> 2024-02-14 pad Assets:Cash Equity:Opening-Balances
>>
>> 2024-02-14 open Assets:Stocks:NVDA
>>   NVDA
>> 2024-02-14 commodity NVDA
>>
>> 2024-02-14 * "Buying some NVDA" ""
>> Assets:Stocks:NVDA
>>  2.00 NVDA {733.09 USD}
>> Assets:Cash
>>
>> 2024-05-31 balance Assets:Stocks:NVDA
>>  2 NVDA
>> 2024-05-31 balance Assets:Cash
>>  0.00 USD
>>
>> The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and my
>> Fidelity account confirms that I have 20 shares.  Per the docs[1], I would
>> do (I think):
>>
>> 2024-06-02 * "NVDA 10:1 stock split" ""
>> Assets:Stocks:NVDA
>>-2 NVDA {1,096.33 USD}
>> Assets:Stocks:NVDA
>>50 NVDA {109.633 USD}
>>
>> bean-check fails, however:
>>
>> nvidia_split.beancount:24:  No position matches
>> "Posting(account='Assets:Stocks:NVDA', units=-2 NVDA,
>> cost=CostSpec(number_per=Decimal('1096.33'), number_total=None,
>> currency='USD', date=None, label=None, merge=False), price=None, flag=None,
>> meta={'filename': 'nvidia_split.beancount', 'lineno': 29})" against balance
>> (2.00 NVDA {733.09 USD, 2024-02-14})
>>
>> Explicitly using the lot in that transaction fails, too:
>>
>> 2024-06-02 * "NVDA 10:1 stock split" ""
>> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
>> Assets:Stocks:NVDA 20 NVDA {109.633 USD}
>>
>> The error is:
>>
>> nvidia_split.beancount:24:  Transaction does not balance: (726.4800
>> USD)
>>
>>2024-06-02 * "NVDA 10:1 stock split" ""
>>  Assets:Stocks:NVDA  -2.00 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
>>  Assets:Stocks:NVDA 20 NVDA {109.633 USD, 2024-06-02}
>>
>> So it seems the price of 1096.33 is being ignored and I’m trying to
>> purchase 20 shares at 109.633 USD using 2*733.09 USD and the “gain” of
>> 363.24 USD per share is being lost.
>>
>> What is the proper way to reflect a stock split?
>>
>> Thanks,
>> Brian
>>
>> [1]:
>> https://beancount.github.io/docs/trading_with_beancount.html#stock-splits
>> —
>> Brian Lalor (he/him)
>> bla...@bravo5.org
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/C9EBE17D-A95F-4018-B979-59831C301DFB%40bravo5.org
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhMXg654ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAK21%2BhMXg654ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%40mail.gmail.com?u

Re: How to record a stock split?

2024-06-22 Thread Martin Blais
You bought your NVDA at 733.09 not 1096.33, that's what you have to provide
in the cost for the -2 leg.
The docs are correct.


On Sat, Jun 22, 2024 at 5:32 PM Brian Lalor  wrote:

> I know this has been discussed a few times, but the docs are still
> incorrect and I’m unable to find a complete example.  I’m using beancount
> v2 because Fava’s not been updated for v3, yet.
>
> NVDA recently split 10:1. I previously purchased 2 shares:
>
> option "operating_currency" "USD"
>
> 2024-02-14 open Equity:Opening-Balances
>  USD
>
> 2024-02-14 open Assets:Cash
>  USD
> 2024-02-14 pad Assets:Cash Equity:Opening-Balances
>
> 2024-02-14 open Assets:Stocks:NVDA
>   NVDA
> 2024-02-14 commodity NVDA
>
> 2024-02-14 * "Buying some NVDA" ""
> Assets:Stocks:NVDA
>  2.00 NVDA {733.09 USD}
> Assets:Cash
>
> 2024-05-31 balance Assets:Stocks:NVDA
>2 NVDA
> 2024-05-31 balance Assets:Cash
>  0.00 USD
>
> The pre-split stock price (per Yahoo and bean-price) was 1,096.33, and my
> Fidelity account confirms that I have 20 shares.  Per the docs[1], I would
> do (I think):
>
> 2024-06-02 * "NVDA 10:1 stock split" ""
> Assets:Stocks:NVDA
>-2 NVDA {1,096.33 USD}
> Assets:Stocks:NVDA
>50 NVDA {109.633 USD}
>
> bean-check fails, however:
>
> nvidia_split.beancount:24:  No position matches
> "Posting(account='Assets:Stocks:NVDA', units=-2 NVDA,
> cost=CostSpec(number_per=Decimal('1096.33'), number_total=None,
> currency='USD', date=None, label=None, merge=False), price=None, flag=None,
> meta={'filename': 'nvidia_split.beancount', 'lineno': 29})" against balance
> (2.00 NVDA {733.09 USD, 2024-02-14})
>
> Explicitly using the lot in that transaction fails, too:
>
> 2024-06-02 * "NVDA 10:1 stock split" ""
> Assets:Stocks:NVDA -2 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
> Assets:Stocks:NVDA 20 NVDA {109.633 USD}
>
> The error is:
>
> nvidia_split.beancount:24:  Transaction does not balance: (726.4800
> USD)
>
>2024-06-02 * "NVDA 10:1 stock split" ""
>  Assets:Stocks:NVDA  -2.00 NVDA {733.09 USD, 2024-02-14} @ 1096.33 USD
>  Assets:Stocks:NVDA 20 NVDA {109.633 USD, 2024-06-02}
>
> So it seems the price of 1096.33 is being ignored and I’m trying to
> purchase 20 shares at 109.633 USD using 2*733.09 USD and the “gain” of
> 363.24 USD per share is being lost.
>
> What is the proper way to reflect a stock split?
>
> Thanks,
> Brian
>
> [1]:
> https://beancount.github.io/docs/trading_with_beancount.html#stock-splits
> —
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/C9EBE17D-A95F-4018-B979-59831C301DFB%40bravo5.org
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMXg654ZmD8N%2BedrJuCzSah2hrX0apH1Q6o%3D2%3DxP80kQQ%40mail.gmail.com.


Re: Announcement: v3 and git branches

2024-06-22 Thread Martin Blais
I just fixed the github actions/workflows to produce and upload valid
wheels.
It includes wheels from 3.8 to 3.12 for windows, macos, linux for 3.0.0.



On Tue, Jun 18, 2024 at 7:48 AM Martin Blais  wrote:

> On Tue, Jun 18, 2024 at 3:43 AM Stefano Zacchiroli 
> wrote:
>
>> About this:
>>
>> On Sun, Jun 16, 2024 at 04:22:43PM -0400, Martin Blais wrote:
>> > I've reviewed missing PyPI releases and made sure we have these:
>> > https://pypi.org/project/beancount2ledger/
>>
>> did you mean to release the current beancount2ledger to PyPI?
>>
>
> Not really, but if it needs to we could.
>
>
> Because it currently isn't released (last release on PyPI is 4-year old,
>> last commit in Git 2-year old) and there are a couple of useful changes
>> in Git: a missing dependency in requirements.txt and the configurability
>> of a metadata key used (ledger side) to store payees.
>>
>> I'm listed as co-maintainer of beancount2ledger so I can do this too,
>> but wanted to check with you before proceeding to avoid an upload race.
>>
>
> Please do! SGTM
>
>
>
>
>
>>
>> Let me know,
>> Cheers
>> --
>> Stefano Zacchiroli . z...@upsilon.cc . https://upsilon.cc/zack  _. ^ ._
>> Full professor of Computer Science  o o   o \/|V|\/
>> Télécom Paris, Polytechnic Institute of Paris o o o   <\>
>> Co-founder & CTO Software Heritageo o o o   /\|^|/\
>> https://twitter.com/zacchiro . https://mastodon.xyz/@zacchiro   '" V "'
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/20240618074317.kpm7rlumhixsbrw7%40upsilon.cc
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMvERdGZPww%3DuJHvXWcMhkK9Aw9Ht1XTMQW9EXvJGR0fw%40mail.gmail.com.


Re: Installation problems on MacBook Air M2 (Sonoma 14.5)

2024-06-21 Thread Martin Blais
I can't
The docs are all about v2.
Not updated.

On Fri, Jun 21, 2024, 07:27 Alejandro López  wrote:

> Can you point me to the updated docs?
>
> El vie, 21 jun 2024 a las 1:36, Martin Blais () escribió:
>
>> bean-report is gone.
>>
>>
>> On Thu, Jun 20, 2024 at 8:34 PM Alejandro López 
>> wrote:
>>
>>> Hi,
>>>
>>> I installed Beancount 3.0.0 with homebrew and some commands aren't being
>>> recognized. When I use 'bean-report --help', it says 'bean-report: command
>>> not found'. Running 'bean-check --version' does work though. I checked the
>>> path and it's in /opt/hombrew/bin/beancount. I've tried uninstalling and
>>> reinstalling and it didn't work. I've tried installing through pip3 and it
>>> doesn't recognize ANY command.
>>>
>>> Could anyone help?
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/95cd8581-674a-44fd-92a9-392230ee38a7n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/95cd8581-674a-44fd-92a9-392230ee38a7n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhMnTDA23qXS%2Bi9etV4RgYgk%2B%3D_AOQ08i%3DxG%3DdUqWFSZ4w%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhMnTDA23qXS%2Bi9etV4RgYgk%2B%3D_AOQ08i%3DxG%3DdUqWFSZ4w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CALA_xcWGnkmPceht-%3D_vgbK5wNw0YYu%2BuRq5smTONx1D1MRzGw%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CALA_xcWGnkmPceht-%3D_vgbK5wNw0YYu%2BuRq5smTONx1D1MRzGw%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPzvQypKXFXnnNhMp0S3VDRxTVA0fopV-8RpxmnsqUa3Q%40mail.gmail.com.


Re: Installation problems on MacBook Air M2 (Sonoma 14.5)

2024-06-20 Thread Martin Blais
bean-report is gone.


On Thu, Jun 20, 2024 at 8:34 PM Alejandro López  wrote:

> Hi,
>
> I installed Beancount 3.0.0 with homebrew and some commands aren't being
> recognized. When I use 'bean-report --help', it says 'bean-report: command
> not found'. Running 'bean-check --version' does work though. I checked the
> path and it's in /opt/hombrew/bin/beancount. I've tried uninstalling and
> reinstalling and it didn't work. I've tried installing through pip3 and it
> doesn't recognize ANY command.
>
> Could anyone help?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/95cd8581-674a-44fd-92a9-392230ee38a7n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMnTDA23qXS%2Bi9etV4RgYgk%2B%3D_AOQ08i%3DxG%3DdUqWFSZ4w%40mail.gmail.com.


Re: bean-extract is gone with v3 [Was: Announcement: v3 and git branches]

2024-06-18 Thread Martin Blais
On Tue, Jun 18, 2024 at 7:09 AM Martin Blais  wrote:

> On Tue, Jun 18, 2024, 04:13 Stefano Zacchiroli  wrote:
>
>> On Tue, Jun 18, 2024 at 03:36:34PM +0800, Martin Michlmayr wrote:
>> > * Stefano Zacchiroli  [2024-06-18 09:27]:
>> > > I welcome migration tips on what's the easiest migration path (to
>> > > beangulp, I guess?)
>> >
>> > Yes.
>>
>> Thanks, although I'm still a bit confused.
>>
>> This document
>>
>> https://docs.google.com/document/d/1hBfsHZcoHgz5rvhCdP42g2FJ5ouycIMV4H1tfgXpwBU/
>> "Importing External Data in Beancount" is about v3 ("This document is
>> about Beancount v3, under development, and a work in progress.") and
>> Beangulp, but still talks about bean-extract as an executable involved
>> in importing transactions with v3/beangulp.
>>
>> What am I missing?
>>
>
> Ah yes I should rename all the v3 docs to sometime more generic, like
> roadmap to the future or something. Will do.
>  Thanks for reminding me
>

Two "v3" docs are really about a future rewrite or a desiderata. I've
renamed those to "Vnext."
Those are very much still relevant for future work.
https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/
https://docs.google.com/document/d/1H0UDD1cKenraIMe40PbdMgnqJdeqI6yKv0og51mXk-0/

Some of the other "v3" docs were about "v3" as in "C++ rewrite," and now
that that's moved to a branch,
I just called those "C++ version". You can safely ignore these.
https://docs.google.com/document/d/1WwZYqsp28Uuk5eFqHQ1u1zqdjghymy8S_Yo-OJENoa4/
https://docs.google.com/document/d/10R-msZljuqFY8nckUnR1jVxMX1ol7rJUCMZo7w7QUQs/
https://docs.google.com/document/d/1Ia4zYmkB6I6IbWPRlcZYYuMS1ZI55T99dp9LiMJqXCE/

The content is largely unchanged. You've already read all those
docs, there's nothing really new but a change in name.

I'm hoping to restart doing some needed changes incrementally to what is
now called "v3" this summer.
In particular, I think making precision and tolerance explicit can be done
backwards-compatibly and a lot of questions come about that.
Modernizing a bit, I've applied auto-formatting (via ruff format) over the
weekend, and will be adding types as well over time.




> --
>> Stefano Zacchiroli . z...@upsilon.cc . https://upsilon.cc/zack  _. ^ ._
>> Full professor of Computer Science  o o   o \/|V|\/
>> Télécom Paris, Polytechnic Institute of Paris o o o   <\>
>> Co-founder & CTO Software Heritageo o o o   /\|^|/\
>> https://twitter.com/zacchiro . https://mastodon.xyz/@zacchiro   '" V "'
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/20240618081318.k5vti66pqlz3po2t%40upsilon.cc
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO0yKMFY-AjEYnhv%2BCEZjR6BTxX6b_9-zjVVNheFvj75A%40mail.gmail.com.


Re: Announcement: v3 and git branches

2024-06-18 Thread Martin Blais
On Tue, Jun 18, 2024 at 3:43 AM Stefano Zacchiroli  wrote:

> About this:
>
> On Sun, Jun 16, 2024 at 04:22:43PM -0400, Martin Blais wrote:
> > I've reviewed missing PyPI releases and made sure we have these:
> > https://pypi.org/project/beancount2ledger/
>
> did you mean to release the current beancount2ledger to PyPI?
>

Not really, but if it needs to we could.


Because it currently isn't released (last release on PyPI is 4-year old,
> last commit in Git 2-year old) and there are a couple of useful changes
> in Git: a missing dependency in requirements.txt and the configurability
> of a metadata key used (ledger side) to store payees.
>
> I'm listed as co-maintainer of beancount2ledger so I can do this too,
> but wanted to check with you before proceeding to avoid an upload race.
>

Please do! SGTM





>
> Let me know,
> Cheers
> --
> Stefano Zacchiroli . z...@upsilon.cc . https://upsilon.cc/zack  _. ^ ._
> Full professor of Computer Science  o o   o \/|V|\/
> Télécom Paris, Polytechnic Institute of Paris o o o   <\>
> Co-founder & CTO Software Heritageo o o o   /\|^|/\
> https://twitter.com/zacchiro . https://mastodon.xyz/@zacchiro   '" V "'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/20240618074317.kpm7rlumhixsbrw7%40upsilon.cc
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO59xJ__YHg5DapZhBZ6nwA%2BkdPGM_2dnrCyXdfQS%3D%3DUQ%40mail.gmail.com.


Re: bean-extract is gone with v3 [Was: Announcement: v3 and git branches]

2024-06-18 Thread Martin Blais
On Tue, Jun 18, 2024, 04:13 Stefano Zacchiroli  wrote:

> On Tue, Jun 18, 2024 at 03:36:34PM +0800, Martin Michlmayr wrote:
> > * Stefano Zacchiroli  [2024-06-18 09:27]:
> > > I welcome migration tips on what's the easiest migration path (to
> > > beangulp, I guess?)
> >
> > Yes.
>
> Thanks, although I'm still a bit confused.
>
> This document
>
> https://docs.google.com/document/d/1hBfsHZcoHgz5rvhCdP42g2FJ5ouycIMV4H1tfgXpwBU/
> "Importing External Data in Beancount" is about v3 ("This document is
> about Beancount v3, under development, and a work in progress.") and
> Beangulp, but still talks about bean-extract as an executable involved
> in importing transactions with v3/beangulp.
>
> What am I missing?
>

Ah yes I should rename all the v3 docs to sometime more generic, like
roadmap to the future or something. Will do.
 Thanks for reminding me






-- 
> Stefano Zacchiroli . z...@upsilon.cc . https://upsilon.cc/zack  _. ^ ._
> Full professor of Computer Science  o o   o \/|V|\/
> Télécom Paris, Polytechnic Institute of Paris o o o   <\>
> Co-founder & CTO Software Heritageo o o o   /\|^|/\
> https://twitter.com/zacchiro . https://mastodon.xyz/@zacchiro   '" V "'
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/20240618081318.k5vti66pqlz3po2t%40upsilon.cc
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOQTT4LrP7ZN%2Bwgz9ZYLUWVoC%2B4tX_nZ3euYB2RUShneg%40mail.gmail.com.


Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-17 Thread Martin Blais
On Mon, Jun 17, 2024, 09:33 Daniele Nicolodi  wrote:

> On 10/06/24 23:58, Chary Chary wrote:
> >
> >
> > On Monday, June 10, 2024 at 8:49:45 PM UTC+2 dan...@grinta.net wrote:
> >
> >
> > AFAICT you haven't contributed to beancount or beanquery yet you are
> > asking to introduce policies to govern the contributions of others.
> > This
> > is one step beyond anything I've see so far.
> >
> > This is something that I bumped into recent and may be worth reading
> >
> >
> https://www.hezmatt.org/~mpalmer/blog/2024/05/14/is-this-project-still-maintained.html
> >
> > Cheers,
> > Dan
> >
> >
> > Sorry if I offended you somehow, as I really appreciate the work you are
> > doing in developing beanquery and beancount further.
>
> No offense taken. It is perfectly fine for you to dictate how I
> contribute to open source projects. I guess you didn't bother reading
> the blog post I liked to.
>

That's a pretty good opinion piece that blog!
Spot on



> I'm really sorry for the inconvenience I've caused to you releasing my
> work under an open source license. Any further development will happen
> in a private branch, so that you will not have to suffer similar
> discomfort again.
>

I think you mean to be snarky.  That might be lost on some people, it's
worth noting.
(Your tone can be misleading at times and some may take it harshly.)





> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/563cb594-910d-45c9-8450-057c759bf390%40grinta.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNsxVsEjyrkt%3DthtUvHAvxmpir4nRGyaad1gAMuVv7ktw%40mail.gmail.com.


Re: Announcement: v3 and git branches

2024-06-17 Thread Martin Blais
I'd forgotten the tag. There's one now.

On Mon, Jun 17, 2024 at 7:33 AM Martin Blais  wrote:

> On Mon, Jun 17, 2024 at 6:00 AM Brian Lalor  wrote:
>
>> This is great! Thank you! Is there a summary of what’s new/different in
>> 3.0.0 from 2.3.6? (Also I don’t see a 3.0.0 tag in GitHub; was that an
>> oversight?)
>>
>
> v3
> - removes beanquery, beanprice, beanweb and more, is pretty stripped down.
> Use the subprojects instead.
> - has a number of really minor fixes added over time but no major new
> features
> If you were using the 'master' branch there's no change.
>
> You should not use v2 anymore.
>
>
>
>
>> --
>> Brian Lalor (he/him)
>> bla...@bravo5.org
>>
>> On Jun 16, 2024, at 4:23 PM, Martin Blais  wrote:
>>
>> 
>> Based on our recent discussion around Beancount branches being confusing,
>> I did the following to branches:
>>
>> - v2: remains the same (no change); but v2 is now even less subject to
>> freeze exceptions than before, because v3 is now officially born and PyPI
>> releases will be made for it.  The default reply to patches to v2 will be
>> "move that to v3."
>>
>> - cpp: I turned the previous master branch's state with all C++ and Bazel
>> build into a new 'cpp' branch.
>>   All work on the C++ rewrite -- if it is to continue -- will live on
>> that branch.
>>   If things do move to Rust, I will probably salvage bits and pieces of
>> that manually into a 'rust' branch.
>>   In particular, the schema defined in the proto files is something I'd
>> like to carry forward (nicely
>>   documented and distinguishes between the pre and post interpolation
>> data structures explicitly),
>>   and perhaps the new reFlex parser will be useful at some point.
>>
>> - v3: a new branch, to contain the state of the master branch MINUS the
>> C++ bits.
>>   As stated above, the C++ code remains only on branch 'cpp'.
>>   This is now the official release branch and PyPI releases will be made
>> of it.
>>
>> - master: this branch is now where new work on v3 might live.
>>   I'm not sure we really need it or what it should mean, but it should
>> track v3 for now.
>>
>> I've reviewed missing PyPI releases and made sure we have these:
>>
>> https://pypi.org/project/beancount/
>> https://pypi.org/project/beangulp/
>> https://pypi.org/project/beanquery/
>> https://pypi.org/project/beanprice/
>> https://pypi.org/project/beangrow/
>> https://pypi.org/project/beancount2ledger/
>>
>> The inclusion of v3 releases for PyPI and new PyPI releases for
>> subprojects should normalize the versioning situation in Beancount. Note
>> that packaging and following other people's conventions are not my forte
>> (and I don't use PyPI for my own projects I just use source), if you have
>> any suggestions or something's missing please reply to this thread.
>>
>> Thanks for your patience,
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CAK21%2BhNfFy-Y%3DiOgnNLFf04c42b4hBiqgfcjGCx-re2H02y_ww%40mail.gmail.com
>> <https://groups.google.com/d/msgid/beancount/CAK21%2BhNfFy-Y%3DiOgnNLFf04c42b4hBiqgfcjGCx-re2H02y_ww%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/5246A8C0-336D-4B5C-8FE8-D95BF7E23C7C%40bravo5.org
>> <https://groups.google.com/d/msgid/beancount/5246A8C0-336D-4B5C-8FE8-D95BF7E23C7C%40bravo5.org?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO3KqQ9qq4tk4o1qYqugbDNWE8zHnpMCqaXi6O7oKPpTQ%40mail.gmail.com.


Re: Announcement: v3 and git branches

2024-06-17 Thread Martin Blais
On Mon, Jun 17, 2024 at 6:00 AM Brian Lalor  wrote:

> This is great! Thank you! Is there a summary of what’s new/different in
> 3.0.0 from 2.3.6? (Also I don’t see a 3.0.0 tag in GitHub; was that an
> oversight?)
>

v3
- removes beanquery, beanprice, beanweb and more, is pretty stripped down.
Use the subprojects instead.
- has a number of really minor fixes added over time but no major new
features
If you were using the 'master' branch there's no change.

You should not use v2 anymore.




> --
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> On Jun 16, 2024, at 4:23 PM, Martin Blais  wrote:
>
> 
> Based on our recent discussion around Beancount branches being confusing,
> I did the following to branches:
>
> - v2: remains the same (no change); but v2 is now even less subject to
> freeze exceptions than before, because v3 is now officially born and PyPI
> releases will be made for it.  The default reply to patches to v2 will be
> "move that to v3."
>
> - cpp: I turned the previous master branch's state with all C++ and Bazel
> build into a new 'cpp' branch.
>   All work on the C++ rewrite -- if it is to continue -- will live on that
> branch.
>   If things do move to Rust, I will probably salvage bits and pieces of
> that manually into a 'rust' branch.
>   In particular, the schema defined in the proto files is something I'd
> like to carry forward (nicely
>   documented and distinguishes between the pre and post interpolation data
> structures explicitly),
>   and perhaps the new reFlex parser will be useful at some point.
>
> - v3: a new branch, to contain the state of the master branch MINUS the
> C++ bits.
>   As stated above, the C++ code remains only on branch 'cpp'.
>   This is now the official release branch and PyPI releases will be made
> of it.
>
> - master: this branch is now where new work on v3 might live.
>   I'm not sure we really need it or what it should mean, but it should
> track v3 for now.
>
> I've reviewed missing PyPI releases and made sure we have these:
>
> https://pypi.org/project/beancount/
> https://pypi.org/project/beangulp/
> https://pypi.org/project/beanquery/
> https://pypi.org/project/beanprice/
> https://pypi.org/project/beangrow/
> https://pypi.org/project/beancount2ledger/
>
> The inclusion of v3 releases for PyPI and new PyPI releases for
> subprojects should normalize the versioning situation in Beancount. Note
> that packaging and following other people's conventions are not my forte
> (and I don't use PyPI for my own projects I just use source), if you have
> any suggestions or something's missing please reply to this thread.
>
> Thanks for your patience,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhNfFy-Y%3DiOgnNLFf04c42b4hBiqgfcjGCx-re2H02y_ww%40mail.gmail.com
> <https://groups.google.com/d/msgid/beancount/CAK21%2BhNfFy-Y%3DiOgnNLFf04c42b4hBiqgfcjGCx-re2H02y_ww%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/5246A8C0-336D-4B5C-8FE8-D95BF7E23C7C%40bravo5.org
> <https://groups.google.com/d/msgid/beancount/5246A8C0-336D-4B5C-8FE8-D95BF7E23C7C%40bravo5.org?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM8q%2B%3DO9fdSrS5Rs_hnj%2BJDayg7ea%3DGncOkZTAP6BfYcA%40mail.gmail.com.


Announcement: v3 and git branches

2024-06-16 Thread Martin Blais
Based on our recent discussion around Beancount branches being confusing, I
did the following to branches:

- v2: remains the same (no change); but v2 is now even less subject to
freeze exceptions than before, because v3 is now officially born and PyPI
releases will be made for it.  The default reply to patches to v2 will be
"move that to v3."

- cpp: I turned the previous master branch's state with all C++ and Bazel
build into a new 'cpp' branch.
  All work on the C++ rewrite -- if it is to continue -- will live on that
branch.
  If things do move to Rust, I will probably salvage bits and pieces of
that manually into a 'rust' branch.
  In particular, the schema defined in the proto files is something I'd
like to carry forward (nicely
  documented and distinguishes between the pre and post interpolation data
structures explicitly),
  and perhaps the new reFlex parser will be useful at some point.

- v3: a new branch, to contain the state of the master branch MINUS the C++
bits.
  As stated above, the C++ code remains only on branch 'cpp'.
  This is now the official release branch and PyPI releases will be made of
it.

- master: this branch is now where new work on v3 might live.
  I'm not sure we really need it or what it should mean, but it should
track v3 for now.

I've reviewed missing PyPI releases and made sure we have these:

https://pypi.org/project/beancount/
https://pypi.org/project/beangulp/
https://pypi.org/project/beanquery/
https://pypi.org/project/beanprice/
https://pypi.org/project/beangrow/
https://pypi.org/project/beancount2ledger/

The inclusion of v3 releases for PyPI and new PyPI releases for subprojects
should normalize the versioning situation in Beancount. Note that packaging
and following other people's conventions are not my forte (and I don't use
PyPI for my own projects I just use source), if you have any suggestions or
something's missing please reply to this thread.

Thanks for your patience,

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNfFy-Y%3DiOgnNLFf04c42b4hBiqgfcjGCx-re2H02y_ww%40mail.gmail.com.


Re: How to list all lots with their buying and selling history

2024-06-16 Thread Martin Blais
It looks like I had a quick go at this in 2020 and concluded I'd never more
than an afternoon:
https://github.com/beancount/beancount/tree/trade_quick_experiment



On Fri, Jun 14, 2024 at 1:29 PM Martin Blais  wrote:

> Yeah, that's why it wasn't done.
> I'll see if I can just insert the metadata for it, should be pretty easy.
>
> On Fri, Jun 14, 2024, 13:13 Chary Chary  wrote:
>
>> This seems to be the most logical thing, as beancount internally already
>> must be using this information.
>>
>> Anyone who attempts to write a plugin to implement this will have to
>> simulate beancount logic inside the plugin, and then somehow verify that
>> plugin's logic was equivalent to the one of beancount
>>
>> On Friday, June 14, 2024 at 3:30:44 PM UTC+2 bl...@furius.ca wrote:
>>
>>> BTW I think the best way to implement this is by modifying the booking
>>> process to insert metadata IDs on its output, so that one could call a
>>> function to easily extract all the trades from the same set of directives
>>> after they've been booked and interpolated, by just matching these IDs.
>>>
>>>
>>>
>>>
>>> On Thu, Jun 13, 2024, 21:56 Martin Blais  wrote:
>>>
>>>> In order to generate this you need to produce this as a side-effect of
>>>> the booking process (which involves matching the incomplete posting spec to
>>>> the inventory contents).
>>>> I think I've wanted to make this part of the core - an important part I
>>>> should say - but at the time I switched to building Johnny (
>>>> https://github.com/edgebips/johnny) for more sophisticated trading
>>>> (options with adjustments to multiple legs) and never built it in. I
>>>> documented this for the rewrite, as I think it's important:
>>>> https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/edit#heading=h.1on91pqrb473
>>>>
>>>> So right now, unfortunately no.
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jun 11, 2024 at 7:38 AM Peter  wrote:
>>>>
>>>>> Hey there,
>>>>>
>>>>> Is there a way to list a history of all lots for a given commodity? I
>>>>> am using FiFo and I would like to create some sort of spreadsheet that
>>>>> lists all lots with their buy date and sell date (if there is one).
>>>>>
>>>>> So, these transactions
>>>>>
>>>>> 2023-06-01 * "Buy shares"
>>>>>   Assets:Investments:Stocks  50 AAPL {300.00 USD}
>>>>>   Assets:Bank:Checking
>>>>>
>>>>> 2023-07-01 * "Buy shares"
>>>>>   Assets:Investments:Stocks  50 AAPL {400.00 USD}
>>>>>   Assets:Bank:Checking
>>>>>
>>>>> 2023-08-01 * "Buy shares"
>>>>>   Assets:Investments:Stocks  50 AAPL {500.00 USD}
>>>>>   Assets:Bank:Checking
>>>>>
>>>>> 2023-12-01 * "Sell shares"
>>>>> Assets:Investments:Stocks -75 AAPL {500.00 USD}
>>>>> Assets:Bank:Checking 37,500 USD
>>>>> Income:Capital:Gains
>>>>>
>>>>> 2024-01-01 * "Sell shares"
>>>>> Assets:Investments:Stocks -25 AAPL {500.00 USD}
>>>>> Assets:Bank:Checking 12,500 USD
>>>>> Income:Capital:Gains
>>>>> Should become something like this:
>>>>>
>>>>> +---++-+---++-+---++-+--+
>>>>> | Commodity | Bought | Qty | Price | Sold | Qty | Price | PnL | Duration
>>>>> (days) | Held more than 145 days? |
>>>>> +---++-+---++-+---++-+--+
>>>>> | AAPL | 2023-06-01 | 50 | 300 | 2023-12-01 | 50 | 500 | 10,000 | 150 | Y 
>>>>> |
>>>>> +---++-+---++-+---++-+--+
>>>>> | AAPL | 2023-07-01 | 50 | 400 | 2023-12-01 | 25 | 500 | 5000 | 120 | N |
>>>>> +---++-+---++-+---++-+--+
>>>>> | | | | | 2024-01-01 | 25 | 500 | 5000 | 150 | Y |
>>>>> +---++-+---++-+---++---

Re: Advice on alternative accounting system for trading (including daytrading)

2024-06-14 Thread Martin Blais
I've developed Johnny for that purpose (https://github.com/edgebips/johnny),
in the context of retail trading (not pro).
It's not really in a state that's easy for others to use TBH.
In theory it could be, but if you used it you'd be 90% sure to his some
corner case that's not supported, e.g. some transaction type I've never
encountered and don't support.

Broadly speaking, for that use case you need
- more sophisticated transaction types wit some common fields
- the volume of transactions is such you'd want this in a table format, one
line per transaction, ideally going to a database. Beancount is designed to
be user-editable and too verbose.
- you'd also want to automate everything (ingest the data from your
brokers, normalize it in the same schema, etc) with as little manual
intervention as possible.
- Beancount doesn't handle derivatives with multipliers too great right now
(futures and options), you have to multiply by hand, its symbology has to
be extended to support that (Johnny does that fine)
So Beancount is fine for investments, say ~100 equities or funds positions
with dividends and monthly transactions, but when you're talking about
1k-100k or more trades/month - still retail level but a bit more dedicated
- Beancount isn't a great solution for that.




On Fri, Jun 14, 2024 at 9:16 AM Marcio A. Vianna F. (mvianna) <
marciovian...@gmail.com> wrote:

> Just to make it clear: I've been thinking of using Beancount for general
> personal finance (tracking expenses, earnings etc.), with investment
> portfolio lumped up as "holdings" or so. These "holdings" would be updated
> from time to time with profits/losses or profit/losses accrued. Only the
> details of the actual single trades would have to be managed in the other
> application.
>
> Marcio
>
> On Friday 14 June 2024 at 09:52:44 UTC-3 Marcio A. Vianna F. wrote:
>
>> Hi, all.
>>
>> Are you aware of accounting software targeted at a similar audience as
>> Beancount, but meant for trading taxes, tracking and accounting? In common
>> with Beancount, desirable features would be:
>>
>> * flexible (customizable)
>> * extensible
>> * python
>> * for small businesses or personal use
>> * scalable at least to a certain point
>>
>> All solutions I find on the internet are too limiting and may demand
>> worksome workarounds.
>>
>> The issue has been brought up some times on this board and it seems it is
>> now acknowledged that this kind of application isn't in the scope of
>> Beancount or its future developments (correct me if I'm wrong). I've been
>> away from Beancount for some years, so that I cannot recall exactly what
>> made Beancount a less-than-perfect fit for trading, but I think two needed
>> features would be: time of transaction, mean value of inventories,
>> inventories with negative balance (short positions). I could give up the
>> plain-text advantages for sqlite or other rdms if needed.
>>
>> Any tips in this regard?
>>
>> Many thanks.
>>
>> Marcio
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/71915cd3-429c-4d74-98d6-57b5586c3e08n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPLuq8SfPg3LL2Q9XpjDFzqkMj%2BpS1CiyEscnwqCnMpmA%40mail.gmail.com.


Re: How to list all lots with their buying and selling history

2024-06-14 Thread Martin Blais
Yeah, that's why it wasn't done.
I'll see if I can just insert the metadata for it, should be pretty easy.

On Fri, Jun 14, 2024, 13:13 Chary Chary  wrote:

> This seems to be the most logical thing, as beancount internally already
> must be using this information.
>
> Anyone who attempts to write a plugin to implement this will have to
> simulate beancount logic inside the plugin, and then somehow verify that
> plugin's logic was equivalent to the one of beancount
>
> On Friday, June 14, 2024 at 3:30:44 PM UTC+2 bl...@furius.ca wrote:
>
>> BTW I think the best way to implement this is by modifying the booking
>> process to insert metadata IDs on its output, so that one could call a
>> function to easily extract all the trades from the same set of directives
>> after they've been booked and interpolated, by just matching these IDs.
>>
>>
>>
>>
>> On Thu, Jun 13, 2024, 21:56 Martin Blais  wrote:
>>
>>> In order to generate this you need to produce this as a side-effect of
>>> the booking process (which involves matching the incomplete posting spec to
>>> the inventory contents).
>>> I think I've wanted to make this part of the core - an important part I
>>> should say - but at the time I switched to building Johnny (
>>> https://github.com/edgebips/johnny) for more sophisticated trading
>>> (options with adjustments to multiple legs) and never built it in. I
>>> documented this for the rewrite, as I think it's important:
>>> https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/edit#heading=h.1on91pqrb473
>>>
>>> So right now, unfortunately no.
>>>
>>>
>>>
>>>
>>> On Tue, Jun 11, 2024 at 7:38 AM Peter  wrote:
>>>
>>>> Hey there,
>>>>
>>>> Is there a way to list a history of all lots for a given commodity? I
>>>> am using FiFo and I would like to create some sort of spreadsheet that
>>>> lists all lots with their buy date and sell date (if there is one).
>>>>
>>>> So, these transactions
>>>>
>>>> 2023-06-01 * "Buy shares"
>>>>   Assets:Investments:Stocks  50 AAPL {300.00 USD}
>>>>   Assets:Bank:Checking
>>>>
>>>> 2023-07-01 * "Buy shares"
>>>>   Assets:Investments:Stocks  50 AAPL {400.00 USD}
>>>>   Assets:Bank:Checking
>>>>
>>>> 2023-08-01 * "Buy shares"
>>>>   Assets:Investments:Stocks  50 AAPL {500.00 USD}
>>>>   Assets:Bank:Checking
>>>>
>>>> 2023-12-01 * "Sell shares"
>>>> Assets:Investments:Stocks -75 AAPL {500.00 USD}
>>>> Assets:Bank:Checking 37,500 USD
>>>> Income:Capital:Gains
>>>>
>>>> 2024-01-01 * "Sell shares"
>>>> Assets:Investments:Stocks -25 AAPL {500.00 USD}
>>>> Assets:Bank:Checking 12,500 USD
>>>> Income:Capital:Gains
>>>> Should become something like this:
>>>>
>>>> +---++-+---++-+---++-+--+
>>>> | Commodity | Bought | Qty | Price | Sold | Qty | Price | PnL | Duration
>>>> (days) | Held more than 145 days? |
>>>> +---++-+---++-+---++-+--+
>>>> | AAPL | 2023-06-01 | 50 | 300 | 2023-12-01 | 50 | 500 | 10,000 | 150 | Y |
>>>> +---++-+---++-+---++-+--+
>>>> | AAPL | 2023-07-01 | 50 | 400 | 2023-12-01 | 25 | 500 | 5000 | 120 | N |
>>>> +---++-+---++-+---++-+--+
>>>> | | | | | 2024-01-01 | 25 | 500 | 5000 | 150 | Y |
>>>> +---++-+---++-+---++-+--+
>>>> | AAPL | 2023-08-01 | 50 | 500 | | | | | | |
>>>> +---++-+---++-+---++-+--+
>>>> Is this possible? If so, how?
>>>>
>>>> Regards
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Beancount" group.
>>>> To unsubscribe from this group and stop receiving

Re: How to list all lots with their buying and selling history

2024-06-14 Thread Martin Blais
BTW I think the best way to implement this is by modifying the booking
process to insert metadata IDs on its output, so that one could call a
function to easily extract all the trades from the same set of directives
after they've been booked and interpolated, by just matching these IDs.




On Thu, Jun 13, 2024, 21:56 Martin Blais  wrote:

> In order to generate this you need to produce this as a side-effect of the
> booking process (which involves matching the incomplete posting spec to the
> inventory contents).
> I think I've wanted to make this part of the core - an important part I
> should say - but at the time I switched to building Johnny (
> https://github.com/edgebips/johnny) for more sophisticated trading
> (options with adjustments to multiple legs) and never built it in. I
> documented this for the rewrite, as I think it's important:
> https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/edit#heading=h.1on91pqrb473
>
> So right now, unfortunately no.
>
>
>
>
> On Tue, Jun 11, 2024 at 7:38 AM Peter  wrote:
>
>> Hey there,
>>
>> Is there a way to list a history of all lots for a given commodity? I am
>> using FiFo and I would like to create some sort of spreadsheet that lists
>> all lots with their buy date and sell date (if there is one).
>>
>> So, these transactions
>>
>> 2023-06-01 * "Buy shares"
>>   Assets:Investments:Stocks  50 AAPL {300.00 USD}
>>   Assets:Bank:Checking
>>
>> 2023-07-01 * "Buy shares"
>>   Assets:Investments:Stocks  50 AAPL {400.00 USD}
>>   Assets:Bank:Checking
>>
>> 2023-08-01 * "Buy shares"
>>   Assets:Investments:Stocks  50 AAPL {500.00 USD}
>>   Assets:Bank:Checking
>>
>> 2023-12-01 * "Sell shares"
>> Assets:Investments:Stocks -75 AAPL {500.00 USD}
>> Assets:Bank:Checking 37,500 USD
>> Income:Capital:Gains
>>
>> 2024-01-01 * "Sell shares"
>> Assets:Investments:Stocks -25 AAPL {500.00 USD}
>> Assets:Bank:Checking 12,500 USD
>> Income:Capital:Gains
>> Should become something like this:
>>
>> +---++-+---++-+---++-+--+
>> | Commodity | Bought | Qty | Price | Sold | Qty | Price | PnL | Duration
>> (days) | Held more than 145 days? |
>> +---++-+---++-+---++-+--+
>> | AAPL | 2023-06-01 | 50 | 300 | 2023-12-01 | 50 | 500 | 10,000 | 150 | Y |
>> +---++-+---++-+---++-+--+
>> | AAPL | 2023-07-01 | 50 | 400 | 2023-12-01 | 25 | 500 | 5000 | 120 | N |
>> +---++-+---++-+---++-+--+
>> | | | | | 2024-01-01 | 25 | 500 | 5000 | 150 | Y |
>> +---++-+---++-+---++-+--+
>> | AAPL | 2023-08-01 | 50 | 500 | | | | | | |
>> +---++-+---++-+---++-+--+
>> Is this possible? If so, how?
>>
>> Regards
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/2b279e0f-255e-4783-951c-6b53042fcd5dn%40googlegroups.com
>> <https://groups.google.com/d/msgid/beancount/2b279e0f-255e-4783-951c-6b53042fcd5dn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMG9AkVUBxAkD5O69ZZvrt0Cpj%3DJD%3DUNXmc_evUUtL_mg%40mail.gmail.com.


Re: How to list all lots with their buying and selling history

2024-06-13 Thread Martin Blais
In order to generate this you need to produce this as a side-effect of the
booking process (which involves matching the incomplete posting spec to the
inventory contents).
I think I've wanted to make this part of the core - an important part I
should say - but at the time I switched to building Johnny (
https://github.com/edgebips/johnny) for more sophisticated trading (options
with adjustments to multiple legs) and never built it in. I documented this
for the rewrite, as I think it's important:
https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/edit#heading=h.1on91pqrb473

So right now, unfortunately no.




On Tue, Jun 11, 2024 at 7:38 AM Peter  wrote:

> Hey there,
>
> Is there a way to list a history of all lots for a given commodity? I am
> using FiFo and I would like to create some sort of spreadsheet that lists
> all lots with their buy date and sell date (if there is one).
>
> So, these transactions
>
> 2023-06-01 * "Buy shares"
>   Assets:Investments:Stocks  50 AAPL {300.00 USD}
>   Assets:Bank:Checking
>
> 2023-07-01 * "Buy shares"
>   Assets:Investments:Stocks  50 AAPL {400.00 USD}
>   Assets:Bank:Checking
>
> 2023-08-01 * "Buy shares"
>   Assets:Investments:Stocks  50 AAPL {500.00 USD}
>   Assets:Bank:Checking
>
> 2023-12-01 * "Sell shares"
> Assets:Investments:Stocks -75 AAPL {500.00 USD}
> Assets:Bank:Checking 37,500 USD
> Income:Capital:Gains
>
> 2024-01-01 * "Sell shares"
> Assets:Investments:Stocks -25 AAPL {500.00 USD}
> Assets:Bank:Checking 12,500 USD
> Income:Capital:Gains
> Should become something like this:
>
> +---++-+---++-+---++-+--+
> | Commodity | Bought | Qty | Price | Sold | Qty | Price | PnL | Duration
> (days) | Held more than 145 days? |
> +---++-+---++-+---++-+--+
> | AAPL | 2023-06-01 | 50 | 300 | 2023-12-01 | 50 | 500 | 10,000 | 150 | Y |
> +---++-+---++-+---++-+--+
> | AAPL | 2023-07-01 | 50 | 400 | 2023-12-01 | 25 | 500 | 5000 | 120 | N |
> +---++-+---++-+---++-+--+
> | | | | | 2024-01-01 | 25 | 500 | 5000 | 150 | Y |
> +---++-+---++-+---++-+--+
> | AAPL | 2023-08-01 | 50 | 500 | | | | | | |
> +---++-+---++-+---++-+--+
> Is this possible? If so, how?
>
> Regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/2b279e0f-255e-4783-951c-6b53042fcd5dn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPg9Au1q2eb9pjN3dtw12C%3DaejG3Cghexdav4UnwSRfvA%40mail.gmail.com.


Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-10 Thread Martin Blais
One of the problems with switching that makes me really skittish about even
trying it is that there's no going back.
You can't easily convert back to GDocs.



On Mon, Jun 10, 2024 at 11:11 AM Chary Chary  wrote:

>
> - re. documentation: baking it into reST/Sphinx is going to result in less
> up-to-date docs. Years of people contributing fixes have made that clear to
> me (I can't write three words without a mistake and years after people were
> still submitting typo changes). Maybe though it's a thing whereby during
> its development it's sufficient but maintenance is harder?  I doubt it'll
> solve a problem. The right person to say something with heft about this
> would be someone who...  wrote a lot of documentation. I really don't like
> the resistance to Google Docs for political reasons I've seen in the past
> (socialists) and feel quite strongly about kicking back unless it's clearly
> made for technical reasons.
>
>
> 
>
> Martin,
> your documentation for beancount is definately a blueprint for project
> documentation.
>
> But for *beanquery*, can we then at least spin off the new version of a
> document from the current one,
> 
> the new version shall be applicable for a new standalone version of
> *beanquery*
>
> And then probably a policy can be introduce to always update a document in
> a draft mode, when submitting a pull request?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/35ab2f6f-4720-4433-99cb-7a65c041e65bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOxeXMRRBFBZP33domD1mUzUh3SKptyDcg6k0s95skwyg%40mail.gmail.com.


Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-10 Thread Martin Blais
rnative. I can look at the design doc and see which parts can be
>> broken out that could be done incrementally. (FWIW I'd already identified
>> making the parser support comments and round-trip, but I think no
>> one stepped up for that).
>>
>> - Re. bugs from v2 --> v3, it's just a merge. I've been doing merges
>> semi-regularly.
>>
>> - +1 to bean{gulp,query,price} on PyPI. Call them 1.0.0 why not, this is
>> stable, working software.
>>
>> - re. documentation: baking it into reST/Sphinx is going to result in
>> less up-to-date docs. Years of people contributing fixes have made that
>> clear to me (I can't write three words without a mistake and years after
>> people were still submitting typo changes). Maybe though it's a thing
>> whereby during its development it's sufficient but maintenance is harder?
>> I doubt it'll solve a problem. The right person to say something with heft
>> about this would be someone who...  wrote a lot of documentation. I really
>> don't like the resistance to Google Docs for political reasons I've seen in
>> the past (socialists) and feel quite strongly about kicking back unless
>> it's clearly made for technical reasons.
>>
>> - +1 to moving the C++ code to a "cpp" branch, though what we could do
>> instead is move just the ccore and make the existing newer/better C++
>> cparser that produces protos create the Python directives directly (before
>> interpolation/plugins). That would be a faster parser for free.  I'm
>> sort-of 50/50 on moving that to the "cpp" branch. Maybe that's easier (a
>> Rust parser would replace it in a Rust implementation, but data.proto is
>> something I aim to keep, and would generate code from it).
>>
>> - Bazel can move to cpp too.
>>
>> - re. import I like it, that's a feature that could be done incrementally.
>>
>> - re. changes in indentation compatibility: I don't think they're very
>> important and could be included in 3.0.
>>
>>
>>
>>
>>
>> On Mon, Jun 10, 2024 at 8:46 AM Chary Chary  wrote:
>>
>>> Dan,
>>>
>>> I like the idea of moving documentation to  eST and Sphynx or .md files,
>>> at least for beanquery.
>>> If we make documentation to be a part of the original source code and
>>> make a policy that documentation shall always be updated when a new feature
>>> is added (e.g. via PR), then this shall hopefully make sure documentation
>>> stays up to date.
>>>
>>> I saw a lot of very nice features implemented in beanquery (thank you
>>> very much for managing it), but documentation was never updated, which is
>>> really pity.
>>> I hope this can still be recovered, because one thing is to formally
>>> describe new feature, explain the thinking behind it and how author
>>> intended to use it.
>>> Since beanquery by its nature is very flexible and very versatile,
>>> having a good documentation is also very essential there.
>>> Also, I think beanquery is one of the things, what makes beancount very
>>> distinct from hledger and ledger, so having a good documentation shall help
>>> to attract new people to the community.
>>>
>>> Regarding speed improvement in v3: my *.beancount file is 7.8 MB,
>>> contains transactions from the last 20 years in 130k lines and speed was
>>> never a problem to me, I personally can wait till Martin's retirement when
>>> he plans to  move it to Rust (of whatever new language he will want to play
>>> with by that moment).
>>>
>>> On Monday, June 10, 2024 at 11:04:16 AM UTC+2 dan...@grinta.net wrote:
>>>
>>>> On 10/06/24 09:27, Stefano Zacchiroli wrote:
>>>> > On Sun, Jun 09, 2024 at 07:45:22PM -0400, Martin Blais wrote:
>>>> >> I'm hoping to restart v3 in Rust at some point and to maybe write a
>>>> >> proto generator for a Rust-native data structure at that time. Well,
>>>> >> you know, probably in retirement if I'm realistic, unless someone
>>>> else
>>>> >> does it.
>>>> >
>>>> > The current v2/v3 split is very bad for the Beancount community right
>>>> > now. If there is an existential risk for this (amazing!) community,
>>>> it
>>>> > lies there. I can elaborate on why I think that's the case, but I'd
>>>> > rather focus on positive/actionable stuff. It's great that you
>>>&

Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-10 Thread Martin Blais
+1 SGTM let's try it
My focus is the core beancount anyhow, spinning off parts was a way to keep
things under a certain size and let people experiment.
Let's see how this goes,


On Mon, Jun 10, 2024 at 11:11 AM Chary Chary  wrote:

>
> - re. documentation: baking it into reST/Sphinx is going to result in less
> up-to-date docs. Years of people contributing fixes have made that clear to
> me (I can't write three words without a mistake and years after people were
> still submitting typo changes). Maybe though it's a thing whereby during
> its development it's sufficient but maintenance is harder?  I doubt it'll
> solve a problem. The right person to say something with heft about this
> would be someone who...  wrote a lot of documentation. I really don't like
> the resistance to Google Docs for political reasons I've seen in the past
> (socialists) and feel quite strongly about kicking back unless it's clearly
> made for technical reasons.
>
>
> 
>
> Martin,
> your documentation for beancount is definately a blueprint for project
> documentation.
>
> But for *beanquery*, can we then at least spin off the new version of a
> document from the current one,
> 
> the new version shall be applicable for a new standalone version of
> *beanquery*
>
> And then probably a policy can be introduce to always update a document in
> a draft mode, when submitting a pull request?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/35ab2f6f-4720-4433-99cb-7a65c041e65bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMejPY4rWmpT-APWpmRhcNjzpfY887esKXUQwn4WceA5A%40mail.gmail.com.


Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-10 Thread Martin Blais
Gosh, this thread.
All at once:

Stefano:
- There's no existential risk. Small community of dedicated users + 1000
quiet users of stable software.

- About a roadmap, it's old but it's still 100% relevant:

https://docs.google.com/document/d/1qPdNXaz5zuDQ8M9uoZFyyFis7hA0G55BEfhWhrVBsfc/

https://docs.google.com/document/d/1H0UDD1cKenraIMe40PbdMgnqJdeqI6yKv0og51mXk-0/

- Here's a pinned issue: https://github.com/beancount/beancount/issues/829

- re. Fava: it should update itself. +1 w/ Daniele on that. Hopefully PyPI
releases make that easy.


Daniele:
- +1 to everyone using the master branch for minimum deps

- Re v2/v3, let's close this matter now: I can christen a v3 branch off of
the master branch. It's been the new stable for a VLT anyhow. This is
largely a non-event but for clarity. (v4 can be the rewrite?  on a branch)

- What's more, the C++ rewrite was fine BUT for the protos zero-copy issue.
We have a really slick new parser. I'd been hoping zero-copy across
Python/C++ would have been solved with changes in protobuf (and it might at
this point for all I know, it's probably time for another look, and protos
were undergoing a rewrite 3 years ago, but there's upb as an option) but in
any case, in the meantime activity in the Python community has made it very
clear that Rust is the new best friend for project core rewrites and that's
probably the way it should go.

- Re. evolutionary approach, doubtful it can be made to happen, but have
little alternative. I can look at the design doc and see which parts can be
broken out that could be done incrementally. (FWIW I'd already identified
making the parser support comments and round-trip, but I think no
one stepped up for that).

- Re. bugs from v2 --> v3, it's just a merge. I've been doing merges
semi-regularly.

- +1 to bean{gulp,query,price} on PyPI. Call them 1.0.0 why not, this is
stable, working software.

- re. documentation: baking it into reST/Sphinx is going to result in less
up-to-date docs. Years of people contributing fixes have made that clear to
me (I can't write three words without a mistake and years after people were
still submitting typo changes). Maybe though it's a thing whereby during
its development it's sufficient but maintenance is harder?  I doubt it'll
solve a problem. The right person to say something with heft about this
would be someone who...  wrote a lot of documentation. I really don't like
the resistance to Google Docs for political reasons I've seen in the past
(socialists) and feel quite strongly about kicking back unless it's clearly
made for technical reasons.

- +1 to moving the C++ code to a "cpp" branch, though what we could do
instead is move just the ccore and make the existing newer/better C++
cparser that produces protos create the Python directives directly (before
interpolation/plugins). That would be a faster parser for free.  I'm
sort-of 50/50 on moving that to the "cpp" branch. Maybe that's easier (a
Rust parser would replace it in a Rust implementation, but data.proto is
something I aim to keep, and would generate code from it).

- Bazel can move to cpp too.

- re. import I like it, that's a feature that could be done incrementally.

- re. changes in indentation compatibility: I don't think they're very
important and could be included in 3.0.





On Mon, Jun 10, 2024 at 8:46 AM Chary Chary  wrote:

> Dan,
>
> I like the idea of moving documentation to  eST and Sphynx or .md files,
> at least for beanquery.
> If we make documentation to be a part of the original source code and make
> a policy that documentation shall always be updated when a new feature is
> added (e.g. via PR), then this shall hopefully make sure documentation
> stays up to date.
>
> I saw a lot of very nice features implemented in beanquery (thank you very
> much for managing it), but documentation was never updated, which is really
> pity.
> I hope this can still be recovered, because one thing is to formally
> describe new feature, explain the thinking behind it and how author
> intended to use it.
> Since beanquery by its nature is very flexible and very versatile, having
> a good documentation is also very essential there.
> Also, I think beanquery is one of the things, what makes beancount very
> distinct from hledger and ledger, so having a good documentation shall help
> to attract new people to the community.
>
> Regarding speed improvement in v3: my *.beancount file is 7.8 MB, contains
> transactions from the last 20 years in 130k lines and speed was never a
> problem to me, I personally can wait till Martin's retirement when he plans
> to  move it to Rust (of whatever new language he will want to play with by
> that moment).
>
> On Monday, June 10, 2024 at 11:04:16 AM UTC+2 dan...@grinta

Re: Is there a language-neutral intermediate representation for a beancount ledger?

2024-06-09 Thread Martin Blais
Yes, the ledger.proto including the data.proto from ccore is supposed to be
that.
Indeed it doesn't currently represent comments but a while ago it was
discussed to be able to do that, and to allow programmatic transformation
on the parsed output and to reconstitute text, as well as round-tripping.
It's never been done, but IIRC it was the next project on the cparser front.

I spent a good amount of time dealing with zero-copy C++ protos from Python
and it wasn't obvious and more or less gave up.
I'm hoping to restart v3 in Rust at some point and to maybe write a proto
generator for a Rust-native data structure at that time.
Well, you know, probably in retirement if I'm realistic, unless
someone else does it. A few people have written decent Rust parser for the
full Beancount syntax BTW.




On Sun, Jun 9, 2024 at 6:52 PM Filip Filmar  wrote:

> Hi.
>
> Perhaps this is a wrong-headed idea from the get go. I apologize if so.
>
> As asked in the subject - is there a language neutral IR for the
> ledger, that isn't the freeform text format? I ask because I'd rather use a
> different programming language for any beancount extensions.
> https://github.com/beancount/beancount/blob/master/beancount/cparser/ledger.proto
> is kind of that, except it does not preserve the include structure as far
> as I can tell.
>
> One reason is I'm not that skilled with python. Another is that last time
> I checked beancount pulls in a preposterous amount of python deps, each one
> a potential dependency hell. This is of course not beancount's fault, but
> it is something I worry about.
>
> Thanks,
> F
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAKaOXii_goRTnyCQyvKDms944S0dGT0i3C2%2BHOEpVSRU08u2dQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNG4XsAsqaK2Y1vyhJEkmo6yLbWi2PgCsPG1vXDGgv0Ng%40mail.gmail.com.


Re: Formulas with variables in transaction legs

2024-06-04 Thread Martin Blais
Not that I'm aware of


On Tue, Jun 4, 2024 at 9:25 AM Tino Didriksen 
wrote:

> Was a solution ever found/made for this? Plugin or otherwise?
>
> I would also very much like some way to back-reference numbers. I've got
> transactions like:
>
> 2024-01-02 * "Bs betaling MODSTRØM DANMARK A/S"
> Assets:Nordea:Tino:Primary -1036.65 DKK
> Liabilities:TDC:VAT:Y2024 (-1036.65 * 0.3 * 0.2 * -1) DKK
> Liabilities:TDC:B-Tax:Y2024 (-1036.65 * 0.3 * 0.8 * -1) DKK
> Expenses:Housing:Power
>
> and it is a bit silly to repeat the number on every line. I would like to
> instead write something akin to:
>
> 2024-01-02 * "Bs betaling MODSTRØM DANMARK A/S"
> Assets:Nordea:Tino:Primary -1036.65 DKK
> Liabilities:TDC:VAT:Y2024 (\1 * 0.3 * 0.2 * -1) DKK
> Liabilities:TDC:B-Tax:Y2024 (\1 * 0.3 * 0.8 * -1) DKK
> Expenses:Housing:Power
>
> where \1 inserts the result of the first line, here just a flat number,
> but similarly \2 should be the result of the second line's calculation.
> Should be simple to implement, so if it doesn't exist I might take a stab
> at a plugin.
>
> -- Tino Didriksen
>
>
> On Wednesday 16 March 2022 at 00:59:44 UTC+1 Dan Schultz wrote:
>
> Hello all,
>
> This project and community is excellent, thank you so much for it!
>
> I'm entering some transactions for a small business where each invoice
> results in a "gross income tax" liability due to a regional business tax.
> In my specific case this is 0.4%.
>
> I know I can write the formula directly e.g.:
>
> 2018-06-13 * "My Client" "invoice" ^2018-06-13-invoice-1 #MyProject
>   Assets:AccountsReceivable 1000.00 USD
>   Income:Services:MyClient   -1000.00 USD
>   Expenses:Taxes:BusinessPrivilege (1000.00 * 0.004) USD
>   Liabilities:Taxes:BusinessPrivilege-(1000.00 * 0.004) USD
>
> I was wondering if there is any ability to define variables and reference
> those variables in transactions.
>
> First: could I define the business privilege tax in a global event
> variable and reference that?
>
> Second: could I even define that net billable "1000.00" in a transaction
> level metadata field that can be referenced in multiple places?
>
> I also appreciate maybe the most explicit thing would be to simply do the
> calculation by hand as part of the entry, and so variable based stuff would
> be too complex and unpredictable, but wanted to ask just in case!
>
> Best,
>  - Dan
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/fb0e1d6e-ce9e-42c8-990f-7c85afbf0ab7n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM11Y5MvzifvA9oZ8mnrFEP_-8%2BC2334U%2BSpEVZZh-eqg%40mail.gmail.com.


Re: Loving beangulp

2024-05-28 Thread Martin Blais
It would be indeed nice if I created a PyPI for it.
I think when the projects got forked from the beancount repo I never did
that.




On Tue, May 28, 2024 at 11:19 PM Red S  wrote:

> Not releases, but just a single release would suffice.
>
> The first release implies the author/maintainer deemed it release-worthy,
> which is meaningful when viewed in the context of the reputation of the
> author/maintainer. This message
> 
> explicitly says it’s not ready for a release, and that being a strong
> warning. Fair enough if that’s the state of it, but that may also
> reasonably interpreted to mean one shouldn’t be coding and releasing other
> software against it. Plus, a release would result in a PyPI package
> presumably, which is also required for other packages to depend on it.
>
> Regular releases/commits help signify activity, and are not an ask, at
> least from me here.
>
> Does that help clarify?
> ​
>
> On Tuesday, May 28, 2024 at 7:58:38 PM UTC-7 bl...@furius.ca wrote:
>
> I mean it does the job, should we make releases just so people feel like
> it's changing?
> I can commit a diff every month on the readme file if it helps  /shrug
>
>
> On Tue, May 28, 2024, 01:29 Red S  wrote:
>
>
>
> On Monday, May 27, 2024 at 7:32:52 PM UTC-7 just...@gmail.com wrote:
>
> On Wednesday, May 22, 2024 at 9:59:14 AM UTC+7 Red S wrote:
>
> Mini rant: I’d love for anyone who writes an importer to come to the same
> realization Felipe did, and *write it using the beangulp API*.
>
>
> I have several written several importers. I've never looked at moving them
> to beangulp. Because when I look at beangulp's github repository there are
> no releases, no commits in 8 months, and the "Status" documentation says
> "As of February 2021, the project has just been forked out of Beancount.
> Expect some changes to be made here."
>
> I assume, perhaps incorrectly(?), that if beangulp isn't in a state to be
> released yet then it isn't in a state for me to migrate my importers to it.
>
>
> I’ve done the same thing for exactly the same reasons, and thus,
> beancount_reds_importers
>  is written
> against bean-{identify, extract, file} in Beancount v2 instead of beangulp.
> Good catch, thank you, I should’ve been more explicit and instead
> recommended that people write importers against released code, which in
> this case is Beancount v2’s importers.
> ​
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/7332b74a-39c8-476d-83dd-9dae2ed7c864n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP0pW7pxyq4yO%3DxWt_JkffaF3g8k-NTG9bJkiSZzZzqsQ%40mail.gmail.com.


Re: Loving beangulp

2024-05-28 Thread Martin Blais
I mean it does the job, should we make releases just so people feel like
it's changing?
I can commit a diff every month on the readme file if it helps  /shrug


On Tue, May 28, 2024, 01:29 Red S  wrote:

>
>
> On Monday, May 27, 2024 at 7:32:52 PM UTC-7 just...@gmail.com wrote:
>
> On Wednesday, May 22, 2024 at 9:59:14 AM UTC+7 Red S wrote:
>
> Mini rant: I’d love for anyone who writes an importer to come to the same
> realization Felipe did, and *write it using the beangulp API*.
>
>
> I have several written several importers. I've never looked at moving them
> to beangulp. Because when I look at beangulp's github repository there are
> no releases, no commits in 8 months, and the "Status" documentation says
> "As of February 2021, the project has just been forked out of Beancount.
> Expect some changes to be made here."
>
> I assume, perhaps incorrectly(?), that if beangulp isn't in a state to be
> released yet then it isn't in a state for me to migrate my importers to it.
>
>
> I’ve done the same thing for exactly the same reasons, and thus,
> beancount_reds_importers
>  is written
> against bean-{identify, extract, file} in Beancount v2 instead of beangulp.
> Good catch, thank you, I should’ve been more explicit and instead
> recommended that people write importers against released code, which in
> this case is Beancount v2’s importers.
> ​
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/8707764a-7279-4f9b-96c4-86063882b26an%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOtKw%2BajSk2ZKLzN%3DU5QQYNoJHqGWYvtXatDjinBOAvqQ%40mail.gmail.com.


Re: Loving beangulp

2024-05-20 Thread Martin Blais
+1 on all points


On Mon, May 20, 2024, 17:04 Daniele Nicolodi  wrote:

> beangulp is a redesign of the old importers code in Beancount v2. The
> main goal of the project has always been to define a API for importers
> and to build a minimal framework around it that implements most of the
> tedious parts.
>
> The common importers API should have enabled importers to be easily
> shared and used in import applications implementing additional features
> on top or simply implementing a specific workflow.
>
> Judging from the overwhelming lack of feedback we received, I thing that
> the goal has not been met.
>
> On the other hand, implementing an importer is so simple that I am not
> surprised that there are multiple projects dealing with importing
> transactions into a Beancount ledger.
>
> Personally I use beangulp with some extra functionality bolted on top to
> do automatic categorization and some cleanup of the imported
> transactions. I use Emacs and some personal tools built on top of
> beancount-mode for reviewing the imported transactions. I would never
> use a browser based solution because it would always be too slow
> compared to working directly in Emacs.
>
> Cheers,
> Dan
>
>
> On 20/05/24 20:59, Timothy Jesionowski wrote:
> > So now I'm wondering, since I've got a handful of purely custom
> > importers and a whole bunch of new importers to write next quarter, what
> > does the preponderance of the community use and why? I've heard of Red's
> > importers, beancount-import, and now beangulp. I know there's others. I
> > haven't looked at any of them personally yet because I'll need to
> > package them for my niche linux distro first (NixOS has /some
> downsides/).
> >
> > Just looking at the github repos:
> >
> >  1. beangulp was written by the same guy that wrote beancount itself (Hi
> > Martin!) so I would expect it to integrate very well.
> >  2. beancount-import has a web UI, which seems like a very useful tool
> > for verifying all this automation (especially for expense
> > categorization, which I'm skeptical can /ever/ be particularly
> reliable)
> >  3. red's importers has the most active community by far, and seems to
> > focus heavily on a "run the script every time you look at the
> > reports" workflow
> >
> > I don't have unit tests on my importers, and I'm importing from CSV's
> > because I just got the simplest thing working. It's a KISS
> >  setup that's exactly as
> > messy as it sounds. So given that I need to do an overhaul anyways, I'm
> > curious why, for example, James doesn't use red's scripts.
> >
> > Is it just that a fully automated setup is harder to build? The peace of
> > mind from looking at the web UI to verify stuff?
> >
> > Sincerely,
> > Timothy Jesionowski
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/9f551ccd-4182-4a94-a8a2-31ab19f0f870%40grinta.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPXZCwvDEqQh-Fm9Fh%3Df9uVnba44zg92cKLDsAaYwV3Ag%40mail.gmail.com.


Re: Introducing Beanpost: A PostgreSQL-Based Experiment for Beancount Users

2024-04-28 Thread Martin Blais
It's not pedantic, it's totally needed at some point
It would be nice to be able to generate accurate statements from both sides
of these transactions.


On Sat, Apr 27, 2024 at 4:59 AM Brian Lalor  wrote:

> Yes, that’s the one! I might be a bit overly pedantic about setting the
> effective date, but it helps reconciling transactions with my bank.
> --
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> On Apr 26, 2024, at 10:58 PM, b...@gerdemann.org wrote:
>
> 
>
> On Apr 26, 2024, at 1:53 PM, Brian Lalor  wrote:
>
>
> There’s a plugin that adds processing for an effective_date field. Maybe
> part of Reds’ suite? I use this extensively. Maybe worth exploring and
> adding explicit support for?
>
>
>
> Hi Brian,
>
> Thanks for sharing this! I wasn't aware of this plugin. Are you referring
> to this one (
> https://github.com/redstreet/beancount_reds_plugins/tree/main/beancount_reds_plugins/effective_date#readme)?
> Beanpost already supports importing and exporting metadata, so it wouldn’t
> be hard to implement this syntax.
>
> However, unlike Beancount, Beanpost doesn't require transactions to occur
> at a specific point in time. This can lead to a situation where money
> "disappears" from your assets while "in transit" between accounts. While
> this is somewhat closer to reality, it might not always be what you want.
> In this case, you could create manual holding transactions, like in the
> example.
>
> Beanpost doesn't have "plugins” yet to do things like this automatically,
> but it's something to consider for the future.
>
> To be honest, I didn't think much about allowing postings to have their
> own dates when I implemented it. This change could be undone if it causes
> more confusion or problems than it solves, but I have seen this feature
> requested for Beancount a few times.
>
> Best regards,
> Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/5BAF897D-5F22-40FE-B58D-E15D9D404BD5%40gerdemann.org
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/3A1E6703-508D-4051-87F9-1A51A44AF438%40bravo5.org
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMSJ1x8wXwKUJkgMq%2B_ZmcLL_qAbSFL8ep9-ZUthn1Ctg%40mail.gmail.com.


Re: Introducing Beanpost: A PostgreSQL-Based Experiment for Beancount Users

2024-04-24 Thread Martin Blais
Oh wow, that's crazy cool. I didn't know postgresql supported that!
Will have a more detailed look, sorry for not digging in deeper

On Mon, Apr 22, 2024, 14:46 Ben Gerdemann  wrote:

> Hi Everyone,
>
> I hope this email finds you well. I've been using Beancount for many
> years. It's been an amazing tool, and I'm grateful to this community and
> especially to Martin Blais for maintaining such a fantastic project.
>
> I'm sharing a project I've been working on called Beanpost, which you can
> find on GitHub at https://github.com/gerdemb/beanpost. This started as an
> experiment to see if I could recreate plain text accounting functionality
> using a PostgreSQL database, and it turned out more successful than I
> expected. I thought the Beancount community might find it useful and
> interesting.
>
> Beanpost consists of a PostgreSQL schema and import/export commands that
> let you transfer data between a beancount file and a PostgreSQL database.
> Much of Beancount's functionality is implemented using custom PostgreSQL
> functions, allowing for complex queries and data manipulation. This setup
> provides a flexible backend that can integrate with other tools like web
> apps or reporting systems.
>
> One of the reasons I created Beanpost was to build a mobile-friendly
> custom front-end. Fava is a fantastic tool, but it's not very
> mobile-friendly, isn't intuitive for beginners, and is hard to customize.
> With Beanpost, you have more flexibility to create a custom front-end that
> suits your needs.
>
> The included functionality is as follows:
>
>- Functions to calculate account balances or changes over a specific
>period.
>- Support for calculations on individual accounts or account
>hierarchies (e.g., "Assets").
>- Check balance assertions.
>- Verify that transactions balance.
>- Support for explicit precisions for each currency to use for balance
>tolerances.
>- Display the running balance of an account by posting.
>- Convert between currencies, including converting baskets of
>currencies.
>- Store documents as byte-data in the database.
>
> I'm curious to hear your thoughts on this approach. Would love to hear any
> feedback. I think I've implemented the majority of the required features,
> but maybe I'm missing a few things?
>
> Maybe we could call this "database-based accounting" instead of "plain
> text accounting." 🙂
>
> Thank you for your time, and I look forward to hearing from you.
>
> Best regards,
>
> Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPwsZmzukX5vfxodBXBhoQ9U8vU_nArs%2Bed5SYDoOWz2A%40mail.gmail.com.


Re: Introducing Beanpost: A PostgreSQL-Based Experiment for Beancount Users

2024-04-22 Thread Martin Blais
Thanks for sharing, Ben,
Broadly speaking this approach will work if you don't have to match cost
basis and if you have only a single currency.
Note that export to SQL has existed for a while, but I think to be able to
most generally replace the functionality from Beancount one would need a
custom aggregator implementation (to accumulate positions with a variety of
commodities and track individual lots, i.e., the Inventory class).





On Mon, Apr 22, 2024 at 2:46 PM Ben Gerdemann  wrote:

> Hi Everyone,
>
> I hope this email finds you well. I've been using Beancount for many
> years. It's been an amazing tool, and I'm grateful to this community and
> especially to Martin Blais for maintaining such a fantastic project.
>
> I'm sharing a project I've been working on called Beanpost, which you can
> find on GitHub at https://github.com/gerdemb/beanpost. This started as an
> experiment to see if I could recreate plain text accounting functionality
> using a PostgreSQL database, and it turned out more successful than I
> expected. I thought the Beancount community might find it useful and
> interesting.
>
> Beanpost consists of a PostgreSQL schema and import/export commands that
> let you transfer data between a beancount file and a PostgreSQL database.
> Much of Beancount's functionality is implemented using custom PostgreSQL
> functions, allowing for complex queries and data manipulation. This setup
> provides a flexible backend that can integrate with other tools like web
> apps or reporting systems.
>
> One of the reasons I created Beanpost was to build a mobile-friendly
> custom front-end. Fava is a fantastic tool, but it's not very
> mobile-friendly, isn't intuitive for beginners, and is hard to customize.
> With Beanpost, you have more flexibility to create a custom front-end that
> suits your needs.
>
> The included functionality is as follows:
>
>- Functions to calculate account balances or changes over a specific
>period.
>- Support for calculations on individual accounts or account
>hierarchies (e.g., "Assets").
>- Check balance assertions.
>- Verify that transactions balance.
>- Support for explicit precisions for each currency to use for balance
>tolerances.
>- Display the running balance of an account by posting.
>- Convert between currencies, including converting baskets of
>currencies.
>- Store documents as byte-data in the database.
>
> I'm curious to hear your thoughts on this approach. Would love to hear any
> feedback. I think I've implemented the majority of the required features,
> but maybe I'm missing a few things?
>
> Maybe we could call this "database-based accounting" instead of "plain
> text accounting." 🙂
>
> Thank you for your time, and I look forward to hearing from you.
>
> Best regards,
>
> Ben
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/143e6263-3db3-4532-ae0e-eac6d7e6ffebn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhO1JLNPorhm3qweWGcHX%2BdyAJ-kjxLMbT10rh96oKgzag%40mail.gmail.com.


Re: account_unrealized_gains, account_current_conversions'

2024-04-19 Thread Martin Blais
On Mon, Apr 15, 2024 at 3:20 PM Chary Chary  wrote:

> Martin,
>
> thanks.
>
>
>- Is my understanding correct, that you   you are planning to expand
>the current 5 accounts (Assets, Liabilities, Income, Expenses, Equity) also
>with Earnings and Conversions?
>
> I'm planning nothing at this point, I'm so busy I can't even get to my
email during the week


>
>- Also, when you capture this information in options
>('account_current_conversions', 'account_unrealized_gains'), who are the
>intended consumers of this information? At the moment beanquery seems to be
>the only consumer of the *load_entries (*as reports are being phased
>out in v3)
>
> So, does beanquery do something useful with these options? Will these
> options influence any queries?
>

I just grepped the source, indeed since I deleted a bunch of code in v3
these options aren't used, they need to be deleted





>
> On Sunday, April 14, 2024 at 5:30:14 PM UTC+2 bl...@furius.ca wrote:
>
> These were defined to absorb amounts produced by summarizations described
> in
>
> https://docs.google.com/document/d/100tGcA4blh6KSXPRGCZpUlyxaRUwFHEvnz_k9DyZFn4/
>
>
> On Sun, Apr 14, 2024 at 6:38 AM Chary Chary  wrote:
>
> Martin,
>
> sorry, did you manage to have a loot at my question?
>
> On Monday, April 8, 2024 at 10:39:27 PM UTC+2 Chary Chary wrote:
>
> Martin,
>
> I am working on unrealized gains analysis in beancount  (probably somehow
> similar to what you have in v2, but the one which works also in the
> situation, where nothing is booked at cost). In fact I only tested this so
> far for the situations of booking without the cost
>
> The goal is that you can exactly see by using beanquery P&L-like query
> where the change in your net worth between 2 different periods comes from
> (even in case you move your assets between different currencies, whilst
> currency prices change).
>
> I have it working for my purposes now, but I will try to bring it to the
> state, where it can be made publicly available.
>
> I noticed, that in v3 you have the following options in beancount:
>
> 'account_current_earnings': 'Earnings:Current', 'account_current_conversions':
> 'Conversions:Current', 'account_unrealized_gains': 'Earnings:Unrealized',
>
>
> So, my questions are:
>
>
>- what are these accounts?
>
>
>- Are you planning to expand the current 5 accounts (Assets,
>Liabilities, Income, Expenses, Equity) also with Earnings and
>Conversions?
>
>
>- If yes, What is the thinking behind this?
>
>
>- What is the thinking behind booking unrealized gains to 
> 'Earnings:Unrealized',
>rather than Income: Unrealized
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/c7865897-63a2-4cca-9ad0-f0838696fd59n%40googlegroups.com
> 
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/8ee702fa-4060-4a8d-ac6e-d58443e3820en%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPJ3ShLxC2nupkuZQ3ApV1iSoYMv_c4noA1-c_MFLYu%3Dw%40mail.gmail.com.


Re: account_unrealized_gains, account_current_conversions'

2024-04-14 Thread Martin Blais
These were defined to absorb amounts produced by summarizations described
in
https://docs.google.com/document/d/100tGcA4blh6KSXPRGCZpUlyxaRUwFHEvnz_k9DyZFn4/


On Sun, Apr 14, 2024 at 6:38 AM Chary Chary  wrote:

> Martin,
>
> sorry, did you manage to have a loot at my question?
>
> On Monday, April 8, 2024 at 10:39:27 PM UTC+2 Chary Chary wrote:
>
>> Martin,
>>
>> I am working on unrealized gains analysis in beancount  (probably somehow
>> similar to what you have in v2, but the one which works also in the
>> situation, where nothing is booked at cost). In fact I only tested this so
>> far for the situations of booking without the cost
>>
>> The goal is that you can exactly see by using beanquery P&L-like query
>> where the change in your net worth between 2 different periods comes from
>> (even in case you move your assets between different currencies, whilst
>> currency prices change).
>>
>> I have it working for my purposes now, but I will try to bring it to the
>> state, where it can be made publicly available.
>>
>> I noticed, that in v3 you have the following options in beancount:
>>
>> 'account_current_earnings': 'Earnings:Current', 
>> 'account_current_conversions':
>> 'Conversions:Current', 'account_unrealized_gains': 'Earnings:Unrealized',
>>
>>
>> So, my questions are:
>>
>>
>>- what are these accounts?
>>
>>
>>- Are you planning to expand the current 5 accounts (Assets,
>>Liabilities, Income, Expenses, Equity) also with Earnings and
>>Conversions?
>>
>>
>>- If yes, What is the thinking behind this?
>>
>>
>>- What is the thinking behind booking unrealized gains to 
>> 'Earnings:Unrealized',
>>rather than Income: Unrealized
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/c7865897-63a2-4cca-9ad0-f0838696fd59n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM65XXf4fCYvXAFXPZfkKJoS6mw%2BrBwo8K4203gF9J91w%40mail.gmail.com.


Re: Changes to support cost transfers

2024-04-13 Thread Martin Blais
- There's no dev list, this is it, not enough traffic to justify a separate
list.
- Your feature touches a very sensitive part of the booking process - one
I've struggled to get sort of right in the past, has a lot of weird
corner cases, it's been a bit of a whack-a-mole situation - I'd have to
really immerse myself back into this to give it proper review, and I don't
have time for a while.
- I would suggest adding unit tests for the specific changes it improves
would be very useful to that effect.
- In the meantime I'm happy to create for you a permanent branch in the
beancount repo itself to track this, or perhaps even better, to install a
conditional in the master branch with an option that dispatches between the
two implementations.
- The cheap (time-boxed) and easy thing I could do could be to ensure
before/after results match.
LMK what you'd like to do,



On Thu, Apr 11, 2024 at 12:10 PM Eric Altendorf 
wrote:

> I have revisited the work I did earlier to tweak Beancount to propagate
> cost basis with asset transfers.  (As has been discussed, this is a bit of
> a corner case in general, but is actually very common and important for
> capital gains calculations for cryptocurrency assets, since they are
> frequently transferred between accounts.)
>
> Digging through my git repo, it looks like what I did was this:
>
> https://github.com/beancount/beancount/compare/master...ericaltendorf:beancount:cost-transfer?expand=1
>
> I would appreciate some feedback on whether this generally looks like the
> right approach, as well as any shortcomings that would need to be addressed
> before I can send a PR to merge it into Beancount proper.
>
> Thanks,
> Eric
>
> (Is there a "beancount-dev" list that would be better to send this to? :)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAFXPr0u1vHW-5C32d_LvpgWXTd_quhsk-UGP8U%2BO8VU9syj3xw%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMuNzXX61TJqRawP3Cq-jK8U1Weokra9rmd19PCMbYBkw%40mail.gmail.com.


Re: Cost basis adjustment for average cost booking

2024-04-04 Thread Martin Blais
On Thu, Apr 4, 2024 at 3:45 PM Chary Chary  wrote:

> On Thursday, April 4, 2024 at 3:34:23 AM UTC+2 bl...@furius.ca wrote:
>
> are there any serious consequences of just ignoring such tiny values
> balance errors?
>
> No.
> The worse that could happen is that a larger balance gets accidentally
> absorbed by this posting (when used without an amount).
> This could be asserted by a plugin.
>
>
> Martin,
>
> can you please elaborate more on this?
>
> I was reading your answer again and again,  but I just don't get it
>

If you just put a posting with no amount it'll automatically get filled by
the remaining amount, no matter how large.
Ideally you'd want to have some sort of warning in case that's larger than
whatever is small enough to be considered a rounding amount.
There is none at the moment.




>
> How can something larger can be   gets accidentally absorbed by something
> tiny?
>
> How can posting be without an amount (I understand, it can be without
> price or cost, but how without amount?)
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/18d5480c-0fcc-4b95-a176-dd92bf8e10a9n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNCCkHQK3nLZE8QLhJ6-jcdWJAcK-_utC2PygGkpb9xnQ%40mail.gmail.com.


Re: Cost basis adjustment for average cost booking

2024-04-03 Thread Martin Blais
On Wed, Apr 3, 2024 at 4:04 AM Chary Chary  wrote:

>
>
> On Sunday, February 11, 2024 at 6:46:47 PM UTC+1 bl...@furius.ca wrote:
> 
>
> Practical solution: just add a little Equity:RoundingError posting to
> absorb the fraction of a cent and move on.
>
>
> Martin,
>
> are there any serious consequences of just ignoring such tiny values
> balance errors?
>
No.
The worse that could happen is that a larger balance gets accidentally
absorbed by this posting (when used without an amount).
This could be asserted by a plugin.




>
> Under consequence I would mean, that beanquery would for instance
> completely ignore such a transaction.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/99f12786-bde1-48d3-a4e9-9849d7611631n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOpP%3DAZNPLOusqky0HOmQsM1douNhkCiZSGDXVB%3D8gv8A%40mail.gmail.com.


Re: Balance report and other common reports in v3?

2024-03-26 Thread Martin Blais
FWIW, I feel like I've implemented less than a third of the ideas I've had
for reporting, just ran out of time and energy.
It's an area where there could be a lot of fun new outputs.

About an API, I've started to sketch a simplified API in the master branch,
so that all the symbols hang off of a "beancount as bn" imprt.
https://github.com/beancount/beancount/blob/master/beancount/api.py
It's not much of a change, but ultimately the goal would be to make script
writing more prominent and more commonly used.


On Tue, Mar 26, 2024 at 6:53 PM Red S  wrote:

> Especially with things like PTA, I always wonder what someone's workflow
> looks like. Personally, I write my own scripts to spit out the 3 or 4
> reports I most frequently use exactly the way I want it. This is trivial to
> do with Beancount *since it is (also) a library *for processing your
> journal.
>
> Investor  for example, has a
> few reports that I use to various degrees. See the bottom of the README
> here
> 
>  for
> an asset allocation example, which for me is the base report I use, on top
> of which I have a bit of scripting to figure out net worth, change in net
> worth across time, what the market did across time, etc.
>
> In addition, I also use Fava's web frontend to both give me a quick
> balances overview, see net worth over time graphically (although as Chary
> pointed out, there's no indication of why net worth changed), and chase
> down answers to quick, one-time questions and such.
>
> Hope that helps.
>
> On Monday, March 25, 2024 at 3:51:22 PM UTC-7 j...@pobox.com wrote:
>
>> I'm new to beancount (but not to PTA, though rusty). I should have read
>> the docs for v3 first, but I was surprised to see there's no bean-report in
>> v3.
>>
>> What do people use to get e.g. a balance report? Same question for
>> whatever other reports people regularly find useful?
>>
>> I see there's beanquery split out into a separate repo. Do people really
>> use that just to get a balance report? (I don't mean to suggest that's bad
>> if that's the way people do it, I just suspect I'm missing something)
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/f159d55f-cf30-4d20-a8ea-d9cd2e7f0c66n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhM3%2B_WNa7WEQBVy1y%3D6NjV2tfj_UAzAgzJyrpptuaY99Q%40mail.gmail.com.


Re: Balance report and other common reports in v3?

2024-03-25 Thread Martin Blais
On Mon, Mar 25, 2024 at 6:58 PM fin  wrote:

> John Lee wrote:
>
> > I'm new to beancount (but not to PTA, though rusty).  I should have read
> the docs for v3 first, but I was surprised to see there's no bean-report in
> v3.
> >
> > What do people use to get e.g. a balance report?  Same question for
> whatever other reports people regularly find useful?
>

bean-query




> >
> > I see there's beanquery split out into a separate repo.  Do people
> really use that just to get a balance report?  (I don't mean to suggest
> that's bad if that's the way people do it, I just suspect I'm missing
> something)
>

yes
bean-query has moved to its own repository.
You can also build scripts against the API



>   a good question and one that will be followed by me.  :)
>
>   the two reports i use constantly right now are balance (bal)
> and networth (netw).  i haven't had time to worry about writing
> either of those using the query language because i'd like to
> finish my conversion efforts before the spring planting season
> gets here (i'm not sure i'll get all of it done, but i am
> making progress :) ).
>
>   that said, perhaps someone else has already written them?
>

balance you can do with a "select account, sum(position) ... group by
account".
net worth requires a custom script, especially depending on what you

here's something I wrote a long while ago:
https://github.com/beancount/beanlabs/blob/master/beanlabs/compensation/net-worth-over-time.py




>
>
>   fin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/d4c9dk-06o.ln1%40anthive.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPZkrWbCTAH2HX3xckL_ogN9i9FxCsg7wjJy3S2wMEj9w%40mail.gmail.com.


Re: Seeking beta-testers/devs for crypto tax tools

2024-03-16 Thread Martin Blais
+1 to that.
I don't do package management much.
I just git clone, build locally and mangle my PYTHONPATH.


On Sat, Mar 16, 2024 at 6:51 PM Eric Altendorf 
wrote:

> On Wed, Feb 28, 2024 at 10:19 AM CD  wrote:
>
>> Thank you.  I think I have the CoinbaseImporter set up properly but it is
>> saying it can't import beangulp.
>>
>
> python package management is, IMHO, a complete disaster.  also IMHO
> beancount has lingering out of date documentation files, as well as
> multiple simultaneous versions, that make it a bit challenging to get a
> working setup.
>
> that said, magicbeans is probably even more finicky and harder to get
> running :-D
>
> if you feel like trying it out, I have a draft of some install and
> configuration instructions here:
>
> https://github.com/ericaltendorf/magicbeans/pull/1/commits/b81deb54f66d39ddd3f1b975ae0b08241c30e413
>
>
>
>>
>>
>> On Sunday, February 25, 2024 at 1:04:42 PM UTC-5 erical...@gmail.com
>> wrote:
>>
>>> If you're new to both Beancount and Python, it could be ambitious to get
>>> deep into this experimental package :)  But no harm in giving it a try!
>>>
>>> I will write some installation/getting-started docs on github and then
>>> get back to you.  Thanks for the interest!
>>>
>>> On Sat, Feb 24, 2024 at 11:28 AM CDT  wrote:
>>>
 I'm relatively new to Python scripting and have been hand entering
 things while I'm learning, but this looks very interesting considering the
 volume of transactions that can occur with cryptos when the bull market
 heats up.

 How do I install this?  (I'm using Windows 11 but I can use pip on
 command line)

 On Saturday, February 17, 2024 at 6:23:37 PM UTC-5 erical...@gmail.com
 wrote:

> It's 2024, so, time to dust off Magicbeans and prepare 2023 taxes --
> hope folks don't mind me bumping this thread.  If anyone else is 
> interested
> in using Beancount to track crypto transactions, take a look below and if
> you're willing to beta-test and help develop, feel free to reach out to 
> me.
>
> best,
> eric
>
> On Wed, Nov 1, 2023 at 3:49 AM Chary Chary  wrote:
>
>> Ok,
>>
>> thanks for clarification
>>
>> On Tuesday, October 31, 2023 at 5:30:39 PM UTC+1 erical...@gmail.com
>> wrote:
>>
>>> No worries.  I suspect that a lot of crypto traders/investors fall
>>> into these categories:
>>>
>>> - Casual users who make minimal trades on one or two exchanges.
>>> These are probably adequately served by existing commercial offerings 
>>> like
>>> cointracker.io etc.
>>> - Professional traders who already have some other professional
>>> commercial trade recording/reporting software.
>>>
>>> For people in between, who are doing something more complex
>>> (multiple exchanges, offline wallets, mining income, large numbers of
>>> transactions or lots) but are not professional traders, I suspect that
>>> probably most tax returns are full of errors that neither the filers nor
>>> the IRS are readily able to untangle.  If the amounts are low, then it's
>>> not worth either of their time.  If the amounts are large, I am not 
>>> sure.
>>> I talked to a tax preparer, asking how one would verify the numbers, 
>>> and he
>>> said that probably you'd have to engage a mid-to-large accounting firm 
>>> and
>>> hand them your raw data -- not sure how they would analyze it.  He also
>>> said that with the IRS it would probably be a bit hit and miss how an
>>> auditor would handle or analyze it -- they probably wouldn't be reading
>>> one's Python code, no :)
>>>
>>> My goal with Magicbeans was to generate PDF reports which lay out
>>> the lots in both inventories and transactions such that one could 
>>> actually
>>> manually match everything up, even if it would be tedious.  The goal 
>>> was to
>>> be able to walk into an IRS office with that report and be able to 
>>> justify
>>> the cap gains/losses of any sale someone questions.
>>>
>>> On Thu, Oct 26, 2023 at 1:11 PM Chary Chary 
>>> wrote:
>>>
 I know this is an offtopic, but I am just wondering: if it takes
 that much efforts plus python programming skills to file a tax return, 
 then:


- How do other people (mortals) do it?
- How on the earth someone is able to verify it? One can't
imagine a tax officer debugging a Python code?


 On Thursday, October 26, 2023 at 8:57:27 PM UTC+2
 erical...@gmail.com wrote:

> I recently filed my 2022 tax return using Magicbeans
>  to do detailed lot
> tracking and capital gains/losses reporting for my crypto assets.
> Magicbeans is a set of tools (importers and report generation tools) 
> built

Re: Modify postings in transactions and update the input beancount file

2024-03-15 Thread Martin Blais
There's a far fetched idea for the next version to augment the parser such
that it is possible to completely reverse the process and regenerate the
input file with modifications, but it's just a fanciful idea at this point.


On Fri, Mar 15, 2024 at 6:47 PM Saglara S  wrote:

> I want to add and modify postings in transactions based on a lookup table
> (search string : account). The script here does the job and will print out
> the modified transactions.
>
> But how on earth to modify / update the transactions in the input file
> accordingly?
>
> import json
> import re
> from beancount import loader
> from beancount.core import data
> from beancount.parser import printer
>
> # Define the filename and load the Beancount file
> filename = "comdirect-mitko.beancount"
> entries, errors, options = loader.load_file(filename)
>
> # Define the JSON lookup table
> lookup_table = {
> "AGIP": "Assets:Test",
> "PayPal Europe": "Assets:Transfer:Paypal",
> # Add more entries as needed
> }
>
> # Loop over each key-value pair in the lookup table
> for search_string, posting_account in lookup_table.items():
> for entry in entries:
> if isinstance(entry, data.Transaction):
> if re.search(search_string, (entry.payee or entry.narration)):
> posting = data.Posting(
> posting_account,
> None,
> None,
> None,
> None,
> None,
> )
> if len(entry.postings) == 1:
> entry.postings.append(posting)
> elif len(entry.postings) == 2:
> entry.postings[1] = posting
> printer.print_entry(entry)  # Print the modified entry
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/11a9fd9a-f6b4-42d6-9851-8c9ef21c71acn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN_bfEsBK4VnVhgG9cNLk_pJfeU3cTETnEpAV-gB3U8uw%40mail.gmail.com.


Re: thank you beancounters! :)

2024-03-03 Thread Martin Blais
Sounds great! Congrats.


On Sun, Mar 3, 2024 at 5:34 PM fin  wrote:

>   as of today i've finally gotten one of my longest
> running accounts imported, balanced, working, it's
> beautiful!
>
>   only a few transactions missing from the era of
> hand written passbooks.
>
>   i'm tempted to ask someone if they still have
> those records around and to see if i can find those
> to fill them in.
>
>   what this journey has taught me is that if you
> want a good and useful history you may need to
> include more notes with the transactions.
>
>   this one account history is useful, but it won't
> be nearly as useful as it could have been had i put
> a little effort into better notes for transactions.
>
>   now i can move on to the next longest other history
> i have which does have more notes and more details
> but it is not complete either - yet it is better than
> nothing for my purposes.
>
>   it is very satisfying to me to reach the end of a
> process and watching the stubs and shims get removed
> as things balance out and hook together.  since my
> background is computers, programming, etc. it does
> all fit with that sort of analysis and breaking
> projects into parts and then testing the isolated
> parts and then filling in the gaps and putting things
> back together.
>
>   i'm not surprised that it works, but satisfied all
> the same.  :)
>
>
>   fin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/hfafbk-fvd.ln1%40anthive.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPrD6mZdgVknVREwnsi-cORFSxmBuBP03uSHjGT91Z%3DMQ%40mail.gmail.com.


Re: Balance for each account for each month

2024-03-02 Thread Martin Blais
I think the query you issued should work.
Can you be more specific about "it mixes together the balances"?
Maybe isolate just a few transactions and run on that, to isolate what you
believe is the problem and reply here.




On Sat, Mar 2, 2024 at 9:58 AM Andrea Vidali  wrote:

> Hi everyone, first of all thank you for this amazing piece of software
> that is Beancount.
>
> The issue: I need to extract the balance of multiple accounts *separately*
> on the last day of each month, over a period (suppose a year + the latest
> day of the previous year).
>
> I researched this in this group and in the docs, but I couldn't find an
> answer. The simplest solution I found is to use the following query
> multiple times, one for each account:
>
> SELECT month, year, units(last(balance))FROM OPEN ON 2023-01-01 CLOSE ON
> 2024-01-01WHERE account ~ 'Assets:Bank:Checking'
>
> This outputs something like:
>
> month | year | units_last_balance
> 12 | 2022 | 400.00 EUR
> 1 | 2023 | 800.00 EUR
> 2 | 2023 | 100.00 EUR
> 3 | 2023 | 30.00 EUR
> 4 | 2023 | 200.00 EUR
> 5 | 2023 | 600.00 EUR
> 6 | 2023 | 100.00 EUR
> 7 | 2023 | 40.00 EUR
> 8 | 2023 | 400.00 EUR
> 9 | 2023 | 700.00 EUR
> 10 | 2023 | 800.00 EUR
> 11 | 2023 | 900.00 EUR
> 12 | 2023 | 1300.00 EUR
>
> But I would prefer instead to do a query like this:
>
> SELECT month, year, account, units(last(balance)) AS blcFROM OPEN ON
> 2023-01-01 CLOSE ON 2024-01-01WHERE account ~
> 'Assets:Bank:Checking|Assets:Broker:AAPL'GROUP BY year, month, account
> ORDER BY year, month, account
>
> To output something like:
>
> month | year | account | units_last_balance
> 12 | 2022 | Assets:Bank:Checking | 400.00 EUR
> 12 | 2022 | Assets:Broker:AAPL | 5 AAPL
> 1 | 2023 | Assets:Bank:Checking | 800.00 EUR
> 1 | 2023 | Assets:Broker:AAPL | 7 AAPL
> 2 | 2023 | Assets:Bank:Checking | 100.00 EUR
> 2 | 2023 | Assets:Broker:AAPL | 7 AAPL
> 3 | 2023 | Assets:Bank:Checking | 30.00 EUR
> 3 | 2023 | Assets:Broker:AAPL | 7 AAPL
> 4 | 2023 | Assets:Bank:Checking | 200.00 EUR
> 4 | 2023 | Assets:Broker:AAPL | 15 AAPL
> 5 | 2023 | Assets:Bank:Checking | 600.00 EUR
> 5 | 2023 | Assets:Broker:AAPL | 15 AAPL
> 6 | 2023 | Assets:Bank:Checking | 100.00 EUR
> 6 | 2023 | Assets:Broker:AAPL | 15 AAPL
> 7 | 2023 | Assets:Bank:Checking | 40.00 EUR
> 7 | 2023 | Assets:Broker:AAPL | 15 AAPL
> 8 | 2023 | Assets:Bank:Checking | 400.00 EUR
> 8 | 2023 | Assets:Broker:AAPL | 15 AAPL
> 9 | 2023 | Assets:Bank:Checking | 700.00 EUR
> 9 | 2023 | Assets:Broker:AAPL | 20 AAPL
> 10 | 2023 | Assets:Bank:Checking | 800.00 EUR
> 10 | 2023 | Assets:Broker:AAPL | 20 AAPL
> 11 | 2023 | Assets:Bank:Checking | 900.00 EUR
> 11 | 2023 | Assets:Broker:AAPL | 20 AAPL
> 12 | 2023 | Assets:Bank:Checking | 1300.00 EUR
> 12 | 2023 | Assets:Broker:AAPL | 20 AAPL
>
> Which doesn't yeld this result at all, instead it mixes together the
> balances, and I am unable to understand what's going on. The numbers in
> these examples are made up, the point is that each number should be the
> balance for that account at the end of the last day of the month.
>
> Is there a way to use a single query to output what I need?
>
> Thank you in advance!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/71cb61cc-f027-4e6f-ace9-7d4c8b134669n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNeftC%2BDYgFqVcLXGuzT_WS%2Bg03J1J05qLS6Aeu7TWo3w%40mail.gmail.com.


Re: Bazel build failing on fedora-toolbox (how to properly set up python env?)

2024-02-26 Thread Martin Blais
You can still use the same build process (Makefiles + C) in the master
branch. The C++ code is not enabled by default.


On Mon, Feb 26, 2024 at 5:25 PM Chary Chary  wrote:

>
>
> On Wednesday, January 31, 2024 at 8:11:39 PM UTC+1 dan...@grinta.net
> wrote:
>
>
> If you just want to use Beancount v3 (and not hack on the C++ code) just
> install it as a regular Python package. The v3 branch uses meson-python
> to build the extension modules and pack them up in a Python wheel.
>
>
> What if I want to install Beancount v3 for hacking, but not in C++, but in
> a python code with the goal to create a pull request later on.
> Is there a "simplified" way to do this, without this Bazel?
> P.S. I am using Windows
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/4bb5c6cc-2dcf-4b80-b7b8-28fd770811a2n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN-O%3Djww%3D2zopa67LXKs76MR%3DvMW2zYvnjz3rSkStRYFw%40mail.gmail.com.


Re: Purpose of a filename metadata in posting object

2024-02-25 Thread Martin Blais
I think it was just added by default. Also, the "filename" field really is
a source identifier saying "where does this bit of data originate from?"
and for postings created by plugins that could be the plugin name. It
should probably be renamed to "source" in the new version.


On Sun, Feb 25, 2024 at 12:02 PM Chary Chary  wrote:

> Hello everybody.
>
> I am just wondering what is the purpose to store a filename metadata in
> posting object, this is in addition to the filename metadata in the
> transaction object.
>
> Can there be a situation, when transaction and belonging to it posting
> would come from different files?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/10dbe563-fcbb-4063-8ead-f54b6a761120n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMDi%2B32DR3U67r-7-z%2Bp1FSM3KoHYE_bcCL%3D_RynW_vVA%40mail.gmail.com.


Re: Totals for a specific commodity

2024-02-25 Thread Martin Blais
(No need to apologize, there are no dumb questions here - but maybe just
not much time for detailed answers.)
Use beanquery:
https://github.com/beancount/beanquery
https://docs.google.com/document/d/1s0GOZMcrKKCLlP29MD7kHO4L88evrwWdIO0p4EwRBE0/


On Sun, Feb 25, 2024 at 12:18 PM CDT  wrote:

> I'm new to Python, coding and Beancount, so I don't mean to sound like a
> dunce when I ask - where do I use "SELECT sum(position) WHERE currency =
> 'BTC'?
>
> Is that to be put in a script I create or is that used in Bean-Query or
> Bean-Report or something else?
>
> On Saturday, February 24, 2024 at 3:25:34 PM UTC-5 bl...@furius.ca wrote:
>
>> Just SELECT sum(position) WHERE currency = 'BTC'?
>>
>> On Sat, Feb 24, 2024 at 2:46 PM CDT  wrote:
>>
>>> I have some commodities (lets just use BTC as an example) spread out
>>> over many different accounts.
>>>
>>> Is there a command to get a grand total on a specific commodity (like
>>> BTC) regardless of the account hierarchy?
>>>
>>> I couldn't find anything on this.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/9b8133d0-e942-44cd-bc80-db773878aa9en%40googlegroups.com
>>> 
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/3b6fada2-18e8-45e1-9318-5f665424840bn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP39UrfQ45SjFRm_AwrWL6ntr3oxEHdv88Jmd%2B%2BtySx%3DQ%40mail.gmail.com.


Re: Totals for a specific commodity

2024-02-24 Thread Martin Blais
Just SELECT sum(position) WHERE currency = 'BTC'?

On Sat, Feb 24, 2024 at 2:46 PM CDT  wrote:

> I have some commodities (lets just use BTC as an example) spread out over
> many different accounts.
>
> Is there a command to get a grand total on a specific commodity (like BTC)
> regardless of the account hierarchy?
>
> I couldn't find anything on this.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/9b8133d0-e942-44cd-bc80-db773878aa9en%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP3i9tNzyKpdqMRwtCaxSReBsYXQvUFs-718ZcHizmGGg%40mail.gmail.com.


Re: How to transfer commodities between currencies?

2024-02-19 Thread Martin Blais
It helps to think of it as all the steps that would be taken by your broker.
Say on a transfer you realize the gains:

plugin "beancount.plugins.auto"

2024-01-01 * "Add cash"
  Income:Misc
  Assets:CA:Brokerage:USAccount:Cash   1000.00 USD

2024-01-01 * "Buy BMO in US"
  Assets:CA:Brokerage:USAccount:BMO   2 BMO {90.00 USD}
  Assets:CA:Brokerage:USAccount:Cash


2024-02-18 * "Sell BMO, realized gain"
  Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
  Assets:CA:Brokerage:USAccount:Cash   2*94.19 USD
  Income:CA:Brokerage:USAccount:PnL

2024-02-18 * "Transfer cash equivalent"
  Assets:CA:Brokerage:USAccount:Cash -2*94.19 USD
  Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ USD

2024-02-18 * "Sell BMO, realized gain"
  Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD
  Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}


It's not super convenient, but you can compress those last three
transactions to

2024-02-18 * "Sell BMO, realized gain"
  Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
  Income:CA:Brokerage:USAccount:PnL   -8.38 USD
  Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}
  Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ USD
  Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD

If you prefer to provide the exchange rate instead it can fill in the P/L:

2024-02-18 * "Sell BMO, realized gain"
  Assets:CA:Brokerage:USAccount:BMO  -2 BMO {90.00 USD} @ 94.19 USD
  Income:CA:Brokerage:USAccount:PnL
  Assets:CA:Brokerage:CanadianAccount:BMO   +2 BMO {127.03 CAD}
  Assets:CA:Brokerage:CanadianAccount:Cash   2*127.03 CAD @ 0.74147 USD
  Assets:CA:Brokerage:CanadianAccount:Cash  -2*127.03 CAD

Granted it could be better, but it's possible.
Thankfully you probably don't have a ton of these...
(You could automate the generation of these with a plugin if you do.)



On Mon, Feb 19, 2024 at 9:08 AM Martin Blais  wrote:

> (But to the straightforward question is: yes, it can.)
>
> On Mon, Feb 19, 2024 at 9:08 AM Martin Blais  wrote:
>
>> It depends.
>> What happens to your unrealized gain?
>> Does this trigger a realization and stepping up of cost-basis? Or do you
>> carry the unrealized gain to CAD?
>>
>>
>> On Sun, Feb 18, 2024 at 10:11 PM Matt McCormick 
>> wrote:
>>
>>> Some commodities trade on multiple stock exchanges and can be
>>> exchanged.  How can this transaction be properly recorded?  For example:
>>>
>>> 2024-02-18 * "Transfer BMO"
>>> Assets:CA:Brokerage:CanadianAccount:BMO 1 BMO {127.03 CAD}
>>> Assets:CA:Brokerage:USAccount:BMO -1 BMO {} @ 94.19 USD
>>>
>>> This results in a "Transaction does not balance" error due to the
>>> different currencies.
>>> Is there a way this can be properly recorded?
>>>
>>> Thanks
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Beancount" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to beancount+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com
>>> <https://groups.google.com/d/msgid/beancount/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP0fSAzCyhZQqDLhMnuxZrq31Sa7PiYFMmv6B5FfwgsJw%40mail.gmail.com.


Re: How to transfer commodities between currencies?

2024-02-19 Thread Martin Blais
(But to the straightforward question is: yes, it can.)

On Mon, Feb 19, 2024 at 9:08 AM Martin Blais  wrote:

> It depends.
> What happens to your unrealized gain?
> Does this trigger a realization and stepping up of cost-basis? Or do you
> carry the unrealized gain to CAD?
>
>
> On Sun, Feb 18, 2024 at 10:11 PM Matt McCormick 
> wrote:
>
>> Some commodities trade on multiple stock exchanges and can be exchanged.
>> How can this transaction be properly recorded?  For example:
>>
>> 2024-02-18 * "Transfer BMO"
>> Assets:CA:Brokerage:CanadianAccount:BMO 1 BMO {127.03 CAD}
>> Assets:CA:Brokerage:USAccount:BMO -1 BMO {} @ 94.19 USD
>>
>> This results in a "Transaction does not balance" error due to the
>> different currencies.
>> Is there a way this can be properly recorded?
>>
>> Thanks
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Beancount" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to beancount+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com
>> <https://groups.google.com/d/msgid/beancount/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMwKnAs%2BvprXwaucKLNAPt7EoUqFYn%2BmpZxJfnjwituBg%40mail.gmail.com.


Re: How to transfer commodities between currencies?

2024-02-19 Thread Martin Blais
It depends.
What happens to your unrealized gain?
Does this trigger a realization and stepping up of cost-basis? Or do you
carry the unrealized gain to CAD?


On Sun, Feb 18, 2024 at 10:11 PM Matt McCormick  wrote:

> Some commodities trade on multiple stock exchanges and can be exchanged.
> How can this transaction be properly recorded?  For example:
>
> 2024-02-18 * "Transfer BMO"
> Assets:CA:Brokerage:CanadianAccount:BMO 1 BMO {127.03 CAD}
> Assets:CA:Brokerage:USAccount:BMO -1 BMO {} @ 94.19 USD
>
> This results in a "Transaction does not balance" error due to the
> different currencies.
> Is there a way this can be properly recorded?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/d6516c06-94ff-4066-862f-a8762f1a8b4fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN4Ec8hEMn8zdGAmDgNYUuyRAVjV0WULYPkbQbNpFrpLQ%40mail.gmail.com.


Re: T-bills through Treasury Direct - How to Record?

2024-02-19 Thread Martin Blais
I have a bunch of these now too, I haven't converted to Beancount yet, but
I think it'll be straightforward.
I think there is a choice to make about whether you want to
- just account for the cash flows (which should be really easy, book as a
new commodity with a price that begins at what you paid and ends at the
face value, with transactions for coupons in between)  or
- if you also want to be precise and account for the accrued interest and
discounted value portions separately on acquisition.
Anyhow, I'll try to post one of these here or to a doc as an example once I
do mine.



On Mon, Feb 19, 2024 at 8:12 AM CDT  wrote:

> What is the best way to post entries for t-bills?
>
> When you purchase a 30 day t-bill on Treasury Direct, you purchase at a
> discount, so if it's $1100 face value bill, and the interest rate is 5.4%,
> you get a 5.4% ($4.53) discount and only pay $1,095.47.
>
> In 30 days the face value is $1100.
>
> So how is the interest counted 30 days later?  Is there a way to do that?
>
> Also, you can let each month roll over into a new bond, so in cases like
> that the $1100 would come due but you would get a refund for the new bond
> that is discounted.
>
> I'm just confused how these things would be registered in Beancount.
>
> From the treasury direct website...
>
> A refund payment from a Treasury bill is the difference between the face
> value and the price paid when purchased at original issue. Treasury bills
> are sold at a discount or at par (face value). When the bill matures, the
> buyer is paid its face value.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/a74715d8-96ec-41fa-8ee2-9312fe917ed6n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNcrAtykwjgg-AdMkKne_Nf9GnU2z8XoNhZnLrrtsgJoA%40mail.gmail.com.


Re: Setting up first Beancount file - should I separate LLC partnership and personal finances

2024-02-17 Thread Martin Blais
On Fri, Feb 16, 2024, 08:51 CDT  wrote:

> Hello,
>
> I'm setting up my first Beancount file and will start with 2024.
>
> Currently I have all of my ledgers in Gnucash but I will probably not
> export the existing items (yet).
>
> My wife and I have an LLC partnership for a property we rent and we have
> always kept that in our general Gnucash file that has all our personal
> items, but we are able to pull an income statement pretty easily from that
> file for accounting and tax purposes.
>
> My questions are:
>
> 1. Should I create two text files - one for the LLC and one for personal
> items?
>

Yes

2. If I don't create separate files and keep everything in one file, will I
> be able to easily pull out an income statement for just the LLC items like
> I can on Gnucash?
>

Use appropriate account names you can filter on and it should be fine



> Thanks in advance.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/70085993-bdc6-4960-9c63-8d5bf6aad7c2n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNOnciyMswNEYPy7A1M0LJHVLTmHPG_pdD1j4H7Ty5kMg%40mail.gmail.com.


Re: install from github missing bean-report

2024-02-15 Thread Martin Blais
Use the v2 branch, this has been deleted in the master branch (deprecated,
use beanquery)

On Thu, Feb 15, 2024, 00:30 fin  wrote:

>   If you install beancount from a local directory on your
> computer after downloading it from the github current site
> there is no bean-report command available.
>
>   If you use pip install from PyPI there is a bean-report
> command.
>
>
>   fin
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/l4k0ak-l53.ln1%40anthive.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPM-z_OWeVFcdrtiCYP%3D64YUkz%2Ba0KU2u0JE9C7N5hAwQ%40mail.gmail.com.


Re: Copy-pasting multiline (multiple lines) query into bean-query

2024-02-14 Thread Martin Blais
I don't know. If it's supported in
https://docs.python.org/3/library/cmd.html it should be possible to improve
it.


On Tue, Feb 13, 2024 at 5:55 AM Dan Andersson 
wrote:

> Motivation: Give people (including Windows users) copy-pasteable commands
> they can simply use as-is (regardless of platform).
>
> On Tuesday, February 13, 2024 at 10:51:12 AM UTC Dan Andersson wrote:
>
>> Hi, I'm aware that backslashes can be used for Bash.
>> I was referring to the *interactive* session (after doing only
>> "bean-query foo.beancount"). I guess I was hoping it wouldn't "complete" a
>> command until it sees a semicolon, but currently it seems to complete a
>> command after every newline.
>>
>> On Saturday, February 10, 2024 at 3:01:39 PM UTC bl...@furius.ca wrote:
>>
>>> This is a bash question. Look at how multiple lines are handled in bash
>>> (should be lots of info online).
>>>
>>> On Sat, Feb 10, 2024 at 9:24 AM Dan Andersson 
>>> wrote:
>>>
 Hi,

 After doing bean-query foo.beancount to enter the interactive session,
 can I somehow copy-paste multiple lines in there?

 It seems like multi-line queries (e.g. the examples in the
 documentation), when pasted in there, always get split into one command per
 line, resulting in errors.

 Do I always have to combine those lines first, before pasting them?

 Thanks,
 DA

 --
 You received this message because you are subscribed to the Google
 Groups "Beancount" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to beancount+...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/beancount/50b1d037-b464-4838-ae46-58ffc250e8b8n%40googlegroups.com
 
 .

>>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/782b5ed0-a61e-487f-9f60-5d5757aaccd1n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMORvD7wboc2asGKH_-g2pGoO9-miE3ciR-K-NQXLfGQg%40mail.gmail.com.


Re: Cost basis adjustment for average cost booking

2024-02-14 Thread Martin Blais
I agree it's totally possible to rewrite a plain-text accounting system on
your own in a short amount of time and there are many such projects on
github but going all the way to handling a bunch of the corner cases,
dealing with user issues continuously for a while, and making it extensible
via plugins and other things are what gives it value IMHO. It's not hard,
it's just a lot of perseverance. I spent a *lot* of weekends on this
somehow, I really wanted to have this working well. It's far from done and
perfect, all I see are the pain points...  it's annoying me a lot but I
have no cycles.


On Wed, Feb 14, 2024 at 6:59 AM Ceri Storey  wrote:

> > (Maybe I can use Beancount v3 as an easy and familiar project to learn
> Rust with.)
>
> I've considered building a beancount clone myself (usually this lasts
> until I remember just how much work the current implementation represents).
> One option I've considered is porting v2 a module at a time using PyO3
>  or similar. But to be fair, a big part of that is that
> I wrote some C++ twenty years ago and it's terrified me ever since.
>
> On Wednesday 14 February 2024 at 04:16:40 UTC bl...@furius.ca wrote:
>
>> On Mon, Feb 12, 2024 at 11:15 AM Chary Chary  wrote:
>>
>>> On Sunday, February 11, 2024 at 6:46:47 PM UTC+1 bl...@furius.ca wrote:
>>>
>>> One day, when I retire, I'll spend months writing v3 and offer you all a
>>> new and improved Beancount or maybe someone with more free time and
>>> enthusiasm will beat me to it, go Crustaceans, go!).
>>>
>>>
>>> Martin, but you will not leave us completely alone until after your
>>> retirement, will you?
>>>
>>
>> Not completely, but as you've seen in the last couple of years, there
>> isn't much time anymore.
>> (Maybe I can use Beancount v3 as an easy and familiar project to learn
>> Rust with.)
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/2f421a9f-627c-4a67-9d2f-be1bb44a129fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPvLSxXr_YCzi93iPTsd5uFQPLYBRRHhO0CWJQvd3Yoqw%40mail.gmail.com.


Re: Cost basis adjustment for average cost booking

2024-02-13 Thread Martin Blais
On Mon, Feb 12, 2024 at 11:15 AM Chary Chary  wrote:

> On Sunday, February 11, 2024 at 6:46:47 PM UTC+1 bl...@furius.ca wrote:
>
> One day, when I retire, I'll spend months writing v3 and offer you all a
> new and improved Beancount or maybe someone with more free time and
> enthusiasm will beat me to it, go Crustaceans, go!).
>
>
> Martin, but you will not leave us completely alone until after your
> retirement, will you?
>

Not completely, but as you've seen in the last couple of years, there isn't
much time anymore.
(Maybe I can use Beancount v3 as an easy and familiar project to learn Rust
with.)

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhNjdEDZFNDj%2BfJv6iwyjhoqB%3D1xzi%3Dn%2Be6QKFXd8M0wLQ%40mail.gmail.com.


Re: Cost basis adjustment for average cost booking

2024-02-11 Thread Martin Blais
What it should be: precision has to be rewritten (the v3 proposal includes
ideas for doing this)
Practical solution: just add a little Equity:RoundingError posting to
absorb the fraction of a cent and move on.

One day, when I retire, I'll spend months writing v3 and offer you all a
new and improved Beancount or maybe someone with more free time and
enthusiasm will beat me to it, go Crustaceans, go!).




On Sun, Feb 11, 2024 at 11:15 AM Ceri Storey  wrote:

> Hi folks,
>
> I'm in the UK, so we get to deal with the inconvenience that is average
> cost booking when it comes to figuring out capital gains taxes. I'm
> currently using the average cost plugin, which works fine, but that
> approach it means that the inventory never gets reduced, so you end up with
> holdings never really going away.
>
> So I was planning on using a cost-basis adjustment approach (
> https://beancount.github.io/docs/trading_with_beancount.html#cost-basis-adjustment-and-return-of-capital)
> to "re-base" the assets to have a single average cost basis. In this case,
> the asset is purchasable on a fractional basis.
>
> So I've tried something like this:
>
> 2020-12-07 open Assets:Fnord:Foo
>  FOO
> 2020-12-07 open Assets:Fnord:Cash
>   GBP
>
> 2020-12-07 * "Buy Asset"
> Assets:Fnord:Cash
> -6.86 GBP
> Assets:Fnord:Foo
> 5. FOO  {1.2345 GBP}
>
> 2021-04-07 * "Buy more asset"
> Assets:Fnord:Cash
>  -30.80 GBP
> Assets:Fnord:Foo
>  13.1313 FOO  {2.3456 GBP}
>
> 2021-04-11 * "Average cost re-base"
> ; Re-base to current average cost basis
> Assets:Fnord:Foo
>  -5. FOO  {1.2345 GBP}
> Assets:Fnord:Foo
> -13.1313 FOO  {2.3456 GBP}
> ; Actual average is 2.015275062075903846565490079, according to
> python's decimal module.
> Assets:Fnord:Foo
> 5. FOO  {2.0152 GBP}
> Assets:Fnord:Foo
>  13.1313 FOO  {2.0152 GBP}
>
> No matter how much precision I specify for the average, it always seems to
> be off by some small amount:
>
> /Users/cez/Documents/beancount/ledger/cost-basis-simple.beancount:12:
>  Transaction does not balance: (-0.00140267 GBP)
>
> If I use an average of 2.015, -0.0051. Even with the 20 decimal places of
> precision for the average price, the transaction is off by
> -0.00102592 GBP.
>
> So I'm clearly missing something about the precision, and/or how to handle
> these cost basis adjustments. Can anyone offer any suggesiton as to what I
> might be missing? Is this one of those cases where I should post an
> adjustment to a hack account of some kind?
>
> Thanks,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/db6e8cec-1ed5-49e9-b587-4719d1a90f54n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPi53e%3DLFGHwbGV5_cSttouRwFQhY2vd8U1X-5-he5_wQ%40mail.gmail.com.


Re: Branching transaction import logic (i.e. partially automating imports)

2024-02-10 Thread Martin Blais
Here's how I do it (from my import script):



def process_entry(entry):
... do something...
return entry


def process_extracted_entries(extracted_entries_list, ledger_entries):
"""Filter the extracted entries to save on time."""
return [(filename, [process_entry(entry) for entry in entries],
account, importer)
for filename, entries, account, importer in
extracted_entries_list]


if __name__ == '__main__':
main = Ingest(importers, hooks = [process_extracted_entries])
main()



On Fri, Feb 9, 2024 at 3:46 PM Danny  wrote:

> *Background*
>
> I've been using beancount for a few years now. I just have a couple
> credits cards and a bank account, nothing especially complex, but I feel
> secure knowing I have a registry of where all my money has gone. Also the
> process of getting transactions into beancount is my check on spending,
> letting me notice anything suspicious.
>
> However, its just way too labor intensive. I already use beancount-import,
> but still get bogged down in hundreds of $2.90 subway payments, the grocery
> store, and sandwiches from the same handful of places.
>
> *What I'm Looking For*
>
> I need a less time-consuming workflow. I discovered Red's five minute
> ledger, and agree completely with the philosophy. However I think I need a
> way to separate transactions from any given account into two separate
> streams.
>
> To better illustrate, this is my ideal pipeline:
>
>1. Download transactions manually or automatically where possible (csv
>and ofx)
>2. Run code that has a set of predefined expense category rules (e.g.
>amazon automatically to a zero-sum category, grocery store below certain
>dollar value)
>3. Separate the categorized transactions and pass the remaining ones
>to beancount-import
>4. Write everything to the ledger like normal
>
> I haven't found any examples of branching the transaction pipeline like
> this, so my question is whether its even plausible within the framework of
> beancount importers. My back up plan is to write a more or less hardcoded
> script that will do it all, but I'm hoping for a more flexible approach!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/1d463106-57c7-447c-b374-087ab60943ddn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOgxJu8-83Nb%3DfNSQp-7VfC0gsdX8d-%2BxL%3D6jJBOz%2B_1Q%40mail.gmail.com.


Re: Copy-pasting multiline (multiple lines) query into bean-query

2024-02-10 Thread Martin Blais
This is a bash question. Look at how multiple lines are handled in bash
(should be lots of info online).

On Sat, Feb 10, 2024 at 9:24 AM Dan Andersson 
wrote:

> Hi,
>
> After doing bean-query foo.beancount to enter the interactive session, can
> I somehow copy-paste multiple lines in there?
>
> It seems like multi-line queries (e.g. the examples in the documentation),
> when pasted in there, always get split into one command per line, resulting
> in errors.
>
> Do I always have to combine those lines first, before pasting them?
>
> Thanks,
> DA
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/50b1d037-b464-4838-ae46-58ffc250e8b8n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPv6nMsT1ES8Td4U1BJv2hqi%3DQd3bMaKO-e2Hj605kscQ%40mail.gmail.com.


Re: I created a way to do BeanCount bookkeeping using typescript.

2024-02-08 Thread Martin Blais
Maybe if Beancount gets rewritten in Rust we can compile it to Rust-WASM
and run it in the browser, haha!


On Thu, Feb 8, 2024 at 10:14 AM base hamster 
wrote:

> The biggest benefit is that it makes beancount Turing-complete, so you can
> use typescript to write recurring bills.
>
>
> import { EAccountType, Ledger, utils } from "../index.js";
>
> const { USD, CNY } = utils.createCurrencies({ defaultDate: "1970-10-01" },
> [
>   "USD",
>   "CNY",
> ] as const);
>
> const Assets = utils.buildAccountHierarchy(USD, EAccountType.Assets, {
>   CN: {
> Cash: utils.createAccountNodeConfig({ open: "1970-01-01", currency:
> CNY }),
>   },
>   Cash: utils.createAccountNodeConfig({ open: "1970-01-01" }),
>   UTrade: {
> Account: {
>   AAPL: utils.createAccountNodeConfig({ open: "1970-01-01" }),
>   EWJ: utils.createAccountNodeConfig({ open: "1970-01-01" }),
> },
>   },
> });
>
> const Expenses = utils.buildAccountHierarchy(USD, EAccountType.Expenses, {
>   Food: {
> Groceries: utils.createAccountNodeConfig({ open: "1970-01-01" }),
> Alcool: utils.createAccountNodeConfig({ open: "1970-01-01" }),
>   },
> });
>
> const ledger = new Ledger(
>   [
> ...utils.flattenAccountHierarchy(Assets),
> ...utils.flattenAccountHierarchy(Expenses),
>   ],
>   [USD, CNY]
> );
>
> const { tr } = utils.transactionBuilder(ledger);
>
> tr(
>   "1970-01-01",
>   "Distribution of cash expenses",
>   Assets.Cash.posting(-300),
>   Expenses.Food.Alcool.posting(300)
> );
>
> console.log(utils.beanCount.serializationLedger(ledger));
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/a52e830a-de80-484e-8ad3-c6fe4f09n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPbmg2az7r0CX%2BUkgsB0TMDPbykqAeoX%3DGJHcxpRdnG0Q%40mail.gmail.com.


Re: Bazel build failing on fedora-toolbox (how to properly set up python env?)

2024-02-03 Thread Martin Blais
On Sat, Feb 3, 2024 at 7:24 AM Daniele Nicolodi  wrote:

> On 31/01/24 22:23, Chary Chary wrote:
> > Dan,
> >
> > I thought that the main idea of beancount v3 was migrating some
> > functionality to C++ to make the thing be faster.
> >
> > If this is not being done in beancount v3, are there any  other
> > improvements which make it worth using as an opposite to v2 at the
> moment?
>
> The C++ rewrite has seen significant progress but it has never landed in
> a form where it can be used from a beancount application.
>

That's correct. It stalled on two things:
- not much free time to play with open source anymore (sad)
- a decent kludge I had to make passing protobufs between Python and C++
got taken away in a change in protobuf itself
I've pretty much decided to explore Rust as an alternative (not much
progress, again, no time to play)



> The major change in the v3 branch is that beancount.ingest has been
> split of and significantly restructured into the beangulp project, that
> beancount.query has been split of into the beanquery project and
> significantly improved, that the deprecated bean-report and bean-web
> functionality have been removed, and several other cleanups. A detailed
> list of changes has not been compiled.
>
> Cheers,
> Dan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to beancount+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/8e4ad0b7-e480-4cfd-866a-8f995dd424dd%40grinta.net
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN2sLNvGVojq8HkGt%3Dz-GhQgPGbBVqF7Lq9Avw%2B8OjpjQ%40mail.gmail.com.


  1   2   3   4   5   6   7   8   9   10   >