2019-07-06 GnuCash IRC logs
00:51:22 *** chris has quit IRC
01:58:32 *** gjanssens has joined #gnucash
01:58:32 *** ChanServ sets mode: +o gjanssens
01:58:47 <gjanssens> .
02:10:04 *** gour has joined #gnucash
02:10:05 *** ChanServ sets mode: +v gour
02:58:08 *** karelk has joined #gnucash
04:20:29 *** boldstripe has joined #gnucash
05:47:02 *** chris has joined #gnucash
05:47:02 *** ChanServ sets mode: +v chris
05:47:39 <chris> gjanssens seeking your help wrapping qoflog
05:47:52 <chris> because gnc:debug will severely impair report performance
05:48:06 <chris> my branch wrapqoflog
05:48:08 <gjanssens> Right, I saw the conversation yesterday...
05:48:53 <gjanssens> Have you tried adding qoflog.h to engine.i ?
05:49:22 <gjanssens> You may have to add it twice: once as %include <qoflog.h> and once as #include <qoflog.h>
05:50:12 <gjanssens> The latter is to have it as normal c header file so it's functions are visible to other code in engine.i
05:50:29 <gjanssens> The former actually tells swig to wrap all functions in qoflog.h
06:13:48 <chris> tried. still struggle to export QOF_LOG_DEBUG or something
06:14:26 <chris> apologies in/out due to dinner and getting ready for concert :P
06:16:30 <chris> also has household chores
06:17:26 <chris> alternatively i can move the gnc:debug call to a less critical part of commodity-utilities.scm
06:20:07 *** storyjesse has joined #gnucash
06:23:41 <chris> i.e. https://github.com/christopherlam/gnucash/commit/ad1d771cc887c7119a5aa2f81d56b0dcb78b129e which will work fine, and means chris still can't do .i changes
06:25:58 *** boldstripe has quit IRC
06:34:40 <gjanssens> chris: do you get errors ?
06:35:09 <chris> not for including qoflog, but QOF_LOG_DEBUG can't be found
06:35:26 <gjanssens> QOF_LOG_DEBUG is an enumerator value
06:35:44 <gjanssens> I believe you have to export those separately in engine.i
06:35:56 <gjanssens> look for SET_ENUM in that file
06:36:11 <chris> see https://github.com/christopherlam/gnucash/commit/898a9cdb8e1a8cad34125e6599ff62587297b01b where i tried
06:37:25 <gjanssens> What error did you get ?
06:38:58 <chris> (the gnc:debug move above is fine... average-balance from 15s to 2.5s
06:39:39 <gjanssens> Sure, but I'm interested in figuring out where it went wrong to be able to guide you through it.
06:39:45 <chris> ice-9/boot-9.scm:752:25: In procedure dispatch-exception:
06:39:46 <chris> Unbound variable: QOF-LOG-DEBUG
06:40:30 <chris> full log https://pastebin.com/raw/jWA545tV
06:41:11 <gjanssens> Ok, have you done a clean build with an empty build directory ?
06:41:17 <chris> yes
06:41:29 <gjanssens> Ok.
06:41:47 <chris> isn't QOF_LOG_DEBUG a special hash-type var instead of normal var?
06:41:55 <gjanssens> Where can I pull your work in progress to experiment locally ?
06:42:32 <chris> https://github.com/christopherlam/gnucash/commits/wrapqoflog
06:42:44 <chris> or https://github.com/christopherlam/gnucash/tree/wrapqoflog
06:43:37 <chris> i used your template branch wraprecurrence...
06:54:05 *** oozer has joined #gnucash
07:01:21 <chris> gtg now a few hours
07:03:31 <gjanssens> See you later
07:28:00 *** oozer has quit IRC
07:45:08 <gjanssens> hmm, it looks like wrapping QofLog.h is more complicated. I suspect the macros to define the enum are in the way
07:59:17 <gjanssens> Unfortunately I don't have time to chase this further.
08:13:00 *** boldstripe has joined #gnucash
08:29:04 <warlord> gjanssens, in your opinion, how many months of 5-day bounces before I remove people from the list? 5/6 names are repeated from 6/6 to 7/6
08:32:50 *** jervin has joined #gnucash
08:42:38 *** jervin has quit IRC
09:27:11 *** Jimraehl1 has joined #gnucash
09:27:40 *** jervin has joined #gnucash
09:27:55 *** Jimraehl1 has left #gnucash
09:28:13 *** jervin has quit IRC
09:45:31 *** fell has quit IRC
10:17:23 *** storyjesse has quit IRC
10:23:53 *** boldstripe has quit IRC
10:42:28 *** quitte has joined #gnucash
10:43:31 *** ChanServ sets mode: +v quitte
10:50:05 <quitte> Hi. I just moved GnuCash into my MacOS User Applications folder. It started up in english instead of german.
10:50:24 <quitte> Language settings are okay in the system preferences
10:50:28 *** oozer has joined #gnucash
10:51:30 <quitte> Just to check if it makes a difference I moved it to the System Applications folder. It does not.
11:14:30 *** jervin has joined #gnucash
11:16:56 <chris> quitte https://wiki.gnucash.org/wiki/Locale_Settings
11:17:09 <chris> jralls I have merged moving gnc:debug only
11:20:56 *** jervin has quit IRC
11:25:01 <quitte> chris: I just tried the defaults command with the de,en as it is on that page. No change.
11:30:33 <quitte> Hmm. The gnucash help links to the localized html files.
11:30:57 <quitte> Is the GUI not localized to german, yet?
11:31:34 <gjanssens> quitte: https://bugs.gnucash.org/show_bug.cgi?id=797297
11:31:48 <gjanssens> This appears to be a new bug in the 3.6 release
11:32:52 <gjanssens> And probably macOS specific. I can't reproduce this on Fedora linux
11:34:09 <quitte> okay. Trying the previous version …
11:37:53 *** jervin has joined #gnucash
11:41:39 *** jervin has quit IRC
11:42:06 <quitte> That did indeed work. The older version is also bigger by 8.2 MB
11:43:45 *** jervin has joined #gnucash
12:16:51 *** fell has joined #gnucash
12:16:51 *** ChanServ sets mode: +o fell
12:35:41 <jralls> chris: Your push this morning broke tests. Did you push an incomplete merge?
12:39:14 <jralls> Hmm, not a merge at all. gjannsens do you understand why docker is trying to fetch a non-existent merge commit?
12:47:47 *** quitte has quit IRC
12:51:31 *** quitte has joined #gnucash
12:51:31 *** ChanServ sets mode: +v quitte
13:00:26 <jralls> chris, gjanssens: I think I see the problem. chris merged PR523 after force-pushing and before travis had retrieved the PR code, so the PR test-build fails. Since it's an FF merge the same SHA is on the maint branch and so travis doesn't know it needs to start over from scratch; restarting build 4210 just retries the same fetch.
13:06:52 <jralls> ninja-check is OK locally, so the next push should make the history display look OK again.
13:14:41 *** quitte has quit IRC
13:18:51 *** quitte has joined #gnucash
13:23:14 *** boldstripe has joined #gnucash
13:27:54 *** User_ has joined #gnucash
13:31:56 *** quitte has quit IRC
13:32:23 *** guak has joined #gnucash
13:33:39 *** ypical has joined #gnucash
13:35:28 *** User_ has quit IRC
13:45:59 *** ypical has quit IRC
13:57:08 <gjanssens> ok
13:57:24 <gjanssens> warlord: I'd think two months of bounces should be sufficient, no ?
13:59:58 *** quitte has joined #gnucash
13:59:58 *** ChanServ sets mode: +v quitte
14:00:16 *** quitte has quit IRC
14:19:16 *** gour1 has joined #gnucash
14:21:04 *** gour has quit IRC
14:57:55 *** fell has quit IRC
15:12:57 *** omnireq has joined #gnucash
15:14:44 *** omnireq has quit IRC
15:18:41 <warlord> gjanssens, I think so, too.
15:28:10 *** fell has joined #gnucash
15:28:11 *** ChanServ sets mode: +o fell
15:28:54 *** frakturfreak has joined #gnucash
15:29:55 *** boldstripe has quit IRC
15:55:49 *** jervin has joined #gnucash
16:00:14 *** jervin has quit IRC
16:00:29 *** jervin has joined #gnucash
16:01:58 *** jervin has quit IRC
16:20:06 *** frakturfreak has quit IRC
16:55:23 *** jervin has joined #gnucash
17:04:23 <jralls> chris, I've gotten your wrapqoflog branch fixed, details as comments on https://github.com/christopherlam/gnucash/commit/898a9cdb8e1a8cad34125e6599ff62587297b01b.
17:06:24 *** jervin has quit IRC
17:07:34 *** boldstripe has joined #gnucash
17:10:01 <jralls> gjanssens: I think SWIG may be leaking const char* conversions in Guile. It casts the return value of SWIG_scm2str($input) to const char* but there's no corresponding freearg typemap that casts it back. Barring the case where the C value is going to be put into a static variable the arg should be cast to char* and freed at the end of the wrapped function.
17:13:46 <gjanssens> jralls: sounds reasonable
17:13:57 *** Mechtilde has quit IRC
17:16:08 * gjanssens is impressed by jralls' swig detective work
17:16:56 <jralls> I wasn't detecting, I was trying to remove the cobwebs from my memory about typemaps to get chris's wrap to work.
17:19:13 <gjanssens> :)
17:19:25 <jralls> It may actually be that the const char* typemaps aren't ever applied. Even though QofLogModule is typedeffed as const char* SWIG insisted on applying the plain char* typemap and the compile failed when it went to free it because the compiler knows that it's const.
17:22:54 *** boldstripe has quit IRC
17:27:49 <gjanssens> It's not a straightforward wrap with the macros interfering and the custom typemap.
17:28:16 <gjanssens> I can understand this is not something chris could have figured out.
17:28:27 <gjanssens> Anyway time to go to bed
17:28:31 <gjanssens> See you later
17:30:26 *** gjanssens has quit IRC
18:13:17 *** chris has quit IRC
18:13:17 *** gnomey has quit IRC
18:13:17 *** badger92 has quit IRC
18:13:17 *** puck has quit IRC
18:13:17 *** jerryq has quit IRC
18:13:17 *** chf has quit IRC
18:13:17 *** redarrow has quit IRC
18:13:17 *** Simon has quit IRC
18:13:22 *** chris has joined #gnucash
18:13:22 *** ChanServ sets mode: +v chris
18:13:23 *** badger92 has joined #gnucash
18:13:28 *** Robert847 has joined #gnucash
18:13:29 *** Simon has joined #gnucash
18:13:29 *** ChanServ sets mode: +v Simon
18:13:30 *** jerryq has joined #gnucash
18:13:30 *** redarrow has joined #gnucash
18:13:53 *** chf has joined #gnucash
18:13:55 *** gnomey has joined #gnucash
18:15:22 *** puck has joined #gnucash
18:24:54 *** Robert847 has left #gnucash
18:28:53 *** gour1 has quit IRC
20:10:18 *** guak has quit IRC
20:12:09 <chris> jralls thx for the work on wrapqoflog... i'll fix up and PR when done
20:12:53 <jralls> chris: OK. Are you sure that blocking (strify) will prevent the args from being evaluated?
20:13:04 <chris> yes
20:13:24 <chris> i intend to change definition so that querying qof_debug will only be done *once*
20:13:57 <chris> (define gnc:debug (if debug? (lambda args (gnc_log_debug (strify args))) #f))
20:14:56 <jralls> That's reasonable as it's only set once. OTOH since you set the top-level domain there won't be any recursion, the call will be pretty fast. That does mean that it gets set if *any* domain is set to debug...
20:15:40 <chris> ok i understand very little of this, will await PR comments :)
20:15:54 <jralls> It
20:16:06 <chris> i'm also reviewing your note on commodity-utils.scm wrt cap-gains splits causing price distortion... do we want to fix this? i can try
20:18:40 <jralls> I'm not sure what you think is broken actually is broken, but regardless inserting a new price at the time of the split isn't going to affect anyone's understanding of the basis.
20:19:29 <chris> https://github.com/Gnucash/gnucash/blob/maint/gnucash/report/report-system/commodity-utilities.scm#L93
20:20:16 <jralls> The APR already handles splits correctly. The only other place where it would be useful is engine/capital-gains.cpp and that's an ugly mess... and not in Scheme.
20:21:14 <jralls> s/capital-gains.cpp/cap-gains.c/
20:21:51 <chris> it would affect charts i think, my approach was to test (if (= txn-date (caar result)) [add-to-existing-pricealist-entry] [add-new-pricealist-entry]) but if this is not an issue i'll skip
20:26:48 <jralls> Hmmm. It will depend on the price source. Most users trading stocks will be updating their pricedb with market prices, and those adjust immediately to account for the split so the pricedb will get the right price the next time you run F::Q.
20:29:57 <jralls> average-cost and weighted-average are the ones to worry about, but they must do something close to right or a stock split would screw up the trial balance report and we'd hear about it.
20:32:25 <chris> ok I've added to https://github.com/christopherlam/gnucash/tree/wrapqoflog using your helpful notes; I trust it's now complete
20:33:15 <chris> I may try fix the pricealist and add comment if successful
20:34:00 <jralls> Does it provide the speedup you found, but still log the debug info (and slow down) if you pass --log gnc.report=debug?
20:35:06 <chris> testing...
20:47:21 <chris> it works but the params must be --log gnc=debug
20:56:41 <chris> debug=7s noop=1.7s \o/
20:57:32 <jralls> Didn't you report 10x yesterday? Or was that with a different report?
20:58:54 <jralls> But we need to figure out how to get the log param right. We can't tell users to use gnc=debug, it will make the tracefile far too noisy to be useful.
20:59:11 <chris> same report, not sure why it's faster now
21:00:14 <chris> I can change test to "gnc.report", works well then
21:02:25 <jralls> Well, for reports it does, but it will break gnc:debug in libgnucash/scm.
21:02:39 <chris> ok
21:02:59 <chris> i'll put it up as PR for further discussion anyway then
21:03:33 <jralls> By all means, maybe gjanssens will have an idea about how to find out the current context's QofLogModule.
21:06:55 <jralls> gtg
21:07:31 <chris> ok ttyl
21:28:41 *** oozer has quit IRC
22:09:51 *** jervin has joined #gnucash
22:27:55 *** Aussie_matt has joined #gnucash
22:42:22 *** jervin has quit IRC
22:42:36 *** jervin has joined #gnucash
22:44:13 *** jervin has quit IRC
23:37:20 <chris> warlord: jobs are weird... they belong to customer or vendor, yet we can create any invoice/bill and try attach job which then belong to the job's end-owner rather than originating invoice/bill
23:44:58 <warlord> chris, a job is a type of owner...
23:45:21 <warlord> an invoice can belong to a job, or it can be jobless. a job "passes through" to the job's owner (a customer or vendor)
23:47:47 <chris> then I think the invoice/bill creation is a bit flawed...
23:48:41 <warlord> Why?
23:48:58 <chris> say I have customer with open job
23:49:33 <warlord> "I have customer with open job". Okay...
23:50:09 <chris> I can select another customer/vendor, new invoice/bill, and choose the first customer's job
23:50:36 <chris> more fun: cust-A (USD) has job job-A
23:51:00 <warlord> If you select a job it should change the invoice's "owner" to the job's owner.
23:51:28 <warlord> so if you select cust-A, and then select Job-1 (which is owned by cust-B), the invoice should change over to cust-B.
23:51:47 <chris> ok then UI must reflect this
23:52:06 <warlord> If it doesnt then its a bug. It used to.
23:52:12 <warlord> s/bug/regression/
23:55:13 <chris> or New Bill, choose any Vendor, choose a Customer-job, and resulting is an Invoice
23:55:18 <chris> you get the idea...
23:56:27 <warlord> Well, that's not surprising.
23:57:48 <warlord> the only thing special about "create invoice" vs "create bill" is the default search for customer or vendor. If you select a customer then the job search is supposed to limit (by default) to that customer's jobs. But if you reset and go beyond then yes, you can reset the object.