Re: ledger vs hledger vs beancount or how to choose the right cli client

2014-09-08 Thread Gour
On Sun, 7 Sep 2014 11:12:26 -0400
Martin Blais bl...@furius.ca wrote:

Hello Martin,

 Again, what makes you think that the other softwares are running
 behind? In some of the ways that it differs, I view some of the new
 features I implement in Beancount as new and pushing the envelope
 forward.

don't get me wrong...but I use Gnucash for several years and before that
I spent some time whether I should start taking care about my finances
and do bookkeeping. Even then, I was aware of the existance of both
ledger and hledger - it looks I had to go throuugh experience with GC
before considering cli - but never heard about Beancount until 10 days
ago or so.

Hledger clearly says it does not support all the ledger's features,
although it adds some of its own stuff like web ui, some reports etc.,
so, as John confirmed, my impression was that for the 'core' financial
stuff, ledger is the leader.

I apologize if it does not apply to Beancount.


 Personally I think that syntax is a poor way to evaluate software.

That's true, but it's pragmatic!

For instance, I've, more or less, settled to use Fossil
(http://fossil-scm.org/) as my primary DVCS. Although I like its
features/simplicity/power/security/etc. it's still awesome to know there
is way out to the most popular Git if something goes wrong. 

Here are the steps to convert Fossil repo to git:

git init new-repo
cd new-repo
fossil export --git ../repo.fossil | git fast-import


Otoh, using Beancount with its incompatible syntax means, one is on
his/her own when wishing to go 'back' to Ledger which is certainly more
popular and with greater community behind.

Shortly, (ic)compatibility is not the metric to evaluate software, but
pragmatic concern.

 I see 2.0beta:
 https://pypi.python.org/pypi/beancount
 
 I've just updated and called it 2.0beta2
 (I'm not very good about updating indexes all around the web.)

I was Googling for Beancount and the link for 0.9 was higher. :-)

Moreover, I run Debian Sid and was able to install (h)ledger with
simple: apt-get install, while I do not see packages for Beancount?

 Aren't they nicely readable and beautifully formatted and available
 on all your devices and in many formats? Isn't this the goal of
 documentation? Why don't you like them?

I like that 'reading' is separate from 'editing'. There was a user in
#ledger yesterday who got the feeling that he needs to have Google
account to be able to read it and he wrote: I give it up.

Why don't you simply use something like https://readthedocs.org/ which
seems to be popular for Python stuff?

 I just click on the reject button to remove those accidental
 suggestions when that happens. Also, I might accept the suggestion but
 reject the specific change and reword things manually to make it
 better; that would also show up as a rejected suggestion. Nothing
 personal.


Nothing personal, don't worry, but it was a bit strange. For me, it's
more natural to use my preferred editor, fix things and then 'pull
request', send a patch etc.

 Furthermore, beyond their capabilities, languages nurture particular
 cultures. In many ways, these cultures subsume the particular
 technical advantages of computer languages. As examples relevant to
 the case in point, despite its inherent looseness in typing and
 glaring performance disadvantages, Python has succeeded in creating a
 uniquely vibrant culture of making things simple and explicit, with
 great documentation and adherence to well-defined contracts (via
 conventions). 

Considering that Hledger is slower than Ledger, I wonder how does
Benacount perform in comparison?

 Alright, this is getting seriously OT.

:-)

 I think you misunderstood what I meant. I'm saying CLI accounting is
 easy to implement and should be equally doable in any language. So,
 yes.

OK. I had impression you're thinking about the way how the calc is
performed, iow. about representation of numbers.


Sincerely,
Gour

-- 
One must deliver himself with the help of his mind, and not 
degrade himself. The mind is the friend of the conditioned soul, 
and his enemy as well.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger vs hledger vs beancount or how to choose the right cli client

2014-09-08 Thread Martin Blais
On Mon, Sep 8, 2014 at 3:22 AM, Gour g...@atmarama.net wrote:

 On Sun, 7 Sep 2014 11:12:26 -0400
 Martin Blais bl...@furius.ca wrote:

 Hello Martin,

  Again, what makes you think that the other softwares are running
  behind? In some of the ways that it differs, I view some of the new
  features I implement in Beancount as new and pushing the envelope
  forward.

 don't get me wrong...but I use Gnucash for several years and before that
 I spent some time whether I should start taking care about my finances
 and do bookkeeping. Even then, I was aware of the existance of both
 ledger and hledger - it looks I had to go throuugh experience with GC
 before considering cli - but never heard about Beancount until 10 days
 ago or so.

 Hledger clearly says it does not support all the ledger's features,
 although it adds some of its own stuff like web ui, some reports etc.,
 so, as John confirmed, my impression was that for the 'core' financial
 stuff, ledger is the leader.


On this list and in the documents I've shared with you I've argued and
shown specific examples how the lack of inventory booking in Ledger's model
offers little support for entering a correct replication of investment
trades and calculate capital gains incorrectly. It makes it very difficult
if not impossible to enter correct data about past trades--errors in data
entry are very common in my experience (that is, the experience of creating
a replication of 8 years worth of trades with a system that _does_ detect
such errors, errors which would otherwise have gone undetected by the
Ledger model). The conversions problem is also not solved--it is possible
with Ledger to produce a trial balance with a residual value, which is
impossible in Beancount--this provides an additional assurance of
correctness.  For these reasons, in terms of core financial stuff, the
current model Ledger implements falls short, and the model Beancount offers
is better suited for replicating account history, especially when it comes
to maintaining cost basis of investments.





  I see 2.0beta:
  https://pypi.python.org/pypi/beancount
 
  I've just updated and called it 2.0beta2
  (I'm not very good about updating indexes all around the web.)

 I was Googling for Beancount and the link for 0.9 was higher. :-)

 Moreover, I run Debian Sid and was able to install (h)ledger with
 simple: apt-get install, while I do not see packages for Beancount?


That's just because nobody packaged it for Debian.
Clone the repo, python3 setup.py install. Standard procedure.
I won't package for all distros myself, I have other things to do.





  Aren't they nicely readable and beautifully formatted and available
  on all your devices and in many formats? Isn't this the goal of
  documentation? Why don't you like them?

 I like that 'reading' is separate from 'editing'. There was a user in
 #ledger yesterday who got the feeling that he needs to have Google
 account to be able to read it and he wrote: I give it up.


Well he did not try very hard. I find it odd that some in the open source
community balk at the use of my documentation tools. The point of
documentation is that you're able to read it. If you can read it and
contribute to it, the goal has been achieved. How conservative.




 Why don't you simply use something like https://readthedocs.org/ which
 seems to be popular for Python stuff?


Because I think Google Docs is better. There is simply no parallel in how
it allows you to make immediate corrections without having to patch source
code and rebuild. I can even make changes on my phone while I'm on the go!
Unless someone builds and maintains a similar libre service, there is
simply no comparison when it comes to allowing you to contribute changes
and fixes and comments. In the few months I've shared my Beancount
documents, I've already received far more contributions and corrections
than in 10 entire years of traditional rst-based documentation for all my
other projects combined. Most often in the OSS community, people don't
contribute to docs. So far the experiment is paying off handsomely and I
have felt little to desire to retreat to my old tools. If anything, it has
encouraged me to write more. I love Google Docs.



 I just click on the reject button to remove those accidental
  suggestions when that happens. Also, I might accept the suggestion but
  reject the specific change and reword things manually to make it
  better; that would also show up as a rejected suggestion. Nothing
  personal.


 Nothing personal, don't worry, but it was a bit strange. For me, it's
 more natural to use my preferred editor, fix things and then 'pull
 request', send a patch etc.


Things change; adapt yourself. People are reluctant to change. Realize
this. The world used to be desktops, then it was mostly all laptops, and by
now it's mostly devices. You can highlight text, right-click and add a
comment right there in your browser, and you automatically get an email
notification later on. 

Problem getting started with Ledger

2014-09-08 Thread Joseph Mornin
Here's my ledger.dat:

2014/09/29 Employer
Assets:Checking $500.00
Income:Salary

When I run ledger -f ledger.dat balance, I get this error:

Error: Posting with null amount's account may be mispelled:
  Assets:Checking $500.00

Why?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem getting started with Ledger

2014-09-08 Thread Douglas Philips
you need two white space characters between the account name and amount.
your sample looks like an accountname yhat ends in $500.00

-=Doug


On 9/8/14 12:38 PM, Joseph Mornin wrote:
 Here's my ledger.dat:
 
 |
 2014/09/29Employer
 Assets:Checking$500.00
 Income:Salary
 |
 
 When I run ledger -f ledger.dat balance, I get this error:
 
 |
 Error:Postingwithnullamount's account may be mispelled:
Assets:Checking $500.00
 |
 
 Why?
 
 -- 
 
 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to ledger-cli+unsubscr...@googlegroups.com 
 mailto:ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger vs hledger vs beancount or how to choose the right cli client

2014-09-08 Thread Simon Michael

On 9/7/14 8:12 AM, Martin Blais wrote:

Ledger uses a rational number representation AFAIK. I had a quick look
and I think it's here:
https://github.com/ledger/ledger/blob/master/src/amount.h#L83

I'm not so familiar with HLedger's source code, all I see is a Haskell
Double, which surprises me:
https://github.com/simonmichael/hledger/blob/master/hledger-lib/Hledger/Data/Types.hs#L49
This is probably not what's used. Simon: what are you using to represent
number types?


Yes Double with some extra smarts at present. Decimal soon probably, see 
http://ircbrowse.net/browse/hledger?id=884timestamp=1409941137#t1409941137 
for more discussion.



--

--- 
You received this message because you are subscribed to the Google Groups Ledger group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Problem getting started with Ledger

2014-09-08 Thread Joseph Mornin
Thanks!

On Monday, September 8, 2014 9:43:03 AM UTC-7, Doug wrote:

 you need two white space characters between the account name and amount. 
 your sample looks like an accountname yhat ends in $500.00 

 -=Doug 


 On 9/8/14 12:38 PM, Joseph Mornin wrote: 
  Here's my ledger.dat: 
  
  | 
  2014/09/29Employer 
  Assets:Checking$500.00 
  Income:Salary 
  | 
  
  When I run ledger -f ledger.dat balance, I get this error: 
  
  | 
  Error:Postingwithnullamount's account may be mispelled: 
 Assets:Checking $500.00 
  | 
  
  Why? 
  
  -- 
  
  --- 
  You received this message because you are subscribed to the Google 
 Groups Ledger group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an email to ledger-cli+...@googlegroups.com javascript: mailto:
 ledger-cli+unsubscr...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/d/optout. 



-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


New fontification Scheme

2014-09-08 Thread Craig Earls
I have spent the last month overhauling ledger fontification.  I gave
up on using the standard REGEX based methods that most font lockers
use. Instead I wrote a few functions that actually understand the
semantics of a ledger xact then had jit-lock and font-lock call those.
  Overall there is much more flexibility and it seems to be plenty
fast.  The regexes I do use are much simpler.   I tested with a file
that had 2,613,072 postings and it was lighting fast.  Comments after
amounts are now properly recognized and you can fontify an entire xact
based on its overall status (my favorite part, that font-lock just
really couldn't do).

For those of you who use lots of different directives there are now
separate faces possible for all valid directives (or just use one face
for all directives)

Please check it out and report any bugs you find.  I have banged on it
for a while and it has been stable and well behaved.  Of course you
will find problems.

-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New fontification Scheme

2014-09-08 Thread Andrew Schwartzmeyer

On Sep 8, 2014, at 8:49 PM, Craig Earls ender...@gmail.com wrote:

 I have spent the last month overhauling ledger fontification.  I gave
 up on using the standard REGEX based methods that most font lockers
 use. Instead I wrote a few functions that actually understand the
 semantics of a ledger xact then had jit-lock and font-lock call those.
  Overall there is much more flexibility and it seems to be plenty
 fast.  The regexes I do use are much simpler.   I tested with a file
 that had 2,613,072 postings and it was lighting fast.  Comments after
 amounts are now properly recognized and you can fontify an entire xact
 based on its overall status (my favorite part, that font-lock just
 really couldn't do).

Awesome! Thanks so much for your work man.

 For those of you who use lots of different directives there are now
 separate faces possible for all valid directives (or just use one face
 for all directives)
 
 Please check it out and report any bugs you find.  I have banged on it
 for a while and it has been stable and well behaved.  Of course you
 will find problems.

Gotta say for the first thirty seconds I though it was totally broken when 
everything was white, made sense once I scrolled down (white for cleared 
transactions, green for budget, normal for uncleared, at least with my theme).

So far it's recognizing (highlighting properly): assertions, lot value / 
posting cost / amount expressions, and posting notes. Sweet!

However, it unfortunately doesn't smartly indent any of the above except plain 
currency values. What would go into fixing that? I can take a look.

 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com
 
 -- 
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New fontification Scheme

2014-09-08 Thread Craig Earls
Indentation is totally independent of font-lock. There is a bug noted
already. I just haven't gotten to it.

On Monday, September 8, 2014, Andrew Schwartzmeyer and...@schwartzmeyer.com
wrote:


 On Sep 8, 2014, at 8:49 PM, Craig Earls ender...@gmail.com javascript:;
 wrote:

  I have spent the last month overhauling ledger fontification.  I gave
  up on using the standard REGEX based methods that most font lockers
  use. Instead I wrote a few functions that actually understand the
  semantics of a ledger xact then had jit-lock and font-lock call those.
   Overall there is much more flexibility and it seems to be plenty
  fast.  The regexes I do use are much simpler.   I tested with a file
  that had 2,613,072 postings and it was lighting fast.  Comments after
  amounts are now properly recognized and you can fontify an entire xact
  based on its overall status (my favorite part, that font-lock just
  really couldn't do).

 Awesome! Thanks so much for your work man.

  For those of you who use lots of different directives there are now
  separate faces possible for all valid directives (or just use one face
  for all directives)
 
  Please check it out and report any bugs you find.  I have banged on it
  for a while and it has been stable and well behaved.  Of course you
  will find problems.

 Gotta say for the first thirty seconds I though it was totally broken when
 everything was white, made sense once I scrolled down (white for cleared
 transactions, green for budget, normal for uncleared, at least with my
 theme).

 So far it's recognizing (highlighting properly): assertions, lot value /
 posting cost / amount expressions, and posting notes. Sweet!

 However, it unfortunately doesn't smartly indent any of the above except
 plain currency values. What would go into fixing that? I can take a look.

  --
  Craig, Corona De Tucson, AZ
  enderw88.wordpress.com
 
  --
 
  ---
  You received this message because you are subscribed to the Google
 Groups Ledger group.
  To unsubscribe from this group and stop receiving emails from it, send
 an email to ledger-cli+unsubscr...@googlegroups.com javascript:;.
  For more options, visit https://groups.google.com/d/optout.

 --

 ---
 You received this message because you are subscribed to the Google Groups
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to ledger-cli+unsubscr...@googlegroups.com javascript:;.
 For more options, visit https://groups.google.com/d/optout.



-- 
Craig, Corona De Tucson, AZ
enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.