digiKam Recipes 2023-01-27 released

Planet KDE - Tue, 2023-01-24 19:00
New year, new digiKam Recipes book release. The new version features the completely rewritten Tag faces with the Face Recognition feature chapter and an all-new example workflow section in the Batch process photos and RAW files chapter. Several chapters have been revised and improved, including Edit tags with Tag Manager, Color management in digiKam, and Move digiKam library and databases. All screenshots have been refreshed, too. As always, the new revision includes plenty of tweaks and fixes.
Categories: FLOSS Project Planets

Centarro: Custom Order Number Patterns in Drupal Commerce

Planet Drupal - Tue, 2023-01-24 17:04

Drupal Commerce differentiates between the serial numeric ID assigned to an order by the database on save and the order number used to formally identify a placed order. Orders typically start as "drafts" (as in the case of shopping carts) and are assigned an order number when placed (as when a customer completes checkout).

In Commerce 1.x, the order number defaulted to the order ID. This created confusing order number sequences in admin listings when carts were checked out long after they were created or when they were abandoned. Businesses that required sequential order numbers without gaps needed custom code to make it happen.

Thanks to the Number Pattern module we added in Commerce 2.x, site builders have much greater control over order number generation via configuration alone. Number Pattern is used to generate order numbers and invoice numbers (via Commerce Invoice), and it is available for other contributed modules to use as well.

See selection here in the order type edit form:

Read more
Categories: FLOSS Project Planets

MidCamp - Midwest Drupal Camp: Get your session in now...

Planet Drupal - Tue, 2023-01-24 16:56
Get your session in now... Call for Speakers

We’ve had 30+ sessions submitted already and we’d love to add your words to that number. We’re looking for talks geared toward beginner through advanced Drupal users, as well as end users and business owners. Please see our session tracks page for full descriptions of the kinds of talks we are looking for. Listen to the recording of our Speaker Workshop for some ideas.

Submit a session now!

Important Dates:

  • Proposal Deadline: January 25 (Wednesday), 2023 at midnight CST

  • Tickets on sale: very soon! Keep an eye out.

  • Early-bird deadline and speakers announced: early February (all speakers are eligible for a free ticket, and anyone who submits a session that is not accepted will be eligible for early-bird pricing even after it closes)

Sponsors Get Early, Privileged Access

Get early and privileged access to new talent and customers by sponsoring MidCamp. We have a variety of sponsorship packages available.

Starting at $600, sponsoring organizations can target their jobs to a select group of experienced Drupal talent, maximize exposure by sharing space with dozens of jobs instead of millions, and have three days of being face-to-face with applicants.

Because sponsors make MidCamp possible, we want to return the favor by helping your organization grow within the community and save you time.

Find the right sponsorship for you!

Stay In The Loop

Join the MidCamp Slack and come hang out with the community online. We will be making announcements there from time to time. We’re also on Twitter and Mastodon.

Keep an eye on this space, we will be releasing more blog posts with venue details, hotel and travel options, fun social events, speaker announcements and more! Our preliminary schedule is up now.

We can’t wait to see you soon! Don’t forget, cancel all those other plans and make MidCamp the only thing happening on your calendar from April 26-28, 2023. 😀

Categories: FLOSS Project Planets

FSF News: FSF board adopts updated by-laws to protect copyleft

GNU Planet! - Tue, 2023-01-24 15:41
BOSTON, Massachusetts, USA -- Tuesday, January 24, 2023 -- The board of the Free Software Foundation (FSF) today announced it has adopted updated bylaws for the nonprofit effective Feb. 1, 2023.
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #561 (Jan. 24, 2023)

Planet Python - Tue, 2023-01-24 14:30

#561 – JANUARY 24, 2023
View in Browser »

How to Get and Use the Current Time in Python

In this tutorial, you’ll be getting the current time in Python. You’ll get your hands on a datetime object that represents the current time. You’ll see how to format it according to international standards, and you’ll even check out how computers represent time.

Property-Based Testing With Hypothesis and Pytest

This tutorial is a gentle guide to property-based testing. Property-based testing is a testing philosophy; a way of approaching testing that will bring you many benefits that other types of testing don’t give you.
RODRIGO GIRÃO SERRÃO • Shared by Rodrigo Girão Serrão

Building an IoT App with InfluxDB Cloud, Python, and Flask

Step-by-step tutorial for building a monitoring app. The prototype is serverless, with zero infrastructure to manage, and free—all built on the free tier of InfluxDB time series platform →

Boost Your Python Performance Using Continuous Profiling

Learn how to use Grafana Phlare and continuous profiling to discover bottlenecks in you code and boost the performance of your Python applications

CircleCI Security Incident: Rotate Your Keys

CircleCI says hackers stole encryption keys and customers’ secrets.

Discussions What Is Your Favorite Tech Podcasts These Days?


Python Jobs Python Video Course Instructor (Anywhere)

Real Python

Python Tutorial Writer (Anywhere)

Real Python

More Python Jobs >>>

Articles & Tutorials Analyzing Labor Markets in Python With LODES Data

This article shows step-by-step instructions on how to use pandas and pygris to analyze geographical data. The example uses the LODES (LEHD Origin-Destination Employment Statistics) data set, a synthetic data set with US Census block and job workplace data, to map the commute flow to Apple headquarters in Cupertino, California.

Using the Terminal on macOS

In this Code Conversation video course, you’ll learn how to use the terminal on macOS. You’ll navigate the file system with Philipp and Martin and perform common tasks like creating files and folders. If you’ve never used the terminal before, then this video course will help you get started.

Get Personalized Insight from Python Experts

We are performance tuners, Django and Python experts, infrastructure and scaling architects. We’ve worked with over a hundred companies and teams of all types. We know what works best and which roads lead to failure. Let our experience guide you, your code, and your processes to smoother waters →
REVSYS sponsor

A Not So Unfortunate Sharp Edge in Pipenv

Pipenv keeps hashes of installed projects to help protect from supply chain attacks. Something interesting happened though when a project didn’t change version numbers but did change hashes, learn just what the edge case was and how it complicated build repeatability.

One a Day One Liners With Python

Three weeks ago Jeremy started writing a mini-blog posting each day about a Python one-liner. This week’s theme is vector and matrix processing. Last week was on text processing.
JEREMY BROWN • Shared by Jeremy Brown

Awesome Design Patterns

This is a curated list of software and architecture design patterns. It has language specific sections as well as general architecture sections such as cloud, big data, devops, IOT, serverless, micro-services, and more.

4 Tips for Structuring Your Research Group’s Python Packages

This opinion piece by David Aaron Nicholson gives some great advice about how to name and structure your packages. Life lessons learned by coming across modules that weren’t so elegantly structured.

Authentication With Django and Single Page Apps

Single Page Applications (SPA) often use passed tokens for authenticated pages. This article shows you how to use Django’s session based auth mechanism in conjunction with an SPA.

Using pytest to Test PySpark Code

This article shows you how to run automated tests on your PySpark code using the pytest. It delves into some of the pitfalls and how to make your tests performant.
GARY BAKE • Shared by Gary Bake

Data is the Lifeblood of Modern Businesses

What are the most common mistakes companies make when it comes to managing and protecting sensitive user data? Read the guide now to learn how to move fast without breaking privacy.
SKYFLOW sponsor

Improving Python Packaging: Why 14 Tools Are 12 Too Many

A journey to the world of Python packaging, a visit to the competition, a hopeful look at the future, and highlights from a disappointing discussion.

Why Polars Uses Less Memory Than Pandas

Polars is an alternative to Pandas than can often run faster—and use less memory! This article shows you how to go from Pandas to Polars.

Projects & Code Trace Your Python Process Line by Line

GITHUB.COM/FURKANONDER • Shared by Furkan Onder

Finds All 3rd-Party Imports in Your Python Project

GITHUB.COM/SAADMK11 • Shared by Maksudul Haque

socketify.py: High Performance Python Web Server


pybboxes: Light Weight Toolkit for Bounding Boxes


CustomTkinter: Python UI-library Based on Tkinter


Events PyKla Monthly Meetup

January 25, 2023

101 Django Rest Framework

January 25, 2023

Heidelberg Python Meetup

January 25, 2023

Weekly Real Python Office Hours Q&A (Virtual)

January 25, 2023

SPb Python Drinkup

January 26, 2023

PyDelhi User Group Meetup

January 28, 2023

Happy Pythoning!
This was PyCoder’s Weekly Issue #561.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

Matt Glaman: Leveraging the list cache tag for entity types

Planet Drupal - Tue, 2023-01-24 13:06

Recently I wrote about launching my wife's web store for her holiday cookie orders. During the launch, I had a little hiccup. The homepage controller has code to display the available published products. When it came time, I published the products, and... the homepage stayed the same. I was confused. I wrote the code and knew it was collecting cacheable metadata. It should have been updated once changes happened to the products. So, I did what all Drupalists do when things don't work as expected: clear the cache. Then I needed to figure out why this didn't work so that the homepage would be updated once we unpublished the products.

Categories: FLOSS Project Planets

Bits from Debian: New Debian Developers and Maintainers (November and December 2022)

Planet Debian - Tue, 2023-01-24 10:00

The following contributors got their Debian Developer accounts in the last two months:

  • Dennis Braun (snd)
  • Raúl Benencia (rul)

The following contributors were added as Debian Maintainers in the last two months:

  • Gioele Barabucci
  • Agathe Porte
  • Braulio Henrique Marques Souto
  • Matthias Geiger
  • Alper Nebi Yasak
  • Fabian Grünbichler
  • Lance Lin


Categories: FLOSS Project Planets

Real Python: Python Basics: Object-Oriented Programming

Planet Python - Tue, 2023-01-24 09:00

OOP, or object-oriented programming, is a method of structuring a program by bundling related properties and behaviors into individual objects.

Conceptually, objects are like the components of a system. Think of a program as a factory assembly line of sorts. At each step of the assembly line, a system component processes some material, ultimately transforming raw material into a finished product.

An object contains both data, like the raw or preprocessed materials at each step on an assembly line, and behavior, like the action that each assembly line component performs.

In this video course, you’ll learn how to:

  • Create a class, which is like a blueprint for creating an object
  • Use classes to create new objects
  • Instantiate classes with attributes and methods

This video course is part of the Python Basics series, which accompanies Python Basics: A Practical Introduction to Python 3. You can also check out the other Python Basics courses.

Note that you’ll be using IDLE to interact with Python throughout this course. If you’re just getting started, then you might want to check out Python Basics: Setting Up Python before diving into this course.

[ 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 ]

Categories: FLOSS Project Planets

What is the Cyber Resilience Act and why it’s important for Open Source

Open Source Initiative - Tue, 2023-01-24 08:00

The Cyber Resilience Act (CRA) is an interesting and important proposal for a European law that aims to drive the safety and integrity of software of all kinds by extending the “CE” self-attestation mark to software. And it may harm Open Source. The proposal includes a requirement for self-certification by suppliers of software to attest conformity with the requirements of the CRA including security, privacy and the absence of Critical Vulnerability Events (CVEs).

OSI has submitted the following information to the European Commission’s request for input on its proposed Cyber Resilience Act text.

We recognise that the European Commission has framed an exception in recital 10 attempting to ensure these provisions do not accidentally impact Open Source software. However, drawing on more than two decades of experience, we at the Open Source Initiative can clearly see that the current text will cause extensive problems for Open Source software. The problems arise from ambiguities in the wording and a framing which does not match the way Open Source communities actually function and their participants are motivated.

First, for those distributing software as a community function to confidently rely on the exclusion, this absolutely must be inserted as an article and the “should” must be changed to “shall”.

Second, since the goal is—or should be—to avoid harming Open Source software, which the European Commission is working hard to support, this goal should be stated at the start of the paragraph as the rationale, replacing the introductory wording about avoiding harm to “research and innovation” to avoid over-narrowing the exception.

Thirdly, the reference to “non-commercial” as a qualifier should be substituted. The term “commercial” has always led to legal uncertainty for software and is a term which should not be applied in the context of open source as specific commercial uses of open source projects by some users are frequently disconnected from the motivations and potential compensation of the wider community of maintainers. The software itself is thus independent of its later commercial application.The problem is not the lack of a taxonomy of “commercial”, it is the very act of making “commercial” the qualification rather than, for example, “deployment for trade”. Thus adding a taxonomy of commerciality is not a solution. OSI would be pleased to collaborate over better approaches to qualifying an exception.

To illustrate the concern our community feels, we wish to highlight an analysis by OSI affiliate Eclipse Foundation, based in Brussels. While they note that, with staff and financial resources, they are “in a better position than most” to deal with such requirements, they conclude that “we fear that the obligations set forth by the legislation will cripple the Eclipse Foundation and its community.”

OSI’s recommendation

The Open Source Initiative assumes the Act is not intended to negatively impact the communities that make Open Source software or burden the non-profit foundations that support them.

Therefore OSI recommends further work on the Open Source exception to the requirements within the body of the Act to exclude all activities prior to commercial deployment of the software and to clearly ensure that responsibility for CE marks does not rest with any actor who is not a direct commercial beneficiary of deployment. Leaving the text as it is could chill or even prevent availability of globally-maintained open source software in Europe. We also support the more detailed analysis we have co-signed with Open Forum Europe.

Categories: FLOSS Research

Civic UK: Build a grid section creating a new Drupal Media type

Planet Drupal - Tue, 2023-01-24 07:00
In this post we'll describe how you can create a grid-like section of simple items, by creating a new Drupal Media type.
Categories: FLOSS Project Planets

Kentaro Hayashi: Porterboxes and alternatives

Planet Debian - Tue, 2023-01-24 06:29

As you know, Debian projects and sponsor provides so-called "porterbox", but it does not cover all architectures.

There are some alternatives to fix architecture-specific bugs. For the record, let's pick it up them. [1][2][3]

porterbox deb-o-matic qemu amd64 adayevskaya.d.o debomatic-amd64.d.n DQIB ready arm64 amdahl.d.o debomatic-arm64.d.n DQIB ready armel amdahl.d.o abel.d.o debomatic-armel.d.n NG armhf amdahl.d.o abel.d.o harris.d.o debomatic-armhf.d.n DQIB ready i386 exodar.d.n debomatic-i386.d.n DQIB ready mips64el eller.d.o debomatic-mips64el.d.n DQIB ready mipsel eller.d.o debomatic-mipsel.d.n DQIB ready ppc64el platti.d.o debomatic-ppc64el.d.n DQIB ready s390x zelenka.d.o debomatic-s390x.d.n DQIB ready alpha N/A N/A NG arc N/A N/A N/A hppa panama.d.n N/A N/A ia64 yttrium.d.n N/A N/A kfreebsd-amd64 lemon.d.n N/A N/A kfreebsd-i386 lemon.d.n N/A N/A m68k mitchy.d.n N/A NG powerpc perotto.d.n debomatic-powerpc.d.n DQIB ready ppc64 perotto.d.n N/A DQIB ready riscv64 debian-riscv64-porterbox-01.d.n N/A DQIB ready sh4 N/A N/A NG sparc64 kyoto.d.n N/A N/A x32 N/A N/A N/A

Thus, no alternatives for alpha, arc, sh4 and x32.

Categories: FLOSS Project Planets

Five Jars: Is Drupal a good CMS for enterprise companies?

Planet Drupal - Tue, 2023-01-24 05:55
In this post, we'll examine if Drupal can satisfy an enterprise’s CMS requirements.
Categories: FLOSS Project Planets

Andy Wingo: parallel ephemeron tracing

GNU Planet! - Tue, 2023-01-24 05:48

Hello all, and happy new year. Today's note continues the series on implementing ephemerons in a garbage collector.

In our last dispatch we looked at a serial algorithm to trace ephemerons. However, production garbage collectors are parallel: during collection, they trace the object graph using multiple worker threads. Our problem is to extend the ephemeron-tracing algorithm with support for multiple tracing threads, without introducing stalls or serial bottlenecks.

Recall that we ended up having to define a table of pending ephemerons:

struct gc_pending_ephemeron_table { struct gc_ephemeron *resolved; size_t nbuckets; struct gc_ephemeron *buckets[0]; };

This table holds pending ephemerons that have been visited by the graph tracer but whose keys haven't been found yet, as well as a singly-linked list of resolved ephemerons that are waiting to have their values traced. As a global data structure, the pending ephemeron table is a point of contention between tracing threads that we need to design around.

a confession

Allow me to confess my sins: things would be a bit simpler if I didn't allow tracing workers to race.

As background, if your GC supports marking in place instead of always evacuating, then there is a mark bit associated with each object. To reduce the overhead of contention, a common strategy is to actually use a whole byte for the mark bit, and to write to it using relaxed atomics (or even raw stores). This avoids the cost of a compare-and-swap, but at the cost that multiple marking threads might see that an object's mark was unset, go to mark the object, and think that they were the thread that marked the object. As far as the mark byte goes, that's OK because everybody is writing the same value. The object gets pushed on the to-be-traced grey object queues multiple times, but that's OK too because tracing should be idempotent.

This is a common optimization for parallel marking, and it doesn't have any significant impact on other parts of the GC--except ephemeron marking. For ephemerons, because the state transition isn't simply from unmarked to marked, we need more coordination.

high level

The parallel ephemeron marking algorithm modifies the serial algorithm in just a few ways:

  1. We have an atomically-updated state field in the ephemeron, used to know if e.g. an ephemeron is pending or resolved;

  2. We use separate fields for the pending and resolved links, to allow for concurrent readers across a state change;

  3. We introduce "traced" and "claimed" states to resolve races between parallel tracers on the same ephemeron, and track the "epoch" at which an ephemeron was last traced;

  4. We remove resolved ephemerons from the pending ephemeron hash table lazily, and use atomic swaps to pop from the resolved ephemerons list;

  5. We have to re-check key liveness after publishing an ephemeron to the pending ephemeron table.

Regarding the first point, there are four possible values for the ephemeron's state field:


The state transition diagram looks like this:

,----->TRACED<-----. , | ^ . , v | . | CLAIMED | | ,-----/ \---. | | v v | PENDING--------->RESOLVED

With this information, we can start to flesh out the ephemeron object itself:

struct gc_ephemeron { uint8_t state; uint8_t is_dead; unsigned epoch; struct gc_ephemeron *pending; struct gc_ephemeron *resolved; void *key; void *value; };

The state field holds one of the four state values; is_dead indicates if a live ephemeron was ever proven to have a dead key, or if the user explicitly killed the ephemeron; and epoch is the GC count at which the ephemeron was last traced. Ephemerons are born TRACED in the current GC epoch, and the collector is responsible for incrementing the current epoch before each collection.

algorithm: tracing ephemerons

When the collector first finds an ephemeron, it does a compare-and-swap (CAS) on the state from TRACED to CLAIMED. If that succeeds, we check the epoch; if it's current, we revert to the TRACED state: there's nothing to do.

(Without marking races, you wouldn't need either TRACED or CLAIMED states, or the epoch; it would be implicit in the fact that the ephemeron was being traced at all that you had a TRACED ephemeron with an old epoch.)

So now we have a CLAIMED ephemeron with an out-of-date epoch. We update the epoch and clear the pending and resolved fields, setting them to NULL. If, then, the ephemeron is_dead, we are done, and we go back to TRACED.

Otherwise we check if the key has already been traced. If so we forward it (if evacuating) and then trace the value edge as well, and transition to TRACED.

Otherwise we have a live E but we don't know about K; this ephemeron is pending. We transition E's state to PENDING and add it to the front of K's hash bucket in the pending ephemerons table, using CAS to avoid locks.

We then have to re-check if K is live, after publishing E, to account for other threads racing to mark to K while we mark E; if indeed K is live, then we transition to RESOLVED and push E on the global resolved ephemeron list, using CAS, via the resolved link.

So far, so good: either the ephemeron is fully traced, or it's pending and published, or (rarely) published-then-resolved and waiting to be traced.

algorithm: tracing objects

The annoying thing about tracing ephemerons is that it potentially impacts tracing of all objects: any object could be the key that resolves a pending ephemeron.

When we trace an object, we look it up in the pending ephemeron hash table. But, as we traverse the chains in a bucket, we also load each node's state. If we find a node that's not in the PENDING state, we atomically forward its predecessor to point to its successor. This is correct for concurrent readers because the end of the chain is always reachable: we only skip nodes that are not PENDING, nodes never become PENDING after they transition away from being PENDING, and we only add PENDING nodes to the front of the chain. We even leave the pending field in place, so that any concurrent reader of the chain can still find the tail, even when the ephemeron has gone on to be RESOLVED or even TRACED.

(I had thought I would need Tim Harris' atomic list implementation, but it turns out that since I only ever insert items at the head, having annotated links is not necessary.)

If we find a PENDING ephemeron that has K as its key, then we CAS its state from PENDING to RESOLVED. If this works, we CAS it onto the front of the resolved list. (Note that we also have to forward the key at this point, for a moving GC; this was a bug in my original implementation.)

algorithm: resolved ephemerons

Periodically a thread tracing the graph will run out of objects to trace (its mark stack is empty). That's a good time to check if there are resolved ephemerons to trace. We atomically exchange the global resolved list with NULL, and then if there were resolved ephemerons, then we trace their values and transition them to TRACED.

At the very end of the GC cycle, we sweep the pending ephemeron table, marking any ephemeron that's still there as is_dead, transitioning them back to TRACED, clearing the buckets of the pending ephemeron table as we go.


So that's it. There are some drawbacks, for example that this solution takes at least three words per ephemeron. Oh well.

There is also an annoying point of serialization, which is related to the lazy ephemeron resolution optimization. Consider that checking the pending ephemeron table on every object visit is overhead; it would be nice to avoid this. So instead, we start in "lazy" mode, in which pending ephemerons are never resolved by marking; and then once the mark stack / grey object worklist fully empties, we sweep through the pending ephemeron table, checking each ephemeron's key to see if it was visited in the end, and resolving those ephemerons; we then switch to "eager" mode in which each object visit could potentially resolve ephemerons. In this way the cost of ephemeron tracing is avoided for that part of the graph that is strongly reachable. However, with parallel markers, would you switch to eager mode when any thread runs out of objects to mark, or when all threads run out of objects? You would get greatest parallelism with the former, but you run the risk of some workers prematurely running out of data, but when there is still a significant part of the strongly-reachable graph to traverse. If you wait for all threads to be done, you introduce a serialization point. There is a related question of when to pump the resolved ephemerons list. But these are engineering details.

Speaking of details, there are some gnarly pitfalls, particularly that you have to be very careful about pre-visit versus post-visit object addresses; for a semi-space collector, visiting an object will move it, so for example in the pending ephemeron table which by definition is keyed by pre-visit (fromspace) object addresses, you need to be sure to trace the ephemeron key for any transition to RESOLVED, and there are a few places this happens (the re-check after publish, sweeping the table after transitioning from lazy to eager, and when resolving eagerly).


If you've read this far, you may be interested in the implementation; it's only a few hundred lines long. It took me quite a while to whittle it down!

Ephemerons are challenging from a software engineering perspective, because they are logically a separate module, but they interact both with users of the GC and with the collector implementations. It's tricky to find the abstractions that work for all GC algorithms, whether they mark in place or move their objects, and whether they mark the heap precisely or if there are some conservative edges. But if this is the sort of thing that interests you, voilà the API for users and the API to and from collector implementations.

And, that's it! I am looking forward to climbing out of this GC hole, one blog at a time. There are just a few more features before I can seriously attack integrating this into Guile. Until the next time, happy hacking :)

Categories: FLOSS Project Planets

Introducing kdalgorithms

Planet KDE - Tue, 2023-01-24 05:00

Are you already convinced and just want to download the library? We’re glad you liked it: https://github.com/KDAB/KDAlgorithms

I’m sure many people have told you time and time again, Don’t use raw for loops; use algorithms.” Still, each time you tried, you found your code harder to read.

// ugly and unreadable algorithm code vector<int> vec{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; std::for_each(vec.cbegin(), vec.cend(), [](int i) { cout << i << " "; });

In case you’re wondering, the above simply prints out the vector.

Further, you might have looked at what C++20 (and especially C++23) offers in this area, but you are unfortunately stuck on C++17 or even C++14 and expect to be for quite a while.

Finally, you might have tried some of the existing libraries but found that they didn’t work very well with the Qt containers.

This was exactly my situation when I decided to write a few algorithm wrappers. Actually, I was using some other code already but it was GPL, and I wanted to offer something for Qt Widgets and More in an episode on algorithms.

In the rest of this blog post, I’ll switch between Qt and non-code Qt. KDAlgorithms works just as well with both container libraries. If you’re not familiar with Qt, just mentally replace QVector with std::vector, qDebug() with cout, and you will be just fine.

Let’s see a realistic (though still trivial) example of a loop that benefits from being rewritten as an algorithm:

QVector<QString> result; for (auto i : vec) { result.append(QString::number(i)); } qDebug() << "transform with loop:" << result;

So what does the above do? It takes a vector of integers and converts it into a vector of strings — easy enough. Still, you need to read all 5 lines to understand what is going on.

Let’s see the same thing, this time with the STL algorithms available in C++14:

QString toString(int i) { return QString::number(i); } QVector<QString> result; std::transform(vec.cbegin(), vec.cend(), std::back_inserter(result), toString); qDebug() << "Transform with std::transform:" << result;

I doubt many of you are running around the living room with your arms in the air screaming with joy.

One problem with the above is that you need to declare the result variable by itself and then use std::back_inserter to append to it. Another problem is that you need to call .cbegin() and .cend(), rather than just provide the vector. Finally, I’m sure a few of you are slightly bothered by the standalone toString function, which was what things looked like before C++11 and what lambdas fortunately solved.

Let me show you the above (this time with a lambda), rewritten to use kdalgorithms:

auto toString = [](int i) { return QString::number(i); }; auto result = kdalgorithms::transformed(vec, toString); qDebug() << "Transform to std::vector:" << result;

Now is a good time for that victory dance. Let me read the code for you:

  1. Okay, so there is a lambda here for converting an integer to a string. Well, I’m too important and busy to read the details — next!
  2. Aaah…okay, so this is transforming the vector by calling toString on each item.


You see, that is the beauty of algorithms (besides ensuring that the algorithm is properly implemented and tested) — the code is much easier to read. Heck, if you were really busy, you could have stopped at the word transformed and still got the gist of what is going on.

While the above few statements are true about algorithms in general, my claim is that they are even more so for kdalgorithms. Observe how we cut down on the extra noise:

  • We just provide the complete vector, not a pair of iterators. While there indeed are many good use cases for operating on a subset of a container, my guess is that in 97.8% of the cases you execute the algorithms on the full container.
  • You get the result returned to you, rather than providing an output iterator (std::back_inserter(result)) to where the data should go.
Okay, Tell Me What’s in the Package…

Sorry, I am not going to list all the available functions. For that, have a look at the documentation.

Let me, however, show you a few examples. For each of the examples, I’ll tell you, below the code, what it does, so you can try to interpret the code first.

Example: Find_if std::vector vec{1, 2, 3, 4, 5}; auto greaterThan = [] (int value) { return [value] (int test) { return test > value; }; }; const auto result = kdalgorithms::find_if(vec, greaterThan(2)); if (result) std::cout << *result << std::endl; else std::cout << "ahh nothing, right\n";

That wasn’t too hard, was it? First, we created a nifty function that returns another function. If you can’t wrap your head around that, it basically just boils down to writing this code in the find_if line:

const auto result = kdalgorithms::find_if(vec, [] (int test) { return test > 2; });

The find_if basically searches for the first number in the list that’s greater than 2. However, in contrast to STL algorithms, it doesn’t return an iterator but, rather, an object with an operator bool() so it’s more natural to check if there was a result, and an operator* for getting to the actual value.

See more about find_if in the documentation.

Example: Partitioned const auto& [alive, dead] = kdalgorithms::partitioned<std::unordered_set>(getAllPlayers(), &Player::isAlive);

Simple, still quite a few things to explain.

First, kdalgorithms::partitioned returns a simple struct with two containers in it — one called in, the other called out. Using C++17’s structured binding, I unpack that struct as the value is returned. Had I only had C++14, the code would look like this:

const auto result = kdalgorithms::partitioned<std::unordered_set>(getAllPlayers(), &Player::isAlive); const auto in = result.in; const auto out = result.out;

Second, the method getAllPlayers() — which honestly only exists in my head — returns a std::vector<Player>. Maybe the players are sorted somehow, but I don’t care about sorting. Instead, the following code might want to do some set operations, so, on the fly, kdalgorithms::partitioned converts the result into two unordered sets. Had I not had that requirement, I could have left out the <std::unordered_set> part and kdalgorithms::partitioned would return a structure containing two vectors.

Finally, what kdalgorithms::partitioned is doing is to splitting the input into two collections — one that contains values that match the given predicate, and one that contains those that don’t (the in‘s and out‘s). As mentioned, the input is a vector of Players and, rather than writing a lambda to call isAlive on each item to decide if they are in or out, I simply provide a pointer to the member function.

In other words, the above code would produce the same result as this:

const auto& [alive, dead] = kdalgorithms::partitioned<std::unordered_set>( getAllPlayers(), [] (const Player& player) { return player.isAlive(); });

By the way, the syntax &Player::isAlive would be the same whether isAlive is a public function or a public member variable.

Want more examples of partitioned? Head over to the documentation for partitioned.

Example: Searching for Old People std::vector<std::string> names{"Jesper", "Anne Helene", "Louise", "Laura", "Santa"}; std::vector<int> ages{52, 49, 11, 8}; auto olderThan = [](int age) { return [age](const auto &tuple) { return std::get<1>(tuple) > age; }; }; auto getName = [](const auto &tuple) { return std::get<0>(tuple); }; auto oldPeople = kdalgorithms::filtered_transformed(kdalgorithms::zip(names, ages), getName, olderThan(40));

Ahem! It’s senior citizens, not old people. Besides that, I take it the code reads without any hiccups, right?

Still let me go over it.

The first two lines are just setting up the test data. And I’m sure you are already asking me why I didn’t just have a vector of structs? To that, my answer is simple: Oh for <beep>’s sake please get down from the ivory tower.

We’ve all been in that situation where we have two pieces of data representing different attributes of the same items (here, name and age) but, unfortunately, we’ve had them in two different containers.

Reviewing your code, I’m sure you will find code that smells like this:

for (nameIt = names.cbegin(), ageIt = ages.cbegin(); namesIt != names.cend() && agesIt != ages.cend(); ++namesIt, ++agesIt) { .... }

That’s where kdalgorithms::zip (which you may get from the file kdalgorithms.zip — okay, I admit that was a bad joke!) comes to the rescue. It takes any number of containers and produces a resulting container of tuples, each containing one item from each container.

The above test data would result in this:

std::vector<std::tuple<std::string, int>> resultOfZip{ {"Jesper", 52}, {"Anne Helene", 49}, {"Louise", 11}, {"Laura", 8} };

Next, we use filtered_transformed, which, despite its terrible name, does a very common thing:

First, it filters the data (here, it searches for everyone above 40, using the function olderThan(40)) and then transforms those that match (here, it’s calling getName to extract the name from the tuple). The result is a std::vector with two members in it, namely “Jesper” and “Anne Helene” (which, incidentally, is my wife and me — though I’m not saying she’s old!)

Want to learn more about zip or filtered_transformed? <—-Well, there are two links to the documentation.

So, Why Did You Create kdalgorithms?

As previously mentioned, I wanted to showcase algorithms in Qt Widgets and More. Additionally, and maybe most importantly, I wanted to learn much more about template meta programming.

As everyone else in KDAB, I’m entitled to utilizing 10% of my work time for education purposes. So, I decided to play with templates.

So, you might ask, “Is this just a piece of play code for you that you will abandon in no time?”

No! In KDAB, I also wrote my own version of what the rest of the world would think of as SAP — namely, a pretty large and complex piece of software that can tell KDAB everything we want to know about our cashflow, our customers, and even who’s been a bad boy and worked a lot of overtime recently (something we do not allow people to do; we insist that they have a good work/life balance).

What was I talking about? Ahh…right. Yes, in that tool, which is 150,000 lines of code, I am using kdalgorithms intensively –  a word count on kdalgorithms:: reveals almost 500 calls.

So, unless I one day decide that I need a bus full of consultants to redesign KDAB (by introducing SAP), I likely am doomed to support kdalgorithms for a very long time.

Which, now that I think of it, is great, since templates are a lot of fun and I’m sure that, just like 3-dimensional sudokus will delay Alzheimers, so will template meta programming.

Want more? Okay, then — you have to look me in the eyes (aka. watch youtube videos of me). Episode 95 is about kdalgorithms and shows a few different examples. Episodes 96-99 dive into a lot of template meta programming code, with the goal of letting the viewer understand how kdalgorithms::transformed is implemented and, more specifically, optimized for temporaries (that is rvalues) where it can steal the container provided.

Final words: Time to download and provide your feedback on kdalgorithms.

A Special Thanks…

I’d like to bring a special thank you to my coworker, Ivan Čukić, who has been a tremendous help on my journey towards a reborn C++ developer.

Ivan has patiently reviewed all of my pitiful attempts to write template code and continuously pushed me to reach higher.

Besides being a brilliant C++ developer, Ivan also has a good eye for structuring your code for maximum readability. To that end, I can strongly recommend his book on functional programming in C++.

About KDAB

If you like this article and want to read similar material, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

The post Introducing kdalgorithms appeared first on KDAB.

Categories: FLOSS Project Planets

Golems GABB: Layout builder toolset. Must have contrib modules for better layout control

Planet Drupal - Tue, 2023-01-24 04:42
Layout builder toolset. Must have contrib modules for better layout control Editor Tue, 01/24/2023 - 11:42

Dries Buytaert once wrote:

"...it can work with structured and unstructured content, and with templated and free-form pages."

One might call it primitive, but those who master it will be delighted with it because it is the basis. Hello friends! Today our focus is on Drupal Layout Builder. This is a nifty tool that all marketers and developers need.
Layout Builder is the best Drupal responsive web design tool for today. Drupal already has it at its core! That's awesome! Using Layout Builder in Drupal 8 or 9, you can add/remove sections to customize your pages following your requirements and display content using different layouts.

Categories: FLOSS Project Planets

Python Bytes: #320 The Bug Is In The JavaScript

Planet Python - Tue, 2023-01-24 03:00
<a href='https://www.youtube.com/watch?v=uy04vHILEtY' style='font-weight: bold;'>Watch on YouTube</a><br> <br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://testandcode.com/"><strong>Test &amp; Code</strong></a> Podcast</li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/stream/live</strong></a> to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too.</p> <p><strong>Brian #1:</strong> <a href="https://github.com/executablebooks/markdown-it-py"><strong>markdown-it-py</strong></a></p> <ul> <li>Yes. another markdown parser.</li> <li><a href="https://github.com/Textualize/rich/releases/tag/v13.2.0">Rich recently switched markdown parsers</a>, from <code>commonmark</code> to <code>markdown-it-py</code>.</li> <li>Let’s look at those a bit.</li> </ul> <p><strong>Michael #2:</strong> <a href="https://github.com/approximatelabs/sketch"><strong>Sketch</strong></a></p> <ul> <li>via Jake Firman</li> <li>Sketch is an AI code-writing assistant for pandas users that understands the context of your data</li> <li>A Natural Language interface that successfully navigates many tasks in the data stack landscape. <ul> <li>Data Cataloging: <ul> <li>General tagging (eg. PII identification)</li> <li>Metadata generation (names and descriptions)</li> </ul></li> <li>Data Engineering: <ul> <li>Data cleaning and masking (compliance)</li> <li>Derived feature creation and extraction</li> </ul></li> <li>Data Analysis: <ul> <li>Data questions</li> <li>Data visualization</li> </ul></li> </ul></li> <li>Watch the video on the GitHub page for a quick intro</li> </ul> <p><strong>Brian #3:</strong> <a href="https://pythontest.com/fix-circular-import-python-typing-protocol/"><strong>Fixing Circular Imports in Python with Protocol</strong></a></p> <ul> <li>Built on <a href="https://hynek.me/articles/python-subclassing-redux/"><strong>Subclassing in Python Redux</strong></a> from Hynek <ul> <li>We covered this in the summer of 2021, <a href="https://pythonbytes.fm/episodes/show/240/this-is-github-your-pilot-speaking">episode 240</a></li> <li>However, I re-read it recently due to a typing problem</li> <li>Problem is when an object passes itself to another module to be called later. <ul> <li>This is common in many design patterns, including just normal callback functions.</li> <li>Normally not a problem with Python, due to duck typing.</li> <li>But with type hints, suddenly it seems like both modules need types from the other.</li> </ul></li> <li>So how do you have two modules use types from each other without a circular import.</li> <li>Hynek produces two options <ul> <li>Abstract Data Types, aka Interfaces, using the <code>abc</code> module <ul> <li>Requires a third interface class</li> </ul></li> <li>Structural subtyping with <code>Protocol</code> <ul> <li>This is what I think I’ll use more often and I’m kinda in love with it now that I understand it.</li> <li>Still has a third type, but one of the modules doesn’t have to know about it.</li> </ul></li> <li>"<strong>Structural Subtyping :</strong> <em>Structural subtyping</em> is <em>duck typing</em> for types: if your class fulfills the constraints of a <code>[Protocol](https://docs.python.org/3/library/typing.html#typing.Protocol)</code>, it’s automatically considered a subtype of it. Therefore, a class can implement <em>many</em> <code>Protocol</code>s from all kinds of packages without knowing about them!”</li> </ul></li> </ul></li> <li>The <a href="https://pythontest.com/fix-circular-import-python-typing-protocol/">Fixing Circular Imports in Python with Protocol</a> article walks through one example of two classes talking with each other, typing, circular imports, and fixing them with Protocol</li> </ul> <p><strong>Michael #4:</strong> <a href="https://github.com/salabim/unrepl"><strong>unrepl</strong></a></p> <ul> <li>via/by Ruud van der Ham</li> <li><p>We’ve seen the code samples:</p> <div class="codehilite"> <pre><span></span><code><span class="o">&gt;&gt;&gt;</span> <span class="n">board</span> <span class="o">=</span> <span class="p">[]</span> <span class="o">&gt;&gt;&gt;</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">):</span> <span class="o">...</span> <span class="n">row</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">]</span> <span class="o">*</span> <span class="mi">3</span> <span class="o">...</span> <span class="n">board</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">row</span><span class="p">)</span> <span class="o">...</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">board</span> <span class="p">[[</span><span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">]]</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">board</span>\<span class="p">[</span><span class="mi">2</span>\<span class="p">][</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s1">&#39;X&#39;</span> <span class="o">&gt;&gt;&gt;</span> <span class="n">board</span> <span class="p">[[</span><span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">],</span> <span class="p">[</span><span class="s1">&#39;X&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">,</span> <span class="s1">&#39;_&#39;</span><span class="p">]]</span> </code></pre> </div></li> <li><p>But you cannot <em>really</em> run this code. You can’t paste it into a REPL yourself nor can you put it into a .py file.</p></li> <li>So you unrepl it: <strong>Copying the above code to the clipboard and run unrepl</strong>.</li> <li>Paste the result and now you can.</li> <li>Unrepl can be used as a command line tool but also as a module.</li> <li>The REPL functionality of underscore (_) to get access to the last value is also supported.</li> </ul> <p><strong>Extras</strong> </p> <p>Michael:</p> <ul> <li>You'll want to update your git ASAP.</li> <li>Get course releases at Talk Python <a href="https://training.talkpython.fm/courses/rss">via RSS</a></li> <li><a href="https://fosstodon.org/@cobler/109718505946298680">Gist</a> for using Turnstile with Python + Pydantic</li> </ul> <p><strong>Joke:</strong> <a href="https://www.youtube.com/watch?v=jxi0ETwDvws">there's a bug in the js</a></p> <ul> <li>You’ve checked all your database indexes, </li> <li>You’ve tuned all your API hooks,</li> <li>You’re starting to think</li> <li>That you might need a drink,</li> <li>Because there’s only one place left to look:</li> <li>…</li> <li>There must be a bug in the javascript</li> <li>Because everything else was built properly</li> <li>But the frontend’s a pile of crap ;)</li> </ul>
Categories: FLOSS Project Planets

Specbee: How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website

Planet Drupal - Tue, 2023-01-24 02:34
How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website Akshay Devadiga 24 Jan, 2023 Subscribe to our Newsletter Now Subscribe Leave this field blank

Git has been a reliable version control tool for a large number of closed and open-source projects. With Drupal being an extremely collaborative open-source content management framework, a trackable, transparent, and distributed version control system like Git is a perfect fit. Git replaced a long-time version control partner – CVS – in early 2011 and became every Drupal developer and contributor’s favorite tool for its security, distributed nature, agile workflow, and of course, being open source!

If you’re a Drupal developer, you should be familiar with patches already. Patches are like band-aids. They are small pieces of code that are added on top of already existing code files to support it or fix any issues. Different types of patches include bug fixes, security vulnerability fixes, performance enhancements, styling fixes, etc. If you are a regular contributor to the Drupal project, you should know that to fix an issue in Drupal core or contributed modules, you must submit a patch to an issue in the issues queue. These patches are then examined and tested by the module maintainer and applied if found beneficial.

This is a revised version of the article. We’d like to thank Anktiha Shetty and Pratik Kadambari for all their great inputs! 

There are different ways to apply a Git patch. Let’s learn more about various Git Diff commands and how to create/apply a patch with the help of Git diff and Git apply. We will assume that you have already cloned/obtained a copy of the project in your local repository and have pulled the latest changes so you’re not working on an older version of the project. Take a look at some Github best practices here.

What does the Git Diff command do? 

Git diff is a command to output the changes between two sources inside the Git repository. The data sources can be two different branches, commits, files, etc.

The common use cases of git diff commands are listed below.

•    $ git diff 

This command will output all the modified changes which are not added to git or staged.

•    $ git diff filename

This will output the changes of that current file to its previous committed state.

•    $ git diff branch_name

This will output the modifications of the current branch to the mentioned branch to its previous committed state.

•    $ git diff --staged (or --cached) path/to/file

Once the changes are added to Git or moved to staging, you will not be able to see the diff of the files. To see the staged changes, you can use diff with --staged or --cached option.

  •    $ git diff HEAD

To see the changes from both staged and unstaged changes (not untracked files) together, you can use the git diff HEAD command. If you have all changes staged for commit, then both commands i.e., --staged/–-cached and HEAD will output the same.



  •    $ git diff commit_id1 commit_id2

To see the difference between any two commits you can use this git diff command where you need to mention the two commit ids.

If you want to see the list of commits made in the Git repo, use the command $ git log. This will list out all the commits (starting from the latest commit) along with their respective commit ids, the author (developer) and the date it was committed on.

Creating a Git patch with git diff

To create a Git patch, we can use any of the git diff commands to get the changes. We then need to save the changes to a file which can be used as below.

•    $ git diff > my_custom_patch_file.patch




Apply the Git Patch 

Drupal developers will want to apply Git patches frequently to update changes or to fix bugs. Developers will create a patch file that can be used by other developers according to their needs. To apply a git patch to the current branch use the following command.

•    $ git apply patch_file.patch 



Try the above command with the -v or --verbose option. It will cause additional information about the current patch being applied to be reported (as shown below).


Other useful Git patch apply conditions: 1. Working with trailing white spaces

Use --whitespace option to handle such situations.

Here the patch is created accidentally with trailing whitespaces (as shown below).


If the patch is applied as is: $git apply patch_file.patch
The patch will be applied (with whitespace warnings) and will still retain the whitespaces which can cause linting errors.

To fix trailing whitespaces while applying the patch, use the option --whitespace=fix, the patch will be applied, and trailing whitespaces will be removed.

Usage: $git apply --whitespace=fix patch_file.patch

2. Checking the patch before applying

To check before applying the patch, use option --check
The command will show no warnings and errors if the patch is applied cleanly.


  3. To see file statistics before applying the patch

Use --stat option with the git apply command. It will list all files which will be changed upon applying the patch.


The patch will only show information, and will not be applied. 
To apply patch along with “stat” options add option --apply in command.

Usage: $git apply --stat --apply patch_file.patch

4. To apply only changes that are getting removed

Use Option --no-add with git apply.

For example:


Here only changes in red will be applied and green will be excluded.

Usage: $git apply --no-add patch_file.patch


  5. Exclude and include the patch to be applied to selected files

Use --exclude option to exclude files from applying patch change.
$git apply --exclude=file_name.ext patch_file.patch 
Changes on other files, excluding mentioned file, will be reflected.

Vice versa: 

$git apply --include=file_name.ext patch_file.patch 

Changes only on the mentioned file will be reflected.

There might be a situation when the developer does not have write access to the project but still wants to suggest a change or fix a bug. The best way to go around that is to create a patch file. And because patches are additions to the code, testing and reviewing them is easy. This brief guide aims at helping Drupal developers get more familiar with git diff and git apply commands to be able to efficiently create and apply Git patches as needed. Contact us to know more about how we can help you with your next Drupal website.

Drupal Planet Drupal Tutorial Drupal Development Drupal

Leave us a Comment

  Recent Blogs Image How to create and apply a patch with Git Diff and Git Apply commands for your Drupal website Image Installing Drupal 9 on Windows Subsystem for Linux from Scratch Image How to Integrate Drupal 9 with Bitly for URL Shortening Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

Upgrading and consolidating multiple web properties to offer a coherent digital experience for Physicians Insurance

Upgrading the web presence of IEEE Information Theory Society, the most trusted voice for advanced technology

Great Southern Homes, one of the fastest growing home builders in the United States, sees greater results with Drupal 9

View all Case Studies
Categories: FLOSS Project Planets

Ports updates in january 2023

Planet KDE - Mon, 2023-01-23 18:00

It’s been a really slow month for me on the Free Software front. Roughly since the KDE e.V. board meeting in Berlin I’ve been swamped with work-work (just lots of C++ code to grind through) and personal (family health matters) issues. The effect is that when I sit down at my FreeBSD workstation, I have at most 15 minutes a day to deal with whatever Free Software things affect me. That’s KDE, Calamares, and FreeBSD, so they all get short shrift. I finally did sit down this week and get a little more done, so here’s a brief report.

Matrix clients

libQuotient had new releases, so consumers have updated. That is the FreeBSD ports net-im/libquotient and consumers net-im/quaternion and net-im/neochat. Quaternion isn’t updated per se, since there’s no release that builds against the latest libQuotient release. I’ve just marked it broken, people can build against something older.

NeoChat works reasonably well also on FreeBSD, although I prefer Nheko on desktop and FluffyChat on mobile.


Rosegarden got an update, if you want to produce sheet music. I quite like it for a predictable release pace and nice code. It needs a single patch that I’m not even sure is strictly necessary anymore (something about QVariant constructors).

MuseScore on the other hand is a wretched thing to deal with. I can only conclude that it builds fine in the specific Docker container its developers use, and is rarely built outside of that. The “BSD” build instructions are a joke, because it doesn’t even get through the CMake stage. So there’s dozens of patches needed there, and then it still falls over using a vendored copy of a 2-year-old release of fluidsynth. This is a battle every step of the way, so for now 3.6.1 remains in the ports tree until I gather more energy.

KDE bits

Tobias and the rest of the KDE@ and desktop@ teams for FreeBSD have been doing a great job at keeping abreast of things. We’re reasonably up-to-date with Qt from the KDE patch collection, KDE Frameworks, KDE Gear – but not KDE Plasma. There’s still a (long-standing by now) problem where 5.25 and later crash something on startup, and you get a non-functional desktop.

Diagnosing this requires someone with time and patience to sit and start-and-crash a KDE Plasma desktop for a few hours on end to figure out what’s going on. So far, hours on end has been elusive (or not so attractive) for any of us.


CMake 3.25.1 landed, with a handful of fixes for consumers – it’s always a challenge when updating tools to deal with open source projects that last had a release years ago and are no longer quite so compatible with the current generation of tools. This time it was lizardFS, which .. might be interesting or might be dead, I didn’t bother figuring it out and just hacked something together to make it build.

Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #383 - Programming the Physical World

Planet Drupal - Mon, 2023-01-23 14:00

Today we are talking about Programming the Physical World with Stephen Cross.

For show notes visit: www.talkingDrupal.com/383

  • What is meant by Programming in the Physical World
  • How do people interact
  • How are we focusing today’s topic
  • What is a Microcontroller
  • What would you not use a microcontroller for
  • How do they get programmed and what language
  • How do you contain the device
  • Do you need to solder
  • How does this relate to Drupal
  • What have you used it for in the past
  • Where should I get started
Resources Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Stephen Cross - www.StephenCross.com @stephencross

MOTW Correspondent

Martin Anderson-Clutz - @mandclu Alexa Currently provides only a basic integration, for a developer to create a customized handler module to implement the specific functionality they need. An alexa_demo submodule provides a reference.

Categories: FLOSS Project Planets

DrupalEasy: DrupalEasy Podcast S14E5 - Rod Martin - How to be a software trainer

Planet Drupal - Mon, 2023-01-23 12:21

Direct .mp3 file download.

We talk with Rod Martin about what it takes to be a software trainer (including informal, one-on-one teaching) and how students can best prepare for a training.

URLs mentioned DrupalEasy News Audio transcript

We're using the machine-driven Amazon Transcribe service to provide an audio transcript of this episode.


Subscribe to our podcast on iTunes, Google Play or Miro. Listen to our podcast on Stitcher.

If you'd like to leave us a voicemail, call 321-396-2340. Please keep in mind that we might play your voicemail during one of our future podcasts. Feel free to call in with suggestions, rants, questions, or corrections. If you'd rather just send us an email, please use our contact page.

Categories: FLOSS Project Planets