Moin

  • 2 posts
  • 16 comments
Joined 2 years ago
Cake day: March 11th, 2024
  • A good question, as I like it and don’t like it. It is without a doubt better than dynamic types.

    On the pro side it removes redundant writing the type again and again. On the con side it is almost impossible to see what type with what functions the variable in front of you has without an IDE (which you don’t have without cloning the repo) or without an already deep knowledge of the code.

    Same with extension functions (free functions which can be added to a type almost anywhere in the codebase). Very useful (Kotlin is a great example for this) but also confusing when you want to hunt down where this piece of code is coming from.

  • I really don’t like comparing languages by Hello World complexity. You could use a lang which needs 3 chars to print it but sucks at everything else but it would still look better at first glance.

    As for this specific comparison: let the project grow to only midsize and you will crave for static types and well separated classes.

  • The application was MPV. At random time it started consuming 100% of one core for a long time. I could track it down to the clipboard thread where a loop polls Wayland to get the latest content of the clipboard (selected text). Seems like a bug in some other application spamms this clipboard buffer from time to time and so caused the MPV loop to run continously.

    This way I learned about that Wayland API and as MPV can emit logs whenever the poll loop got new data, I was able to see that it fired whenever I selected text in some application.

    Good to know the name of this feature; primary buffer. Now I need to find a way to disable it.

While fixing a problem with a Wayland app I noticed that the programm got a notification from a Wayland fd whenever I selected some text in any other window (not belonging to the app) and was able to read the contents of the selection.

As I’m not a fan of sharing data without explicit actions (so Ctrl+C, Ctrl+V), is there a way to disable this behaviour of Wayland?

OS info: Fedora 43 KDE

  • I tried TDD in a personal project recently and it got annoying pretty fast. It was also a project where I tried a new Framework so writing test when one doesn’t know how things behave exactly results in adjusting the tests afterwards anyway.
    Thinkimg how I want to designe my API upfront while discovering the details as I go served me well in the past (still in context of personal projects).

    It also doesn’t help when my tests have more bugs than the tested code…

  • Which brings me to boil is that they use ‘pardner’.
    I’m not your pardner in any way. I just wanted to read an aswer in my search results for a quite specific question.

    Every time I read this ‘whoa there, pardner’ I want to scream at my screen that they should shut the fuck up.