2019-10-19 GnuCash IRC logs
00:54:50 *** storyjesse has quit IRC
00:59:35 *** Mechtilde has joined #gnucash
00:59:57 *** Mechtilde has quit IRC
01:00:20 *** Mechtilde has joined #gnucash
01:11:28 *** x1 has quit IRC
01:18:49 *** fell has quit IRC
01:20:08 *** fell has joined #gnucash
01:20:09 *** ChanServ sets mode: +o fell
01:58:03 *** gjanssens has joined #gnucash
01:58:04 *** ChanServ sets mode: +o gjanssens
02:04:30 <chris> hi gjanssens! my C skills stalled
02:05:34 <chris> considering the 3.8+ will read/write both possibilities will be a real pain
02:12:24 *** omnireq_ has quit IRC
02:13:19 *** omnireq has joined #gnucash
02:13:19 *** ChanServ sets mode: +v omnireq
02:19:39 *** JayC has quit IRC
03:02:01 *** storyjesse has joined #gnucash
03:04:52 *** fabior has joined #gnucash
03:22:13 *** fabior has quit IRC
04:25:56 *** marusich has quit IRC
04:36:05 *** chris has quit IRC
05:18:56 *** sbluhm has joined #gnucash
05:22:14 *** chris has joined #gnucash
05:22:14 *** ChanServ sets mode: +v chris
05:31:41 *** sbluhm has quit IRC
05:41:42 *** sbluhm has joined #gnucash
05:41:42 *** ChanServ sets mode: +v sbluhm
05:52:30 *** bertbob has quit IRC
05:54:51 *** bertbob has joined #gnucash
05:54:52 *** ChanServ sets mode: +v bertbob
05:59:42 *** sbluhm has quit IRC
07:19:39 *** FoxT has quit IRC
07:26:03 *** FoxT has joined #gnucash
07:35:03 *** sbluhm has joined #gnucash
07:35:03 *** ChanServ sets mode: +v sbluhm
07:43:53 *** tienne has joined #gnucash
07:58:18 *** Jimraehl1 has joined #gnucash
08:00:20 *** Jimraehl1 has quit IRC
08:31:52 *** tienne has quit IRC
09:21:33 *** sbluhm has quit IRC
09:51:23 *** fell_laptop has joined #gnucash
09:51:23 *** ChanServ sets mode: +o fell_laptop
09:51:23 *** fell has quit IRC
10:00:13 *** monkeyjuice has joined #gnucash
10:04:50 *** monkeyjuice has quit IRC
10:14:33 *** Unhammer has quit IRC
10:14:56 *** Unhammer has joined #gnucash
10:14:57 *** ChanServ sets mode: +v Unhammer
10:22:56 *** Unhammer has quit IRC
10:39:39 *** Unhammer has joined #gnucash
10:39:39 *** ChanServ sets mode: +v Unhammer
10:59:56 *** storyjesse has quit IRC
11:30:13 *** phoenix has joined #gnucash
11:50:59 <jralls> chris, that's a bit of a problem, because libgncmod-apputils depends on libgncmod-engine so making something in engine depend on something in app-utils creates a dependency loop that won't compile.
11:52:20 <chris> yups I gathered
11:54:41 <chris> maybe the solution is to copy some apputils functions into ScrubBudget.c
11:56:46 <chris> all I really need is to determine the current reversal strategy and gnc_prefs_get_bool is in engine
11:56:59 <jralls> Not copy, move, and not necessarily to Scrubbudget. gnc_reverse_balance is just looking up a preference and preferences are in core-utils.
11:58:56 <jralls> gnc_reverse_balance is old code, left over from when reading a preference from a file was expensive. I think with gsettings that's no longer true... gjanssens knows the system better than I.
11:59:47 <chris> ok while this is being considered, the gnc_account_foreach_descendant issue is baffling
12:00:10 <chris> if gnc_reverse_balance is made more accessible I can progress #585
12:01:48 <jralls> Do you need to know whether to reverse a particular account type or do you just need to know the values og REVERSED_ACCTS_INC_EXP and REVERSED_ACCTS_CREDIT?
12:02:21 <chris> account-type
12:04:57 <chris> ScrubBudget.c#L52 will skip account if it's not reversible
12:04:57 *** oozer has joined #gnucash
12:05:03 <jralls> I'd think that gnc_account_foreach_descendant would be intuitive to you: It's straightforward tail recursion, very lispy.
12:05:48 *** phoenix has quit IRC
12:05:58 <chris> ^ yes but the root parameter doesn't seem to get recognised as a genuine account
12:06:31 <jralls> No, the root parameter is ignored because it's not a descendant.
12:06:53 *** omnireq has quit IRC
12:07:03 *** omnireq has joined #gnucash
12:07:03 *** ChanServ sets mode: +v omnireq
12:07:42 <jralls> Suppose you're asked to name all of your grandmother's descendants: You wouldn't include her in the list.
12:08:27 <chris> maybe I misunderstood the error. i'll try again.
12:08:36 <chris> (ned to recompile)
12:09:06 <chris> afai remember the scheme fix-budgets was absolutely fine
12:09:26 <chris> the c one refuses to run the account_descendant_foreach because it didn't recognise that the root was an account
12:09:29 <chris> (IIRC)
12:09:43 <chris> but rechecking
12:10:33 <jralls> OK. GTG, but if you can't sort it yourself, post the code somewhere and I'll look at it later.
12:10:47 <chris> while recompiling, for #592, it seems working well.
12:10:57 <chris> ok have a nice day!
12:16:33 *** sbluhm has joined #gnucash
12:16:33 *** ChanServ sets mode: +v sbluhm
12:17:15 *** isn0gud has joined #gnucash
12:18:04 <chris> * 00:17:34 ERROR <gnc.engine> void gnc_account_foreach_descendant(const Account*, AccountCb, gpointer): assertion 'GNC_IS_ACCOUNT(acc)' failed is the error produced running the fix
12:20:19 <chris> ^ it'd seem the 'root' being passed is something else; a pointer/integer etc.
12:20:41 <chris> or maybe NULL
12:21:09 *** isn0gud has quit IRC
12:34:40 *** chris has quit IRC
12:40:33 *** sbluhm has quit IRC
13:06:23 *** sbluhm has joined #gnucash
13:06:23 *** ChanServ sets mode: +v sbluhm
13:30:23 *** sbluhm has quit IRC
13:42:59 <jralls> chris, That's because you're passing &root instead of root in ScrubBudget.c:93. root is an Account* so &root is an Account**. gnc_account_foreach_descendant expects an Account*.
14:04:37 *** fell_laptop has quit IRC
14:30:18 *** warlord has joined #gnucash
14:30:46 *** frakturfreak has joined #gnucash
14:30:46 *** ChanServ sets mode: +v frakturfreak
14:32:56 *** bertbob has quit IRC
15:09:19 *** sbluhm has joined #gnucash
15:35:50 *** bertbob has joined #gnucash
15:35:51 *** ChanServ sets mode: +v bertbob
17:15:43 *** fell_laptop has joined #gnucash
17:15:43 *** ChanServ sets mode: +o fell_laptop
17:37:04 *** sbluhm has quit IRC
18:01:05 *** gjanssens has quit IRC
18:17:52 *** frakturfreak has quit IRC
18:32:36 *** frakturfreak has joined #gnucash
18:37:46 *** fell_laptop has quit IRC
18:37:49 *** fell has joined #gnucash
18:37:49 *** ChanServ sets mode: +o fell
18:39:41 *** fell has quit IRC
18:39:45 *** fell_laptop has joined #gnucash
18:39:45 *** ChanServ sets mode: +o fell_laptop
18:45:10 *** chris has joined #gnucash
18:45:10 *** ChanServ sets mode: +v chris
18:45:32 <chris> jralls thank you that did it!
18:46:07 *** chris has quit IRC
18:46:15 *** chris has joined #gnucash
18:46:15 *** ChanServ sets mode: +v chris
19:06:29 *** jervin has joined #gnucash
19:28:00 <chris> from my POV, scm is so much more concise, yet C much more colourful :)
19:28:54 *** oozer has quit IRC
19:30:07 *** jervin has quit IRC
19:30:18 <jralls> chris, Scheme is more concise because it has a more developed standard library. C++ does too and can be much more concise.
19:31:28 <jralls> On your two PRs, only create GNC_FEATURE_BUDGET_UNREVERSED in maint. Otherwise there will be a merge conflict when it's merged up to master.
19:32:24 <jralls> Or when the master PR is applied.
19:33:47 *** jervin has joined #gnucash
19:34:08 <jralls> I wonder if the reversal-detection in the scrub is adequate. It seems to depend on the user having the same reversal policy in effect as when they created the budget.
19:37:32 <jralls> chris: As for gnc_reverse_balance needing to be accessible, just put it in engine/Account.cpp.
19:38:01 *** fell_laptop is now known as fell
19:38:28 <chris> jralls: I'm aware scrub works well if reversal policy hasn't changed
19:39:15 <chris> hence the message includes warning to verify budget reports and retry with another pref
19:40:11 <chris> as far as moving gnc_reverse_balance, it comes with a trail of helper functions though
19:40:14 <jralls> Isn't it too late at that point? If the budget was created with no reversal and the user later enables reversal the scrub will do the wrong thing.
19:40:44 <jralls> chris: That's because it's poorly written.
19:40:58 <chris> Yes it's too late; hence: don't save, change pref, and reload datafile
19:41:22 <chris> Dont know a smoother way to do it
19:41:57 <jralls> That's not feasible if the user is using a SQL backend: There is no "don't save".
19:42:04 <chris> ah
19:42:49 <chris> then i'm stumped
19:43:39 <jralls> We should be able to work out a heuristic to determine if a budget account is reversed.
19:44:12 <chris> Ok... which means no need to move gnc_reverse_balance
19:45:39 <jralls> Even better.
19:46:20 <chris> I'll see how that would work. It's about counting the number of negative budget-amounts in various account types.
19:46:47 * chris will do in scheme first!
19:47:45 *** oozer has joined #gnucash
19:48:52 *** jervin has quit IRC
19:51:09 *** jervin has joined #gnucash
19:57:23 <jralls> ;-)
19:59:13 *** frakturfreak has quit IRC
20:10:22 *** jervin has quit IRC
20:14:17 *** fell has quit IRC
20:14:24 *** fell has joined #gnucash
20:14:24 *** ChanServ sets mode: +o fell
20:17:24 *** fell has quit IRC
20:22:08 *** fell has joined #gnucash
20:22:08 *** ChanServ sets mode: +o fell
20:26:33 *** oozer has quit IRC
21:17:17 *** TownsendHardware1 has joined #gnucash
21:18:38 *** TownsendHardware has quit IRC
21:18:38 *** TownsendHardware1 is now known as TownsendHardware
21:29:17 *** jervin has joined #gnucash
21:59:18 *** TownsendHardware has quit IRC
22:14:23 *** omnireq has quit IRC
22:14:34 *** omnireq has joined #gnucash
22:14:34 *** ChanServ sets mode: +v omnireq
22:35:43 *** jervin has quit IRC
23:39:07 *** Aussie_matt has joined #gnucash