2019-06-14 GnuCash IRC logs
00:37:59 *** mdforbis has quit IRC
00:56:00 *** Mechtilde has joined #gnucash
01:13:07 *** fell has quit IRC
01:13:56 *** fell has joined #gnucash
01:13:56 *** ChanServ sets mode: +o fell
01:19:53 *** JayC has quit IRC
02:10:42 *** Mechtilde has quit IRC
02:11:31 *** gjanssens has joined #gnucash
02:11:31 *** ChanServ sets mode: +o gjanssens
02:14:27 <gjanssens> .
02:20:38 <chris> so much discussion last night!
02:28:01 <gjanssens> :)
02:28:42 <gjanssens> chris: I'm struggling with list creation in guile, and have come up with something that works, but it may be really ugly in your view
02:28:53 <gjanssens> The call is this:
02:29:12 <gjanssens> let ((module (append mod-prefix (list rpt-file))))
02:29:20 <gjanssens> give or take a pair of parens
02:29:45 <gjanssens> mod-prefix is a list of symbols and rpt-file is a single symbol
02:30:14 <chris> it's fine
02:30:16 <gjanssens> the idea is that module should be the mod-prefix list with rpt-file appended to it
02:30:24 <gjanssens> Ok
02:30:45 <gjanssens> I thought you would redo these things with quote expressions
02:30:48 <chris> (let ((module `(,@mod-prefix ,rpt-file))) ...) may work as well :)
02:30:55 <chris> [untested]
02:31:07 <gjanssens> why the @ ?
02:31:20 <gjanssens> That's a new one to me in a list
02:31:42 <chris> try in REPL and be amazed :)
02:32:08 <chris> (define prefix '(a b c)) (define file 'd)
02:32:18 <chris> `(,prefix ,d) `(,@prefix ,d)
02:33:09 <chris> I call @ a bully prefix... takes up more than 1 space in the bus
02:33:50 <chris> rather: `(,prefix ,file) `(,@prefix ,file)
02:41:47 <chris> --> '((a b c) d) vs '(a b c d)
03:02:10 <gjanssens> cool, though for my own understanding I think I'll stick with my solution
03:04:54 *** shoonya has joined #gnucash
03:08:20 *** fabior has joined #gnucash
03:09:31 <chris> NP infinite ways of doing this
03:14:15 *** shibu has joined #gnucash
03:24:58 *** AdrianoKF has joined #gnucash
03:24:59 *** ChanServ sets mode: +v AdrianoKF
03:33:48 *** fabior has quit IRC
04:27:11 *** bertbob has quit IRC
04:28:40 *** bertbob has joined #gnucash
04:28:40 *** ChanServ sets mode: +v bertbob
04:55:08 <chris> gjanssens: regarding use-modules, the only remaining option would be to duplicate guile's use-modules definition and attach an intercept somewhere in the middle.
04:56:43 *** shibu has quit IRC
04:58:17 <gjanssens> chris: I prefer not to. Instead I'll go with my other idea and set up a deprecated module hierarchy.
04:59:28 *** shibu has joined #gnucash
04:59:32 <gjanssens> I plan to do that in cmake code, so a dev should only add something like 'add_deprecated_guile_module ("(gnucash report standard transaction)" "(gnucash reports standard transaction)") in cmake
05:00:01 <chris> ah clever
05:00:11 <gjanssens> Perhaps with an optional third parameter for a custom deprecation message. All the rest can be autogenerated from there.
05:15:48 *** storyjesse has joined #gnucash
05:18:04 *** shibu has quit IRC
05:18:50 *** shibu has joined #gnucash
05:19:13 *** storyjesse has quit IRC
05:21:46 *** mr_sm11th has joined #gnucash
05:21:47 *** ChanServ sets mode: +v mr_sm11th
06:02:25 *** shoonya has quit IRC
06:15:56 *** fabior has joined #gnucash
06:29:02 *** AdrianoKF has quit IRC
06:34:36 *** Jimraehl1 has joined #gnucash
06:35:41 *** Jimraehl1 has left #gnucash
06:47:42 *** Aussie_matt has quit IRC
06:59:49 *** oozer has joined #gnucash
07:02:00 *** fabior has quit IRC
07:07:57 *** Aussie_matt has joined #gnucash
07:17:11 *** boldstripe has joined #gnucash
07:22:28 *** warlord has joined #gnucash
07:22:28 *** gncbot sets mode: +o warlord
07:26:01 *** shibu has quit IRC
08:04:18 *** Mechtilde has joined #gnucash
08:11:21 *** User__ has joined #gnucash
08:15:11 *** jervin has joined #gnucash
08:22:13 *** redarrow has joined #gnucash
08:25:31 <gjanssens> chris: IIUC with your recent changes to test-graphing gnucash no longer relies on jqplot, right ?
08:26:01 <chris> correct
08:26:26 <gjanssens> I was about to remove jqplot, but I realized it comes with exposed api, like gnc:make-piechart-report
08:26:58 <gjanssens> If users have custom reports based on this api in 3.x these would stop working in 4.x if I remove that api
08:27:29 <gjanssens> Is there a way to map the exposed functions from the jqplot based api to the new chartjs api ?
08:28:13 <chris> uh... they can map loosely
08:28:14 <gjanssens> That is, if a user calls gnc:make-piechart-report, we emit a deprecation warning and reroute it to gnc:make-html-chart
08:28:40 <gjanssens> Well, loosely is enough, as long as the user doesn't get a flat-out report failure I'm ok with it.
08:29:00 <gjanssens> (together with the deprecation waring of course)
08:30:14 <gjanssens> (and it's gnc:make-piechart without the '-report' in my example)..
08:31:00 <gjanssens> Can you look into this for master?
08:31:25 <gjanssens> That's a prerequisite to permanently drop jqplot
08:32:00 <chris> I'll see what i can do
08:32:03 <gjanssens> Tx
08:39:23 *** User__ has quit IRC
08:49:46 *** redarrow has quit IRC
08:49:57 *** redarrow has joined #gnucash
08:54:38 *** jervin has quit IRC
09:07:43 <chris> there's an easy way to do: the html-piechart-render creates html-chart with html-piechart properties.
09:08:10 <chris> no need to map other functions
09:09:07 *** jervin has joined #gnucash
09:19:02 *** jervin has quit IRC
09:31:11 *** jervin has joined #gnucash
09:45:40 <gjanssens> chris: ok and what will happen if a user uses for example (gnc:html-barchart-set-width! bla) once that mapping is done ?
09:46:02 <gjanssens> Do we want to continue to support all these functions ?
09:46:57 *** gour has joined #gnucash
09:47:03 <chris> these functions work, sets html-barchart properties
09:47:19 <chris> it's the renderer that will query html-barchart properties and set html-chart properties instead
09:49:01 <chris> https://pastebin.com/raw/U4w69jgC is the idea
09:49:01 <gjanssens> That's a good thing. I note you're no longer using this in the updated reports, where it was used in maint reports
09:50:05 <gjanssens> The message should probably be more accurate, in "use gnc:make-html-chart instead"
09:50:55 <gjanssens> ISTR with the move to chartjs you also changed the preferred way to set chart properties ?
09:51:04 <chris> yes
09:51:22 <gjanssens> Shouldn't we then deprecate the complete old api on master ?
09:51:53 <chris> we could but setting deprecation warning on the constructors is enough
09:53:13 <gjanssens> With constructors do you mean the gnc:make-piechart and friends ?
09:53:36 <chris> yes, all other api will require a constructed old-chart object
09:54:56 <gjanssens> Ok, and what will happen if the user replaces the constructor with the new gnc:make-html-chart but forgets to update other api functions in a custom report ?
09:55:53 <chris> guile will complain loudly... wrong type sent to gnc:html-chart-set-width
09:56:06 <gjanssens> Thought so.
09:56:51 <gjanssens> Now imagine the user that's using the custom report is not as intimately familiar with the api as you are (and to a lesser extent as I am)
09:56:59 <gjanssens> How would the user react ?
09:58:08 <gjanssens> I'm trying to illustrate that a good deprecation warning is infinitely more user friendly than guile bombing out.
09:59:09 <gjanssens> It's more work for us developers though for sure...
09:59:24 <chris> well the current method illustrate above will not barf... html-barchart is still valid, except the render defers to html-chart
09:59:57 <gjanssens> Agreed. Deprecation is long term thinking
10:01:42 <gjanssens> Remembering my own early trials in migrating from guile 1.8 to guile 2.0 I was very grateful for every deprecation warning I got because I didn't have a full overview of what functions were interdependent
10:02:12 <gjanssens> And I also remember my frustration for messages that only said "this function is deprecated" without offering an alternative.
10:02:37 <gjanssens> Considering we eventually want to drop the old api at some point, we should plan for that well in advance
10:03:09 <gjanssens> I assume a casual user trying a custom report is not intimitely familiar with the gnucash api
10:03:43 <gjanssens> So if that user gets a first deprecation warning nudging him to use gnc:make-html-chart instead of gnc:make-piechart
10:03:54 <gjanssens> That user is likely to do just that and move on.
10:04:22 <gjanssens> In the expectation s/he did what was required to avoid the deprecation problem.
10:04:47 <gjanssens> However at that point the custom report is suddenly broken, rather that future safe!
10:04:56 <gjanssens> A very unpleasant experience.
10:05:00 <chris> so, perhaps we nudge towards test-graphing.scm for more info
10:05:49 <gjanssens> That's one option - make the deprecation warning elaborate enough the user fixes it properly first time.
10:06:06 <gjanssens> A safety net in the old api would even be better.
10:06:20 *** storyjesse has joined #gnucash
10:06:47 <gjanssens> Is there a level where we can intercept all api calls for say a piechart and validate if the object passed is a proper <pie-chart> object ?
10:07:09 *** gour1 has joined #gnucash
10:07:10 <gjanssens> That would be a good point to emit another warning suggesting the user may have been mixing old and new api.
10:08:00 <chris> yes very ugly
10:08:12 <gjanssens> For the looks of it it means amending each api function :(
10:08:44 <chris> exactly
10:08:57 *** gour has quit IRC
10:09:29 <chris> https://pastebin.com/raw/nW6kD3ng
10:14:14 <gjanssens> chris: I'd do this: https://pastebin.com/FA7ZtMqb but the basic idea is the same
10:14:36 <gjanssens> We only want to issue a deprecation warning when the user tries to use the old api with a new chart object
10:15:09 <gjanssens> Any other non piechart type is still a coding error that guile can catch for us
10:16:40 <gjanssens> OTOH I can't wait to see the deprecated API go. Yours is so much lighter :)
10:18:57 <chris> :)
10:19:12 *** Aussie_matt has quit IRC
10:19:15 <chris> i had lots of headaches designing the tree/leaf modifier
10:26:32 *** ecdhe has quit IRC
10:28:02 *** kael has joined #gnucash
10:28:02 *** ChanServ sets mode: +v kael
10:37:11 *** JayC has joined #gnucash
10:37:11 *** ChanServ sets mode: +v JayC
10:38:23 *** gour1 is now known as gour
10:40:25 *** jervin has joined #gnucash
10:41:27 *** Cuare has quit IRC
10:42:35 *** ecdhe has joined #gnucash
10:50:37 *** shibu has joined #gnucash
10:53:41 *** Mechtilde has quit IRC
11:08:22 *** guak has joined #gnucash
11:08:33 *** jervin has quit IRC
11:20:56 *** fabior has joined #gnucash
11:22:18 *** jervin has joined #gnucash
11:33:14 *** jervin has quit IRC
11:57:32 *** ArtGravity has joined #gnucash
11:57:32 *** ChanServ sets mode: +v ArtGravity
12:13:07 *** warlord has quit IRC
12:13:11 *** warlord has joined #gnucash
12:13:11 *** gncbot sets mode: +o warlord
12:22:47 *** shibu has quit IRC
12:24:06 *** shibu has joined #gnucash
12:35:39 *** Mechtilde has joined #gnucash
12:39:11 *** boldstripe has quit IRC
12:40:07 *** boldstripe has joined #gnucash
12:46:28 *** jervin has joined #gnucash
12:46:54 *** calvinct has joined #gnucash
12:48:32 *** jervin has quit IRC
12:49:00 *** fabior has quit IRC
13:07:18 *** storyjesse has quit IRC
13:08:03 *** gour has quit IRC
13:10:21 *** MarkFirewhal has quit IRC
13:11:50 *** jervin has joined #gnucash
13:12:45 *** gour has joined #gnucash
13:14:52 *** kael has quit IRC
13:15:34 *** Mechtilde has quit IRC
13:16:58 *** MarkFirewhal has joined #gnucash
13:18:07 *** Mechtilde has joined #gnucash
13:25:03 *** kael has joined #gnucash
13:25:03 *** ChanServ sets mode: +v kael
13:36:04 *** Mechtilde has quit IRC
13:39:52 *** Mechtilde has joined #gnucash
13:43:11 *** shibu has quit IRC
14:02:16 *** calvinct has quit IRC
14:02:53 *** calvinct has joined #gnucash
14:06:32 *** nikolai has joined #gnucash
14:06:32 *** ChanServ sets mode: +v nikolai
14:07:17 *** fell has quit IRC
14:07:47 *** fell has joined #gnucash
14:07:47 *** ChanServ sets mode: +o fell
14:07:49 *** calvinct has quit IRC
14:07:53 *** calvinct has joined #gnucash
14:28:52 *** nikolai has quit IRC
14:39:52 *** boldstripe has quit IRC
14:40:47 *** boldstripe has joined #gnucash
14:41:18 *** nikolai has joined #gnucash
14:42:25 *** jervin has quit IRC
14:43:33 *** Mechtilde has quit IRC
14:46:46 *** Mechtilde has joined #gnucash
15:09:14 *** jervin has joined #gnucash
15:11:13 *** bertbob has quit IRC
15:11:22 *** jervin has quit IRC
15:12:34 *** jervin has joined #gnucash
15:16:05 *** bertbob has joined #gnucash
15:16:05 *** ChanServ sets mode: +v bertbob
15:16:44 *** jervin has quit IRC
15:19:03 *** jervin has joined #gnucash
15:20:44 *** jervin has quit IRC
15:21:22 *** jervin has joined #gnucash
15:23:53 *** jervin has quit IRC
15:24:02 *** jervin has joined #gnucash
15:27:37 *** jervin has quit IRC
15:27:39 *** Mechtilde has quit IRC
15:29:15 *** Mechtilde has joined #gnucash
15:32:16 *** Mechtilde has quit IRC
15:53:02 *** kapip has quit IRC
15:59:25 *** User__ has joined #gnucash
16:01:42 *** kapip has joined #gnucash
16:24:32 *** User__ has quit IRC
16:36:45 *** jervin has joined #gnucash
16:37:10 *** calvinct has quit IRC
16:40:32 *** boldstripe has quit IRC
16:41:28 *** boldstripe has joined #gnucash
16:44:47 *** jervin has quit IRC
16:49:01 *** nikolai has quit IRC
16:53:43 *** ArtGravity has quit IRC
16:55:48 *** kael has quit IRC
17:10:09 *** gjanssens has quit IRC
17:35:08 *** gour has quit IRC
18:28:47 *** jmoll1234 has joined #gnucash
18:34:19 *** jmoll1234 has left #gnucash
18:35:04 *** jmoll1234 has joined #gnucash
18:36:24 *** jmoll1234 has left #gnucash
18:41:13 *** boldstripe has quit IRC
18:42:09 *** boldstripe has joined #gnucash
18:52:44 *** jmoll1234 has joined #gnucash
18:54:27 *** jmoll1234 has left #gnucash
18:54:49 *** jmoll1234 has joined #gnucash
18:55:52 *** jmoll1234 has left #gnucash
18:56:49 *** jmoll1234 has joined #gnucash
18:57:45 *** ChanServ sets mode: +v jmoll1234
18:59:14 *** ArtGravity has joined #gnucash
18:59:14 *** ChanServ sets mode: +v ArtGravity
18:59:15 *** jmoll1234 has quit IRC
19:00:03 *** jmoll1234 has joined #gnucash
19:11:58 *** Aussie_matt has joined #gnucash
19:44:12 *** guak has quit IRC
20:18:11 *** jmoll1234 has quit IRC
20:41:53 *** boldstripe has quit IRC
21:03:05 *** kapip has quit IRC
21:18:12 *** oozer has quit IRC
23:40:50 *** storyjesse has joined #gnucash