2019-04-15 GnuCash IRC logs

00:21:10 *** omnireq has joined #gnucash
00:59:31 *** jervin has joined #gnucash
01:04:55 *** Mechtilde has joined #gnucash
01:07:55 *** Mechtilde has quit IRC
01:10:38 *** jervin has quit IRC
01:11:31 *** jervin has joined #gnucash
01:15:29 *** Mechtilde has joined #gnucash
01:20:45 *** jervin has quit IRC
01:24:52 *** nicoroumeau has joined #gnucash
01:27:12 *** Mechtilde has quit IRC
01:30:51 *** nicoroumeau has quit IRC
01:35:56 *** Mechtilde has joined #gnucash
01:37:37 *** fell has quit IRC
01:38:55 *** fell has joined #gnucash
01:38:55 *** ChanServ sets mode: +o fell
02:03:06 *** fabior has joined #gnucash
02:10:07 *** Mechtilde has quit IRC
02:10:25 *** Mechtilde has joined #gnucash
02:31:29 *** fabior has quit IRC
02:36:39 *** gour has joined #gnucash
02:37:31 *** ChanServ sets mode: +v gour
03:29:13 *** fabior has joined #gnucash
03:30:58 *** fabior has quit IRC
04:05:07 *** Mechtilde has quit IRC
04:20:59 *** Mechtilde has joined #gnucash
04:21:50 *** storyjesse has joined #gnucash
04:54:33 *** boldstripe has joined #gnucash
04:54:46 *** boldstripe has quit IRC
04:55:39 *** isn0gud has joined #gnucash
04:58:14 *** abc134ca87 has joined #gnucash
04:59:51 *** warlord has quit IRC
05:15:04 *** gour has quit IRC
05:27:18 *** SingleMen3756 has joined #gnucash
05:28:54 *** SingleMen3756 has quit IRC
05:46:49 *** FoxT has quit IRC
05:54:29 *** FoxT has joined #gnucash
05:55:10 *** storyjesse has quit IRC
05:59:39 *** abc134ca87 has quit IRC
06:15:54 *** GabrieleV has quit IRC
06:35:52 *** warlord has joined #gnucash
06:35:52 *** gncbot sets mode: +o warlord
06:36:21 *** isn0gud has quit IRC
06:42:55 <warlord> .
06:45:18 *** oozer has joined #gnucash
06:49:01 *** fabior has joined #gnucash
06:50:58 *** Aussie_matt has quit IRC
06:52:10 *** User has joined #gnucash
06:58:09 *** fabior has quit IRC
06:58:30 *** isn0gud has joined #gnucash
06:58:30 <chris> on Windows my (current-encoding) outputs CP1252
06:59:25 <chris> (locale-encoding)
07:10:14 *** nimish2711 has joined #gnucash
07:18:27 *** nimish2711 has quit IRC
07:37:58 <chris> jralls see last para of https://www.gnu.org/software/guile/manual/html_node/String-Ports.html I think you know about it
07:44:11 <chris> https://pastebin.com/raw/ys4QrhMh is a safe string sanitizing function on Windows, avoids string ports
07:46:10 <chris> but this snippet only handles the sanitizing part... the monetary printer still munges unicode
07:46:49 <chris> so the issue becomes, avoid all string ports like the plague
07:53:17 *** User has quit IRC
07:53:24 <chris> Ok I can fix the TYR symbol issue
07:54:31 <chris> account-piecharts.scm: in subtitle, it's the (format #f ": ~a" str) which is munging unicode... remove format and unicode is intact
08:05:43 <chris> so there are 2 issues that need fixing for this
08:06:15 <chris> (1) html-string-sanitize must be rewritten, (2) avoid unicode in (format) strings
08:34:09 *** boldstripe has joined #gnucash
09:40:00 *** mikee has quit IRC
09:49:32 *** mikee has joined #gnucash
09:49:32 *** gncbot sets mode: +o mikee
09:49:32 *** ChanServ sets mode: +o mikee
09:59:40 *** zipppy has quit IRC
10:01:41 *** zipppy has joined #gnucash
10:05:10 *** KevinDB has quit IRC
10:06:08 *** kael has joined #gnucash
10:06:08 *** ChanServ sets mode: +v kael
10:08:33 *** KevinDB has joined #gnucash
10:08:33 *** ChanServ sets mode: +v KevinDB
10:08:45 <chris> conclusion nothing wrong with xaccPrintAmount or gnc_commodity_print_info ... it was (format) all along
10:09:19 *** nimish2711 has joined #gnucash
10:11:06 *** fell has quit IRC
10:12:25 *** fell has joined #gnucash
10:12:25 *** ChanServ sets mode: +o fell
10:27:02 *** nimish2711 has quit IRC
10:27:57 *** nimish2711 has joined #gnucash
10:46:26 * chris will not use (format) or string-ports anymore
10:47:24 * chris unless I know 100% they're safe
10:50:34 *** nimish2711 has quit IRC
10:51:06 *** nimish2711 has joined #gnucash
11:05:33 *** boldstripe has quit IRC
11:06:00 *** boldstripe has joined #gnucash
11:10:54 *** nimish2711 has quit IRC
11:11:21 *** nimish2711 has joined #gnucash
11:15:01 *** kael has quit IRC
11:26:14 *** nimish2711 has quit IRC
11:26:42 *** nimish2711 has joined #gnucash
11:41:35 *** nimish2711 has quit IRC
11:42:02 *** nimish2711 has joined #gnucash
11:47:38 *** jervin has joined #gnucash
11:50:50 *** jervin has quit IRC
11:57:38 *** nicoroumeau has joined #gnucash
11:59:10 *** guak has joined #gnucash
12:01:47 *** guak1 has joined #gnucash
12:01:55 *** nimish2711 has quit IRC
12:02:10 *** guak has quit IRC
12:02:10 *** guak1 is now known as guak
12:02:24 *** nimish2711 has joined #gnucash
12:07:15 *** nimish2711 has quit IRC
12:07:42 *** nimish2711 has joined #gnucash
12:09:18 *** kael has joined #gnucash
12:09:18 *** ChanServ sets mode: +v kael
12:17:14 *** fabior has joined #gnucash
12:17:35 *** nimish2711 has quit IRC
12:18:02 *** nimish2711 has joined #gnucash
12:18:32 *** calvinct has joined #gnucash
12:22:55 *** nimish2711 has quit IRC
12:23:22 *** nimish2711 has joined #gnucash
12:48:15 *** nimish2711 has quit IRC
12:48:43 *** nimish2711 has joined #gnucash
12:55:42 *** kael has quit IRC
12:55:45 *** kael has joined #gnucash
12:55:45 *** ChanServ sets mode: +v kael
12:58:35 *** nimish2711 has quit IRC
12:59:03 *** nimish2711 has joined #gnucash
12:59:53 *** nicoroumeau has quit IRC
13:00:50 *** nicoroumeau has joined #gnucash
13:05:30 *** ArtGravity has joined #gnucash
13:05:30 *** ChanServ sets mode: +v ArtGravity
13:11:44 *** fabior has quit IRC
13:12:32 *** jervin has joined #gnucash
13:16:34 *** jervin has quit IRC
13:23:55 *** nimish2711 has quit IRC
13:24:23 *** nimish2711 has joined #gnucash
13:29:15 *** nimish2711 has quit IRC
13:29:43 *** nimish2711 has joined #gnucash
13:36:22 *** fabior has joined #gnucash
13:39:35 *** nimish2711 has quit IRC
13:40:04 *** nimish2711 has joined #gnucash
13:44:25 *** calvinct has quit IRC
13:44:56 *** nimish2711 has quit IRC
13:45:24 *** nimish2711 has joined #gnucash
13:54:27 *** fell has quit IRC
13:55:17 *** nimish2711 has quit IRC
13:55:19 *** fabior has quit IRC
13:55:45 *** nimish2711 has joined #gnucash
14:05:37 *** nimish2711 has quit IRC
14:06:05 *** nimish2711 has joined #gnucash
14:15:09 *** frakturfreak has joined #gnucash
14:17:07 *** Mechtilde has quit IRC
14:20:58 *** nimish2711 has quit IRC
14:21:27 *** nimish2711 has joined #gnucash
14:21:51 *** fell has joined #gnucash
14:21:51 *** ChanServ sets mode: +o fell
14:24:28 *** User has joined #gnucash
14:29:02 *** User has quit IRC
14:31:18 *** nimish2711 has quit IRC
14:31:46 *** nimish2711 has joined #gnucash
14:36:38 *** nimish2711 has quit IRC
14:37:05 *** nimish2711 has joined #gnucash
14:40:01 *** fabior has joined #gnucash
14:46:58 *** nimish2711 has quit IRC
14:47:28 *** nimish2711 has joined #gnucash
14:57:21 *** nimish2711 has quit IRC
14:57:48 *** nimish2711 has joined #gnucash
15:05:00 *** nimish2711 has quit IRC
15:14:18 *** tienne has joined #gnucash
15:18:03 *** jervin has joined #gnucash
15:24:03 *** nicoroumeau has quit IRC
15:42:52 *** jervin has quit IRC
15:57:14 *** jibade has joined #gnucash
16:05:11 *** jibade has quit IRC
16:08:01 <jralls> chris: The string-ports para may be true for Guile 2.2, I proved it to be not true for 2.0 using the debugger. Unfortunately we're still stuck with 2.0 on Windows.
16:08:54 <mikee> .
16:10:29 <jralls> chris: Why does it spell the substitutions backwards?
16:31:44 *** nicoroumeau has joined #gnucash
16:53:33 *** nicoroumeau has quit IRC
16:56:01 *** nicoroumeau has joined #gnucash
17:00:56 *** frakturfreak has quit IRC
17:02:39 *** nicoroumeau has quit IRC
17:10:52 *** calvinct has joined #gnucash
17:19:21 *** calvinct has quit IRC
17:45:47 <mikee> jralls: Not "Welsh", "C" obviously. I've posted today's small effort.
17:47:19 *** fabior has quit IRC
17:47:26 <jralls> mikee: ;-)
17:48:48 * mikee watching FranLab dismantle a wire recorder,
18:16:17 *** calvinct has joined #gnucash
18:27:55 *** miklcct has quit IRC
18:30:55 *** fell has quit IRC
18:31:36 *** miklcct has joined #gnucash
18:31:36 *** ChanServ sets mode: +v miklcct
18:35:34 *** miklcct has quit IRC
18:40:54 *** Aussie_matt has joined #gnucash
18:41:36 *** miklcct has joined #gnucash
18:41:36 *** ChanServ sets mode: +v miklcct
19:08:08 *** jerryq has quit IRC
19:12:47 *** fell has joined #gnucash
19:12:47 *** ChanServ sets mode: +o fell
19:22:03 *** kael has quit IRC
19:33:30 *** tienne has quit IRC
19:45:02 <chris> jralls: substitutions are backwards because it's how lists are constructed in scheme. bit of long story.
19:45:35 <chris> imagine we want to transform an arbitrary long list eg (list 1 2 3) -> (list 11 12 13) by adding 10 each
19:46:25 <chris> to do it in scheme, start with the first which is 1, add 10, add to the resultlist to produce 11
19:46:55 <chris> then move to second number which is 2, add 10, get 12, then add to resultlist to produce '(11 12)
19:47:48 <chris> the last operation is technically: (append (list 11) (list 12)) which is not efficient because it traverses the resultlist
19:48:28 <chris> a better example will be (list 1 2 3 4 .... 99 10) -> (list 11 12 13 14 .. 109 110)
19:48:28 *** isn0gud has quit IRC
19:50:17 <chris> let's say we've reached halfway, 50, add 10, the resultlist will be (list 11 12 13 14 .. 59) to which we're adding (list 60) --> rather efficient because appending lists means traverse the resultlist to the last pair, set-cdr! the last pair to be new (cons 60 '())
19:50:31 <chris> so this method is wrong
19:51:08 *** isn0gud has joined #gnucash
19:51:37 <chris> it's more efficient to: build the resultlist backwards, then looping the new resultlist to be (cons newelement resultlist)
19:52:03 <chris> and when finish, a single reverse will produce the desired result
19:53:06 <chris> therefore looping lists and building a resultlist always work this way
19:53:08 <chris> see https://github.com/Gnucash/gnucash/blob/maint/gnucash/report/standard-reports/average-balance.scm#L280
19:53:42 <chris> moreover the subs are constructed using cons* instead of cons to produce a pair-terminating list
19:53:58 <chris> (cons* a b c d) is the same as (cons a (cons b (cons c d)))
19:54:14 <chris> in the amended string-sanitize, a/b/c are chars, and d is the resultlist
19:54:47 <chris> hence the resultlist gets several new chars tacked on in 1 go
19:54:53 <chris> and loop to the next char
19:55:17 <chris> wrt string-ports on Windows,
19:55:40 <chris> i've amended scm files in Program Files (x86)\gnucash\etc
19:55:47 <chris> and it does fix the unicode display in mine
19:57:45 <chris> above: let's say we've reached halfway, 50, add 10, the resultlist will be
19:57:46 <chris> (list 11 12 13 14 .. 59) to which we're adding (list 60) --> rather
19:57:46 <chris> (*)inefficient because appending lists means traverse the resultlist to
19:57:46 <chris> the last pair, set-cdr! the last pair to be new (cons 60 '())
19:59:56 <chris> the build-list-in-reverse trick is pervasive across scheme and creates good habits... I surmise it's a trick that catches pythonistas who don't know and creates inefficient code
20:00:31 <chris> see https://github.com/Gnucash/gnucash/pull/483/files#diff-ff8fb63dd4015df92d9626159ded27f8R125 too in the upcoming price-calculators - you can be assured of efficiency
20:00:32 <chris> gtg
20:03:59 *** Simon has quit IRC
20:07:25 *** chris has quit IRC
20:17:34 *** Simon has joined #gnucash
20:17:34 *** ChanServ sets mode: +v Simon
20:19:46 *** isn0gud has quit IRC
20:43:57 *** oozer has quit IRC
21:06:19 *** abc134ca87 has joined #gnucash
21:11:40 *** Simon has quit IRC
21:18:23 *** trying2Simplify has joined #gnucash
21:24:10 *** guak has quit IRC
21:52:53 *** abc134ca87 has left #gnucash
22:01:37 *** jerryq has joined #gnucash
22:05:15 *** Simon has joined #gnucash
22:05:15 *** ChanServ sets mode: +v Simon
22:10:33 *** trying2Simplify has quit IRC
22:10:58 *** jervin has joined #gnucash
22:11:29 *** jervin has quit IRC
22:15:59 *** badger92 has quit IRC
22:26:58 *** nimish2711 has joined #gnucash
22:41:29 *** ArtGravity has quit IRC
23:55:33 *** isn0gud has joined #gnucash