2014-09-12 GnuCash IRC logs

00:02:50 *** linas_ has joined #gnucash
00:02:50 *** linas__ has quit IRC
00:04:50 *** linas__ has joined #gnucash
00:04:50 *** linas_ has quit IRC
00:05:48 *** linas_ has joined #gnucash
00:05:48 *** linas__ has quit IRC
00:33:02 *** webmanoffesto has quit IRC
00:54:25 *** GabrieleV_ has joined #gnucash
00:54:36 *** GabrieleV has quit IRC
00:54:36 *** GabrieleV_ is now known as GabrieleV
01:14:44 *** david has joined #gnucash
01:19:54 *** fell has quit IRC
01:25:50 *** david has quit IRC
01:25:51 *** MechtiIde has joined #gnucash
01:28:53 *** bhardwajs has joined #gnucash
01:34:25 *** bhardwajs1 has joined #gnucash
01:39:36 *** bhardwajs has quit IRC
01:52:34 *** bhardwajs1 has quit IRC
02:11:39 *** MechtiIde has quit IRC
02:30:05 *** O01eg has quit IRC
02:42:44 *** david has joined #gnucash
03:10:10 *** gjanssens has joined #gnucash
03:10:10 *** gncbot sets mode: +o gjanssens
03:40:45 *** david has quit IRC
04:18:21 *** aqua___ has joined #gnucash
04:39:04 *** aqua_ has joined #gnucash
04:41:04 *** aqua___ has quit IRC
05:17:35 *** webmanoffesto has joined #gnucash
05:23:51 *** david has joined #gnucash
05:30:37 *** floh1111 has joined #gnucash
05:55:15 *** himaxx has joined #gnucash
05:55:19 *** calp has quit IRC
05:56:50 *** himaxx has quit IRC
05:57:21 *** calp has joined #gnucash
05:58:56 *** fell has joined #gnucash
05:58:56 *** gncbot sets mode: +o fell
05:59:05 *** floh1111 has quit IRC
06:03:19 *** floh1111 has joined #gnucash
06:03:38 *** wol has joined #gnucash
06:08:30 *** aqua_ has quit IRC
06:14:07 *** david has quit IRC
06:38:48 *** Jimraehl1 has left #gnucash
06:42:35 *** Jimraehl1 has joined #gnucash
07:21:08 *** wol1 has joined #gnucash
07:26:20 *** wol has quit IRC
07:42:03 *** GabrieleV_ has joined #gnucash
07:42:15 *** GabrieleV has quit IRC
07:42:15 *** GabrieleV_ is now known as GabrieleV
07:53:26 *** aqua_ has joined #gnucash
07:55:22 *** wol1 has quit IRC
08:03:20 *** wol has joined #gnucash
08:08:50 *** aqua_ has quit IRC
08:14:39 *** wol1 has joined #gnucash
08:14:40 *** wol has quit IRC
08:28:43 *** himaxx has joined #gnucash
08:36:42 *** wol1 has quit IRC
09:00:42 *** david has joined #gnucash
09:08:57 *** Gbarr has joined #gnucash
09:09:47 *** wol has joined #gnucash
09:20:57 *** lmat has joined #gnucash
09:30:08 *** benjamin-agaric has quit IRC
09:50:35 *** benjamin-agaric has joined #gnucash
09:56:57 *** wol has quit IRC
09:57:59 *** wol has joined #gnucash
10:00:19 *** wol has quit IRC
10:33:17 *** floh1111 has quit IRC
10:43:05 *** floh1111 has joined #gnucash
11:10:20 *** benjamin-agaric has quit IRC
11:10:27 *** benjamin-agaric has joined #gnucash
11:12:00 *** O01eg has joined #gnucash
11:14:02 <warlord> Well, updating my robots.txt seems to have cut my usage by about 50% Yay
11:16:01 <warlord> Too bad bingbot isn't listening.
12:11:33 *** floh1111 has quit IRC
12:12:34 *** webmanoffesto has quit IRC
12:18:50 *** webmanoffesto has joined #gnucash
12:24:09 *** MechtiIde has joined #gnucash
12:33:54 *** webmanoffesto has quit IRC
12:47:40 *** himaxx has joined #gnucash
12:53:21 *** himaxx has quit IRC
13:08:39 *** bhardwajs has joined #gnucash
13:12:03 *** adabo has joined #gnucash
13:21:49 *** bhardwajs has quit IRC
13:23:49 *** david has quit IRC
13:24:36 *** bhardwajs has joined #gnucash
13:26:48 <adabo> How do I record a transaction that goes like this: My friend wants to order something online. He gives me the cash, and I use my card to pay online.
13:31:09 <lmat> @op
13:31:09 <gncbot> lmat: Error: You don't have the #gnucash,op capability. If you think that you should have this capability, be sure that you are identified before trying again. The 'whoami' command can tell you if you're identified.
13:31:10 <gncbot> lmat: Sent 18 hours and 34 minutes ago: <jralls> It doesn't look to me that kvp_frame_.*_binary is actually used anywhere. It doesn't even seem to be supported by the SQL backend. I'd try deleting all references to it and its handlers in backends/xml and see if GC still compiles. No sense in worrying about an overly complicated, yet unused detail.
13:31:27 <lmat> jralls: Excellent!
13:31:34 <lmat> jralls: Converting it was ... inconvenient :)
13:32:26 <lmat> jralls: For instance, c++ (with our current warning levels) doesn't allow stuff like void * h {&other}; dosomething(h + 5);
13:32:33 <lmat> which was being done in kvp
13:32:40 *** bhardwajs1 has joined #gnucash
13:32:56 <lmat> ...which is being done in kvp. I reinterpret_cast<char*>ed it, but wasn't exactly happy with the situation.
13:34:58 <lmat> bhardwajs1: howdy? Done any c++ recently?
13:36:20 *** bhardwajs has quit IRC
13:36:26 <lmat> later then :)
13:36:32 <lmat> oh, oops
13:45:26 <warlord> adabo: transfer from CC -> Cash
13:46:40 <lmat> bhardwajs1: I just realized that note up there says "jralls & lmat: have you been able to edit c++ next steps page?" rather than just ralls.
13:46:51 <lmat> bhardwajs1: I have poison ivy. The only thing I've been able to do is scratch and cry...
13:47:31 <warlord> lmat: calomime
13:48:42 <lmat> ahh, never heard of it (just looked it up). Looks like it has .5% rust and ZnO (zinc rust?)
13:49:11 <warlord> Zinc Oxide
13:49:19 <lmat> warlord: Right... zinc rust, right? ^_^
13:49:51 <warlord> Not sure I'd call it "rust".. It's white, not red.
13:52:57 <bhardwajs1> lmat: sorry about the poison ivy. You might have solution from Derek. :) Some C++, but nothing at the scale we need for gnucash.
13:53:32 <bhardwajs1> Now that I can breathe, I am trying to reset my repos and get all the repos - gnucash, jralls, and my copy - to work together.
13:53:52 <bhardwajs1> Adventures in git land is a wonderful story not to be told to children. :)
13:53:53 *** MechtiIde has quit IRC
13:54:43 <lmat> bhardwajs1: hah!
13:54:49 <lmat> warlord: yeah
13:55:36 <lmat> bhardwajs1: My friend (non programmer) said "Anything on GitHub for me is 'Git Somebody Else'." Had me nearly rolling on the floor laughing
13:57:12 *** bhardwajs1 has quit IRC
14:01:23 *** bhardwajs has joined #gnucash
14:04:49 *** lmat_ has joined #gnucash
14:08:43 *** lmat has quit IRC
14:10:42 <bhardwajs> lmat: That's funny.
14:11:00 <lmat_> :)
14:33:38 *** lmat_ is now known as lmat
14:35:50 *** david has joined #gnucash
14:46:25 *** david has quit IRC
15:01:23 *** jralls has quit IRC
15:01:57 *** jralls has joined #gnucash
15:01:57 *** gncbot sets mode: +o jralls
15:02:03 *** bhardwajs1 has joined #gnucash
15:04:08 <lmat> In C, "hey" is a char const *, right ?
15:04:31 <lmat> In C, is it allowable to implicitly cast to gchar *? (like gchar * hey = "hey"; ?
15:04:34 <lmat> )
15:07:24 <jralls> gchar is just a typedef for char, so yes, anything you can do with char you can do with gchar. For new/rewritten code please avoid all GLibisms though.
15:08:52 <jralls> I'm sure you know that in C++11 'char* hey = "hey"' will earn a deprecation warning from the compiler. You're supposed to say 'const char* hey = "hey"'.
15:09:51 *** bhardwajs has quit IRC
15:09:53 <warlord> However in C a string "hey" is actually a const char *
15:10:04 <lmat> jralls: Okay, so C doesn't mind getting rid of the const? Sounds scarry.
15:10:49 <lmat> kvp_value only accepts gchar * (not gchar const *)! FUN!
15:10:59 *** david has joined #gnucash
15:11:17 <warlord> Well, you can cast away the const.
15:11:26 <warlord> (in C it's really just a "hint")
15:12:29 <jralls> It gets an implicit const_cast in both C and C++. C++11 only deprecates it instead of making it an error because there's so much code out there that uses it without the const.
15:12:41 <lmat> The more I learn about C, the scarrier it seems...
15:12:48 <lmat> oh, okay
15:13:07 *** bhardwajs1 has quit IRC
15:17:15 <lmat> AHH!
15:17:58 <lmat> So, g_value_get_string returns gchar const *
15:18:40 <lmat> yet, kvp_value_delete deletes its contents if it's a string!
15:19:17 <lmat> So, I tried making the kvp_value only hold a gchar *, but the line with g_value_get_string fails. But, if I change everything to gchar const *, then I can't delete the value later!
15:19:30 <lmat> I guess I need to find out if it's safe to delete the return from g_value_get_string..
15:29:03 <jralls> No. It's a pointer to the GValue's string, so if you delete it and try to use the GValue again it will segfault. If you're concerned that the GValue will get destroyed before you're done with the string use g_value_dupe_string() and g_free() the copy you get when you're done with it. Call g_value_unset() when you want to free the object stored in the GValue.
15:30:43 *** david has quit IRC
15:30:57 *** bhardwajs has joined #gnucash
15:34:24 <lmat> In kvp_value_delete (around line 1074), we have g_free(value->value.str); and in kvp_value_from_gvalue, we have kvp_value_new_string(g_value_get_string(gval))
15:34:28 <lmat> I'm guessing that's an erro
15:34:29 <lmat> r
15:34:48 <lmat> So we need to decide: does the caller still own the string, or does kvp_value own the string.
15:35:20 <lmat> Either way is simple to implement...either just store the char (const) * and never delete it
15:35:25 <lmat> or copy it on the way in and delete it when you're ready.
15:35:35 <lmat> The difficult part is making sure that no other part of the code assumes the wrong thing :(
15:40:21 *** cigarshark has quit IRC
15:40:45 *** cigarshark has joined #gnucash
15:44:48 <jralls> You're confusing KvpValue with GValue. They are not at all the same thing.
15:46:44 <lmat> jralls: I don't think I am. I do understand that they're different (although somewhat similar in that they implement the idea of "variant").
15:49:22 <jralls> Note that kvp_value_from_gvalue calls kvp_value_new_from_string(g_value_get_string()) and that calls g_strdup() on its string parameter.
15:50:21 *** david has joined #gnucash
15:52:14 <jralls> To answer your question more directly, the KvpValue *must* duplicate the string because it must live until it is committed to the backend and that may be after the caller and its string have gone out of scope and been destroyed.
15:52:33 <lmat> jralls: Ah right.
15:52:33 <jralls> Generalize string to any object passed in by reference, of course.
15:52:56 <lmat> yup
15:55:42 <lmat> jralls: the dup duped me. (I missed the strdup that is.) That should simplify matters.
15:56:12 <jralls> The situation can be finessed in C++ so long as there's no C wrapper by having KvpValue take a managed ptr (i.e. either shared_ptr or unique_ptr). That way the reference stays valid regardless of what happens on the caller's side. But that's not an option when calling from C.
16:00:57 *** bhardwajs has quit IRC
16:03:27 *** david has quit IRC
16:03:40 <warlord> Will be nicer once we have object reference counting.
16:03:48 *** bhardwajs has joined #gnucash
16:10:45 <jralls> warlord: If we'd used GObject correctly we'd have it now, though not for strings and not as automatic as C++.
16:12:13 <lmat> Oh yes, reference counting is coming :)
16:14:27 <warlord> True. But all this code was written well before gobject.
16:15:23 *** david has joined #gnucash
16:23:54 <lmat> Oh, b32f9d2 changes a test in src/engine to .cpp? fun!
16:24:10 <lmat> heh, it's the only one in this directory :)
16:25:39 *** david has quit IRC
16:31:09 *** bhardwajs has quit IRC
16:32:16 *** bhardwajs has joined #gnucash
16:36:11 *** bhardwajs has quit IRC
16:43:19 <lmat> when running dist-check, configure fails because it can't find my boost.
16:43:34 <lmat> when I run ./configure in the build tree, I pass --with-boost=<dir>
16:43:54 <lmat> Is there already a way to get parameters in to the dist-check configure?
16:44:47 <jralls> No. dist-check does the check configure with no args. Isn't there an environment variable for boost?
16:45:01 *** bhardwajs has joined #gnucash
16:46:30 <lmat> jralls: If you haven't installed boost anywhere, you reference the Boost build tree with BOOST_ROOT
16:46:47 <lmat> jralls: I have installed it, just to an abnormal location, and that's supported with a configure options
16:47:05 <lmat> AM_DISTCHECK_CONFIGURE_FLAGS and DISTCHECK_CONFIGURE_FLAGS seem to factor in here...
16:47:29 <jralls> OOh, didn't know about those.
16:47:57 <lmat> jralls: I only found them in Makefile (not Makefile.am) :) I'm guessing they're generated.
16:48:00 <jralls> But does the boost-supplied m4 macro look at BOOST_ROOT if --with-boost isn't specified.
16:49:21 <lmat> jralls: Yeah, I think so.
16:51:30 <jralls> In that case it's the best way to go. http://www.gnu.org/software/automake/manual/html_node/Checking-the-Distribution.html seems to me to say that we have to put AM_DISTCHECK... in the top Makefile.am to enable the DISTCHECK env variable. If we can get away without doing that it would be better.
16:53:57 <lmat> warlord: My wife says that we have calamine lotion!
16:54:01 <lmat> warlord: but she can't find it...
16:54:16 <lmat> jralls: It worked when I export DISTCHECK_CONFIGURE_FLAGS=--with-boost=/home/...
16:55:45 *** bhardwajs has quit IRC
16:56:29 <warlord> oops1
17:01:13 <jralls> lmat: OK. Seems you're good either way.
17:11:41 *** bhardwajs has joined #gnucash
17:14:48 *** vtkuga has joined #gnucash
17:16:36 <lmat> Where can I find a test report (after make test; )?
17:17:32 *** gjanssens has quit IRC
17:26:55 *** lmat_ has joined #gnucash
17:30:25 *** lmat has quit IRC
17:31:07 *** vtkuga has left #gnucash
17:31:16 *** kuga has joined #gnucash
17:32:18 <kuga> whois
17:32:46 *** kuga has quit IRC
17:46:08 <jralls> lmat: Make test's output goes to stderr by default, and by it stops on failure. Each test program takes the same args as gtester, https://developer.gnome.org/glib/unstable/gtester.html, so you can change the output and behavior if you like.
17:46:46 <jralls> Though setting up the environment for running the tests is a bit painful.
17:47:19 *** bhardwajs1 has joined #gnucash
17:47:21 <jralls> If you want to test more than just libqof, you should use `make check`, which also runs the "legacy" tests.
17:53:20 *** bhardwajs has quit IRC
17:57:30 *** fell has quit IRC
18:15:40 *** cigarshark has quit IRC
18:46:23 *** bhardwajs has joined #gnucash
18:47:15 *** benjamin-agaric has quit IRC
18:52:30 *** bhardwajs1 has quit IRC
18:56:56 *** bhardwajs has quit IRC
19:02:05 *** bhardwajs has joined #gnucash
19:12:25 <lmat_> jralls: thanks
19:12:45 <lmat_> destcheck says: ERROR: files left in build directory after distclean:
19:12:56 <lmat_> ./src/quotes/gnc-fq-helper.1
19:13:02 <lmat_> ./src/quotes/gnc-fq-dump.1
19:13:39 <lmat_> I'm not running a pristine version of maint. I changed kvp_value, and the files that were thereafter affected, but I don't think I see a link between what I did and the fact that distclean left files behind.
19:13:44 <lmat_> Any clues? :)
19:15:36 <jralls> That's kinda weird, but it's probably something to do with maint not with what you're working on. Commit what you've done so far, switch back to maint (you are working in a private branch, of course) and check it again.
19:16:49 <lmat_> yup
19:16:54 <jralls> Actually, are you sure you based your branch on maint, not master? Maint shouldn't have any C++ stuff in it at all.
19:17:16 <lmat_> oh, I mean gnucash/master!
19:17:53 <lmat_> I run git clean -fdx && ./autogen.sh && ./configure ... && make && make install && make distcheck;
19:17:56 <lmat_> Can I cut any of that out?
19:18:16 <jralls> It doesn't really matter if master passes distcheck at this point. Make check is sufficient.
19:19:02 <lmat_> jralls: oh, excellent :D
19:19:23 <jralls> In 18 months it will need to pass distcheck so we can start the 2.8 release cycle.
19:23:38 <lmat_> oh my...that's a while
19:24:21 <lmat_> the latest tag I see is 2.6.3, is that accurate?
19:25:52 <jralls> lmat: Yes. I'll release 2.6.4 on the 28th, from the *maint* branch. Maint must pass distcheck.
19:26:13 <jralls> You can see the whole release schedule at http://wiki.gnucash.org/wiki/Release_Schedule.
19:30:43 <lmat_> jralls: excellent
19:30:54 <lmat_> jralls: master has the same error.
19:31:31 *** shaunm has quit IRC
19:31:50 <lmat_> You know, at first I was a bit unimpressed with your "18 months to 2.8".
19:32:00 <lmat_> After reading the release schedule, I think you may be ambitious!
19:32:13 <lmat_> Okay, gotta go do some bookkeeping!
19:32:27 <jralls> Later.
19:52:47 *** bhardwajs has left #gnucash
19:56:21 *** jralls has quit IRC
19:57:17 *** jralls has joined #gnucash
19:57:17 *** gncbot sets mode: +o jralls
20:17:43 *** shaunm has joined #gnucash
20:52:32 *** antiX-Dave has joined #gnucash
21:03:21 <antiX-Dave> Hello, cannot seem to find a good answer to this with my google fu... is there a way to keep a list of items / standard routines and their prices to tag to an invoice rather than filling it in each time?
21:14:50 <warlord> lmat_: Also, when running 'distcheck' there is usually no need to run 'make' and/or 'make install', and indeed it might not do what you want. For distcheck all you need is autogen; configure; make distcheck
21:15:18 <warlord> antiX-Dave: not really, no. gnucash doesn't have an inventory module.
21:16:57 <antiX-Dave> @warlord. Do you know if there is a forsight for such a module? I looked at the roadmap page but it appears dated for what is in version 2.6.3
21:16:57 <gncbot> antiX-Dave: Error: "warlord." is not a valid command.
21:18:04 <warlord> antiX-Dave: are you willing to implement it?
21:18:16 <warlord> (patches always welcome)
21:18:36 <warlord> If not, I'm afraid no. Nobody has cared to work on it. (This is a 100% voluntary effort)
21:19:11 <antiX-Dave> Possibly if I can figure it out... I will have to look at the source for a moment...
21:24:34 <warlord> Most likely it'll take much more than just a "moment".
21:24:53 <warlord> You'd probably need to (somehow) tie it into the autofill function when in an Invoice/Bill.
21:26:42 <antiX-Dave> warlord. Yes it will take more than a moment to do anything... just wanted to give it a quick scan tonight.
21:26:50 <warlord> Okay.
21:26:57 <warlord> (it's all going to be in C)
21:28:02 <antiX-Dave> :P yep I see that... unfortunately I have not done to much in C, so it will be a moment x 2 LOL
21:28:10 <warlord> :)
21:30:55 <antiX-Dave> I was figuring just another option similar to how "Income account" shows the various income accounts, but tied to the "action:materials" field.
21:31:33 <warlord> Well, it would be more than that, because you need to affect multiple cells.
21:32:03 <antiX-Dave> Very true
21:32:16 <warlord> There is an autofill already where, when you select a known description it auto fills the rest of the line.
21:32:21 <warlord> You would want to hook into that.
21:32:38 <antiX-Dave> Yes I was just going to mention that :D
21:33:21 <antiX-Dave> I almost went with just that, but I did not want to rely on that for the whole list of items.
21:33:36 <antiX-Dave> Hence the original question
21:45:27 <warlord> I honestly haven't looked at that code. But for now you could just create an invoice with a bunch of entries that you want to duplicate ;)
21:47:34 <antiX-Dave> True, not really ideal but functional. :/
21:48:07 <antiX-Dave> So if you have not looked at the code, I am guessing you are a regular user ?
21:48:32 <antiX-Dave> Or do you handle another section of gnucash?
21:50:59 <warlord> These days I'm mostly just a user and sysadmin.
21:51:16 <warlord> I still know the code pretty well, but haven't really studied some of the new features.
21:51:25 <warlord> (this particular one I didn't look at)
21:51:33 * warlord wrote the original business features.
21:52:58 <antiX-Dave> Ah IC.
21:57:05 <warlord> Anyways, I'm heading out. Good night, and good weekend.
21:58:40 <antiX-Dave> Probably a good idea. ;) Good night and weekend to you as well.
21:58:49 *** antiX-Dave has quit IRC
23:13:23 *** GabrieleV_ has joined #gnucash
23:13:52 *** GabrieleV has quit IRC
23:13:52 *** GabrieleV_ is now known as GabrieleV
23:17:32 *** kuga has joined #gnucash
23:26:55 *** adabo has quit IRC
23:29:54 *** GabrieleV_ has joined #gnucash
23:30:00 *** GabrieleV has quit IRC
23:30:00 *** GabrieleV_ is now known as GabrieleV
23:59:54 *** GabrieleV_ has joined #gnucash