2018-09-08 GnuCash IRC logs

00:07:12 *** O01eg has quit IRC
00:21:37 *** O01eg has joined #gnucash
00:25:03 <chris> jralls unsure how the following should be handled: in your test-commodity-utils line 260-268 - "foreign-no-amount" will trigger a div/0 during the make-newrate calculation
00:42:09 <chris> ^ I found this by simplifying gnc-numeric-div into / and scheme's division barfs
01:04:46 *** fell has quit IRC
01:05:36 *** fell has joined #gnucash
01:57:15 *** gjanssens has joined #gnucash
01:57:16 *** ChanServ sets mode: +o gjanssens
02:04:22 <gjanssens> .
02:52:18 *** fell has quit IRC
02:52:55 *** fell has joined #gnucash
04:08:31 *** ncv has joined #gnucash
04:30:37 *** KevinDB has quit IRC
04:34:04 *** KevinDB has joined #gnucash
04:48:18 *** boldstripe has joined #gnucash
05:12:20 *** boldstripe has quit IRC
05:56:50 *** fiddlerwoaroof has quit IRC
06:00:20 *** fiddlerwoaroof has joined #gnucash
06:03:22 *** fiddlerwoaroof has quit IRC
06:05:29 *** warlord has quit IRC
06:08:05 *** fiddlerwoaroof has joined #gnucash
06:08:32 *** fabior has joined #gnucash
06:12:19 *** warlord has joined #gnucash
06:16:30 *** O01eg has quit IRC
06:16:31 *** fiddlerwoaroof has quit IRC
06:20:47 *** fiddlerwoaroof has joined #gnucash
06:28:36 *** ncv has quit IRC
06:29:38 *** ncv has joined #gnucash
06:32:52 *** kritzefitz has joined #gnucash
06:44:07 *** ncv has quit IRC
06:44:18 *** ncv has joined #gnucash
06:45:46 <kritzefitz> Hi, I'm trying to use the loan calculator to check a loan I got from my bank. When I enter the data provided by my bank (payment periods, present value, periodic payment), set future value to 0 and use the tool to calculate the interest rate it always comes out slightly too high (about 0.05% too much). Is that expected or is this a sign that I did something wrong?
06:47:17 *** oozer has joined #gnucash
06:55:42 *** fabior has quit IRC
07:01:40 *** User has joined #gnucash
07:06:40 <warlord> kritzefitz: it's not unusual for the rate to be slightly off. If the amortization table matches then that's all that really matters.
07:08:21 <kritzefitz> warlord: Does gnucash generate an amortization table? I did not find one.
07:08:44 <warlord> In the Loan & Mortgage repayment assistant.
07:08:52 <warlord> last page
07:10:44 <kritzefitz> Ah, I see. That's what I was looking for. I was looking at the loan calculator in the “tools” menu and was disappointed that it doesn't generate a table.
07:14:00 * chris looking at old .scm code: 😠
07:14:12 <warlord> chris: sorry to hear/
07:14:31 <chris> yours is fine warlord
07:15:59 <warlord> phew
07:16:10 <chris> I wish I'd watched SICP 5-10 years ago, I'd have been a benevolent dictator in this field
07:16:18 <warlord> Hal & Gerry would appreciate that!
07:16:56 <warlord> LOL. I took SICP in 1989/1990
07:17:16 <chris> lucky you
07:17:51 <chris> hang on, straight from the masters? O_o
07:18:52 * warlord nods
07:19:37 * chris bows
07:19:49 <warlord> lol
07:20:02 <warlord> it was a required class.
07:20:47 *** User has quit IRC
07:21:45 <chris> i'm sure there was magic in the air even back then
07:21:55 <warlord> I'm sure.
07:22:08 <kritzefitz> Huh, now I have the problem that the assistant generates one repayment rate fewer than I entered and the monthly rate is too cent higher than what I'm actually paying.
07:22:18 <kritzefitz> s/too/two/
07:22:43 <warlord> kritzefitz: you sometimes need to futz with the dates and counts to get it right.
07:38:55 *** oozer has quit IRC
08:05:32 <kritzefitz> warlord: Is it possible that the code that generates the periodic payments has some kind of off-by-one error? When I set the duration to 3 years, I get 25 payments generated (24 + one payment one day before the start date for some reason).
08:07:32 <kritzefitz> The thing is, if I use 4 years instead I get the right number of payment (excluding the strange first one), but then the rates are calculated using the wrong number of payments.
08:12:00 *** Mechtilde_ has quit IRC
08:37:49 *** storyjesse has joined #gnucash
08:47:07 *** storyjesse has quit IRC
09:21:36 *** oozer has joined #gnucash
09:23:12 *** boldstripe has joined #gnucash
09:30:02 *** boldstripe has quit IRC
09:38:21 *** ncv_ has joined #gnucash
09:39:32 *** ncv has quit IRC
09:48:28 *** kritzefitz has quit IRC
10:05:22 *** ncv__ has joined #gnucash
10:06:32 *** ncv_ has quit IRC
10:13:00 *** Mechtilde_ has joined #gnucash
10:38:56 *** jotrago1 has joined #gnucash
10:39:21 *** jotrago has quit IRC
10:39:21 *** jotrago1 is now known as jotrago
10:57:00 *** boldstripe has joined #gnucash
10:57:10 *** bertbob has quit IRC
10:59:02 *** bertbob has joined #gnucash
11:09:36 *** boldstripe_ has joined #gnucash
11:10:26 *** boldstripe has quit IRC
11:10:26 *** boldstripe_ is now known as boldstripe
11:29:28 *** boldstripe has quit IRC
11:49:55 *** boldstripe has joined #gnucash
11:59:36 *** gncbot sets mode: +o fell
12:11:34 *** boldstripe has quit IRC
12:14:52 *** jotrago has quit IRC
12:14:56 *** jotrago has joined #gnucash
12:19:00 *** boldstripe has joined #gnucash
12:46:36 *** boldstripe has quit IRC
13:44:42 *** fell has quit IRC
13:49:02 *** ncv__ has quit IRC
13:51:19 *** fell has joined #gnucash
13:51:19 *** gncbot sets mode: +o fell
13:57:29 *** fell has quit IRC
14:03:44 *** fell has joined #gnucash
14:14:44 *** boldstripe has joined #gnucash
15:02:47 *** frakturfreak has joined #gnucash
15:13:08 *** oozer has quit IRC
15:25:59 <jralls> chris: How about (let ((div ((caadr known-pair) 'total #f))) (if (not (zero? div)) (/ (* (un->known-coll 'total #f) ((cdadr known-pair) 'total #f)) div) #f)) ?
15:26:53 <jralls> chris: Not sure about the parens balancing, I typed it directly into IRC which sadly lacks scheme editing support.
15:39:53 *** sbluhm has quit IRC
15:42:56 *** boldstripe has quit IRC
15:44:28 *** sbluhm has joined #gnucash
15:47:02 *** JayC has quit IRC
15:48:47 *** Mechtilde_ has quit IRC
15:50:26 *** JayC has joined #gnucash
16:09:27 *** sixwheeledbeast has quit IRC
16:09:52 *** sixwheeledbeast has joined #gnucash
16:23:21 *** oozer has joined #gnucash
17:12:53 *** al has joined #gnucash
17:13:50 *** al has quit IRC
17:30:47 *** marusich has joined #gnucash
17:56:49 *** fell has quit IRC
18:05:49 *** fiddlerwoaroof has quit IRC
18:06:47 *** bertbob has quit IRC
18:08:21 *** bertbob has joined #gnucash
18:09:44 *** fiddlerwoaroof has joined #gnucash
18:11:26 *** bertbob has quit IRC
18:22:46 *** jotrago1 has joined #gnucash
18:23:13 *** jotrago has quit IRC
18:23:13 *** jotrago1 is now known as jotrago
18:27:44 *** bertbob has joined #gnucash
18:32:57 <chris> jralls: agree this would be the obvious form. my issue is i have no clue what the divisor/dividends actually means for now, so, if the division isn't actually done, is the calculation still valid. i'd guess it does. i'd think if div=0, instead of div/0, it should output a warning instead similar to the other cases in this function.
18:38:37 <jralls> chris: Sure, it can emit a warning as long as it returns ('XXX' . #f) to indicate that it couldn't find a price for XXX.
18:39:12 <chris> ok
18:39:56 <jralls> It might make more sense though for the warning to be at the caller. resolve-unknown-commodity doesn't really know the circumstances it's being called for.
18:41:50 <chris> ok this is for later, hopefully i'll be able to clean up
18:42:18 *** gjanssens has quit IRC
18:42:36 <chris> I hope you've been able to test the new invoice.scm ? it's been a while since I've looked into it closely
18:43:16 <chris> from my memory it's feature complete
18:44:31 <jralls> I tested it to the extent I'm able to. I don't use the business features so I don't even know what all of the features are, but as far as I could tell from reviewing the code you didn't remove any implementation, you just cleaned it up and consolidated it.
18:45:34 <chris> yups thats the idea
18:49:08 <chris> I converted to (if (zero? div) (begin (warn "div/0 warning) (set! b #f)) ...) which doesn't seem to break anything apart from that one test
18:56:33 <jralls> Ah, because resolve-foreign-commodities previously returned #f if there was no split involving XXX but 0 if there was but it didn't create a price for some reason.
18:58:22 <jralls> I don't think that there's a problem with it returning #f in both cases--in fact I think it's more correct, so go ahead and change the test. If something does break then it should be changed to expect #f.
18:58:33 <chris> cool
19:07:32 * chris gets lost in all those cdadr cddr caadr
19:09:22 <jralls> Me too. The list handling makes for a lot of flexibility but requires the programmer to keep a lot in his head.
19:44:10 <chris> 😠 i've made some changes from gnc-numeric-div to / in commodity-utils, and invalid-price from 0 to #f...... which then causes eguile balsheet to display amounts as $800 + 2/3
19:45:29 <chris> https://github.com/christopherlam/gnucash/commits/maint-fix-newrate-div/0 would have been a nice one to merge
19:45:31 <jralls> Right, because Guile rationals don't have a rounding capability. IIRC that's why I left those computations as gnc-numeric-div.
19:48:32 <jralls> Though I think the integer-plus-fraction formatting is in a C function somewhere, I just can't remember its name. IIRC that function can be told to print decimals at some precision.
19:52:43 <chris> in any case this series is a dead-end... it'll break eguile balsheet which can't handle #f or exact-rational prices and I can't handle eguile.
19:53:18 <jralls> OK.
20:31:37 *** marusich has quit IRC
20:35:47 *** frakturfreak has quit IRC
21:21:43 *** windboy has joined #gnucash
21:25:29 *** windboy has quit IRC
22:07:23 *** oozer has quit IRC
22:39:03 *** Aussie_matt has joined #gnucash
23:55:28 *** Mechtilde_ has joined #gnucash