Feeds
This week in KDE: Custom ordering for KRunner search results
This was a big week for KRunner! In addition, the number of open Plasma 6 issues continues to tick down. Thanks to everyone who’s been making this happen!
Plasma 6General info – Open issues: 81
You can now manually configure certain types of search results in KRunner to be high priority and hence always appear first in the results list! (Alexander Lohnau, link):
KRunner has also received a lot of performance work (Alexander Lohnau, link)
Landed some nice performance work for KWin as well, including making it do less unnecessary work by avoiding repainting layers of the screen that haven’t changed at all (Xaver Hugl, link)
Did a Plasma performance push too, resulting in various parts of Plasma and System Settings launching in some cases hundreds of milliseconds faster (Fushan Wen, link 1, link 2, link 3, and link 4)
The Breeze icon theme’s “refresh” icon and all other icons that use a similar “circle with arrows” style of iconography have now been updated with a new arrow style that looks nicer (Philip Murray, link):
The Breeze icon theme now has more colorful weather icons to match additional weather conditions supported by various weather providers (Alois Spitzbart, link)
When supported, KRunner and KRunner-powered searches now let you manually initiate “Hybrid Sleep”, which is when the system goes to sleep immediately and then hibernates in a few hours (Natalie Clarius, link):
The Display Configuration widget is now less intrusive on your System Tray, and only appears in the visible part if you’ve enabled Presentation Mode (Fushan Wen, link)
Improved the “your distro shipped Discover without its app backends” message to be shorter and more comprehensible (me: Nate Graham, link)
Explanatory text of placeholder messages found throughout Kirigami-based apps is now mouse-selectable and copyable, and can contain clickable links (me: Nate Graham, link)
User Interface ImprovementsPreview thumbnails for HDR images being viewed in non-HDR mode apps are now converted to the sRGB color space, ensuring that they’re actually viewable (Mirco Miranda, kio-extras 23.12. Link)
Konsole’s multi-process architecture gained support for putting each process in its own Systemd cgroup when using (Systemd, of course), which makes them show up correctly as children of Konsole in System Monitor (Theodore Wang, Konsole 23.12. Link)
We now support public holidays in Benin (Lukas Sommer, KDE Frameworks 5.110. Link)
Other Significant Bugfixes(This is a curated list of e.g. HI and VHI priority bugs, Wayland showstoppers, major regressions, etc.)
Fixed yet another way that Plasma could crash when switching Global Themes (Harald Sitter, Plasma 5.27.8. Link)
The Widget Explorer’s category filter once again works for people using the system in a language other than English after we broke this recently, sorry! (David Redondo, Plasma 5.27.8. Link)
Fixed one of the most common random generally unexplainable-to-the-user crashes in Plasma (David Edmundson, Plasma 6.0. Link)
In the Plasma Wayland session, the “Maximized” window placement mode no longer gets inappropriately applied to OSDs (David Edmundson, Plasma 6.0. Link)
Other bug-related information of interest:
- 3 Very high priority Plasma bugs (down from 4 last week). Current list of bugs
- 57 15-minute Plasma bugs (same as last week). Current list of bugs
- 103 KDE bugs of all kinds fixed this week. Full list of bugs
Added a bunch of autotests for Kirigami.PlaceholderMessage (Ivan Tkachenko, link)
Added a bunch of autotests for the Media Controller widget (Fushan Wen, link)
…And everything elseThis blog only covers the tip of the iceberg! If you’re hungry for more, check out https://planet.kde.org, where you can find more news from other KDE contributors.
How You Can HelpIf you’re a developer, work on Qt6/KF6/Plasma 6 issues! Plasma 6 is usable for daily driving now, but still in need of bugfixing and polishing to get it into a releaseable state by the end of the year.
Otherwise, visit https://community.kde.org/Get_Involved to discover other ways to be part of a project that really matters. Each contributor makes a huge difference in KDE; you are not a number or a cog in a machine! You don’t have to already be a programmer, either. I wasn’t when I got started. Try it, you’ll like it! We don’t bite!
And finally, KDE can’t work without financial support, so consider making a donation today! This stuff ain’t cheap and KDE e.V. has ambitious hiring goals. We can’t meet them without your generous donations!
Slimbook Fixins
My Slimbook died. I closed the lid and chucked the laptop into a backpack, and two hours later at the other end of that trip it didn’t start at all. Something I really like about Slimbook is their customer service. My experience is that sending them mail is actually useful, and this time I got back a bunch of troubleshooting advice and a disassembly video. So the machine may be out of warranty, there’s still support and help to repair the machine – good from a sustainability perspective, too.
Matija explains why he chose Slimbook (Pro X 14) this time around, and most of his considerations are ones I share. Or, would share, if I was shopping for a new laptop.
The troubleshooting suggestions from Slimbook were pretty straightforward. My “warranty void” sticker was already scratched open from some previous time I needed to mess around inside the machine so 11 screws later (I’m happy they no longer use tiny Torx heads) I could follow the rest of their guide.
To be fair, I only got to step 3 of their suggestions before the machine worked again:
- Have you tried turning it off and on again?
- Have you tried turning it off, disconnecting the power supply, disassembling the machine, disconnecting memory, SSD and battery, then getting coffee and having lunch and only after lunch reconnect the memory and SSD and power supply and see if it boots?
- Ok, now turn it off again, disconnect the power supply and reconnect the battery. Reconnect power supply. Does it still boot?
I can’t tell if I may have knocked something out of alignment, or if the battery management was briefly confused, but this decidedly low-tech guide has saved me a bunch of money and trouble.
Thanks, Slimbook!
Lullabot: Designing Content Authoring Experiences That Editors Don't Hate
Most people don't love their content management system.
In my experience, the number one complaint of organizations looking to replace their current CMS is, simply, “Our editors hate it.” (link)
Stack Abuse: Remove Elements from a List Python by Index
In this Byte we'll be exploring how to remove an element from a list by its index. Whether you're experienced or a novice, you probably find yourself having to do this quite frequently. In the following sections, we'll be showing a couple different methods for removing an element by index.
Python Lists and IndexingPython lists are a type of data structure that can hold an ordered collection of items, which means you can store multiple items in a single variable. These items can be of any type and you can mix types within a single list.
my_list = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"] print(my_list) ['apple', 'banana', 'cherry', 'orange', 'kiwi', 'melon', 'mango']In Python, indexing syntax can be used as a substitute for the list.get() method. Python uses zero-based indexing, so the first element has an index of 0.
print(my_list[0]) # prints 'apple' print(my_list[2]) # prints 'cherry' apple cherry How to Remove an Element by IndexThere are several ways to remove an element from a list by its index in Python. The two most common methods are using the pop() method and the del statement. Let's go through each of them.
Using pop() MethodThe pop() method removes the element at the specified position. The method also returns the value of the removed element. This can be useful if you need to use the value after removing it from the list.
my_list = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"] removed_element = my_list.pop(1) print(removed_element) # prints 'banana' print(my_list) # prints ['apple', 'cherry', 'orange', 'kiwi', 'melon', 'mango']Output:
banana ['apple', 'cherry', 'orange', 'kiwi', 'melon', 'mango']Note: If you use the pop() method without an index, it removes and returns the last item in the list.
In my experience, I tend to like the pop() method since it's both simple to use and it returns to you the value that was removed.
Using del StatementPython's del statement is a powerful tool that allows you to remove an element from a list by its index. This is a straightforward and efficient way to deal with unwanted elements. Let's see it in action:
fruits = ['apple', 'banana', 'cherry', 'date'] del fruits[1] print(fruits)Output:
['apple', 'cherry', 'date']In this example, we're deleting the second element ('banana') from our list of fruits by referencing its index (1). Remember, Python list indexing starts at 0!
Note: Be careful when using the del statement. If you try to delete an element at an index that doesn't exist, Python will throw an IndexError.
Removing Multiple Elements by IndexWhat if you need to remove multiple elements from a list? You could use the del statement in a loop, but there's a more efficient way. Let's create a function that accepts a list and a set of indices to be removed:
def remove_indices(input_list, indices): indices = set(indices) # remove duplicates input_list = [v for i, v in enumerate(input_list) if i not in indices] return input_list fruits = ['apple', 'banana', 'cherry', 'date'] print(remove_indices(fruits, [0, 2]))Output:
['banana', 'date']In this example, we're removing the first and third elements from our list by passing their indices (0 and 2) to our remove_indices function.
Removing Elements in a RangeIn other scenarios, we may need to remove a range of elements from a list. Python's slice assignment can be used to achieve this. Let's try removing elements from index 1 to 3:
fruits = ['apple', 'banana', 'cherry', 'date', 'elderberry'] fruits[1:3] = [] print(fruits)Output:
['apple', 'date', 'elderberry']Here, 'banana' and 'cherry' have been removed from the list. The slice 1:3 includes indices 1 and 2, but not 3, as Python slice ranges are up to, but not including, the end index.
ConclusionManipulating lists is a fundamental part of programming in Python. Whether you're removing a single element, multiple elements, or a range of elements, Python provides several ways to achieve this.
Profiling & Optimizing KRunner
One central topic of this year's Akademy was energy efficiency and performance of software. I took this occasion to give KRunner another look in regard to profiling, because the multithreading refactor simplified lots of plugin code and allowed for more optimizations.
When I did some benchmarking around two years ago, one of my major performance surprises was the windowed widgets runner. This runner queried all available applets for each letter typed. https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/322/ reused the queried metadata for the duration of the match session.
When I created the “Systemsettings” runner plugin, I took the same approach toward reusing data. But with some better understanding of performance and improved KRunner APIs, I took another stance at improving this and the “Applications” runner. I choose these two, because they are one of the most central plugins for the search experience. Also, the underlying data that is queries (config modules and applications) is quite large.
For the applications runner, I already did an optimization to reuse the loaded apps during the lifetime of the match session around a month ago. All the described improvements are based on top of that work. My approach was to benchmark the runner using hotspot, look at the results and identify unexpectably expensive calculations.
In both plugins, I noticed that checks for an application being authorized or not were surprisingly expensive. In systemsettings, we did the check twice, once by appending the old KF5 “.desktop” postfix to the plugin ID. This could simply be removed in KF6. For the applications runner, the check was done inside KService to determine if the application is hidden. With KF6, the concept of ServiceTypes has gone away, and thus we don't need this check anymore (https://invent.kde.org/frameworks/kservice/-/merge_requests/154).
While cleaning up the visibility check in KService provided faster results, it is even better to check the visibility once we load the applications and not when we filter multiple times for each letter typed.
There were also some pretty significant gains in the systemsettings runner by reducing lookups of the KPluginMetaData JSON object. For example, the user-visible name can be read once inside the loop and then stored as a simple variable. Another issue was that we created a QueryMatch object and assigned some properties, before checking if the given config module matches the query. This was a simple fix and avoided lots of unneeded object creations and temporary memory allocations.
Some other smaller improvements were:
- Systemsettings runner:
- Reusing calculated values, like the query being split in individual words
- Only checking the name for short queries, this also avoid results to appear “random”
- Applications runner:
- Also avoid creating unneeded QueryMatch, though this affected far fewer cases
- Reduce double writes/lookups for internal de-duplication check
- Inline some trivial, internal methods
- Use temporary variables for KService properties when we need it as a variable in the current scope anyway (avoiding usage of iterator on temporary)
- Remove unneeded lambdas for simple filtering. This was a leftover for when we used KApplicationTrader for each letter typed
- Remove unneeded X-KDE-More check, we don't use this in any meaningful way
- Remove check if app may be shown on current platform. In case this check would return false, the app would be considered hidden.
Now you know about the technical changes, let's look at the actual performance measurements! In the original merge requests, I have benchmarked using a test application that is part of the KRunner repo. Since that required me manually typing though, I have later on created a tool for automatically running queries.
Systemsettings runner: The total CPU cycles for matching and querying of the config module were reduced by around 30%. If one only looks at the CPU cycles for matching, the reduction was around two thirds. This means that data initialization was slightly improved, but is still the heaviest part. But once you have typed the first letter and the data is loaded, querying KRunner or the application launcher until it is closed is a lot more efficient!
BEFORE:
AFTER:
Applications runner: The total CPU cycles were reduced by 24% and unlike the other runner, data initialization for the match session took slightly longer. This is due to the check if the app should be shown or not being made during loading and not filtering. But partly due to this tradeoff, querying is almost 60% faster!
The real-world gains depend on the user behavior. For the system settings runner, I have queried “theme” and emulated closing the launcher. For the applications runner, I have used “firefox” instead. In case you have a longer query, the optimizations would come more into play.
BEFORE:
AFTER:
Besides improving performance, I also made sure to simplify and clean up the code. Compared to the previous state, the changes have removed 40 lines in total. There is for sure room for further optimizations, but I intentionally decided against changes that would cause a complexity vs. performance tradeoff.
I hope you enjoyed this read!
Robin Wilson: How to get GeoParquet support in GDAL/OGR from conda-forge
Just a quick one this time…
GeoParquet is a cool new-ish format for geospatial data. I’ve tried to use it a couple of times, but always run into issues with my GDAL/OGR install not supporting it. Each time this has led to me giving up, as I couldn’t be bothered to install GDAL from somewhere else.
Today, I found the solution. I usually use GDAL from conda-forge, and it turns out you can install GeoParquet support for that GDAL by just installing an extra conda-forge package:
conda install -c conda-forge libgdal-arrow-parquet(feel free to replace conda with mamba if – like me – you’re using mamba for its speed improvements).
Once this is installed, GeoParquet works in everything that uses that GDAL library – in my case this included the GDAL/OGR command-line tools, plus various Python modules that link to GDAL.
This is actually documented at the end of the GDAL GeoParquet driver page, but I don’t think I’d ever scrolled to the bottom of that before.
FSF Blogs: August GNU Spotlight with Amin Bandali: Seventeen new GNU releases!
August GNU Spotlight with Amin Bandali: Seventeen new GNU releases!
FSF Events: GNU40
Simon Josefsson: Trisquel on ppc64el: Talos II
The release notes for Trisquel 11.0 “Aramo” mention support for POWER and ARM architectures, however the download area only contains links for x86, and forum posts suggest there is a lack of instructions how to run Trisquel on non-x86.
Since the release of Trisquel 11 I have been busy migrating x86 machines from Debian to Trisquel. One would think that I would be finished after this time period, but re-installing and migrating machines is really time consuming, especially if you allow yourself to be distracted every time you notice something that Really Ought to be improved. Rabbit holes all the way down. One of my production machines is running Debian 11 “bullseye” on a Talos II Lite machine from Raptor Computing Systems, and migrating the virtual machines running on that host (including the VM that serves this blog) to a x86 machine running Trisquel felt unsatisfying to me. I want to migrate my computing towards hardware that harmonize with FSF’s Respects Your Freedom and not away from it. Here I had to chose between using the non-free software present in newer Debian or the non-free software implied by most x86 systems: not an easy chose. So I have ignored the dilemma for some time. After all, the machine was running Debian 11 “bullseye”, which was released before Debian started to require use of non-free software. With the end-of-life date for bullseye approaching, it seems that this isn’t a sustainable choice.
There is a report open about providing ppc64el ISOs that was created by Jason Self shortly after the release, but for many months nothing happened. About a month ago, Luis Guzmán mentioned an initial ISO build and I started testing it. The setup has worked well for a month, and with this post I want to contribute instructions how to get it up and running since this is still missing.
The setup of my soon-to-be new production machine:
- Talos II Lite
- POWER9 18-core v2 CPU
- Inter-Tech 4U-4410 rack case with ASPOWER power supply
- 8x32GB DDR4-2666 ECC RDIMM
- HighPoint SSD7505 (the Rocket 1504 or 1204 would be a more cost-effective choice, but I re-used a component I had laying around)
- PERC H700 aka LSI MegaRAID 2108 SAS/SATA (also found laying around)
- 2x1TB NVMe
- 3x18TB disks
According to the notes in issue 14 the ISO image is available at https://builds.trisquel.org/debian-installer-images/ and the following commands download, integrity check and write it to a USB stick:
wget -q https://builds.trisquel.org/debian-installer-images/debian-installer-images_20210731+deb11u8+11.0trisquel14_ppc64el.tar.gz tar xfa debian-installer-images_20210731+deb11u8+11.0trisquel14_ppc64el.tar.gz ./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso echo '6df8f45fbc0e7a5fadf039e9de7fa2dc57a4d466e95d65f2eabeec80577631b7 ./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso' | sha256sum -c sudo wipefs -a /dev/sdX sudo dd if=./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso of=/dev/sdX conv=sync status=progressSadly, no hash checksums or OpenPGP signatures are published.
Power off your device, insert the USB stick, and power it up, and you see a Petitboot menu offering to boot from the USB stick. For some reason, the "Expert Install" was the default in the menu, and instead I select "Default Install" for the regular experience. For this post, I will ignore BMC/IPMI, as interacting with it is not necessary. Make sure to not connect the BMC/IPMI ethernet port unless you are willing to enter that dungeon. The VGA console works fine with a normal USB keyboard, and you can chose to use only the second enP4p1s0f1 network card in the network card selection menu.
If you are familiar with Debian netinst ISO’s, the installation is straight-forward. I complicate the setup by partitioning two RAID1 partitions on the two NVMe sticks, one RAID1 for a 75GB ext4 root filesystem (discard,noatime) and one RAID1 for a 900GB LVM volume group for virtual machines, and two 20GB swap partitions on each of the NVMe sticks (to silence a warning about lack of swap, I’m not sure swap is still a good idea?). The 3x18TB disks use DM-integrity with RAID1 however the installer does not support DM-integrity so I had to create it after the installation.
There are two additional matters worth mentioning:
- Selecting the apt mirror does not have the list of well-known Trisquel mirrors which the x86 installer offers. Instead I have to input the archive mirror manually, and fortunately the archive.trisquel.org hostname and path values are available as defaults, so I just press enter and fix this after the installation has finished. You may want to have the hostname/path of your local mirror handy, to speed things up.
- The installer asks me which kernel to use, which the x86 installer does not do. I believe older Trisquel/Ubuntu installers asked this question, but that it was gone in aramo on x86. I select the default “linux-image-generic” which gives me a predictable 5.15 Linux-libre kernel, although you may want to chose “linux-image-generic-hwe-11.0” for a more recent 6.2 Linux-libre kernel. Maybe this is intentional debinst-behaviour for non-x86 platforms?
I have re-installed the machine a couple of times, and have now finished installing the production setup. I haven’t ran into any serious issues, and the system has been stable. Time to wrap up, and celebrate that I now run an operating system aligned with the Free System Distribution Guidelines on hardware that aligns with Respects Your Freedom — Happy Hacking indeed!
Simon Josefsson: Trisquel on ppc64el: Talos II
The release notes for Trisquel 11.0 “Aramo” mention support for POWER and ARM architectures, however the download area only contains links for x86, and forum posts suggest there is a lack of instructions how to run Trisquel on non-x86.
Since the release of Trisquel 11 I have been busy migrating x86 machines from Debian to Trisquel. One would think that I would be finished after this time period, but re-installing and migrating machines is really time consuming, especially if you allow yourself to be distracted every time you notice something that Really Ought to be improved. Rabbit holes all the way down. One of my production machines is running Debian 11 “bullseye” on a Talos II Lite machine from Raptor Computing Systems, and migrating the virtual machines running on that host (including the VM that serves this blog) to a x86 machine running Trisquel felt unsatisfying to me. I want to migrate my computing towards hardware that harmonize with FSF’s Respects Your Freedom and not away from it. Here I had to chose between using the non-free software present in newer Debian or the non-free software implied by most x86 systems: not an easy chose. So I have ignored the dilemma for some time. After all, the machine was running Debian 11 “bullseye”, which was released before Debian started to require use of non-free software. With the end-of-life date for bullseye approaching, it seems that this isn’t a sustainable choice.
There is a report open about providing ppc64el ISOs that was created by Jason Self shortly after the release, but for many months nothing happened. About a month ago, Luis Guzmán mentioned an initial ISO build and I started testing it. The setup has worked well for a month, and with this post I want to contribute instructions how to get it up and running since this is still missing.
The setup of my soon-to-be new production machine:
- Talos II Lite
- POWER9 18-core v2 CPU
- Inter-Tech 4U-4410 rack case with ASPOWER power supply
- 8x32GB DDR4-2666 ECC RDIMM
- HighPoint SSD7505 (the Rocket 1504 or 1204 would be a more cost-effective choice, but I re-used a component I had laying around)
- PERC H700 aka LSI MegaRAID 2108 SAS/SATA (also found laying around)
- 2x1TB NVMe
- 3x18TB disks
According to the notes in issue 14 the ISO image is available at https://builds.trisquel.org/debian-installer-images/ and the following commands download, integrity check and write it to a USB stick:
wget -q https://builds.trisquel.org/debian-installer-images/debian-installer-images_20210731+deb11u8+11.0trisquel14_ppc64el.tar.gz tar xfa debian-installer-images_20210731+deb11u8+11.0trisquel14_ppc64el.tar.gz ./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso echo '6df8f45fbc0e7a5fadf039e9de7fa2dc57a4d466e95d65f2eabeec80577631b7 ./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso' | sha256sum -c sudo wipefs -a /dev/sdX sudo dd if=./installer-ppc64el/20210731+deb11u8+11/images/netboot/mini.iso of=/dev/sdX conv=sync status=progressSadly, no hash checksums or OpenPGP signatures are published.
Power off your device, insert the USB stick, and power it up, and you see a Petitboot menu offering to boot from the USB stick. For some reason, the "Expert Install" was the default in the menu, and instead I select "Default Install" for the regular experience. For this post, I will ignore BMC/IPMI, as interacting with it is not necessary. Make sure to not connect the BMC/IPMI ethernet port unless you are willing to enter that dungeon. The VGA console works fine with a normal USB keyboard, and you can chose to use only the second enP4p1s0f1 network card in the network card selection menu.
If you are familiar with Debian netinst ISO’s, the installation is straight-forward. I complicate the setup by partitioning two RAID1 partitions on the two NVMe sticks, one RAID1 for a 75GB ext4 root filesystem (discard,noatime) and one RAID1 for a 900GB LVM volume group for virtual machines, and two 20GB swap partitions on each of the NVMe sticks (to silence a warning about lack of swap, I’m not sure swap is still a good idea?). The 3x18TB disks use DM-integrity with RAID1 however the installer does not support DM-integrity so I had to create it after the installation.
There are two additional matters worth mentioning:
- Selecting the apt mirror does not have the list of well-known Trisquel mirrors which the x86 installer offers. Instead I have to input the archive mirror manually, and fortunately the archive.trisquel.org hostname and path values are available as defaults, so I just press enter and fix this after the installation has finished. You may want to have the hostname/path of your local mirror handy, to speed things up.
- The installer asks me which kernel to use, which the x86 installer does not do. I believe older Trisquel/Ubuntu installers asked this question, but that it was gone in aramo on x86. I select the default “linux-image-generic” which gives me a predictable 5.15 Linux-libre kernel, although you may want to chose “linux-image-generic-hwe-11.0” for a more recent 6.2 Linux-libre kernel. Maybe this is intentional debinst-behaviour for non-x86 platforms?
I have re-installed the machine a couple of times, and have now finished installing the production setup. I haven’t ran into any serious issues, and the system has been stable. Time to wrap up, and celebrate that I now run an operating system aligned with the Free System Distribution Guidelines on hardware that aligns with Respects Your Freedom — Happy Hacking indeed!
July/August in KDE PIM
Here's our bi-monthly update from KDE's personal information management applications team, covering progress made in the months of July and August 2023.
Since the last report, 38 people contributed approximately 1400 code changes, focusing on bugfixes and improvements for the 23.08 release, as well as preparing for the transition to Qt6.
Transition to Qt6/KDE Frameworks 6As we plan for KDE Gear 23.08 to be our last Qt5-based release, there's been on-going work on more Qt6 porting, removing deprecated functions, and so on.
ItineraryItinerary got new importing options, public transport mode preferences, and support for many more travel document formats. It has also been featured prominently on the new KDE for Travelers page. For more details see Itinerary's own summary post.
Merkuro
As part of Gear 23.08, we renamed Kalendar to Merkuro. This has been done since the application not only lets you manage your events and tasks any more, but also incorporates contact management and there is in-progress work to also support email.
For Gear 23.08, we also did a complete revamp of the look of the application and split Merkuro into two applications, so you can have a window with your calendar and another one with your contacts at the same time.
For Gear 23.12, we made the folder list in Merkuro Mail sort the exact same way as KMail by implementing MailCommon::IKernel, added support for libgravatar, and made it possible to edit your IMAP and Identity accounts (including your crypto settings). A big part of the work on supporting Identity accounts went into making KIdentityManagement usable from QML, so other QtQuick-first PIM apps can benefit from it.
As part of GSoC, Anant Verma implemented support for availability (RFC 7953) in Merkuro as well as adding the infrastructure required for this in KCalendarCore and Akonadi Calendar. The end result is that you can now set which time of the day you are available (e.g. working hours in case of a work calendar) and this will then be displayed as part of your free/busy information for other users.
KOrganizerIn the past two months, Dan has worked on improving event views in KOrganizer. He reworked the internals of all event views so that, instead of merging all user's calendars into a single huge calendar which then gets displayed, each event view now supports displaying contents of multiple independent calendars. Thanks to this change, if two calendars contain the same event, the event now gets correctly displayed in both calendars. Previously only one instance would randomly get displayed, as the other one was removed from the huge merged calendar as it was considered a duplicate. This is a fairly common situation when a user is subscribed to their colleague's calendar and they both receive invitations to the same meeting, in which case the same event will be present in both their calendars.
While digging through the code and playing with the event views during testing, many smaller issues and bugs have been fixed as well. Most of these will land in KDE Gear 23.12.
- Fixed recurrent events that were planned during DST showing incorrect time when DST ended (Bug 460186)
- Copying or moving an event using the mouse in the agenda view no longer loses timezone information (Bug 448703)
- Sending a counter-proposal to an invitation uses the correct identity and sender (Bug 458524)
- Fixed the Akonadi iCal Directory Resource not storing any events in the directory (Bug 436693)
The work on improving KOrganizer and event views was funded by g10 Code.
KMailLaurent has started to re-work the existing AdBlock plugin to be based on the ad-blocking code from AngelFish browser.
It is now also possible to display the history of received emails. This means that if the user has a lot of folders with many unread messages, it's now easier to find in which folders the user received new emails recently.
The composer now directly shows information about encryption keys that are near their expiry date or which have already expired. Prior version of KMail showed this information after the user hit the Send button via a popup dialog. Now the user can update the key before hitting Send. Trust Levels for encryption keys are shown in tooltips instead of just their validity, as the concept of Trust Levels make more sense in the cotnext of mail than simple key validity. Additionally, the Encrypt button now indicates, whether encryption is possible or not.
- The Archive plugin now supports defining a time range when archiving (Bug 473007)
- Fixed "Do not change color from original HTML email" also affecting plain text emails (Bug 471857)
- Added support for deleting all attachments from selected messages (T6577)
KAddressbook
- Added keyboard shortcuts to KAddressbook to make editing content easier (Bug 473224)
- All places where an expiration date can be set now use a sensible default and respect configurable restrictions (T6519). Moreover, the UI for setting an expiration date has been unified (T6621).
- When updating an OpenPGP key, Kleopatra now queries the certificate directories of providers (WKD) additionally to the configured key server. For privacy reasons, by default, Kleopatra only does this for user IDs which were originally retrieved from a WKD. (T5903)
- A new GnuPG Desktop AppImage containing Kleopatra (23.07.70) and a tech preview of a special GnuPG edition of Okular (providing PDF signing with GnuPG) is available at https://gnupg.org.
- Multiple alarms can be set to wake the system from suspend when they are due. This is only available on Linux systems configured with the capability for users to set kernel alarm timers. For release in KDE Gear 23.12.
After more than a decade, we finally removed our custom fork of the Qt SQLite driver from Akonadi. The fork was initially created to provide better support for using SQLite from multiple threads, but SQLite itself has matured over the years to a point that the custom code in the fork isn't needed anymore, and so we can just use the upstream Qt SQLite driver. This change is backwards compatible, so users don't need to take any action or modify their configuration. This is yet another step towards making SQLite the default backend for Akonadi.
LibrariesThe code in the akonadi-contacts repository has been split into two libraries: "core" and "widgets". "Core" contains models and formatters reusable in QML-based PIM applications, while the "widgets" library contains QWidget-based UI classes used by KAddressBook and other widget-based PIM apps. Similar work has been done in the LibKSieve repository as well, which now contains KSieveCore and KSieveWidget libraries.
MimeTreeParser & KleopatraWe moved the mime tree parser code from Merkuro to a new repository to share as much code as possible with Kleopatra. We are reusing the code in Kleopatra, making it possible to display encrypted emails directly in there. This leads to various improvements in this mime tree parser implementation, in particular around how we handle encryption and support for GPG trust levels.
GpgME & CraftThere is ongoing work to update the GnuPG stack on craft and make GpgME C++ bindings compile with MSVC (the Microsoft compiler). This would allow us to bring back the PIM stack on Windows.
This work on MimeTreeParser and Craft/GpgME was funded by g10 Code.
KTextAddonsThe custom text editor that we've had in KDE PIM (used e.g. for composing messages) was moved to KTextAddons, allowing other applications like Ruqola to use it as well. The editor supports many features, including translating text via online translators. Laurent has added a new local translator plugin using Bergamot, a machine learning translation model that runs locally on the user's computer, so that the user does not have to rely on cloud services for translations.
SnapsScarlett has been working on updating the Snaps with latest KDE PIM. If you're a Snaps user, you can look forward to getting the latest and greatest KDE PIM via Snaps.
KDE: Weekly report and News, 23.08.0 Snaps call for testing!
Another busy week in the KDE snap world. Most of the release-service apps are in –candidate channel waiting to be tested. Testing is the bottle neck in the process, so I am trying something new and calling for help! Please test your favorite apps and report on https://discuss.kde.org/t/all-things-snaps-questions-concerns-praise/ any issues and which apps tested. Thanks!
There are some very big fixes in this release:
- Desktop file defined so xdg-desktop-portals will now work.
- Print support in many apps where it made sense. Please let me know if I missed one.
The KF6 content pack is coming along nicely using qt-framework-sdk snap!
Qt5 content snap using KDE patch set is nearly complete!
I believe I have a solution for our PIM applications by creating an Akondai dbus provider snap and setting all the PIM applications as consumers. I am waiting for manual review to pass.
I have a pile of new applications waiting for reserved name approvals. Igor has pinged the relevant people to speed this normally quick process up.
The pushback on per repository snapcraft files has stopped, so I have begun the process, which will take some time. This is a huge step in automating snap builds and cutting down my manual work so I can do more exciting things like plasma snaps!
Some big news on my project, a big thank you goes out to Kevin Ottens for reaching out, his company does exactly what I need to move it forward. I will update as we hash out the details, but it looks like my project isn’t dead after all!
I know many have asked “Why haven’t you given up already??” The answer in short, I am stubborn. I refuse to give up on anything until I am given a good reason to. When I started my path in computers oh so many years ago, you would be surprised how many people told me to give it up, you’ll never make it as a woman. Challenge accepted. Here I am, still going strong. When I want something, I go get it, no matter what it takes!
I still need to have a ( somewhat desperate ) call for donations. This will hopefully end soon, but for now, please consider donating to my September survival fund! Please share with anyone you that may find my work useful in any way. Thanks for your consideration
A script element has been removed to ensure Planet works properly. Please find it in the original post.PS: Debian uploads for bubble-gum are moving along. Please if you have any packaging you need done in Debian proper, let me know and I will get on it, time allowing of course.
Scarlett Gately Moore: KDE: Weekly report and News, 23.08.0 Snaps call for testing!
Another busy week in the KDE snap world. Most of the release-service apps are in –candidate channel waiting to be tested. Testing is the bottle neck in the process, so I am trying something new and calling for help! Please test your favorite apps and report on https://discuss.kde.org/t/all-things-snaps-questions-concerns-praise/ any issues and which apps tested. Thanks!
There are some very big fixes in this release:
- Desktop file defined so xdg-desktop-portals will now work.
- Print support in many apps where it made sense. Please let me know if I missed one.
The KF6 content pack is coming along nicely using qt-framework-sdk snap!
Qt5 content snap using KDE patch set is nearly complete!
I believe I have a solution for our PIM applications by creating an Akondai dbus provider snap and setting all the PIM applications as consumers. I am waiting for manual review to pass.
I have a pile of new applications waiting for reserved name approvals. Igor has pinged the relevant people to speed this normally quick process up.
The pushback on per repository snapcraft files has stopped, so I have begun the process, which will take some time. This is a huge step in automating snap builds and cutting down my manual work so I can do more exciting things like plasma snaps!
Some big news on my project, a big thank you goes out to Kevin Ottens for reaching out, his company does exactly what I need to move it forward. I will update as we hash out the details, but it looks like my project isn’t dead after all!
I know many have asked “Why haven’t you given up already??” The answer in short, I am stubborn. I refuse to give up on anything until I am given a good reason to. When I started my path in computers oh so many years ago, you would be surprised how many people told me to give it up, you’ll never make it as a woman. Challenge accepted. Here I am, still going strong. When I want something, I go get it, no matter what it takes!
I still need to have a ( somewhat desperate ) call for donations. This will hopefully end soon, but for now, please consider donating to my September survival fund! Please share with anyone you that may find my work useful in any way. Thanks for your consideration
PS: Debian uploads for bubble-gum are moving along. Please if you have any packaging you need done in Debian proper, let me know and I will get on it, time allowing of course.
Growing Lemons
I’ve extended the house with a large glassed area. We call it the orangeri, which is a lie, since what grows there are lemons. So how do you grow lemons in Sweden?
First of all, you have a hole straight through the construction of your house all the way down to the soil underneath.
Then you send a child down the hole to clean out any left over gravel and stuff from the construction to get a good connection with the soil you pour in from the top. Also, add double layers of plastic to avoid getting the house wet.
Then you take a tree, and way too many bags of soil and assemble it into the gigantic pot you’ve just constructed.
You might notice the pile of styrofoam to the right. There is a vent there which needs a cover. Good thing I have a 3D printer. Designed using FreeCAD.
The tree came with a lot of lemons, so last spring consisted of lemon icecream, lemon drinks, lemon cakes, and various dishes requiring lemon (schnitzel – yay!). But how has it fared in my care? Apparently not too bad. It is taller and wider, and it carries a whole bunch of lemons in the making.
And yesterday I finally picked the first lemon of my making. I almost feel like a parent. I pollinated the flowers with a small brush, I watered the tree, and now I can enjoy the fruits. I just need a few more to be able to do a batch of icecream.
Stack Abuse: Limiting Float Decimal Points in Python
In Python, we often deal with numbers that have a fractional part, known as floating-point numbers. But what if we want to limit the number of decimal points in these numbers? This Byte will talk about the concept of floating-point numbers, why we might want to limit their decimal points, and how to do so using Python's built-in functions.
Floating-Point NumbersFloating-point numbers, or simply "floats", are numbers that have a decimal point. In Python, you can define a float by simply including a decimal point in the number, like so:
my_float = 3.14159 print(my_float)Output:
3.14159 Why limit the decimal points?You might be wondering, "Why would I want to limit the decimal points of a float?" Well, there are many reasons. Perhaps you're dealing with a currency value, and you only need two decimal places. Or maybe you're calculating a percentage, and you don't need a high level of precision and want to make it more readable.
Limiting the decimal points can make your data easier to read and understand.
How to Limit a Float's Decimal PointsPython provides several ways to limit the decimal points of a float. We'll cover some of the most common methods here:
Using the round() FunctionThe round() function is a built-in Python function that rounds a number to a specified number of decimal places. By default, it rounds to the nearest whole number, but you can pass a second argument to specify the number of decimal places. Here's how you can use it:
my_float = 3.14159 rounded_float = round(my_float, 2) print(rounded_float)Output:
3.14In this example, we've rounded my_float to two decimal places.
Note: The round() function uses "round half to even" rounding, also known as "bankers' rounding". This means that if the number to be rounded is exactly halfway between two possible values, it will be rounded to the nearest even number. This is something to keep in mind if you're dealing with numbers that often end in .5.
Using the format() FunctionThe format() function is another way to limit a float's decimal points in Python. This formatting method provides more control over how you want your numbers to be displayed.
num = 12.34567 formatted_num = "{:.2f}".format(num) print(formatted_num)Output:
12.35In this example, the :.2f inside the curly braces {} is a format specification for the float number. The .2 part specifies the precision of the numbers after the decimal. The f at the end stands for "fixed point" number, which is used to represent decimal numbers.
Note: The format() function doesn't modify the original float number. Instead, it returns a formatted string. So if you want to use or manipulate this number, you'll need to convert it back into a float.
Using the Decimal ModuleAnother method to limit a float's decimal points is by using the Decimal module in Python. This module provides support for fast correctly rounded decimal floating point arithmetic.
from decimal import Decimal num = Decimal(12.34567) rounded_num = round(num, 2) print(rounded_num)Output:
12.35In this example, we first import the Decimal module. We then convert our float number to a Decimal and use the round() function to limit the decimal points to two.
The Decimal module provides more precision and control over floating point arithmetic than the built-in Python float data type.
Rounding vs Truncating Decimal PointsWhen limiting decimal points, it's important to understand the difference between rounding and truncating. Rounding refers to approximating a number to the nearest value, while truncating means removing the excess digits without rounding.
For instance, if you have the number 12.789 and you want to limit it to two decimal points, rounding would give you 12.79 while truncating would give you 12.78.
Here's how you can truncate a float to two decimal points by using only int and some multiplication/division:
num = 12.789 truncated_num = int(num * 100) / 100 print(truncated_num)Output:
12.78To achieve the truncation, we multiply the float by 100, convert it to an integer to remove the excess decimal points, and then divide it by 100 to get the truncated value.
ConclusionIn this Byte, we explored different ways to limit a float's decimal points in Python using the round(), format(), and Decimal module. We also discussed the difference between rounding and truncating decimal points. The choice of method you use is largely depends on the specific requirements of your program. The Decimal module is a powerful tool for dealing with floating point numbers, especially when precision is most important. However, for simple rounding or formatting, the round() and format() functions are often enough.
Stack Abuse: Capitalizing First Letter of Each Word in Python
Working with strings is a common task in many programming languages. One possible use-case you'll encounter is capitalizing the first letter of each word in a string. This Byte will explore three different ways we can achieve this: using the title(), capitalize(), and string.capwords() functions.
The title() FunctionThe title() function is a built-in method in Python that converts the first character of each word to uppercase and the remaining characters to lowercase. Here's how you can use it:
text = "welcome to stackabuse.com" print(text.title())The output will be:
Welcome To Stackabuse.ComNote: The title() function capitalizes every word in a string, regardless of what the word is. This may not always be the desired behavior. For example, in our output, ".Com" is capitalized, which is not correct in terms of website domain naming conventions. So you may need to handle cases like this manually.
The capitalize() FunctionThe capitalize() function, on the other hand, only capitalizes the first letter of a string, while making all other characters in the string lowercase.
text = "welcome to STACKABUSE.COM" print(text.capitalize())This will output:
Welcome to stackabuse.comAs you can see, only the first letter of the string is capitalized, and all other letters are now lowercase.
The string.capwords() FunctionThe string.capwords() function from the string module is another way to capitalize the first letter of each word in a string. This function splits the string into words using whitespace, capitalizes the first letter of each word, and then joins them back together.
import string text = "welcome to stackabuse.com" print(string.capwords(text))The output will be:
Welcome To Stackabuse.comYou'll notice that in this case, ".com" is not capitalized like we saw with tite(). This is because it only splits on whitespace, so it considers "stackabuse.com" to be one word.
Example: Formatted Output in User InterfacesLet's take a practical example to see how this works. Suppose we're making a user interface for a simple application. We have a form where the user can enter their full name. However, users can be unpredictable and might enter their name in all lower case, all upper case, or a mix of both. To ensure consistency in our application, we want to capitalize the first letter of each word in their name.
Here's how we can achieve this using the title() function:
def format_name(user_input): return user_input.title() user_name = "jane doe" formatted_name = format_name(user_name) print(formatted_name)When we run this script, the output will be:
$ Jane DoeIn this way, no matter how the user enters their name, it will always be formatted correctly in our application.
Although we're using title() in this example, you could also use string.capwords() if you prefer. Both will give you the same result in this case.
Note: While this is a toy example to show when and why you might title words, formatting names isn't actually this easy. There are names out there that don't actually start with a capital letter, like "Ludwig van Beethoven". It would technically incorrect to capitalize the "van". Unfortunately nothing is ever as easy as it seems in programming 😉
ConclusionIn this Byte, we've looked at three different Python functions that can be used to capitalize the first letter of each word in a string: title(), capitalize(), and string.capwords(). Each function has its own unique quirks and use-cases, but all of them can be useful when dealing with text data, depending on your use-case. Whether you're formatting user input in a UI, as in our example, or working with some kind of dataset, these functions can help format your data consistently.
Web Review, Week 2023-35
Let’s go for my web review for the week 2023-35.
Microsoft is using malware-like pop-ups in Windows 11 to get people to ditch Google - The VergeTags: tech, microsoft, windows, criticism
Microsoft doing Microsoft things in Windows… unsurprising, will never end. Maybe at some point people will move to platforms they really have control on?
https://www.theverge.com/2023/8/30/23851902/microsoft-bing-popups-windows-11-malware
Tags: tech, social-media, messaging
Interesting evolution… looks like people will all go back to some chat system? It’ll be the 90’s all over again? Maybe IRC will make a comeback? :-)
Tags: tech, web, copyright, law, gpt, machine-learning
Interesting analysis around the current situation around web scraping and intellectual property. This moved to being mostly dealt with using contract law which makes it a terrible minefield. Lots of hypocrisy all around too which doesn’t help. GPT and the likes will likely be the next area where cases will rise.
Tags: tech, economics, automation, work, ai, gpt
Interesting opinion piece about GPT and LLMs. When you ignore the hype, consider the available facts, then you can see how it’s another extra tool and unlikely to replace many people.
https://www.ben-evans.com/benedictevans/2023/7/2/working-with-ai
Tags: tech, streaming, culture
If you only stream it, it won’t be available forever. Keep this in mind when it’s something you find culturally relevant… it might require some conservation work.
https://birchtree.me/blog/a-note-to-young-folks-download-the-videos-you-love/
Tags: tech, e-ink, hacking
I agree with this. They are very interesting devices. Not necessarily easily hackable yet though. It’s definitely getting there.
https://rmkit.dev/eink-is-so-retropunk/
Tags: tech, distributed, crdt, research
Interesting research, this shows opportunities to push CRDTs to the next level.
https://www.vldb.org/pvldb/vol16/p856-power.pdf
Tags: tech, elixir, programming, architecture, cost, performance
The claim is huge. The story doesn’t quite say how much is really about Elixir and how much from the revised architecture. That being said, going for something like Elixir has definitely an impact on the architecture… could it be that it pushes for better patterns?
https://paraxial.io/blog/elixir-savings
Tags: tech, kernel, system
Nice article explaining unikernels and showing the example of MirageOS.
https://queue.acm.org/detail.cfm?id=2566628
Tags: tech, c++, criticism
I tend to agree with those, they are among my pet issues with C++.
https://www.thecodedmessage.com/posts/c++-papercuts/
Tags: tech, optimization, performance, architecture, programming
Another partial quote which led to misunderstanding. One should indeed think about performances early on.
https://milen.me/writings/premature-optimization-universally-misunderstood/
Tags: tech, object-oriented, programming
Nice overview of the good uses and wrong uses for classes. We’re far from the abuses of the early times now.
https://geoffviola.github.io/2020/09/07/the-last-vestiges-of-object-oriented-programming.html
Tags: tech, frontend, web, browser, javascript, complexity, maintenance
Nice reasoning. It very well highlights the tradeoffs coming the choice they made. And of course the decision might change if the situation changes.
https://htmx.org/essays/no-build-step/
Tags: tech, complexity, web, frontend
It’s clearly not clear cut, it’s a whole spectrum. I wish more web developers would at least ask themselves the question before having knee-jerk reactions reaching for their favorite framework of the day.
https://gomakethings.com/wtf-is-the-lean-web-anyways/
Tags: tech, 3d, ai, machine-learning
The level of details these techniques are giving now… this is very impressive.
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Tags: tech, graphics, 3d, shader, mathematics
Nice introduction to domain repetitions. A fascinating concept (IMHO) very much used in procedurally generated content.
https://iquilezles.org/articles/sdfrepetition/
Tags: tech, technical-debt, business
More thinking gets around the debate about tech debt. This is definitely welcome. Using more precise labels can indeed being clarity in conversations.
https://www.honeycomb.io/anything-but-tech-debt
Tags: tech, ux
Good set of patterns indeed. The article is web oriented but this makes sense in other type of applications as well.
https://pencilandpaper.io/articles/ux-pattern-analysis-loading-feedback/
Tags: tech, hr, hiring, interviews
Good list of advices, I regularly see people failing because of fundamental things like this… despite explaining my expectations first. So I’d add: listen to what the interviewer says about how he’s going to assess you.
https://robertheaton.com/interview/
Tags: management, hr
An old one but since I’m aware of companies still doing their performance reviews this way… Don’t fall for it, use a more humane process whenever you can.
Tags: tech, agile, change
Interesting opinion piece. Very often we see people mandating a “process”. It’s almost always the wrong way and how you end up with people following blindly “Scrum by the book” or “SAFe”. The approach proposed here is smarter: give the business constraints, let people choose what works best for them, support them along this journey.
https://ronjeffries.com/articles/018-01ff/imposition/
Tags: tech, management, business, productivity
Excellent piece. Be careful what you measure. If you measure the wrong things people will game the system.
https://tidyfirst.substack.com/p/measuring-developer-productivity
Tags: tech, management, business, productivity
And now the part two, with more warnings about what you measure. Also proposes a few ideas toward the end.
https://tidyfirst.substack.com/p/measuring-developer-productivity-440
Bye for now!
Real Python: The Real Python Podcast – Episode #170: Finding the Right Coding Font for Programming in Python
What should you consider when picking a font for coding in Python? What characters and their respective glyphs should you check before making your decision? This week on the show, we talk with Real Python author and core team member Philipp Acsany about his recent article, Choosing the Best Coding Font for Programming.
[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]
Paul Wise: FLOSS Activities August 2023
This month I didn't have any particular focus. I just worked on issues in my info bubble.
Changes- libpst: cleanups
- duck: 01.org is obsolete
- lintian: 01.org is obsolete
- reportbug: usertags pseudo-headers are now repeatable
- Debian BTS usertags: added porter usertags, fixed glibc/DSA/pcre/porter usertags
- Debian package uploads: git-imerge (1 2)
- Debian wiki pages: BisectDebian, DebianKernel/UserspaceTools, DebianMaintainer, DebianTesting, PortsDocs/New (1 2), PortTemplate, PressCoverage
- FOSSjobs wiki pages: Resources (1 2)
- Investigated test failures after Debian pybuild distutils update
- Crashes in fdupes
- Missing dep in gnome-calculator
- Warnings in dbus-broker
- Incorrect unsigned mail handling in evolution
- Features in needrestart, evolution
- Deprecated interface use in git-imerge
- Broken symlink in libgnutls28-dev
- Obsolete URL in thermald
- Conffile removal in bluez, iio-sensor-proxy
- Debian BTS usertags: changes for the month
- Debian IRC: rescue an alternate channel and make it harder to join accidentally
- Debian wiki: unblock IP addresses, approve accounts, update emails for accounts
- Respond to queries from Debian users and contributors on the mailing lists and IRC
The libpst work was sponsored. All other work was done on a volunteer basis.