2017-01-10 GnuCash IRC logs

00:10:54 *** O01eg has quit IRC
01:12:34 *** Mechtilde has joined #gnucash
01:44:51 *** Mechtilde has quit IRC
01:59:43 *** iliv has joined #gnucash
02:26:34 *** iliv has quit IRC
03:02:16 *** fekepp has quit IRC
03:02:23 *** fekepp has joined #gnucash
03:06:25 *** mrklintscher has quit IRC
03:19:45 *** cartsoftware has quit IRC
03:24:09 *** mrklintscher has joined #gnucash
03:34:56 *** fekepp has quit IRC
03:37:20 *** iliv has joined #gnucash
03:42:13 *** cartsoftware has joined #gnucash
03:46:54 *** gjanssens has joined #gnucash
03:46:54 *** ChanServ sets mode: +o gjanssens
03:51:27 *** fabior has joined #gnucash
03:54:38 *** fabior has quit IRC
03:54:57 *** fekepp has joined #gnucash
04:03:23 *** fekepp has quit IRC
04:09:35 *** fabior has joined #gnucash
04:12:03 *** fekepp has joined #gnucash
04:14:24 *** iliv has quit IRC
04:26:22 *** iliv has joined #gnucash
05:07:12 *** iliv has quit IRC
05:07:20 *** iliv has joined #gnucash
05:16:02 *** fell has joined #gnucash
05:23:11 *** iliv has quit IRC
05:29:00 *** iliv has joined #gnucash
06:20:05 *** iliv has quit IRC
06:26:29 *** gncbot sets mode: +o fell
06:33:05 *** fell has quit IRC
06:33:29 *** fekepp has quit IRC
06:33:58 *** fell has joined #gnucash
06:33:58 *** gncbot sets mode: +o fell
06:51:58 *** Jimraehl1 has joined #gnucash
06:56:08 *** fekepp has joined #gnucash
07:06:34 *** hoijui has joined #gnucash
07:33:35 *** fabior has quit IRC
07:34:59 *** fekepp has quit IRC
07:35:02 *** fekepp has joined #gnucash
07:52:30 *** rickoehn has joined #gnucash
07:54:48 *** fekepp1 has joined #gnucash
07:55:21 *** fekepp has quit IRC
07:55:22 *** fekepp1 is now known as fekepp
08:02:03 *** rubdos has quit IRC
08:03:15 *** rickoehn has quit IRC
08:15:17 *** rubdos has joined #gnucash
08:16:47 *** iliv has joined #gnucash
08:22:02 *** rickoehn has joined #gnucash
09:05:35 *** fekepp has quit IRC
09:07:18 *** hoijui has quit IRC
09:16:52 *** fekepp has joined #gnucash
09:23:53 *** iliv has quit IRC
09:24:49 *** mlncn has quit IRC
09:28:23 *** fabior has joined #gnucash
09:39:31 *** fabior has quit IRC
09:54:26 *** fabior has joined #gnucash
10:06:20 *** Mechtilde has joined #gnucash
10:09:02 *** mlncn has joined #gnucash
10:32:05 *** storyjesse has joined #gnucash
10:36:20 *** O01eg has joined #gnucash
10:50:12 *** storyjesse has quit IRC
11:12:35 *** fekepp has quit IRC
11:41:03 *** iliv has joined #gnucash
11:45:54 *** iliv has quit IRC
12:10:15 *** hoijui has joined #gnucash
12:39:40 *** iliv has joined #gnucash
12:40:23 <gjanssens> jralls: ping
12:40:36 <jralls> gjanssens: Hi.
12:40:39 <gjanssens> I'm having some issues with the new date time code
12:40:47 <jralls> OK.
12:41:25 <gjanssens> In short, I'm calling gnc_dmy2timespec_neutral with some invalid values
12:41:38 <gjanssens> This triggers an exception, which I'm expecting
12:41:42 <jralls> maint or master?
12:41:46 <gjanssens> master
12:42:08 <gjanssens> It's partly related to Bob's recent questions on the importer
12:43:38 <gjanssens> I see that in gnc-datetime.cpp you're catching boost::gregorian::bad_year and rethrowing it as std::invalid_argument
12:44:04 <gjanssens> I was counting on that behaviour in my code by only checking for std::invalid_argument
12:44:37 <gjanssens> However by setting a bad day_of_year, the datetime code will throw boost::gregorian::bad_day_of_year
12:44:56 <gjanssens> That's to be expected obviously because there's no rethrowing for that exception
12:45:49 <gjanssens> I wonder, was it your intention to reduce throwing to std::invalid_argument for the whole date-time code ? Or should calling code catch all the possible boost date/time related errors ?
12:46:58 <gjanssens> To experiment, I added extra catch clauses to 2 of the 3 boost::gregorian::bad_year catch clauses you had there, but that doesn't appear to be enough
12:47:25 <gjanssens> There are still boost::gregorian::bad_day_of_year exceptions slipping through.
12:47:25 <jralls> I guess I wasn't thinking broadly enough, and assumed that passed-in dates would at least be well formed, just potentially with an invalid year.
12:47:35 *** hoijui has quit IRC
12:47:46 <gjanssens> We can't guarantee that on import data
12:47:56 <jralls> Right.
12:48:03 *** hoijui has joined #gnucash
12:48:35 <gjanssens> The question is, who is responsible in that case. The importer or the gnc-datetime code ?
12:49:29 <gjanssens> gnc-datetime looks to me like the best place as it would also catch similar issues for other things like a user entering a bad date in a user field
12:49:46 <gjanssens> (Got called away for a sec)
12:50:09 <jralls> Well, ultimately the importer is. But we want to hide that it's implemented with boost::date_time so that if the committee approves std::date_time we can switch without having to chase down a bunch of code outside of libqof.
12:51:30 <jralls> So yes, we should catch and re-throw all boost::date_time exceptions. Then the C++/C interface needs to catch the std::exceptions and handle the error in a C way.
12:55:06 <jralls> What GncDateTime function are you calling that has the leaking boost exception even after you added the additional catches?
12:55:11 <gjanssens> Ok I understand
12:55:34 <gjanssens> Can I leave the changes in date_time to you ?
12:55:35 *** hoijui has quit IRC
12:56:01 *** hoijui has joined #gnucash
12:56:20 <jralls> Yes. Where can I get your tests?
12:56:25 <gjanssens> A useful test is calling gnc_dmy2timespec_neutral with any kind of out of range values for day month of year
12:56:46 <gjanssens> s/of/or/
12:57:30 <jralls> Ah, you haven't extended the unit tests, then.
12:58:06 <gjanssens> Not :(
12:58:40 <gjanssens> But I have tests that will trigger this due to the date parsing code in the csv importer in my cpp branch
12:58:58 <gjanssens> I'll push that code to my private github repo in a minute
13:00:03 <gjanssens> To be complete, I started looking for the unit tests, but didn't immediatly find them and decided to ask here first...
13:00:45 <jralls> OK. I'm in the middle of getting rid of the launcher script in the Mac app bundle to try and make codesigning work better. That should be done soon, so I'll start on catching all of the boost exceptions this afternoon or Thursday.
13:01:03 <jralls> Real life permitting, as usual. ;-)
13:01:27 <gjanssens> No rush, I have my own set of issues to chase here in the importer
13:02:04 <gjanssens> During these tests I stumbled on the boost exceptions, but they're not blocking me
13:02:21 <jralls> Hey, lmat! Have you made any progress on timespec->time64?
13:04:54 *** mrklintscher has quit IRC
13:21:08 *** hoijui has quit IRC
13:21:34 *** hoijui has joined #gnucash
13:30:25 *** iliv has quit IRC
13:30:32 *** iliv has joined #gnucash
13:32:39 <gjanssens> jralls: I'm about to leave because we've got visitors this evening. However...
13:33:48 <gjanssens> You're throwing invalid_argument. There's also out_of_range. Which one do you consider best ?
13:35:04 <gjanssens> I would have taken out_of_range on first reflection, but I'm curious to your reasoning for invalid_argument.
13:37:53 *** mlncn has quit IRC
13:38:08 <jralls> gjanssens: I suppose either is reasonable. I chose invalid_argument because it describes the cause, that an invalid date got passed in.
13:39:49 <jralls> Out of range does describe the errors in question at hand. I don't know off hand if it describes all of the exceptions boost::date_time can throw.
13:39:50 *** hoijui has quit IRC
13:40:17 *** hoijui has joined #gnucash
13:42:06 *** hoijui has quit IRC
13:44:02 *** iliv has quit IRC
13:45:15 *** hoijui has joined #gnucash
13:49:29 *** fabior has quit IRC
13:51:33 *** hoijui has quit IRC
13:52:59 *** hoijui has joined #gnucash
14:05:22 *** hoijui has quit IRC
14:05:41 *** hoijui has joined #gnucash
14:23:51 *** mlncn has joined #gnucash
14:59:58 *** fekepp has joined #gnucash
15:07:15 *** cartsoftware has quit IRC
15:17:40 *** Explorer05_ has joined #gnucash
15:19:15 *** rickoehn has quit IRC
15:19:16 *** hoijui has quit IRC
15:19:21 <Explorer05_> Hello. I am new to personal finance management, and GnuCash. As I am starting to enter 2017 information into it, I am wondering how do I enter purchase refunds, like if I take something back to the store? How should that be treated, or what is the best way?
15:19:47 *** rickoehn has joined #gnucash
15:19:49 *** hoijui has joined #gnucash
15:22:28 *** rickoehn has quit IRC
15:22:35 *** rickoehn has joined #gnucash
15:23:01 *** rickoehn has quit IRC
15:23:10 *** rickoehn has joined #gnucash
15:27:19 *** rickoehn has joined #gnucash
15:32:34 <warlord> Explorer05_: IANAA but I record those as negative expenses.
15:37:35 <gjanssens> jralls: from http://www.boost.org/doc/libs/1_41_0/doc/html/date_time/gregorian.html :
15:38:03 <gjanssens> jralls: "The construction of a date validates all input so that it is not possible to construct an 'invalid' date. That is 2001-Feb-29 cannot be constructed as a date. Various exceptions derived from std::out_of_range are thrown to indicate which aspect of the date input is invalid."
15:38:03 *** hoijui has quit IRC
15:38:30 *** hoijui has joined #gnucash
15:38:37 <gjanssens> It doesn't state no other exceptions are thrown though...
15:38:51 *** hoijui has quit IRC
15:39:10 *** hoijui has joined #gnucash
16:00:35 *** cartsoftware has joined #gnucash
16:13:12 <gjanssens> On the other hand it may not be necessary to rethrow if indeed all exceptions would be based on std::out_of_range
16:13:40 <gjanssens> We could just promote that exception as the one being thrown by our own datetime code
16:13:55 <gjanssens> Anyway, time for bed. See you later...
16:25:04 *** CharlesIC has joined #gnucash
16:25:26 <CharlesIC> for some reason, gnucash has stopped working correctly. every time i download transactions now, i cant categorize or do anything with them b/c it says they are open in another register
16:25:33 <CharlesIC> what in the world is it talking about?
16:26:44 <warlord> CharlesIC: exit and restart? It sounds like gnucash thinks you've got an open register somewhere... Or something stuck.
16:26:56 <warlord> Although... what version of gnucash? And what OS/Distro?
16:27:02 <CharlesIC> f25
16:27:06 <CharlesIC> 2.6.15
16:27:15 <warlord> What backend storage mechanism?
16:39:35 *** gjanssens has quit IRC
16:40:58 *** rubdos has quit IRC
16:49:23 *** hoijui has quit IRC
16:49:23 <CharlesIC> i think it works now
16:49:24 <CharlesIC> thanks
16:49:26 *** CharlesIC has quit IRC
16:50:49 *** hoijui has joined #gnucash
16:54:25 *** fekepp has quit IRC
16:54:54 *** fekepp has joined #gnucash
17:03:47 *** Mechtilde has quit IRC
17:11:32 *** mlncn has quit IRC
17:35:48 *** hoijui has quit IRC
17:36:14 *** Explorer05_ has quit IRC
18:07:16 *** mlncn has joined #gnucash
18:32:52 *** kael has joined #gnucash
18:39:11 *** kael has quit IRC
19:13:08 *** mlncn has quit IRC
19:21:49 *** fekepp has quit IRC
19:21:51 *** fekepp has joined #gnucash
19:37:00 <jralls> @tell gjanssens I grepped all the exceptions in boost::date_time. There are locally derived ones from std::out_of_range and std::logic_error; they also throw out_of_range, ios_base::failure, invalid_argument, and runtime_error directly.
19:37:00 <gncbot> jralls: The operation succeeded.
19:37:18 *** CharlesIC has joined #gnucash
19:37:19 <CharlesIC> hi
19:37:26 <CharlesIC> is there any way to copy a bunch of transactions from one book to another?
19:37:30 <CharlesIC> for a particular account?
19:37:35 *** CDB-Man has quit IRC
19:37:50 *** CDB-Man has joined #gnucash
19:58:15 <jralls> CharlesIC: Not easily. The closest you could get would be to export the transactions as CSV then massage the CSV file a bit so that the importer can digest it and import it into the other book.
19:59:18 <jralls> You have to massage because the exporter writes multi-line transactions to accommodate arbitrary numbers of splits but the CSV importer doesn't know how to read them. It can handle only two-split transactions.
19:59:50 <jralls> There are some CSV-to-QIF and CSV-to-OFX tools out there than might be helpful as well.
20:00:49 <CharlesIC> yeah, that's such a pain :/
20:00:52 <CharlesIC> i dont know why they never add that
20:03:37 *** rickoehn has quit IRC
20:04:04 *** mlncn has joined #gnucash
20:24:46 *** mlncn has quit IRC
20:32:46 <CharlesIC> is there a way to copy a single transaction to another window?
20:32:48 <CharlesIC> and paste it?
20:33:16 <CharlesIC> err instance?
20:33:18 <CharlesIC> it seems not :(
20:55:13 <jralls> Copy and paste with the clipboard should work.
20:56:01 <jralls> Bulk copying isn't implemented because it's almost always a bad idea.
20:57:37 <jralls> The cut/copy/paste transaction actions are in the Transaction menu. There are special keyboard shortcuts that are displayed in the menu (it's control-command-C/X/V on a Mac).
21:23:24 <CharlesIC> jralls,
21:23:34 <CharlesIC> the issue is copying a transaction from one instatiation to another:(
21:23:40 <CharlesIC> i have two open right now because it's between two books
21:23:42 <CharlesIC> so what do i do?