Skip to content

Wednesday, 21 June 2023

Wait a minute…

Having come across sources using include statements for some Qt module headers (like #include <QtDBus>), memories arose about a check from the static analyzer tool krazy as once run conveniently on KDE’s former ebn.kde.org site. That check, called includes, poked one not to use Qt module headers. Due to resulting in the inclusion of all the headers of those modules, and then again that of the other Qt modules used by the module. Which them meant more stuff to process by the compiler for compilation units with such module header includes.

So is that perhaps in 2023 no longer a real-world noticeable issue? A first look at some preprocessor outputs (with Qt5) for a single line file with just an include statement hinted though it might still be true:

foo.cpp: #include <QtDBus>foo.cpp.i: 137477 lines
foo.cpp: #include <QDBusReply>foo.cpp.i: 86615 lines

So 50862 more code lines of mainly declarations and inline methods, where a good part might not be needed at all by other code in a file including the header, yet is processed each time. And if such includes are placed in headers, happening for a lot of compilation units. Given most normal source files are shorter, it seemed like as result this difference might still be noticeable given that order of magnitude in the extreme example above..

Wait some minutes less now

The KDE Frameworks module NetworkManagerQt was found to use quite a lot of QtDBus module header includes. While overall following mostly the include-only-what-you-need-and-forward-declare-otherwise mantra. Possibly those includes have been a result of tools generating code and using the module headers to speed up initial development experience.

A patch to replace those QtDBus module header includes with includes of headers as just needed for the classes & namespace used was done. It turned out that the number of additional include statements needed afterwards was rather small, so no bigger costs there.

For a simple test on the real world effects, an otherwise idle developer system, with hot cache for the source files by previous runs, with SSD and old i5-2520M 2.5 GHz CPU, was used. For both variants the build dir would be cleaned by make clean and then a single job make run started, timed with the time tool, by time make. The results were this (repeated runs hinted those numbers are representative):

#include <QtDBus>#include <[headerasneeded]>
real (wall clock)18m51,032s14m6,925s
user17m58,326s13m22,964s
sys1m54,234s1m26,826s

So an overall build time reduction by around a 1/4 for a clean(ed) build.

Incremental builds during development should also gain, but not measured, just assumed. 🙂

Wait* on the code, to not wait on the build

(*as in waiter)

So in the spirit of the old Krazy includes check, consider to take a look at your codebase if not some Qt module header includes (QtCore, QtDBus, QtQml, QtGui, QtWidgets, QtNetwork, …) have sneaked in which might be simple to replace by “normal” includes.

Note: there is at least one tricky include with QtConcurrent, as that module shares the name with the main C++ namespace. So one might have used #include <QtConcurrent>, due to used-to Qt patterns and because the API documentation also tells to do. Just, that include gets one the module header, which then also pulls in #include <QtCore> with all its headers. Looking at the include directory of that module, one can find dedicated headers to use instead, like QtConcurrentRun. While many codebases e.g. in KDE projects rely on those, they still need to be also officially documented (QTBUG-114663).

In case one would like some more modern automation tool to check for the use of Qt module header includes, take a look at the current work to add a check to the static code analyzer Clazy.

PS: For those into riding their office chair into sword duels… you should have let me win more often? 😉

Monday, 19 June 2023

People are often asking the same questions again and again about some of my projects, so it might be a good opportunity to write a small FAQ.

If you get redirected here, don’t take it personally; I am getting asked these questions very often, and I feel people often misunderstand how open-source projects work.

Why does X not have feature Y?

The most likely reason is that it still needs to be implemented. It doesn’t mean that I or other maintainers are against this feature. It is just that X is a purely non-commercial project, and I and others are currently working on it during our free time. Unfortunately, Free time is a very limited and precious resource. Between our day jobs or university projects, sleeping, eating, and other social activities, little time and energy is left.

We definitively might implement the feature in the future, but the best way to ensure this gets implemented promptly is to get involved and implement it yourself. Feel free to join our development channel beforehand and confirm that the feature is something we would like to have in the application.

We are happy to guide you to make the onboarding experience as good as possible and to help you familiarize yourself with the code base. Getting involved with open-source projects is also an excellent opportunity to learn how to program. Check out the Google Summer of Code, Outreachy, or Season of KDE for special mentoring programs, but getting involved outside these programs is also possible. On a personal note, I learned most of my programming skills by contributing to KDE, so I am very thankful for that.

When will you implement feature Y? Is Y on your roadmap?

Similarly to the previous question, X is a non-commercial project implemented during my and others’ free time. We can’t say precisely when we will be done with a particular feature as it depends on many factors: how much energy do we currently have to work on this project after our day job/university projects, are there more pressing issues, are there a technical blocker which needs to be solved first, it is fun to implement…

Again the best way to speed this up is to get involved.

What is your roadmap?

We are a non-commercial project which is purely volunteer based. We are just a bunch of developers and designers; we do not have managers, stakeholders, or clients influencing our work directly by setting deadlines or by asking and paying for specific features. Part of the reason we enjoy working on this project is that we have a lot of freedom in terms of what we want to work on and are also very flexible, allowing us to switch to a different task whenever we want.

Again the best way to influence the direction of this project is to get involved.

Friday, 16 June 2023

There’s no better measure of success than having a diminutive eight-year-old girl demand to know the name of the painting program she has been using for the last 20 minutes.

Thursday, 15 June 2023

Bundle Creator


Recap

Welcome back! Last time, I successfully completed the development of the Bundle Creator up to the Resource Chooser page. This page now allows us to easily select resource items by applying filters based on tags or names. I’ve introduced some UI improvements, including the ability to click-to-select, the addition of a convenient Remove Selected button and the introduction of a visually appealing grid view to replace the traditional list view. These enhancements enhance the overall user experience and provide a more streamlined resource selection process.

The Bundle Creator Wizard

As mentioned in previous blog posts, the Bundle Creator consists of four pages: the Resource Chooser, Tag Chooser, Bundle Details, and Save to pages. These pages can be seen in the wizard’s side widget, and users can navigate between them using the Next and Back buttons. The Tag Chooser page retains a similar design to the Embed Tags page from the previous version of the bundle creator. It offers a familiar interface for users to select and embed tags to their new bundle. Similarly, the Bundle Details page maintains consistency with the previous bundle creator, where one can fill out the bundle name, author, website etc.

The inclusion of the Save to Page adds a crucial final step to the bundle creation process. It provides a summary of the bundle details, which includes the number of selected resource items per resource type, and the tags chosen for embedding. This comprehensive summary allows users to review and confirm their bundle’s content before finalizing the creation process.

By dividing the bundle creation process into these distinct and user-friendly pages, particularly for beginners, the Bundle Creator offers a streamlined and intuitive experience. Users can efficiently navigate through each step, making informed decisions and customizing their bundles according to their specific needs.

Bundle Creator

I have added a small tool button that allows switching between grid view and list view in both the resource manager and bundle creator, providing convenience to the users. Additionally, I have made the icons in the bundle creator more consistent.

Bundle Creator

Merge Request

My merge request can be viewed here.

Plans ahead

In the upcoming weeks, I would be working on adding the editing bundles feature, as well as improving the Choose Tags section. This requires some UI related feedback, and if you’re interested to help out, please feel free to drop a comment on this post I created on Krita Artists Forum!

Wednesday, 14 June 2023

Hello world,

This is my third blog post for Google Summer of Code 2023 where I will be sharing what I was able to accomplish in the first two weeks.

The first task I worked on was implementing the account moderation tool. This tool enables moderators/admins of an instance to view all the accounts available on the server and take action against them.

Before starting with its implementation, I requested Carl to schedule a meeting so that I could gain a better understanding of the implementation process. He advised me to study the already implemented SocialGraph page, along with other helpful insights.

Initially, when attempting to receive raw JSON data from the /api/v1/admin/accounts endpoint, I encountered a 403 error response. Upon spending some time debugging my code I couldn’t determine what I was doing wrong and so I finally resorted to asking for help in the Tokodon matrix chat, where redstrate❣️ helped me identify that we didn’t have the necessary scope set in Tokodon to access admin endpoints.

After setting the correct scope, I was finally able to make network requests to the admin endpoint 🥳. I decided to implement a QAbstractListModel to expose all the data and required properties in the QML UI. With this in mind, I created a new class AccountsToolModel that inherited from QAbstractListModel. For making all the filter options functional I created QProperty instances with the necessary READ, WRITE and NOTIFY methods.

To display the admin-related information for an account, I parsed the received JSON data and created a new method AbstractAccount::adminIdentityLookup which will populate QProperty instances of AdminAccountInfo to store all the required information for the moderation tool. Once all the cpp backend was ready, I started with the qml implementation, figuring out the best way in which the data can be presented.

Once the UI was implemented, I encountered an issue with pagination not functioning correctly. After debugging the issue, I discovered that when requesting a response for the next page using the v2 endpoint, the response received was actually v1. This discrepancy messed up the query parameters and rendered pagination impossible. To address this issue, I implemented a simple code block: url = url.toString().replace("/v1/", "/v2/");. This replacement fixed the problem and allowed proper pagination to occur.

To ensure the issue was addressed, I reported it on Mastodon’s GitHub repository. You can find the detailed report here.

At the end of the first two weeks the initial page of Account Moderation tool was implemented whose Merge Request can be tracked here. I also made significant progress towards developing next page of the account tool during these weeks.

Images showing implemented Account Moderation tool

An image showing User Interface of Tokodon’s Account Moderation Tool

Next I am working on implementing the second page of account Moderation tool and report Moderation tool :)

I will be writing regular blog posts on my website. You can read my previous blog-posts and follow my progress here

Saturday, 10 June 2023

I’m happy to announce the 1.1 release of Arianna. Arianna is a small ePub reader application I started with Niccolo some time ago. Like most of my open source applications, it is built on top of Qt and Kirigami.

Arianna is both an ePub viewer and a library management app. Internally, Arianna uses Baloo to find your existing ePub files in your device and categorize them.

New features

Arianna can now display the table of content of a book. This supports complex hierarchies of headings.

A table of content displayed as a right sidebar with a tree structure
A table of content displayed as a right sidebar with a tree structure

Arianna now provides you with the metadata about your books.

Dialog showing the title, author, description, license information about a book
Dialog showing the title, author, description, license information about a book

Additionally, you can now disable the reading progress on the library page if it distracts you.

Bug fixes

You can now read books without requiring an internet connection. We also fixed various crashes happening when indexing your books.

Get Involved

If you are interested in helping, don’t hesitate to reach out in the Arianna matrix channel (#arianna:kde.org) and I will be happy to guide you.

I also regularly post about my progress on Arianna (and other KDE apps) on my Mastodon account, so don’t hesitate to follow me there ;) We also now have an official Mastodon account for Arianna @arianna@kde.social.

And in case you missed it, as a member of KDE’s fundraising working group, I need to remind you that KDE e.V., the non-profit behind the KDE community accepts donations.

Packager section

You can find the package on download.kde.org and it has been signed with my GPG key.

Friday, 9 June 2023

Hello world,

This is my second blog post for Google Summer of Code 2023, where I will share what I accomplished during the GSoC-23 community bonding period.

Community Bonding period

During this time GSoC contributors spend 3 weeks learning about their organization’s community and preparing for their coding project. They get to know mentors, read documentation, get up to speed to begin working on their projects

During the community bonding period, the organizers took two introductory sessions kick starting our journey. The first Welcome Session was about the best practices and tips for a successful Google Summer of Code. Following that, GSoC Contributor Summit took place, during which previous participants and mentors shared their experiences of being part of GSoC.

During this time I also got to interact with fellow GSoC contributors and learned more about their interesting projects and their plans .

Furthermore, I utilized this time to get a head-start on my project by familiarizing myself with QT’s model-view programming with the help of official QT's documentation and Tokodon’s source code. Additionally, I implemented the User-Interface of the button to be used to open the moderation tool. The merge request for which can be found here.

An image showing the User Interface of Tokodon with implemented entry point of moderation Tool can be found below.

An image showing User Interface of Tokodon with mouse being hovered on Moderation Tools Icon

Next I am working on implementing the account Moderation tool :)

I will be writing regular blog posts on my website. You can read my previous blog-posts and follow my progress here

Tuesday, 6 June 2023

I have a few blog posts planned, but the one I wanted to post involving KDE color schemes isn’t finished yet (it’s enormous and tedious). So instead, today I’m showing you how simple it is to compile Kirigami with Qt6 so you can start playing with it ahead of time.

Kirigami, KDE’s library that extends QtQuick, is a Tier 1 KDE Framework. The cool thing about it is that it has effectively no dependency on any KDE libraries. It depends only on two things: Qt and extra-cmake-modules (ECM).

Monday, 5 June 2023

gcompris 3.3

Today we are releasing GCompris version 3.3.

This version adds translations for 2 more languages: Arabic and Esperanto.

It contains bug fixes on multiple activities such as "Path encoding", "Letter in word", "Ballcatch" and "Piano composition".

Some improvements of keyboard handling (shortcuts, focus...) have been done on several activities.

It also contains new graphics and improvements on "Photo hunter".

It is fully translated in the following languages:

  • Arabic
  • Azerbaijani
  • Breton
  • Catalan
  • Catalan (Valencian)
  • Greek
  • UK English
  • Spanish
  • Basque
  • French
  • Croatian
  • Indonesian
  • Italian
  • Lithuanian
  • Malayalam
  • Dutch
  • Norwegian Nynorsk
  • Polish
  • Portuguese
  • Brazilian Portuguese
  • Romanian
  • Slovenian
  • Turkish
  • Ukrainian

It is also partially translated in the following languages:

  • Belarusian (79%)
  • Czech (88%)
  • German (99%)
  • Esperanto (99%)
  • Estonian (99%)
  • Finnish (98%)
  • Hebrew (99%)
  • Hungarian (99%)
  • Macedonian (94%)
  • Russian (99%)
  • Slovak (87%)
  • Albanian (99%)
  • Swedish (98%)
  • Chinese Traditional (99%)

You can find packages of this new version for GNU/Linux, Windows, Raspberry Pi and macOS on the download page. This update will be available soon in the Android Play store, the F-Droid repository and the Windows store.

Thank you all,
Timothée & Johnny

Thursday, 1 June 2023

 

KStars v3.6.5 is released on 2023.06.01 for MacOS, Linux, and Windows. It's a bi-monthly bugfix release with a couple of exciting features.


Sky Map Rotation


Akarsh Simha added a new feature to allow the user to rotate the sky map. It also allows some standard settings like inverted view. Here are some the highlights:
  1. Rotate the sky-map freely: Shift + mouse drag on the sky map
  2. Pick pre-defined orientations: Zenith Up / Zenith Down / North Up / North Down depending on the coordinate system being used
  3. A magic mode for Dobsonians: The Erect Observer Correction feature, when selected along with Horizontal Coordinates / Zenith Down settings, will reproduce the orientation seen in the eyepiece of a Dobsonian. May need a one-time adjustment for your specific Dobsonian using the shift + drag feature.





Optimal Sub-Exposure Calculator


Joseph McGee made his first contributor to KStars with the Optimal Sub-Exposure Calculator. This is the first iteration of the calculator and only a handful of camera profiles is supported. There are different points of view within the astrophtography community on how optimal sub-exposure should be calculated and whether we should consider other factors such as processing time given the volume of data produced. Your feedback would be appreciated on this first iteration of the calculator.

Implementation of an optimal sub-exposure calculator based upon the work of, and presentation by, Dr Robin Glover. The calculator considers multiple inputs to determine a sub-exposure time which will provide minimal overall noise in the image:


  • A sky quality measurement (SQM) for light pollution
  • The optic focal length
  • A filter bandwidth
  • Camera read-noise (based upon gain/iso)
  • An optional adjustment to the allowable increase in noise from light pollution

As inputs are adjusted the calculator will refresh graphic presentation of potential exposure times of the range of gains, and update calculated outputs. The output values are separated into two sections: one for the sub-exposure, and another for image stacks of various integration times.

The sub-exposure outputs are:

  • the optimal sub-exposure time
  • the count of electrons produced from light-pollution
  • the shot noise, (noise from light pollution)
  • the total exposure noise, (the combined noise from light-pollution and camera read-noise)

The image stack information is presented in a table showing:

  • planned integration hours
  • the count of exposures to reach the planned integration hours
  • the actual stack (integration time) in seconds
  • the noise for the stack
  • a ration of stack time to noise, (as a indicator of quality)

An instance of the sub-exposure calculator can be started from a new 'clock' icon on the ekos capture screen. Multiple instances of the sub-exposure calculator can be started concurrently so that side-by-side comparisons can be made for variations in inputs.

Data for camera read-noise will be provided through individual xml files which will be user maintained and published in a repository. These camera data files persisted within a folder "exposure_calculator" under user/local/share/kstars. The calculator includes the capability to download camera files from a repository. Upon the initial start of the calculator at least one camera data file download will be mandatory before the calculator can be instantiated.

The intent is that camera data file names will be used to allow the calculator to select an appropriate camera data file based upon the device id of the active camera. (But some of the initial camera files were named using educated guesses, and will likely need to be re-named).


Rotator Dialog Improvements


Toni Schriber merged improvements and fixes for the Rotator Dialog. As shown in the illustrations the user interface is very simple and there is only one parameter to set: The Camera Position Angle. It is a very consistent term and easy to understand. The same Position Angle (PA) is also used in Alignment, Scheduler, and the Sky Map.


In the gauge this angle is presented in the same color as the FOV in the planetarium sky and in viewing direction. This way one can relate and understand this angle intuitively. The rotator angle is presented in gray and also in viewing direction. This angle is calculated from the Camera PA and the Cameras Offset Angle which is calibrated each time a [Capture & Solve] or a [Load & Slew] is brought into action. For further clarity the rotator angle and the camera offset is displayed again in a information window together with the current pier side.

The Rotator Settings can be accessed either in the Capture or Align modules.


Focus Linear 1 Pass Improvements


John Evans continued his phenomenal improvements to Ekos Focus module with L1P Phase 2 changes as detailed in the Linear Focus Phase 2 document. Here are the highlights:

  1. Optimized curve fitting . Should be faster and more accurate and includes outlier rejection.
  2. Currently HFR is the only fitting "measure" available. The following have been added: a) HFR Adj (adjusted HFR to compensate for star brightness vs background variation) b) FWHM c) Number stars (max at focus rather than a min) d) Fourier Power (alternative focus method not requiring star detection)
  3. Focus units can be displayed in pixels or arc-seconds.
  4. Critical Focus Zone - a calculator with 3 different algorithms has been added
  5. Focus Offset Utility to automatically build focus offsets.
  6. Take flats at same focus point as lights has been fixed.
  7. Focus Adviser. Still working on this but a tool to help with focus parameters (since there are now so many).
  8. SEP parameters suggestions for focus. Keen to get some feedback on this.
  9. Adaptive focus to adapt the focuser position between Autofocus runs, aiming to keep optimum focus for each sub-frame. Adaptations for Temperature and Altitude are supported.
  10. Adaptive focuser start . The starting position for an AF run can be filter and Adaptive Focus adjusted.
  11. Focus walks added to control how the inward sweep of the AF process performs.
  12. AF Overscan originally implemented in the Linear algorithm and then reused by Linear 1 Pass now extended to all focuser movements.

In addition to HFR, you can now use different measurements (FHWM, # of Stars, Fourier Power) that may work well with your setup and environment. Here are some focus runs with each of the new measurements types. You will notice that the solutions are very close to each other.

FWHM




# Of Stars



Fourier Power





Focus Aberration Inspector


Wolfgang Reissenberger introduced the mosaic view well known from PixInsight's AberrationInspector script that builds a mosaic from all image corners and center tiles such that they can be compared directly.

Supernovae are back


The last few releases was missing supernovae data since the online source that was providing the data decided to go offline. Thankfully, Philipp Auersperg-Castell communicated with the fine folks over the Transient Name Server (IAU Supernovae Working Group) to obtain daily supernovae updates and imported them to KStars. All Recent supernovae should be available now in KStars.