Live data from Hacker News

Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

blog.kowalczyk.info

61–70 of 175 posts

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#61
post #40

Earlier quoted context omitted.

I actually prefer a textfile to change the colors, especially for a pdf reader I don't like white text on the "#000000" black that a lot of apps use. Instead I use "BackgroundColor = #ECECEC" which is much better for the eyes imho.

Webapps and mobile apps really need two dark modes - the one you like, i.e. light grey text on dark grey background, and another one for AMOLED screens, that's actual light grey or white on pure black . On AMOLED displays, that #000000 not only looks nice, it also saves battery, as it shuts the given pixel off. The difference is substantial - with modern UI trends that waste most of screen space, a "grey on pure blac…

No AMOLED screens on pure black do not consume significantly less power than a dark non pure black color.

The power consumption on pure black vs another dark color is extremely similar. This is because on AMOLED screens individual pixels control themselves and power for off vs dark is very similar.

Source: https://www.xda-developers.com/amoled-black-vs-gray-dark-mod...

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#62
>> The only way for one person to even attempt cross-platform app is to use a UI abstraction layer like Qt, WxWidgets or Gtk. The problem is that Gtk is ugly, Qt is extremely bloated and WxWidgets barely works.

So, how you are going to write cross platform apps, then? :D

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#63
> memory leaks. It's surprisingly hard to find an easy to use memory leak detection tool.

I can vouch for heaptrack[1] nowadays, although it's pretty much Linux only. It's under the umbrella of KDE, but a heaptrack trace only requires a CLI app, and there is a nice Qt viewer to analyse the memory consumption.

It tracks the memory utilization at the level of malloc'd/free'd bytes. It's fine if your memory leak or other memory utilization problem is on this level. Recently I dealt with an issue, where increasing memory utilization was caused by fragmentation within the allocator. This didn't show up in heaptrack as an increasing memory utilization, but heaptrack still pointed out where most of the temporary allocations happened, leading to the culprit of the fragmentation.

[1] https://github.com/KDE/heaptrack

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#64
post #40
post #28

Earlier quoted context omitted.

It’s missing dark mode that other low-key projects have adopted. It’s an app that’s lovely to use, but it sure does give your eyeballs a suntan when it’s open. Yes, there are custom settings you can set, but for simple software, I just want a simple switch.

I actually prefer a textfile to change the colors, especially for a pdf reader I don't like white text on the "#000000" black that a lot of apps use. Instead I use "BackgroundColor = #ECECEC" which is much better for the eyes imho.

I like it when systems have a separate "dark mode," with grays, and "OLED dark mode," with true blacks for high contrast/battery saving on OLED displays. There are a few Android apps that do it and I wish it were more common.

Straight hex codes of course work, but they're not a good option if the program has more than one color.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#65
post #62

>> The only way for one person to even attempt cross-platform app is to use a UI abstraction layer like Qt, WxWidgets or Gtk. The problem is that Gtk is ugly, Qt is extremely bloated and WxWidgets barely works. So, how you are going to write cross platform apps, then? :D

Do like everybody else does and wrap it in a web-browser.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#66
post #60

SumatraPDF author here. Glad people like the software for the reasons I thought the would (small, fast). If you haven't already: use Ctrl + K (Command Palette), a better way to operate the program than menus etc. Also I'll plug my latest project: I "ported" notepad2 to web: https://onlinetool.io/notepad2/ It's 85% done i.e. some functions are not implemented. On Chrome / Edge it can even read / write files from your…

I rarely use SumatraPDF because I often switch Mac-Windows. That said, I certainly appreciate small fast software, e.g uTorrent.

It's small because it's Windows only, and very likely avoid cross platform libs and rewrite everything on their own. For writing personal project, I agree cross platform my be over-rated. Just stick to your favorite platform. Make it works and optimized.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#67

Earlier quoted context omitted.

Webapps and mobile apps really need two dark modes - the one you like, i.e. light grey text on dark grey background, and another one for AMOLED screens, that's actual light grey or white on pure black . On AMOLED displays, that #000000 not only looks nice, it also saves battery, as it shuts the given pixel off. The difference is substantial - with modern UI trends that waste most of screen space, a "grey on pure blac…

No AMOLED screens on pure black do not consume significantly less power than a dark non pure black color. The power consumption on pure black vs another dark color is extremely similar. This is because on AMOLED screens individual pixels control themselves and power for off vs dark is very similar. Source: https://www.xda-developers.com/amoled-black-vs-gray-dark-mod...

Not all dark modes are really that dark, though. MacOS comes to mind but there are plenty of examples. I'd be interested to see a comparison of average luminance.

Also, gray uniformity is an unfortunate shortcoming on a lot of OLEDs.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#68
post #28
post #2

I use SumatraPDF almost every day and I love it. It is very rare these days to have an application that is all of the following: - Small and fast - Hand-crafted for a particular platform - Not bloated with oddly specific UI menus and configuration settings It has one job and it does it very well. Thank you for it.

It’s missing dark mode that other low-key projects have adopted. It’s an app that’s lovely to use, but it sure does give your eyeballs a suntan when it’s open. Yes, there are custom settings you can set, but for simple software, I just want a simple switch.

win32 doesn't have 'dark mode'. If you want that you have to set system colors.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#69

I agree with his points about treating it like commercial software (in terms of having a website/screenshots/etc) but paradoxically the more professional an open source site looks, the more I assume there's going to be a catch. When you find a utility which has a site that looks like Richard Stallman's website you breathe easily because it's unlikely there's going to be any time-limited trial version, subscription mo…

> but paradoxically the more professional an open source site looks, the more I assume there's going to be a catch

I hate to admit this, but I feel the same way when it comes to programmers themselves.

I've tried very, very hard to be mindful of this in an effort to correct it, but I still have this gut feeling when I encounter a fellow programmer with the general put-together-ness of someone in the C-suite.

What makes it worse is that I've had this gut feeling validated several times in the past. I once worked with a very cover-of-GQ programmer who, after ten+ years in the industry, would struggle with FizzBuzz-esque problems.

Re: Lessons learned from 15 years of SumatraPDF, an open source Windows app (2021)

#70
post #64
post #40

Earlier quoted context omitted.

I actually prefer a textfile to change the colors, especially for a pdf reader I don't like white text on the "#000000" black that a lot of apps use. Instead I use "BackgroundColor = #ECECEC" which is much better for the eyes imho.

I like it when systems have a separate "dark mode," with grays, and "OLED dark mode," with true blacks for high contrast/battery saving on OLED displays. There are a few Android apps that do it and I wish it were more common. Straight hex codes of course work, but they're not a good option if the program has more than one color.

Me too. I use OLED dark mode regardless of display technology but if mumble mumble display technology mumble battery is enough to get designers to see reason, then I’ll take the win.
Post reply on HN