2019-09-12 GnuCash IRC logs

00:19:29 *** Mechtilde has joined #gnucash
00:22:33 *** Mechtilde has quit IRC
00:48:16 *** Mechtilde has joined #gnucash
01:08:35 *** gour has joined #gnucash
01:08:35 *** ChanServ sets mode: +v gour
01:42:49 *** fell has quit IRC
01:44:09 *** fell has joined #gnucash
01:44:09 *** ChanServ sets mode: +o fell
01:47:23 *** o01eg has quit IRC
02:07:48 *** Mechtilde has quit IRC
02:10:51 *** omnireq_ has joined #gnucash
02:12:03 *** omnireq has quit IRC
02:53:45 *** gjanssens has joined #gnucash
02:53:46 *** ChanServ sets mode: +o gjanssens
02:57:08 <gjanssens> .
03:02:22 *** fabior has joined #gnucash
03:05:40 *** CarwynNelson has joined #gnucash
03:05:41 *** ChanServ sets mode: +v CarwynNelson
03:20:40 *** fabior has quit IRC
03:35:48 *** fabior has joined #gnucash
03:36:04 *** Mechtilde has joined #gnucash
03:40:04 *** Mechtilde has quit IRC
03:40:38 *** Mechtilde has joined #gnucash
04:07:14 *** Aussie_matt has quit IRC
04:07:20 *** boldstripe has joined #gnucash
04:21:30 *** boldstripe has quit IRC
04:23:02 *** boldstripe has joined #gnucash
04:32:37 *** fell has quit IRC
04:32:39 *** fell_laptop has joined #gnucash
04:32:40 *** ChanServ sets mode: +o fell_laptop
04:45:42 *** fell_laptop has quit IRC
05:54:48 *** oozer has joined #gnucash
06:02:48 *** fabior has quit IRC
06:22:31 *** fabior has joined #gnucash
06:33:49 *** fabior has quit IRC
06:35:01 *** fabior has joined #gnucash
06:51:09 *** Jimraehl1 has joined #gnucash
06:52:01 *** Jimraehl1 has left #gnucash
06:56:57 *** fabior has quit IRC
07:48:37 *** CarwynNelson has quit IRC
07:49:12 *** boldstripe has quit IRC
07:58:30 *** CarwynNelson has joined #gnucash
07:58:30 *** ChanServ sets mode: +v CarwynNelson
08:23:08 *** oozer has quit IRC
08:32:20 *** oozer has joined #gnucash
08:53:29 *** oozer has quit IRC
09:10:38 *** fabior has joined #gnucash
09:16:56 *** jervin has joined #gnucash
09:17:27 *** boldstripe has joined #gnucash
09:27:28 *** CarwynNelson has quit IRC
09:38:38 *** jervin has quit IRC
09:47:57 *** CarwynNelson has joined #gnucash
09:47:57 *** ChanServ sets mode: +v CarwynNelson
10:12:40 *** warlord has quit IRC
10:12:57 *** warlord has joined #gnucash
10:12:57 *** gncbot sets mode: +o warlord
10:24:26 *** storyjesse has joined #gnucash
10:26:32 *** omnireq_ has quit IRC
10:44:16 *** fabior has quit IRC
10:48:11 *** Mechtilde has quit IRC
10:52:57 *** fabior has joined #gnucash
10:54:56 *** CarwynNelson has quit IRC
11:08:02 *** fabior has quit IRC
11:10:20 *** fabior has joined #gnucash
11:11:18 *** fabior has quit IRC
11:21:29 *** bertbob has quit IRC
11:23:02 *** fabior has joined #gnucash
11:24:07 *** fabior has quit IRC
11:27:18 *** ArtGravity has joined #gnucash
11:27:18 *** ChanServ sets mode: +v ArtGravity
11:28:50 *** omnireq has joined #gnucash
11:28:50 *** ChanServ sets mode: +v omnireq
11:28:53 *** bertbob has joined #gnucash
11:28:54 *** ChanServ sets mode: +v bertbob
11:40:21 *** o01eg has joined #gnucash
11:41:13 *** Mechtilde has joined #gnucash
11:42:31 *** fabior has joined #gnucash
11:44:14 *** Mechtilde has quit IRC
11:49:37 *** guak has joined #gnucash
11:57:20 *** fabior has quit IRC
11:58:58 *** Mechtilde has joined #gnucash
12:03:30 *** boldstripe has quit IRC
12:18:35 *** fabior has joined #gnucash
12:27:38 *** oozer has joined #gnucash
12:39:24 *** jervin has joined #gnucash
12:45:32 *** jralls_afk is now known as jralls
12:57:52 *** fabior has quit IRC
13:12:10 *** storyjesse has quit IRC
13:35:41 *** CarwynNelson has joined #gnucash
13:35:41 *** ChanServ sets mode: +v CarwynNelson
13:36:07 *** CarwynNelson has quit IRC
13:37:55 *** CarwynNelson has joined #gnucash
13:37:55 *** ChanServ sets mode: +v CarwynNelson
13:54:39 <CarwynNelson> jralls, I've taken a surface level dive into some of the file->properties code. I haven't found any calls off to scheme code yet, but I haven't looked more than one or two functions deep. I do have a few questions though, and I was wondering if I could pick your brains over them?
13:55:20 <jralls> CarwynNelson, OK.
13:56:12 <CarwynNelson> I guess my first really basic question is, when you refer to file->properties are you talking about the "book options" dialog?
13:56:38 <jralls> BTW about your discussion with gjanssens yesterday about jhbuild, it came about because 10 years ago that was the Gnome way to build Gnome from scratch.
13:56:54 <jralls> Yes.
13:58:30 <jralls> Which uses libgnucash/app-utils/business-options.c for the options. Those options are defined in business-options.scm using make-option defined in options.scm.
14:00:20 <CarwynNelson> okay, so is your intention to move all of that over to c++ code?
14:13:26 <jralls> Yes, though it's turning out to be a lot more difficult than I thought it would be in part because I'm not really wild about using closures to pass GUI stuff into places it doesn't belong.
14:23:08 <CarwynNelson> do you mean that gui structures are being passed into things like the scheme code? could you give an example of what you mean?
14:26:38 <jralls> Look at gnucash/gnome/dialog-options.c. It works by binding GtkWidgets into Scheme lambdas with getter/setter callbacks, passing those SCM lambdas to callback functions in libgnucash/app-utils/option-utils.c.
14:34:23 <CarwynNelson> just whilst i'm reading through that, has this been something that has evolved over time? Are we in a sort of half-way state, or was this a conscious design design?
14:34:41 <CarwynNelson> I guess what i'm really asking is, what is the history behind this (if you are aware)
14:37:05 <jralls> It was way before my time, but from the comments and commit history it appears that warlord wrote the C parts during the migration of GnuCash from a Scheme program that called C to a C program that calls Scheme. That was around 2003. He'd have to comment on his motivations at the time--if he remembers.
14:58:56 <CarwynNelson> I'm starting to see the challenge you are facing
14:59:57 <CarwynNelson> this line made me quite confused (typedef struct gnc_option_win GNCOptionWin;), since GNCOptionWin is defined in the c file. So there is a typedef in the header file for a type that is defined in the c file
15:00:05 <CarwynNelson> mindimplode.gif
15:03:23 <jralls> That's actually standard Gnome. It's their idea of the pimpl idiom. Gnome is based on GObject which is a sort of C-with-classes (the original ~1982 genesis of C++) done by people not smart enough to work at Bell Labs.
15:04:44 *** frakturfreak has joined #gnucash
15:04:44 *** ChanServ sets mode: +v frakturfreak
15:05:15 <CarwynNelson> "people not smart enough to work at Bell Labs" burn
15:05:53 <CarwynNelson> since that's standard gnome, is it hard to get around? do you have to do it like that? or is it even preferable to do it like that?
15:06:09 <jralls> Not really. Almost none of us are smart enough to have worked at Bell Labs. Fortunately Stroustrup was.
15:06:45 <CarwynNelson> Well I was going to say, i'm certain they were a hell of a lot smarter than I will ever be
15:07:16 <jralls> What do you mean "get around"? It really is just pimpl. The contents of the struct are the class's private parts.
15:08:42 <CarwynNelson> i suppose i've always seen the relationship as "c file uses stuff from h file" and not the other way around. I guess that's why I asked if it is preferable to do that; in case I was just missing the point
15:10:47 <jralls> That depends on what C file you mean. A public header defines the public interface. The implementation of that interface doesn't really need to be in a header unless you decide to break it up into multiple files, but in that case it's a private header that doesn't get installed, it's only for building the library.
15:11:32 <jralls> So C files that depend on the interface only need the public header.
15:13:13 <jralls> Modern C++ does that rather differently because template code needs to be available for every instantiation, leading to header-only or header-mostly libraries like the C++ Standard Library and most Boost libraries.
15:17:35 <CarwynNelson> makes sense
15:29:58 *** jervin has quit IRC
15:30:13 *** jervin has joined #gnucash
15:31:35 *** Mechtilde has quit IRC
15:42:44 *** calvinct has joined #gnucash
15:44:48 *** JayC has quit IRC
15:46:16 *** calvinct has quit IRC
15:50:05 *** JayC has joined #gnucash
15:50:06 *** ChanServ sets mode: +v JayC
15:59:33 *** calvinct has joined #gnucash
16:26:42 *** calvinct has quit IRC
16:34:18 <Simon> (Pdb) commodity.get_quote_source()
16:34:20 <Simon> <Swig Object of type 'gnc_quote_source *' at 0x7fab231de990>
16:34:25 <Simon> it's not clear how I'm supposed to use this
16:34:41 <Simon> it doesn't have any useful functions: ['__class__', '__cmp__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__hex__', '__init__', '__int__', '__le__', '__long__', '__lt__', '__ne__', '__new__', '__oct__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'acquire', 'append', 'disown',
16:34:43 <Simon> 'next', 'own']
16:45:34 <CarwynNelson> what does pdb think the source of get_quote_source is?
16:45:40 <CarwynNelson> s/source/source code/
16:47:08 <CarwynNelson> I think you can use the inspect module to do that (https://docs.python.org/3/library/inspect.html#retrieving-source-code), an example of how to do that from stackoverflow (https://stackoverflow.com/a/427533)
16:50:41 <Simon> exactly the same as get_quote_tz(), which returns a string
16:57:04 <gjanssens> jralls: I continued my experiment with ninja-build on windows.
16:57:10 <jralls> Simon, it's an opaque ptr to a C struct. Pass it to the gnc_quote_source_get_xxx functions, of which gnc_quote_source_get_internal_name is probably the most useful to you as it's what's passed to F::Q.
16:57:24 <gjanssens> It was slightly more involved than replacing single quotes with double quotes
16:57:24 <jralls> gjanssens, and?
16:57:28 <gjanssens> It now works
16:57:32 <Simon> (Pdb) gnucash._gnucash_core_c.gnc_quote_source_get_internal_name(y[1].get_quote_source())
16:57:34 <Simon> 'mstaruk'
16:57:39 <jralls> \o/
16:57:40 <Simon> is that the right way to access gnc_quote_source_get_internal_name()?
16:58:04 <gjanssens> The whole trick was to delegate quote escaping to cmake by adding the VERBATIM keyword
16:58:18 <gjanssens> And then undoing the escaped quoting we had added ourselves
16:58:25 <jralls> Simon: I think so. Is mstaruk a real source name?
16:58:40 <gjanssens> The quote escaping done by cmake is different in Windows and linux
16:58:50 <Simon> yes
17:00:06 <jralls> gjanssens, Figures. Going low-level on cmake seems to be a generally bad idea.
17:00:16 <gjanssens> I haven't yet switched over the windows build to ninja by default though. Should we ?
17:00:45 <gjanssens> On my VM it looks marginally faster though I didn't benchmark
17:00:52 <gjanssens> s/looks/feels/
17:01:44 <jralls> On the ArchLinux front I fixed the deprecated GLib functions it was complaining about but it still failed because gdk-pixbuf uses some. Switching Gtk3 and Webkit to import libs fixed it.
17:02:09 <gjanssens> But it may be more resilient to the locked file errors we frequently get with make
17:02:37 <jralls> The catch is that that's a feature introduced to FindPkgConfig in cmake 3.6, so I need to fake that for Ubuntu 14.04 which has only 3.5.
17:04:04 * gjanssens should go read what "import libs" are...
17:04:19 <gjanssens> Bummer on the cmake version
17:04:33 <jralls> https://cmake.org/cmake/help/v3.4/command/add_library.html#imported-libraries
17:05:19 <jralls> Executive summary: It's a target for the current build system to use but not build for itself.
17:06:57 <jralls> Just got https://crascit.com/professional-cmake/ after the author was on last week's cppcast.
17:07:08 <gjanssens> Oh right. That makes sense.
17:07:23 <gjanssens> I was listening to that cppcast earlier this evening :D
17:07:28 <gjanssens> Haven't finished it yet though
17:08:03 <gjanssens> Did order that ebook a while ago, but didn't read it yet.
17:08:16 <gjanssens> I also ordered a few books on C++17
17:08:19 <jralls> The immediate benefit here is that an imported library's includes are added with -isystem instead of -I which tells gcc to not issue warnings about the headers.
17:09:20 <gjanssens> I'm really interested in their new filesystem module (based on boost::filesystem, but using locale rather than codecvt)
17:09:54 <jralls> I saw Nico Josuttis's C++17 came out last weekend. I initially balked at the price but then saw it's the same as Effective Modern C++, so I guess I'll go ahead and order it.
17:10:09 <CarwynNelson> What does the SCM type do/mean? I'm guessing it refers to a scheme function, but i just wanted to check since I can't find where it's defined (i'm assuming in a library)
17:10:27 <gjanssens> BTW the deprecated GLib functions, I suppose that's also what https://bugs.gnucash.org/show_bug.cgi?id=797407 reports ?
17:11:17 * gjanssens is about to go afk for the night :)
17:11:21 <jralls> CarwynNelson: It's an opaque Scheme pointer. Read the Guile docs at https://www.gnu.org/software/guile/manual/guile.html.
17:11:35 <CarwynNelson> thanks very much :)
17:11:40 *** gour has quit IRC
17:12:16 *** frakturfreak has quit IRC
17:12:39 <gjanssens> Good night all!
17:12:48 *** gjanssens has quit IRC
17:18:50 *** calvinct has joined #gnucash
17:37:17 <CarwynNelson> The windows script setup-mingw64.ps1 seems to be failing for me towards the end, when it is trying to apply patches.
17:37:19 <CarwynNelson> patching file /usr/lib/python2.7/site-packages/jhbuild/modtypes/cmake.py
17:37:19 <CarwynNelson> Hunk #1 FAILED at 159.
17:37:37 <CarwynNelson> I suppose I could manually apply the patch files, but before I do do that is there anything obvious that I'm missing here that could be causing the patching to fail?
17:48:48 <warlord> CarwynNelson, the "typedef struct gnc_option_win GNCOptionWin;" in a .h file with the structure defined in a C file is a standard, canonical C way to define an opaque structure. This is done because there is no reason for the caller to need to know the way the GNCOptionWin is implemented, forces you to use the API to access it, but allows the compiler to to compile-time type checking.
17:49:59 <warlord> The File -> Properties code was based on the Options code, but with the data stored in the Book instead of in the Options Database. It leverages the same dynamic GUI creation code.
17:50:49 *** jervin has quit IRC
17:50:57 <warlord> I'm not sure what else else you wanted to know from me
17:52:21 <jralls> CarwynNelson: Probably a MSYS package update has changed the target. I'll take a look in a few minutes after I finish up the ArchLinux commit.
17:53:51 <CarwynNelson> jralls, it looks like the sysdep https://git.gnome.org/browse/jhbuild/plain/modulesets/gnome-apps-3.26.modules is returning a 404 too. not sure if it's related
17:54:31 <jralls> Are you sure you have an up-to-date checkout? git.gnome.org went away months ago.
17:54:34 <CarwynNelson> warlord, I think that covers it. Thanks for taking the time to respond I really appreciate it :)
17:54:46 <CarwynNelson> pretty sure, I only checked out like a few days ago
17:54:47 <warlord> CarwynNelson, you're welcome.
17:55:36 <CarwynNelson> i'm currently on commit 58c17cac of gnucash-on-windows if that helps
17:57:08 *** jervin has joined #gnucash
17:58:23 <jralls> Yup, that's the latest.
18:01:07 <CarwynNelson> brb just rebooting
18:01:19 *** CarwynNelson has quit IRC
18:02:23 *** CarwynNelson has joined #gnucash
18:03:59 *** CarwynNelson has quit IRC
18:04:09 *** CarwynNelson has joined #gnucash
18:04:09 *** ChanServ sets mode: +v CarwynNelson
18:08:49 *** calvinct has quit IRC
18:31:20 <jralls> CarwynNelson: Looks like that cmake patch is obsolete, upstream removed the DESTDIR stuff. I don't see where the gnome-apps-3.26.modules is coming from, it's not in gnucash modules and doesn't really make sense for MSYS2.
18:52:13 <CarwynNelson> I have a linux build working which was fairly easy, so I think I'll just chip away at windows in the background when I get time
18:52:25 <CarwynNelson> anywho, I have to go to bed. bye :)
18:52:34 <jralls> Goodnight.
18:55:05 *** Aussie_matt has joined #gnucash
19:00:27 *** CarwynNelson has quit IRC
19:07:18 *** omnireq has quit IRC
19:57:08 *** omnireq has joined #gnucash
20:16:11 *** ArtGravity has quit IRC
21:11:41 *** guak has quit IRC
21:46:20 *** oozer has quit IRC
21:49:02 *** KevinDB has quit IRC
21:50:20 *** KevinDB has joined #gnucash
21:50:20 *** ChanServ sets mode: +v KevinDB
22:49:28 *** jervin has quit IRC
23:18:37 *** Mechtilde has joined #gnucash
23:23:19 *** Mechtilde has quit IRC
23:23:43 *** Mechtilde has joined #gnucash