2022-07-04 GnuCash IRC logs

01:04:28 *** fell has quit IRC
01:05:46 *** fell has joined #gnucash
01:05:46 *** ChanServ sets mode: +o fell
01:20:27 *** sbluhm has joined #gnucash
01:24:33 *** NoobAlice has quit IRC
01:49:24 *** Gandalf has joined #gnucash
02:14:59 <Simon> jralls: GnuCash does do char* pointer comparison with entries in the string cache, it's why you can't just disable it - I tried
02:54:48 *** bertbob has quit IRC
03:00:23 *** bertbob has joined #gnucash
03:00:24 *** ChanServ sets mode: +v bertbob
03:03:27 *** bertbob has quit IRC
03:10:43 *** bertbob has joined #gnucash
03:10:44 *** ChanServ sets mode: +v bertbob
03:10:49 *** bertbob has quit IRC
03:11:18 *** bertbob has joined #gnucash
03:11:18 *** ChanServ sets mode: +v bertbob
03:59:39 *** Aussie_matt has joined #gnucash
04:01:28 *** Aussie_matt_ has joined #gnucash
04:03:07 *** Aussie_matt has quit IRC
05:21:52 *** chrko has quit IRC
05:21:56 *** chrko has joined #gnucash
05:21:56 *** ChanServ sets mode: +v chrko
06:12:14 *** storyjesse has joined #gnucash
07:22:03 *** chrko has quit IRC
07:24:19 *** chrko has joined #gnucash
07:24:19 *** ChanServ sets mode: +v chrko
07:58:47 *** gncbot has joined #gnucash
08:53:28 *** warlord has joined #gnucash
08:53:34 *** ChanServ sets mode: +qo warlord warlord
08:53:40 *** warlord sets mode: +o gncbot
09:05:05 *** storyjesse has quit IRC
10:27:33 *** gjanssens has joined #gnucash
10:27:33 *** ChanServ sets mode: +o gjanssens
11:03:13 *** sbluhm has quit IRC
11:03:16 *** Aussie_matt_ has quit IRC
11:05:33 <chris> just checked some expanded test-qof-string-cache benchmarks: GHashTable takes 7s, boost::unordered_map takes 33s :-O
12:25:03 *** sbluhm has joined #gnucash
12:40:15 *** matze999 has joined #gnucash
12:46:04 *** sbluhm has quit IRC
13:26:27 *** hresh has joined #gnucash
13:28:49 *** none_of_your_business has joined #gnucash
13:28:56 *** hresh has quit IRC
13:34:01 *** none_of_your_business has quit IRC
13:34:25 *** none_of_your_business has joined #gnucash
13:36:50 *** no_name has joined #gnucash
13:38:03 *** none_of_your_business has quit IRC
13:49:41 *** no_name has quit IRC
13:58:29 *** bertbob has quit IRC
14:05:35 *** bertbob has joined #gnucash
14:05:35 *** ChanServ sets mode: +v bertbob
15:43:00 <jralls> chris, that's what "deja vu" was about.
15:44:11 <jralls> Simon, I know. That's what the constexpr hash thing is about.
15:44:12 <Simon> ideally find a tool that can show you all char* comparisons to something other than NULL and get rid of it
15:47:56 <jralls> I think you can just replace `char* bar = CACHE_INSTERT("foo");` with `auto constexpr bar{hash_literal_string("foo")}; and the comparisons will work. Where that might break down is if you need to recover "foo" somewhere.
15:50:21 <jralls> But as I said on chris's PR changing those uses to enums would better express the intent and get the compiler to make sure you aren't mixing identifiers with different purposes.
15:51:20 *** Gandalf has quit IRC
15:56:24 <Simon> well many of the values are not constants...
15:57:51 <Simon> hashing strings doesn't make unique identifiers...
16:08:44 *** NoobAlice has joined #gnucash
16:08:44 *** ChanServ sets mode: +v NoobAlice
16:10:32 <jralls> Simon, I did that analysis in a PR comment. 92 of the 115 CACHE_INSERT args are string literals. The other 23 have to be dealt with differently.
16:13:47 <jralls> And while it's true that there's no perfect string hash that will produce a unique hash for any arbitrary string, we don't need that. We'd just need it to be unique in the at most 46 instances.
16:14:51 <Simon> I think the places where the ordering has to resort to a string comparison instead of a timestamp are going to be relatively few
16:15:38 <Simon> it would be useful to change all the places where char* is compared using string cache entries to use a macro
16:15:56 <Simon> so that it can be replaced with a strcmp and test disabling the string cache
16:17:07 <Simon> do you want me to make a version of https://github.com/Gnucash/gnucash/pull/1350 based on maint?
16:21:02 <jralls> Actually in light of Bob-IT's last comment and the fact that I just found that right-clicking in the tab bar brings up a menu of open tabs I think that 1350 is unnecessary.
16:24:40 *** jmdaemon has joined #gnucash
17:04:48 <Simon> but that has nothing to do with the purpose of the PR
17:07:13 <jralls> Oh? I thought the PR is to provide a menu to switch tabs when you have a lot of them open.
17:07:17 <Simon> you're effectively proposing that instead of being able to single click any open tab (because they fit on the 2560x1440 display) I should instead leave the tabs at the top and right-click them every time I need to select a different tab that isn't visible
17:09:18 <jralls> No requirement to reposition the tabs, it works no matter where you put them.
17:09:53 <jralls> So if the tab you want is visible you just click it. If it's not you right click and pick it from the menu.
17:11:12 <jralls> Or as long as you're not on macOS where it doesn't work, you can ctrl-alt-space to bring up the tab menu instead of right-clicking.
17:11:58 <Simon> https://s85.org/tMDJ9NtQ https://s85.org/NmhBdRKA
17:12:23 <Simon> yes, which is *two clicks* instead of *one click*
17:17:11 * jralls rolls eyes.
17:21:41 <Simon> so you think I should leave the tabs at the top and waste the whole width of the screen when the window is full size?
17:23:42 *** gjanssens has quit IRC
17:25:12 <jralls> Well, I usually have only 3 tabs open--the two cash accounts and the Accounts tab. I open others only when I need them, which isn't often, and close them when I'm done.
17:26:26 <jralls> And I seldom need GnuCash to take up more than 1/6 or so of one monitor.
17:29:24 <jralls> But IIUC you usually full-screen GnuCash and have lots of tabs open to one side, but sometimes split-screen with something else and put the tabs on top to make more space for the register.
17:29:48 *** mauritslamers has quit IRC
17:29:54 <jralls> And the 4 clicks needed to open the preferences window and select Window is too much effort.
17:32:24 *** mauritslamers has joined #gnucash
17:32:24 *** ChanServ sets mode: +v mauritslamers
17:34:41 <jralls> For that I agree with Bob that it should be on the View menu; I'd go further and say it should be a radio-menu submenu on a Tab Position menu item.
17:36:41 <Simon> I'll move it to the View menu; while it would be quicker to use I'm not sure it justifies a top level menu
17:36:59 <Simon> (the preferences window is 5 clicks because it needs closing too)
17:37:32 <jralls> No, not a top-level menu. View>Tab Position>Right/Left/Top/Bottom.
17:37:46 <Simon> ok
17:38:35 <Simon> I was initially going to do 4 radio items directly under View but decided that took up to much space in a prime position (I think it'd have to go at the top?) and moved it to Window... only later moving the 4 options to a submenu
17:38:42 <jralls> And no, the preferences window isn't modal, you don't need to close it.
17:39:06 <Simon> I do with the usability of the window manager I'm using
17:39:13 <Simon> one day I'll get around to finding a better one...
17:39:45 <jralls> It could go up top on the View menu or under Double Line mode. I don't think it matters that much.
17:41:29 <Simon> for consistency with the other groups I'd put it under Status Bar
17:41:44 <jralls> OK, that works too.
17:58:38 <jralls> To the original question about can it go on maint: Sure, it's not really a substantial change.
21:27:57 *** Aussie_matt has joined #gnucash
22:51:54 *** Aussie_matt has quit IRC
22:59:42 *** Aussie_matt has joined #gnucash