Skip to content

Friday, 6 May 2022

Let’s go for my web review for the week 2022-18. After a one week break, I mentioned we might have a double issue next… Here it is!


EU Joins Mastodon Social Network, Sets Up Its Own Server | PCMag

Tags: tech, social-media, politics

This is very good exposure to both Mastodon and PeerTube.

https://www.pcmag.com/news/eu-joins-mastodon-social-network-sets-up-its-own-server


GNOME patent troll stripped of patent rights

Tags: tech, patents, law

Excellent news, hoping to see more such bogus patents cancelled. Also, one can hope, that patent offices would start becoming less sloppy…

https://blog.opensource.org/gnome-patent-troll-stripped-of-patent-rights/


Blockchain is Dangerous Nonsense | Eisfunke

Tags: tech, blockchain, web3, nft, scam

Behind the hype… a speculative bubble completely out of touch with reality.

https://www.eisfunke.com/article/blockchain-technology.html


Magic-trace collects and displays high-resolution traces of what a process is doing

Tags: tech, debugging, profiling, tracing, performance

This looks like a very interesting tracing tool for debugging and profiling purposes.

https://github.com/janestreet/magic-trace#——magic-trace


Python’s “Type Hints” are a bit of a disappointment to me

Tags: tech, python, type-systems, mypy

A good reminder that it’s not all rosy with Python type-hints. There’s definitely room for improvements.

https://www.uninformativ.de/blog/postings/2022-04-21/0/POSTING-en.html


Robyn

Tags: tech, rust, python, backend, web

Looks like it’s still in the very early days but the overall approach looks interesting.

https://sansyrox.github.io/robyn/#/


Chopping the monolith

Tags: tech, microservices, architecture

Good arguments around the microservices hype. People advocate for it way more than reasonable, this applies only in rare contexts.

https://blog.frankel.ch/chopping-monolith/


Lies we tell ourselves to keep using Golang

Tags: tech, go, rust, type-systems, complexity

This is in part a rant but lots of points in there are very valid. This is in part why I don’t find Go a very compelling option so far. Modern tooling indeed, nice runtime in some areas but leaves way too much of the complexity in imperative code.

https://fasterthanli.me/articles/lies-we-tell-ourselves-to-keep-using-golang


PyScript | Run Python in your HTML

Tags: tech, python, webassembly, browser

It was only a matter of time until this kind of things would be doable through webassembly. I’m wondering about the size of the payloads the browser needs to download though.

https://pyscript.net/


How I fell in love with low-js

Tags: tech, frontend, backend, browser, javascript, html

There is indeed a trade-off approach available nowadays between “backend computes the whole page” and “frontend computes it all in JS”. This sounds like an interesting patch depending on the project context.

https://edofic.com/posts/2022-01-28-low-js/


Why Your CSS is Always Messy and Chaotic – Understanding CSS Complexity

Tags: tech, web, frontend, css

Good explanation of why the complexity of CSS code quickly gets out of control.

https://blog.shimin.io/understanding-css-complexity/


7GUIs

Tags: tech, frontend, interviews

This is indeed a nice set of tasks to evaluate a frontend tech or your mastery of it. Potentially usable in interviews?

https://eugenkiss.github.io/7guis/tasks/


IBM’s asshole test — johnpublic

Tags: hr, interviews

OK, if true this is indeed an interesting test… kind of a social experiment really. Probably quite a bit ambiguous though.

https://johnpublic.mataroa.blog/blog/the-asshole-test/


11 Principles of Engineering Management

Tags: management

An interesting set of management principles. Most make sense, a couple might be contextual.

https://acjay.com/2022/03/11/11-principles-of-engineering-management/


Having Career Conversations

Tags: management, career, hr

Lots of nice advices, both for mentors and mentees. This is definitely hard work but it’s worth it for people to grow.

http://www.softwareonthebrain.com/2021/12/having-career-growth-conversations.html?m=1


Taking control of your professional growth: a personal experience

Tags: management, hr, career

About growth again, definitely from the point of view of the mentee though. This looks like a nice and lean framework to figure out where you are and where you want to go.

https://medium.com/@jas123/taking-control-of-your-professional-growth-a-personal-experience-b53cbdfd8890


Gen Z does not dream of labor

Tags: management, work, life, remote-working

I find the title somewhat limiting due to the “Gen Z” label, but content is way more balanced even though fairly US centric. There are a few good lessons about work perception by people.

https://www.vox.com/the-highlight/22977663/gen-z-antiwork-capitalism


The Most Horrible Parasite: Brain Eating Amoeba - YouTube

Tags: science

The title says it all… indeed really creepy… Good thing there’s a very low chance this could happen to you. ;-)

https://www.youtube.com/watch?v=7OPg-ksxZ4Y


Mechanical Watch – Bartosz Ciechanowski

Tags: watch, mechanical, science, physics, engineering

Ever wondered about the details of a mechanical watch? Here is an excellent primer. Lots of attention to details.

https://ciechanow.ski/mechanical-watch/


103 Bits of Advice I Wish I Had Known

Tags: life, wisdom

Really great collection of wisdoms collected through decades. Loved it, some are funny too.

https://kk.org/thetechnium/103-bits-of-advice-i-wish-i-had-known/


Mending Your Cherished Clothes - Hometown Stories | NHK WORLD-JAPAN On Demand

Tags: culture, japan, craftsmanship

Discovering Kaketsugi, this is a very impressive craft. True labor of love. This is incredible work, feels almost magical. So much patience and attention to details. The amount of analysis which went into it is amazing too.

https://www3.nhk.or.jp/nhkworld/en/ondemand/video/5003184/



Bye for now!

Thursday, 5 May 2022

I’ve finally gotten annoyed enough with inotify failing randomly, because of resource exhaustion, that I’ve built a tiny app to deal with it.

Introducing kde-inotify-survey.

It features a CLI to inspect the inotify state, as well as a kded to warn and help with bumping the maximums. Assuming it turns out amazing for others I hope to progress it to kdereview soon.

I have updated my OBS builds to contain the new KDE Gears 22.04 as well as the last point release of KDE Plasma 5.24.5.

As usual, the packages are provided via my OBS builds. If you have used my packages till now, then you only need to change the apps2112 line to read apps2204. To give full details, I repeat (and update) instructions for all here: First of all, you need to add my OBS key say in /etc/apt/trusted.gpg.d/obs-npreining.asc and add a file /etc/apt/sources.lists.d/obs-npreining-kde.list, containing the following lines, replacing the DISTRIBUTION part with one of Debian_11 (for Bullseye), Debian_Testing, or Debian_Unstable:

deb https://download.opensuse.org/repositories/home:/npreining:/debian-kde:/other-deps/DISTRIBUTION/ ./
deb https://download.opensuse.org/repositories/home:/npreining:/debian-kde:/frameworks/DISTRIBUTION/ ./
deb https://download.opensuse.org/repositories/home:/npreining:/debian-kde:/plasma524/DISTRIBUTION/ ./
deb https://download.opensuse.org/repositories/home:/npreining:/debian-kde:/apps2204/DISTRIBUTION/ ./
deb https://download.opensuse.org/repositories/home:/npreining:/debian-kde:/other/DISTRIBUTION/ ./

Some programs in the other group have been recompiled against the Gears 22.04 libraries.

Enjoy!

PS: Considering that I don’t have a user-facing Debian computer anymore, all these packages are only tested by third parties and not by myself. Be aware!

PPS: Funny to read the Debian Social Contract, Point 4. Our priorities are our users and free software, obviously I care a lot about my users.

Tuesday, 3 May 2022

LabPlot 2.9 released

After a long development and additional testing and beta phases, we’re happy to announce the availability of the next release of LabPlot. In this release we’re bringing again a significant amount of new features and improvements in different areas of LabPlot. The major new features are introduced further below. For more detailed review of the changes in the new release we refer to our ChangeLog file.

In addition to the new functionality added in 2.9, the users will benefit from performance improvements when importing and plotting big amount of data. With this we want to address the needs of users who need to plot several millions of data points and more will come for this in future.

As usual, the source code of LabPlot, the Flatpak and Snap packages for Linux as well as the installer for Windows and the image for macOS are available on our download page.

We’re always interested in user’s feedback and invite everybody who wants to discuss the currently available features or features that should be added in the future releases to join our Matrix Room and to get in touch with us.

What’s new in 2.9?

Color Maps and Conditional Formatting

A collection of multiple well-known color maps and conditional formatting of the data in the spreadsheet

Box Plot

New visualization type – box plot – providing a quick summary of the basic statistical properties of the data set

Multi-Axes

Plot the data against multiple and different axes

Info and Image Elements

New worksheet elements to annotate curve data point and to show images on the worksheet.

Column Statistics

Get insights into the structure of your data and its statistical properties directly in the spreadsheet. A new dialog to show the …

Hilbert Transform

Added Hilbert transform to the set of analysis functions

MATLAB, SAS, Stata and SPSS formats

Support for new data formats widely used in scientific communities

Monday, 25 April 2022

After another few months I’m happy to announce a new release of QCoro, which brings several new features and a bunch of bugfixes.

  • .then() continuation for Task<T>
  • All asynchronous operations now return Task<T>
  • Timeouts for many operations
  • Support for QThread

.then() continuation for Task

Sometimes it’s not possible to co_await a coroutine - usually because you need to integrate with a 3rd party code that is not coroutine-ready. A good example might be implementing QAbstractItemModel, where none of the virtual methods are coroutines and thus it’s not possible to use co_await in them.

To still make it possible to all coroutines from such code, QCoro::Task<T> now has a new method: .then(), which allows attaching a continuation callback that will be invoked by QCoro when the coroutine represented by the Task finishes.

void notACoroutine() {
 someCoroutineReturningQString().then([](const QString &result) {
 // Will be invoked when the someCoroutine() finishes.
 // The result of the coroutine is passed as an argument to the continuation.
 });
}

The continuation itself might be a coroutine, and the result of the .then() member function is again a Task<R> (where R is the return type of the continuation callback), so it is possible to chain multiple continuations as well as co_awaiting the entire chain.

All asynchronous operations now return Task<T>

Up until now each operation from the QCoro wrapper types returned a special awaitable - for example, QCoroIODevice::read() returned QCoro::detail::QCoroIODevice::ReadOperation. In most cases users of QCoro do not need to concern themselves with that type, since they can still directly co_await the returned awaitable.

However, it unnecessarily leaks implementation details of QCoro into public API and it makes it harded to return a coroutine from a non-coroutine function.

As of QCoro 0.5.0, all the operations now return Task<T>, which makes the API consistent. As a secondary effect, all the operations can have a chained continuation using the .then() continuation, as described above.

Timeout support for many operations

Qt doesn’t allow specifying timeout for many operations, because they are typically non-blocking. But the timeout makes sense in most QCoro cases, because they are combination of wait + the non-blocking operation. Let’s take QIODevice::read() for example: the Qt version doesn’t have any timeout, because the call will never block - if there’s nothing to read, it simply returns an empty QByteArray.

On the other hand, QCoroIODevice::read() is an asynchronous operation, because under to hood, it’s a coroutine that asynchronously calls a sequence of

device->waitForReadyRead();
device->read();

Since QIODevice::waitForReadyRead() takes a timeout argument, it makes sense for QCoroIODevice::read() to also take (an optional) timeout argument. This and many other operations have gained support for timeout.

Support for QThread

It’s been a while since I added a new wrapper for a Qt class, so QCoro 0.5.0 adds wrapper for QThread. It’s now possible to co_await thread start and end:

std::unique_ptr<QThread> thread(QThread::create([]() {
 ...
});
ui->setLabel(tr("Starting thread...");
thread->start();
co_await qCoro(thread)->waitForStarted();
ui->setLabel(tr("Calculating..."));
co_await qCoro(thread)->waitForFinished();
ui->setLabel(tr("Finished!"));

Full changelog

  • .then() continuation for Task<T> (#39)
  • Fixed namespace scoping (#45)
  • Fixed QCoro::waitFor() getting stuck when coroutine returns synchronously (#46)
  • Fixed -pthread usage in CMake (#47)
  • Produce QMake config files (.pri) for each module (commit e215616)
  • Fix build on platforms where -latomic must be linked explicitly (#52)
  • Return Task<T> from all operations (#54)
  • Add QCoro wrapper for QThread (commit 832d931)
  • Many documentation updates

Thanks to everyone who contributed to QCoro!


Download

You can download QCoro 0.5.0 here or check the latest sources on QCoro GitHub.

More About QCoro

If you are interested in learning more about QCoro, go read the documentation, look at the first release announcement, which contains a nice explanation and example or watch recording of my talk about C++20 coroutines and QCoro this years’ Akademy.

Friday, 22 April 2022

Let’s go for my web review for the week 2022-16. I need some rest, so no web review next week. If I’m motivated we might have a double issue the week after. We’ll see.


It’s Still Stupidly, Ridiculously Difficult To Buy A ‘Dumb’ TV

Tags: tech, TV, low-tech, obsolescence

I feel less alone. I guess my next TV (hoping the current one will last though) will be a video projector.

https://www.techdirt.com/2022/04/14/its-still-stupidly-ridiculously-difficult-to-buy-a-dumb-tv/


Memray is a memory profiler for Python

Tags: tech, python, memory, profiling, performance

That looks like a very interesting tool for larger Python based projects. Definitely need a way to profile memory use in there.

https://bloomberg.github.io/memray/


How to Freaking Hire Great Developers

Tags: tech, interviews

I like this approach to technical interview questions. I do something similar in some cases with a mix of reading and writing.

https://freakingrectangle.wordpress.com/2022/04/15/how-to-freaking-hire-great-developers/


The Rise of the 9 p.m. Work Hour - The Atlantic

Tags: tech, management, remote-working, life

Interesting to see how a more widespread remote work impact people. Unexpected patterns appear, it’s clearly not all for the better though.

https://www.theatlantic.com/newsletters/archive/2022/04/triple-peak-day-work-from-home/629457/


The Dunning-Kruger Effect is Autocorrelation – Economics from the Top Down

Tags: psychology, science, statistics

Very interesting debunk of the Dunning-Kruger effect. This is welcome since I see it pervasively cited. Also comes with a few interesting facts introduced by the papers which critiqued it first.

https://economicsfromthetopdown.com/2022/04/08/the-dunning-kruger-effect-is-autocorrelation/



Bye for now!

Friday, 15 April 2022

Within SoK 2022 project, I worked on an in-app alert queueing system for KDE Connect iOS

Since my previous blog post I’ve been working on migrating all alerts to the new system, iOS 14 support and modernization of manual IP input screen.

Migrating to the new system

Alerts in the app are now using the new system. Everything has been migrated and works well (everything, besides one text alert, which I will discuss later in the post).

iOS 14 compatibility

There were some issues with queuing working on iOS 14, as iOS 15 introduced a lot of new features in swift. One of the problems was caused by a compatibility layer that allowed one view to have multiple .alert() modifiers. As of now, there is in fact only one alert in the entire app, so removing the compatibility layer was an obvious solution.

Here is a screen from iOS 14 with working alerts.

ios14 alerts

Configure Devices by IP screen

One of the reasons behins changing the “Configure Devices By IP” screen was to bring it up to modern apple standards. This screen used an outdated alert with text input, which is now gone. In the current version, the entire list of IPs is editable and you can add a new line with a click of a button. It works on the same basis as the native iOS reminders app.

Here is a before and after.

ip view screen

The other reason was that the text alert isn’t supported by the new alert manager :)

Other things

Having done all of that I focused on cleaning up the code and adding documentation for the new system.

Closing thoughts

My work for SoK is done. It has been a great opportunity to learn more about iOS development and work with a community-driven open source project. Over the span of the last few months, Swift really grew on me. With the help of my mentors’ work was going smoothly, and SoK was the thing I needed to finally contribute to the Open Source community.

Let’s go for my web review for the week 2022-15. Apparently not much made the cut this week for some reason… I guess that compensate with last week which was very well loaded. :-)


The smallest Docker image to serve static websites

Tags: tech, docker, http

Funny experiment, that’s a seriously small docker image now!

https://lipanski.com/posts/smallest-docker-image-static-website


A list of new(ish) command line tools

Tags: tech, command-line

Good list of interesting CLI tools. I adopted quite a few of them, there are more I’d like to evaluate.

https://jvns.ca/blog/2022/04/12/a-list-of-new-ish–command-line-tools/



Bye for now!

Overview

This is my fourth blogpost for SoK 2022.

It’s been quite some time since my third blogpost. If you remember, I’ve been working on adding the Perspective Ellipse Assistant Tool in Krita as a part of SoK’22.

My Progress so far

Merge Request and Status Report

Here’s the link to my Merge Request. Also, feel free to check out my status report.

Creating the Insrcibed Drawable Ellipse

My Perspective Ellipse Assistant Tool looked like this as of March 2022.

Animation

But the drawable Ellipse is different from the one shown in the animation. Here drawable Ellipse refers to the ellipse in krita/plugins/assistants/Assistants/Ellipse.cc.

In order to draw the drawable Ellipse, I need to find out the extreme points of the major axis of the ellipse and any other point on that ellipse. Finding out the extreme points of the major axis of the tranaformed ellipse is not a simple task and requires a bit of math, which has been explained in the next section.

A bit of math…

In order to find the extreme points of the major axis of the transformed ellipse, here’s what we need to do.

  1. Obtain the equation of the ellipse by solving the tangent equations using the the four points of the four-point-cage, and the touch points of the cage and the ellipse, which in turn can be found by transforming the touch points of the unit square and inscribed circle.
  2. The general equation of an ellipse contains 6 unknowns, namely (a, b, c, d , e, f). Assuming a can never be zero, I can divide the equation by a, to get 5 unknowns namely (b/a, c/a, d/a, e/a, f/a).
  3. Once I find the 5 coefficients, I can use these to find out the major axis extreme points by the formula shown here.

Here’s a link that demonstrates the above math vividly. Do check it out!

The KisAlgebra2d::transformEllipse() helps us to find the major and the minor axis of the transformed ellipse, along with the transformation matrix that we need to apply to the coordinate system. This final transformation is translate + rotate only. However this function works for cases when the circle is centered at the origin. Since our circle is cenetered at (0.5, 0.5), we need to take care of this offest before calling the function.

Hence the function call should look something like this.

QPointF newAxes;
QTransform newTransform;

QTransform oldTransform = QTransform::fromTranslate(0.5, 0.5) * m_cachedTransform;

std::tie(newAxes, newTransform) = KisAlgebra2D::transformEllipse(QPointF(0.5, 0.5), oldTransform);

I have not yet understood fully what to do with newTransform, and am still talking to my mentors and clarifying some doubts.

Next Steps

Although the Season of KDE is officially over, I would still be spending a few weeks on this project to complete what’s left. I had a great time working and interacting with the devs, and wish to contribute more to open source whenever I get some time off!

Thursday, 14 April 2022

Ohayo Gozaimosu!

This is going to a slightly informal post about my SoK experience. If you're looking for my status updates, the sixth and final status update was posted here.

My French KonneKt

Back during 2013 - 2015, I studied French at school. That was the first touch with this language for most students, as a result we did not have any serious texts in our coursebook. All texts were related to a French person/ couple/ family going out to the beach or monument or for picnic or something like that. For three years I studied that.

The net learning that a young Snehit had from those year was that the French are really cool people! Had I continued studying French, I would have been exposed to more serious texts, but I simply had to drop the subject when they got more focused on irregular verbs.

My Twentieth Winter

So what happened during the twentieth winter of my life? Of course, I had caught a cold after Christmas, which meant that my laptop and PC could finally get some rest. It also meant that I would be late to the join the KDE folks.

On 30th December 2021, I joined the KDE Flatpak Matrix channel, only to see that some potential contributors for the project have already introduced themselves. My health was in no mood to get to work, so I went back to sleep.

On 9th January 2022, I finally decided I was back in my usual high. Quickly checked the groups and oh my cat! Everyone had already gotten on to work. I scroll up the messages and find that three days prior to that, a cool sounding person had tagged four people and given them some instructions on how they could get started with the work. I felt I was far off, so I decided I could just help out the other contributors if they face roadblocks. That was the tiniest sweet thing a cake could do. And I do think I could help out a fine enthusiastic person on the channel.

French KonneKt Pt. 2

I was casually looking about the cool person I mentioned earlier, Timothée Ravier. YouTube seemed to have some videos by this person and wait what, he was speaking French???

I really needed to work with this cool person. I mean I wasn't expecting to virtually visit Le Louvre with him, but at least I could flex that I can pronounce the French 'r'!

So I speed run learning how to package as Flatpak. As I have mentioned many times already, I have experience in that, so it was rather smooth for me.

Timothée has been very helpful during our chats. Patiently listens to everything I say, while I go haywire telling him I did this, I broke that, I'll do this, I won't do that. I might just switch to an AZERTY keyboard, because I type his name too often these days and have to copy paste that é every time.

Getting to Work

Since I did not have classes in first 2-3 weeks of SoK, I speed ran my project (typical of me). A good number of applications were submitted to Flathub.

Next I tried reinventing the wheel, because I have a history of programming in Rust. As usual, I fell back to using a Python script. Flatpak External Data Checker got the work done, even though it did produce unexpected output at times.

Over on to the CI stuff, I wrote and rewrote^7 the build script. It not yet perfect, but I'll get to it very soon.

One potentially good thing to happen with me was that I started using Twitter. Now I'm more in sync with the abbreviations people use these days, thanks to the character limit. I hope they bring out the edit feature soon, and make the character limit 100x times longer so that long worded people like me feel at home there, but first I'm gonna petition to rename KDE Connect to KDE KonneKt.

What I Learnt

  • Packaging
  • Not running rm -rf out of context (I once deleted my build directory and then had to rebuild many KDE apps again)
  • Being on time for online meetings (other's time is important too)
  • Debating why JSON is better than YAML

Conclusions

French people are cool. So is whole of the KDE Community.