2017-11-21 GnuCash IRC logs

00:17:14 *** Trel has quit IRC
00:17:25 *** Trel has joined #gnucash
00:34:20 *** jotrago has joined #gnucash
01:29:19 *** Mechtilde has joined #gnucash
01:39:44 *** fell has quit IRC
01:40:30 *** fell has joined #gnucash
02:03:10 *** Mechtilde has quit IRC
02:29:18 *** Simon has quit IRC
02:49:40 *** storyjesse has joined #gnucash
02:56:10 *** bertbob has quit IRC
02:56:30 *** fekepp has quit IRC
02:58:07 *** Simon has joined #gnucash
02:58:19 *** bertbob has joined #gnucash
03:02:13 *** Simon has quit IRC
03:04:39 *** Simon has joined #gnucash
03:24:29 *** gjanssens has joined #gnucash
03:24:29 *** ChanServ sets mode: +o gjanssens
03:24:35 <gjanssens> .
03:46:04 *** Mechtilde has joined #gnucash
04:29:04 *** carwynnelson has joined #gnucash
05:13:54 *** fabior has joined #gnucash
05:19:12 *** pilotauto has quit IRC
06:06:17 *** carwynnelson has quit IRC
06:33:55 *** fabior has quit IRC
08:26:59 *** Jimraehl1 has joined #gnucash
08:29:09 *** Jimraehl1 has left #gnucash
09:06:48 *** jotrago has quit IRC
09:15:37 <chris> lmat: thx
09:23:30 *** kael has joined #gnucash
09:26:13 *** jchonig has quit IRC
09:27:31 *** jchonig has joined #gnucash
09:28:53 *** jotrago has joined #gnucash
09:31:37 <chris> lmat: https://github.com/Gnucash/gnucash/blob/unstable/libgnucash/app-utils/gnc-sx-instance-model.c#L85 is a C func that expects timepairs - need time64 conversion
09:32:17 <chris> sx-summary.scm calls it
09:36:23 <chris> well actually it's the function gnc_sx_all_instantiate_cashflow_all which takes 2 timepairs and returns a GHashTable
09:47:56 *** storyjesse has quit IRC
09:48:11 <chris> yup just tested, gnc_sx_all_instantiate_cashflow_all expects 2 timepairs
10:09:58 *** chris-laptop has quit IRC
10:14:09 *** Cuare has joined #gnucash
11:10:25 *** Mechtilde has quit IRC
12:06:09 *** kael has joined #gnucash
12:08:35 *** kael has quit IRC
12:25:47 <jralls> chris: All of the gnc_sx functions take either GDate or time64; it's GDates in the case of gnc_sx_all_instantiate_cashflow_all. What's happening is that Swig sees the GDate arg and looks it up in common/base-typemaps.i where it finds on L57 %typemap(in) GDate "$1 = gnc_timepair_to_GDate($input);" and inserts a call to that in the wrapper in {builddir}/libgnucash/app-utils/swig-app-utils-guile.c.
12:28:06 <jralls> chris: The fix is to change gnc_timepair_to_GDate() (it's in libgnucash/engine/engine-helpers.[ch]) to gnc_time64_to_GDate() and change the typemap. That will break every call in Scheme to C functions taking GDate until you fix them to pass a time64 instead of a timepair.
12:30:37 *** jchonig has quit IRC
12:31:30 *** jchonig has joined #gnucash
12:37:48 <lmat> chris: I made the changes mentioned in my time64-ftw branch. I rebased my work onto your work, so you can just start working from that point if you like.
12:49:23 *** Mechtilde has joined #gnucash
14:15:39 *** fekepp has joined #gnucash
14:16:58 *** bertbob has quit IRC
14:19:34 *** bertbob has joined #gnucash
14:27:37 *** fbruetting has joined #gnucash
14:29:59 *** fabior has joined #gnucash
14:34:52 <lmat> gjanssens: Oh, by the way, I think once I'm done giving 2.6 the ability to understand flat/guid bayes data, it will be able to both read and write the data. Of course, it will not be able to convert from one to the other.
14:34:58 *** carwynnelson has joined #gnucash
14:35:42 <jralls> lmat: Excellent. Thanks!
14:37:52 <lmat> A long time ago I said "May as well mention that 2.6 bayes import maps are busted if a user has "/" in his tokens" then I said "...is wrong. I forgot, 2.6 doesn't parse "/" within kvp keys!"
14:38:05 <lmat> I'm almost sure this second statement is a bit wrong, too.
14:38:33 <lmat> In XML everything is swimming, but does the SQL backend store them flat?
14:40:24 <jralls> lmat: It doesn't, though I think it stores the whole path as a key.
14:41:17 <jralls> lmat: But I don't think that it parses the key, either. So if the KVP that's passed to the SQL backend is flat it will store it as flat.
14:41:45 <jralls> Is that confusing?
14:41:55 <lmat> yup :-)
14:42:00 <lmat> I'll formulate a question.
14:42:11 <jralls> Sorry.
14:42:34 <lmat> The flat KVP looks like this: import-map-bayes/token/account-guid => count (gint64)
14:42:55 <lmat> I'm thinking the not-flat one will look the same in SQL since it's serialized.
14:43:17 <jralls> It won't.
14:44:00 <lmat> okay.
14:44:15 <lmat> jralls: I remember us talking about the slots schema having foreign key relations to itself to represent the hierarchy.
14:46:13 <jralls> But the difference will be that in the not-flat version import-map-bayes and import-map-bayes/token are KVPFrames, so the obj_guid for import_map_bayes will be the account's guid, for import-map-bayes/token it will be the import_map_bayes guid_val, and for import-map-bayes/token/account-guid it will be the import-map-bayes/token's guid_val.
14:46:42 <lmat> yes
14:47:04 <jralls> In the flat version there are no KVPFrames to traverse so there will just be a single row import-map-bayes/token/account-guid whose obj_guid will be the account's guid.
14:47:42 <jralls> More clear?
15:10:56 *** carwynnelson has quit IRC
15:11:53 *** sixwheeledbeast has quit IRC
15:14:17 *** jralls is now known as jralls_afk
15:41:43 *** Mechtilde has quit IRC
16:00:35 <gjanssens> lmat: I'm looking forward to your bayes work :)
16:09:56 *** fabior has quit IRC
16:10:08 *** fbruetting has quit IRC
16:10:24 <lmat> jralls_afk: Yes, thank you.
16:20:01 *** gjanssens has quit IRC
16:22:10 *** carwynnelson has joined #gnucash
16:22:12 *** carwynnelson has joined #gnucash
16:26:46 *** User has joined #gnucash
16:36:37 *** fekepp has quit IRC
16:37:05 *** User has quit IRC
16:48:58 *** pilotauto has joined #gnucash
17:38:27 *** fbruetting has joined #gnucash
17:40:13 *** fbruetting has quit IRC
17:46:40 *** opmrcl has joined #gnucash
17:46:50 <opmrcl> quit
17:46:53 <opmrcl> exit
17:47:21 *** opmrcl has quit IRC
18:04:11 *** pilotauto has quit IRC
18:06:22 *** pilotauto has joined #gnucash
18:17:40 <chris> so I did: git checkout time64-ftw; git pull lmat time64-ftw ... which seems to have worked
18:29:38 <chris> "undefined reference to `time64_to_gdate"
18:46:46 *** carwynnelson has quit IRC
19:48:49 *** jralls_afk is now known as jralls
19:57:23 <jralls> chris: That's because it's gnc_time64_to_GDate, replacing gnc_timepair_to_GDate.
20:00:18 <jralls> Wait, no, wrong place. I see the problem. He added time64_to_GDate in gnc-date.h but forgot to do the implementation.
20:03:19 <jralls> You can do it, it's in libgnucash/engine/gnc-date.cpp. Just copy&paste timespec_to_GDate (line 1339ff), rename it with time64, change the parameter to `time64 t`, and change `ts.tv_sec` to `t`.
20:20:47 <chris> +1 will do tonight
20:29:09 *** bertbob has quit IRC
20:30:11 *** bertbob has joined #gnucash
21:02:46 *** jralls has quit IRC
21:48:44 *** puck has quit IRC
21:53:47 *** puck has joined #gnucash
22:15:25 *** shakes808 has joined #gnucash
23:25:55 *** shakes808 has quit IRC