2017-04-20 GnuCash IRC logs

01:07:34 *** mlncn has joined #gnucash
01:29:31 *** fell_ has joined #gnucash
01:31:22 *** fell has quit IRC
01:33:02 *** Mechtilde has joined #gnucash
01:37:47 *** O01eg has quit IRC
01:41:02 *** Mechtilde has quit IRC
01:41:21 *** Mechtilde has joined #gnucash
01:48:47 *** warlord has quit IRC
01:48:53 *** gncbot has joined #gnucash
01:48:55 *** warlord has joined #gnucash
01:58:04 *** Mechtilde has quit IRC
02:04:22 *** fell_ is now known as fell
02:04:49 <fell> mikee or jralls, can you /op gncbot?
02:05:18 <fell> jralls_afk
02:52:20 *** pilotauto has quit IRC
02:52:59 *** gr8kodr_ has joined #gnucash
02:54:39 *** gr8kodr has quit IRC
02:57:32 *** pilotauto has joined #gnucash
03:00:37 *** gjanssens has joined #gnucash
03:00:37 *** ChanServ sets mode: +o gjanssens
03:39:35 *** fabior has joined #gnucash
04:49:15 *** pilotauto has quit IRC
05:21:28 *** fekepp has quit IRC
05:21:51 *** fekepp has joined #gnucash
06:23:20 *** fabior_ has joined #gnucash
06:23:51 *** fabior has quit IRC
06:26:53 *** fabior__ has joined #gnucash
06:27:23 *** fabior_ has quit IRC
06:34:22 *** Jimraehl1 has joined #gnucash
06:34:48 *** Mechtilde has joined #gnucash
06:35:05 *** Jimraehl1 has left #gnucash
06:37:01 *** fekepp has quit IRC
07:03:44 *** Mechtilde has quit IRC
07:06:13 *** karelk has quit IRC
07:15:56 *** fabior__ has quit IRC
07:20:20 *** Mechtilde has joined #gnucash
07:28:37 *** mlncn has quit IRC
07:50:43 *** rickoehn has joined #gnucash
08:00:00 *** mlncn has joined #gnucash
08:18:54 *** Aussie_matt has joined #gnucash
08:24:30 *** Mechtilde has quit IRC
08:29:43 <Luke> anyone can help ?
08:36:57 *** Mechtilde has joined #gnucash
08:45:30 <weasel> hm. in the ledger view, how do I clear a table without a mouse?
09:08:25 *** fabior has joined #gnucash
09:12:38 *** fekepp has joined #gnucash
09:19:17 <warlord> Luke: what's the question?
09:19:26 <warlord> weasel: what do you mean "clear a table"?
09:30:30 *** fabior has quit IRC
09:32:22 <weasel> erm
09:32:26 <weasel> clear a transaction
09:32:42 <weasel> (doing too many things in parallel)
09:43:23 *** gr8kodr_ has quit IRC
09:52:01 <warlord> weasel: what exactly do you mean by 'clear a transaction'? Do you mean delete it? Do you mean "mark it cleared"? ...
09:52:25 <weasel> the latter
09:52:49 <warlord> No, there is no way to mark a transaction as cleared without using the mouse.
09:52:56 <weasel> (deleting is easy - A-n d)
09:52:59 <weasel> ah, too bad. thanks
09:54:07 <warlord> Yes, deleting is easy.
09:55:34 *** Aussie_matt has quit IRC
10:04:29 *** kael has joined #gnucash
10:11:26 <fell> gjanssens, can you /op gncbot?
10:11:40 *** ChanServ sets mode: +qo warlord warlord
10:11:42 *** warlord sets mode: +o gncbot
10:11:46 <warlord> fell: I can ;)
10:11:51 <warlord> @op fell
10:11:52 *** gncbot sets mode: +o fell
10:12:06 <gjanssens> I can too, but was afk for a couple of minutes :)
10:13:16 <fell> Cools! BTW you were recently every night disconnected, warlord. A new feature?
10:16:55 <warlord> I was on holiday all last week and didn't turn my laptop on for most of the trip. Is that what you mean?
10:19:34 <fell> No, gncbot and warlord disappered e.g. today 5:48 UTC
10:21:21 <warlord> My guess is that AT&T does some nightly maintenance.
10:21:21 <Luke> anyone of you managed to setup for VAT return ?
10:22:47 <warlord> fell: it wasn't out long enough to register an outage in MRTG
10:47:14 *** fabior has joined #gnucash
10:56:23 *** Mechtilde has quit IRC
11:09:05 *** Mechtilde has joined #gnucash
11:52:44 *** Luke has quit IRC
11:54:49 *** jralls_afk is now known as jralls
12:02:11 <jralls> @tell Luke You keep asking that. No one who participates here on IRC does UK/Australia VAT, but there are several of each including an Australian Chartered Accountant on the gnucash-user mailing list. Subscribe to that and ask for help there.
12:02:11 <gncbot> jralls: The operation succeeded.
12:03:24 <jralls> warlord: www.gnucash.org came back late last week, Friday or Saturday. Someone mentioned it here so you should be able to find it in the logs.
12:08:02 <warlord> jralls: that's fine. nobody emailed -devel or -users.
12:08:07 <warlord> (not a big deal)
12:16:57 *** Mechtilde has quit IRC
12:24:55 *** O01eg has joined #gnucash
12:30:04 <weasel> what's the easiest/quickest way to get a report like the balance sheet but only for a few accounts?
12:30:49 <warlord> weasel: Run the balance sheet and choose the accounts you want to include.
12:31:12 <weasel> how do I make this selection?
12:31:39 <weasel> ah, options
12:32:44 <weasel> thanks
12:35:38 <gjanssens> jralls: I've started the implementation of something similar to gnc_dmy2timespec_neutral in c++
12:35:49 <gjanssens> I'd like your input on a few more details
12:36:06 <jralls> gjanssens: OK.
12:36:10 <gjanssens> I've pushed what I've done so far here: https://github.com/gjanssens/gnucash/commit/a71c51164437dffc2a938d43557a34941a187366
12:36:48 <gjanssens> What's there will only allow one to create a GncDateTime from a GncDate with enum for the part of day preference
12:37:21 <gjanssens> That conversion is pretty simple
12:37:47 <gjanssens> Reading gnc_ymd2timespec_neutral it appears to do some additional math for extreme timezones
12:38:13 <gjanssens> It's not clear to me whether I should add this in my c++ code as well
12:38:52 <jralls> gjanssens: The "extreme" timezones will break if you don't.
12:39:02 <gjanssens> How is that ?
12:39:35 <jralls> Because 1100Z isn't the same day in those TZs.
12:40:38 <jralls> So a transaction created in Kiribati (Z+14) today will show up in the register as yesterday.
12:40:44 <gjanssens> Perhaps I need an answer one step earlier in the process then
12:41:18 <gjanssens> Where in gnc_dmy2timespec_neutral does the timezone appear in the picture ? The user only passes a day, month and year
12:41:51 <gjanssens> And similarly where does a timezone first enters the picture for a new GncDateTime ?
12:42:04 <gjanssens> enter*
12:43:12 <gjanssens> I'm creating the internal LDT as m_time(unix_epoch, utc_zone)
12:43:19 <gjanssens> so it's UTC by default
12:43:32 <gjanssens> (or so I assume)
12:43:42 <jralls> Creating a GncDateTime without specifying a TZ creates the GncDateTime with the default TZ, the one that the computer
12:44:14 <jralls> computer's clock is set to.
12:45:24 <gjanssens> Oh, so I probably should initialize my m_time *without* the utc_zone parameter then, like it happens in GncDateTimeIpml (const struct tm tm)
12:45:42 <gjanssens> And then adjust the timezone as required to avoid day jumping?
12:46:41 <gjanssens> That would replicate a GncDateTime with a time setting closer to what gnc_dmy2timespec_neutral produces.
12:47:06 <jralls> No, you're calling tzp.get(), which returns the computer's default TZ, so m_time is in that TZ not Z.
12:48:00 <jralls> Also "offset" has special meaning as the difference between the local TZ and Z, so you should name that variable something else, "time_of_day" perhaps.
12:48:30 <gjanssens> Oops right.
12:49:41 <jralls> Heh, I see that you copied-and-pasted the neutral time_of_day block to end without changing "10" to "23".
12:50:17 <gjanssens> Yay for proofreading :)
12:51:11 <jralls> ;-)
12:51:23 <gjanssens> jralls: Is TimeZoneProvider handling the day jumping corrections ?
12:51:34 <gjanssens> Or should I do them myself still ?
12:52:06 *** storyjesse has quit IRC
12:54:04 <jralls> No. TZP just gets the TZ info from the OS and provides an offset to the GncDateTime. You need to query the offset and adjust time_of_day if it's outside of -11h-+13h.
12:55:04 <jralls> There's another flaw in your logic: While *neutral* needs to be in Z, begin and end need to be in local.
12:55:54 <gjanssens> Ok. Missed that as well.
12:56:49 *** jralls has quit IRC
12:57:30 *** jralls has joined #gnucash
12:57:31 *** ChanServ sets mode: +o jralls
12:57:46 <gjanssens> jralls: welcome back :)
12:57:55 <gjanssens> And that probably answers my next question: none of the other constructors for GncDateTime{,Impl} does timezone corrections. Is that because they are in local as well ?
12:58:17 <jralls> Yes.
12:59:21 <gjanssens> Right. So only neutral needs the special treatment (and I better document this more clearly)
12:59:46 <jralls> Well, some of them. struct tm includes TZ and std::string can if you like. If there's no TZ then it defaults to local.
13:02:29 <jralls> BRB.
13:08:52 <jralls> B
13:13:58 <gjanssens> jralls: I'm slow to grasp this :(
13:14:46 <gjanssens> So neutral times should be in utc (Z) and have time set to 10:59. Is that correct ?
13:15:02 <jralls> Right.
13:15:33 <jralls> That's so that they'll always fall in the same day for the vast majority of users.
13:16:27 <gjanssens> Ok. And after "PTime temp(date->m_greg, time_of_day)" will time hold any timezone information ?
13:16:51 <jralls> Begin and End are used for setting the accounting and report periods, so they should be in local to align with users
13:17:01 <jralls> sigh. with users' expectations.
13:17:23 <gjanssens> Or will this only be added in the call to LDT(m_time, tz) ?
13:17:54 <gjanssens> Sorry, in my code that's LDT(temp, tz)
13:18:10 <jralls> I need to look up PTime's doc. Just a sec...
13:18:35 <gjanssens> I'm just trying to figure out whether creating a PTime with the correct day and time, combined with an LDT constructor using utc_zone will be sufficient
13:20:16 <gjanssens> jralls: from the header file: Time type with no timezone or other adjustments
13:20:25 *** Mechtilde has joined #gnucash
13:20:27 <gjanssens> So that should be good to go
13:27:43 <gjanssens> jralls: my updated code can be found here: https://github.com/gjanssens/gnucash/commit/41f5c20
13:35:07 <gjanssens> jralls: Is there a useful test to check whether a GncDate is properly initialized or should we assume an invalid GncDate can't exist ?
13:35:26 <gjanssens> I'm asking because my new function accepts a GncDate as input
13:35:48 <gjanssens> A pointer to it currently, but I'm tempted to drop the pointer part for easier chaining
13:35:52 <jralls> OK, I think that will work. Just needs some unit tests.
13:36:20 <gjanssens> Unit tests -> obviously :) I won't do the final push without them
13:36:23 <jralls> Much better to use references where possible. Then you don't have to check for nullptr.
13:37:14 <gjanssens> Yes, a reference makes more sense here, but if I understood Meyers correctly a const reference induces a copy. So should I drop the const part ?
13:37:57 <jralls> An invalid GncDate can't exist, the constructor will throw if you try.
13:38:12 <gjanssens> Ok, that's one good thing :)
13:38:43 <jralls> Uh, where does Meyers say a const ref will copy the object?
13:39:17 <jralls> The whole point of refs, const or otherwise, is that it copies only the address.
13:39:44 <gjanssens> I read something along those lines in his Modern Effective C++. I'll see if I can find it again.
13:40:14 <gjanssens> It had something to do with it not being possible to guarantee constness for a reference in some circumstances.
13:40:35 <gjanssens> Perhaps this is only when using universal references. I don't remember very clearly.
13:42:11 <gjanssens> BRB
13:45:42 <jralls> Perhaps you're thinking of the discussion of move semantics? One can't move a const because that would violate constness.
13:52:12 *** fekepp has quit IRC
14:04:20 *** fabior has quit IRC
14:04:56 *** frakturfreak has joined #gnucash
14:08:14 <gjanssens> B
14:09:04 <gjanssens> jralls: I think that was it indeed. I'm slow to fully grasp these new semantics unfortunately.
14:09:22 <gjanssens> So const to a ref it will be.
14:10:33 <jralls> OK. I have some suggestions for your code. Shall I make comments on the commit?
14:12:11 *** kael has quit IRC
14:12:30 *** kael has joined #gnucash
14:14:21 <gjanssens> Please do.
14:23:01 *** fekepp has joined #gnucash
14:26:24 *** kael has quit IRC
14:32:31 *** kael has joined #gnucash
14:32:37 *** Mechtilde has quit IRC
14:40:35 <gjanssens> jralls: tx for the feedback. See my replies on the commit for why it won't work as is...
14:52:33 *** inudv__ has quit IRC
14:52:51 *** fekepp has quit IRC
15:10:29 *** fekepp has joined #gnucash
15:21:05 *** Jacques has joined #gnucash
15:33:23 *** hhn10 has joined #gnucash
15:35:11 <gjanssens> jralls: fyi I am running ninja-build check to ensure swapping the two classes didn't mess anything up
15:35:32 <gjanssens> I'm getting the same test error in gnc-datetime as Bob reported recently
15:35:48 <jralls> The one about TZ?
15:36:11 *** Jacques has quit IRC
15:36:27 <gjanssens> Yes, and running TZ=America/LosAngeles ninja-build check doesn't fix it
15:36:39 <gjanssens> Instead I get several additional errors in that case
15:36:58 <gjanssens> The following tests FAILED:
15:36:59 <gjanssens> 2 - test-qof (OTHER_FAULT)
15:37:01 <gjanssens> 10 - test-gnc-datetime (Failed)
15:37:02 <gjanssens> 32 - test-engine (OTHER_FAULT)
15:37:04 <gjanssens> 85 - sqlite3test (SEGFAULT)
15:37:34 <gjanssens> I can pastbin the full testresult if you like
15:38:26 <gjanssens> Specifically for the gnc-datetime test failure the offsets remain the same with or without setting TZ
15:41:31 <gjanssens> I'm in a slightly different timezone from Bob. He was getting 0, 0, and 3600. I'm getting 3600, 3600 and 7200 respectively as actual offsets
15:41:32 <jralls> That's an interesting change. Does that happen on origin/master?
15:41:37 <gjanssens> yes
15:41:40 <gjanssens> Oh wait
15:41:47 <gjanssens> I have to check first
15:45:41 <gjanssens> jralls: Confirmed. It also happens on origin/master
15:46:18 <gjanssens> Note Bob was using make, I'm using ninja-build
15:47:01 <gjanssens> Maybe adding TZ with make would work. Haven't tested that.
15:47:57 <jralls> It shouldn't. First make sure that America/LosAngeles is a valid TZ on your system.
15:50:26 <gjanssens> Duh it isn't :( That should be America/Los_Angeles
15:50:28 <gjanssens> Retrying...
15:51:19 <gjanssens> Phew, that fixed it including the other tests that failed (test-qof, test-engine)
15:51:38 <gjanssens> It seems our tests don't cope well with an invalid TZ value
15:52:16 <gjanssens> Note the sqlite3test continues to segfault. Don't know why but it only worked on the very first test run.
15:53:22 <gjanssens> That's a python-bindings test, which I'll ignore for now.
15:53:42 <gjanssens> Back to what I was doing...
16:10:48 <gjanssens> jralls: did you see my final question on github concerning the switch statement ?
16:17:36 <jralls> Yes, I was answering it when you diverted my attention with the TZ problem... and then my brain wandered off to something else, sorry.
16:21:32 <gjanssens> np, I know the feeling...
16:40:16 <gjanssens> jralls: question on unit tests... to verify the result of my constructor, can I use the "format" member function (which gets tested only later) ?
16:41:05 <gjanssens> Or would that make the test less strong (as that would use two members of the same object being tested) ?
16:42:24 *** frakturfreak has quit IRC
17:02:35 <gjanssens> jralls: would you like to see my final result once more before I commit to code ?
17:03:44 <gjanssens> That would be https://github.com/gjanssens/gnucash/commit/3526e00cdf3f693cc0fb12c5bd4bc2df46437b8d
17:04:20 <jralls> gjanssens: It wouldn't weaken the test itself, but if format() has a problem it might make figuring out a future failure harder.
17:04:33 <jralls> gjanssens: Looking that the commit now...
17:05:06 <gjanssens> jralls: there's still a separate test for format that's not dependent on my new constructor
17:05:22 <gjanssens> So if there's a problem with format() that should appear there as well.
17:06:20 <gjanssens> Perhaps I could add my constructor tests after the format test, or alternatively add a comment to inform others an independent format() test follows the constructor tests
17:08:13 <jralls> Right. So if format has a problem it will cause two tests to fail (fortunately GoogleTest runs all of the tests) and one might waste some time chasing down why the first one failed before realizing that it was format's fault.
17:08:35 <jralls> A minor concern, especially if it makes writing the other test easier.
17:10:36 <gjanssens> Let me just add a comment to remind us about this if needed.
17:11:22 *** mlncn has quit IRC
17:21:08 <gjanssens> Ok, with the last minor editorial fixes out of the way I have pushed this to code.
17:21:36 <gjanssens> Thanks for your feedback and coaching on this one jralls !
17:21:54 <jralls> You're welcome. Good work!
17:22:58 <gjanssens> My next project will be moving the string-to-date conversion code from the csv importer to gnc-datetime
17:23:34 <gjanssens> And make the csv importer use GncDate instead of TimeSpec/time64
17:24:01 <gjanssens> But that will be some other time. It's getting late here.
17:24:01 <jralls> Sounds good.
17:24:20 <jralls> Yeah, I was thinking it was about your bedtime.
17:24:50 <gjanssens> I'll do as with the new constructor and let you review before I push.
17:26:38 <gjanssens> So... see you later :D
17:27:11 *** gjanssens has quit IRC
17:52:35 *** tuxd00d has quit IRC
17:54:56 *** rickoehn has quit IRC
18:44:28 *** kael has quit IRC
18:51:31 *** pilotauto has joined #gnucash
19:34:04 *** tuxd00d has joined #gnucash
19:55:20 *** O01eg has quit IRC
20:04:41 *** tuxd00d has quit IRC
20:07:01 *** jchonig has quit IRC
20:08:37 *** O01eg has joined #gnucash
20:16:17 *** mlncn has joined #gnucash
20:17:31 *** hhn11 has joined #gnucash
20:18:15 *** hhn10 has quit IRC
20:25:38 *** mlncn has quit IRC
21:19:49 *** User_ has joined #gnucash
21:36:33 *** User_ has quit IRC
22:42:16 *** kael has joined #gnucash
23:34:49 *** O01eg has quit IRC
23:57:50 *** O01eg has joined #gnucash