@movq@www.uninformativ.de Yeah, give it a shot. At worst you know that you have to continue your quest. :-)
Fun fact, during a semester break I was actually a little bored, so I just started reading the Qt documentation. I didnāt plan on using Qt for anything, though. I only looked at the docs because they were on my bucket list for some reason. Qt was probably recommended to me and coming from KDE myself, that was motivation enough to look at the docs just for fun.
The more I read, the more hooked I got. The documentation was extremely well written, something Iāve never seen before. The structure was very well thought out and I got the impression that I understood what the people thought when they actually designed Qt.
A few days in I decided to actually give it a real try. Having never done anything in C++ before, I quickly realized that this endeavor wonāt succeed. I simply couldnāt get it going. But I found the Qt bindings for Python, so that was a new boost. And quickly after, I discovered that there were even KDE bindings for Python in my package manager, so I immediately switched to them as that integrated into my KDE desktop even nicer.
I used the Python KDE bindings for one larger project, a planning software for a summer camp that we used several years. Itās main feature was to see who is available to do an activity. In the past, that was done on a large sheet of paper, but people got assigned two activities at the same time or werenāt assigned at all. So, by showing people in yellow (free), green (one activity assigned) and red (overbooked), this sped up and improved the planning process.
Another core feature was to generate personalized time tables (just like back in school) and a dedicated view for the morning meeting on site.
It was extended over the years with all sorts of stuff. E.g. I then implemented a warning if all the custodians of an activitiy with kids were underage to satisfy new the guidelines that there should be somebody of age.
Just before the pandemic I started to even add support for personalized live views on phones or tablets during the planning process (with web sockets, though). This way, people could see their own schedule or independently check at which day an activity takes place etc. For these side quests, they donāt have to check the large matrix on the projector. But the project died there.
Hereās a screenshot from one of the main views: https://lyse.isobeef.org/tmp/k3man.png
This Python+Qt rewrite replaced and improved the Java+Swing predecessor.
@lyse@lyse.isobeef.org Hmmmmmmmmmmmm ⦠guess I should take a look at Qt. š¤ Thatās the one popular toolkit that Iāve never really tried for some reason. I really donāt like C++ (might as well use Rust), so Iāll also use Python.
@movq@www.uninformativ.de Donāt you worry, this was meant as a joke. :-D
There was a time when I thought that Swing was actually really good. But having done some Qt/KDE later, I realized how much better that was. That were the late KDE 3 and early KDE 4 days, though. Not sure how it is today. But back then it felt Trolltech and the KDE folks put a hell lot more thought into their stuff. I was pleasantly surprised how natural it appeared and all the bits played together. Sure, there were the odd ends, but the overall design was a lot better in my opinion.
To be fair, I never used it from C++, always the Python bindings, which were considerably more comfortable (just alone the possibility to specify most attributes right away as kwargs in the constructor instead of calling tons of setters). And QtJambi, the Java binding, was also relatively nice. I never did a real project though, just played around with the latter.
@lyse@lyse.isobeef.org (⦠I am making a Zalgo Generator in Python right now, because I need it for something else ⦠š¤£)
I was always under the wrong impression that Tkinter is bundled with Python.
It should be. Maybe your distro splits it off. š¤
@movq@www.uninformativ.de I never programmed with Tkinter myself and itās been ages that I ran a program which used it. I always thought that it looks awful. But maybe there are nicer themes these days. I just wanted to give the demo python3 -m tkinter a try, but this module doesnāt exist. I was always under the wrong impression that Tkinter is bundled with Python.
@lyse@lyse.isobeef.org Xfce is nice, but itās also mostly GTK. I donāt really know the answer yet. For now, Iāll just avoid anything that uses GTK4.
For my own programs, I might have a closer look at Tkinter. I was complaining recently that I couldnāt find a good file manager, so it might be an interesting excercise to write one in Python+Tkinter. š¤ (Or maybe thatās too much work, I donāt know yet.)
I have a Python script that transforms the original YouTube channel Atom feed into a more useful Atom feed by removing the spam description and replacing it with the video duration, filtering out videos by title, duration, etc. I just updated it to exclude the damn Shorts garbage more efficiently. Finally, YouTube updated their Atom feed generation, so that the video URL contains /short/ if itās of this useless kind. Never thought that they ever actually will improve their Atom feeds. Thank you, much appreciated!
@movq@www.uninformativ.de Iād love to have a Python script pushing my local CSV, too. But thatās never gonna fly, not in a thousand years. I canāt imagine that ever becoming reasonably stable without having to fix everything after the reverse-engineered API changes again.
@lyse@lyse.isobeef.org I do my timetracking in a little Python script, locally. Every now and then, I push the data to our actual service. Problem solved ā but itās a completely unpopular approach, they all want to use the web site. I donāt get it. Then, of course, when itās down, shit hits the fan. (Luckily, our timetracking software is neither developed nor run by us anymore. Itās a silly cloud service, but the upside is that Iām not responsible anymore. š¤·)
Some of our oldschool devs tried to roll out local timetracking once, about 15 years ago. I donāt remember anymore why they failed ā¦
This is developed inhouse, Iām just so glad that weāre not a software engineering company. Oh wait. How embarrassing.
Oh to be anonymous on the internet. That must be nice. š
@prologic@twtxt.net interesting that ruby is so low on the list, i find it the easiest to learn! hell i struggle with python more than ruby and iāve been told that python is like ruby but better lol. maybe itās just my weird brain!
One of the nicest things about Go is the language itself, comparing Go to other popular languages in terms of the complexity to learn to be proficient in:
- Go:
25keywords (Stack Overflow); CSP-style concurrency (goroutines & channels)
- Python 2:
30keywords (TutorialsPoint); GIL-bound threads & multiprocessing (Wikipedia)
- Python 3:
35keywords (Initial Commit); GIL-bound threads,asyncio& multiprocessing (Wikipedia, DEV Community)
- Java:
50keywords (Stack Overflow); threads +java.util.concurrent(Wikipedia)
- C++:
82keywords (Stack Overflow);std::thread, atomics & futures (en.cppreference.com)
- JavaScript:
38keywords (Stack Overflow); single-threaded event loop &async/await, Web Workers (Wikipedia)
- Ruby:
42keywords (Stack Overflow); GIL-bound threads (MRI), fibers & processes (Wikipedia)
@bender@twtxt.net Hereās a short-list:
- Simple, minimal syntaxāmaster the core in hours, not months.
- CSP-style concurrency (goroutines & channels)āsafe, scalable parallelism.
- Blazing-fast compiler & single-binary deploysāzero runtime dependencies.
- Rich stdlib & built-in tooling (gofmt, go test, modules).
- No heavy frameworks or hidden magicāunlike Java/C++/Python overhead.
tar and find were written by the devil to make sysadmins even more miserable
@kat@yarn.girlonthemoon.xyz @prologic@twtxt.net Given that all these programs are super old (tar is from the late 1970ies), while trying to retain backwards-compatibilty, Iām not surprised that the UI isnāt too great. š¤
find has quite a few pitfalls, that is very true. At work, we donāt even use it anymore in more complex scenarios but write Python scripts instead. find can be fast and efficient, but fewer and fewer people lack the knowledge to use it ⦠The same goes for Shell scripting in general, actually.
Thanks, @movq@www.uninformativ.de! That seems to be much easier. Itās already implemented in the Python docs as examples of recvmsg(ā¦) and sendmsg(ā¦):
- https://docs.python.org/3/library/socket.html#socket.socket.recvmsg
- https://docs.python.org/3/library/socket.html#socket.socket.sendmsg
I looked at them sooo many times in order to figure out why my SCM_CREDENTIALS sending code didnāt work. :-D
Nobody want to be a shitty programmer. The question is: Do you do anything not to not be one?
Reading blogs or social media and watching YouTube videos is fun. After them, your code may be a little better, of course. But you need a lot. You need to study! Read good books and study the code of other programmers, for example. Maybe work with a new language, architectures and paradigms. You need break the routine.
If you know Object-oriented programming, you learn functional programming.
If you know Model-View-Controller, you learn Model-View-ViewModel.
If you donāt know anything about architectures, you learn Clean Architecture, Hexagonal Architecture, etc.
If you know Python, you learn Ruby or Go.
If you know Clojure or Lisp⦠you donāt need to learn anything else. You are already a good programmer. Just kidding. You can learn Elixir or Scala.
Be a good programmer my friend.
Weāre all old farts. When we started, there werenāt a lot of options. But today? Iād be completely overwhelmed, I think.
Hence, Iād recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice
Thatās what I usually do (when we have young people at work who never really programmed before), but it doesnāt really āhitā them. Theyāve seen so much, crazy graphics, web pages, itās all fancy. Just some text output is utterly boring these days. ā¹ļø And thatās my problem: I have no idea how I could possibly spark some interest in things like pointers or something ālow-levelā like that. And I truly believe that you need to understand things like pointers in order to program, in general.
Wrote some serious Python for the first time in like 10 years š± I feel so dirty š¤£
@movq@www.uninformativ.de I started with Delphi in school, the book (that we never ever used even once and I also never looked at) taught Pascal. The UI part felt easy at first but prevented me from understanding fundamental stuff like procedures or functions or even begin and end blocks for ifs or loops. For example I always thought that I needed to have a button somewhere, even if hidden. That gave me a handler procedure where I could put code and somehow call it. Two or three years later, a new mate from the parallel class finally told me that this wasnāt necessary and how to do thing better.
You know all too well that back in the day there was not a whole lot of information out there. And the bits that did exist were well hidden. At least from me. Eventually discovering planet-quellcodes.de (I donāt remember if that was the original forum or if that got split off from some other board) via my best schoolmate was like finding the Amber Room. Yeah, reading the ITG book would have been a very good idea for sure. :-)
In hindsight, a console program without the UI overhead might have been better. At least for the very start. Much less things to worry about or get lost.
Hence, Iād recommend to start programming with a console program. As for the language, not sure. But Python is probably a good choice, it doesnāt require a lot of surrounding boilerplate like, say Java or Go. It also does exceptionally well in the principle of least surprise.
nuevos projectos! algunos en python otros en simple html!!
Exciting new for Python 3.14!
t-string, not to be confused with f-string, to avoid malicious code and make life easier for web developers.
https://davepeck.org/2025/04/11/pythons-new-t-strings/
#python
si4er3q. See https://twtxt.dev/exts/twt-hash.html, a timezone offset of +00:00 or -00:00 must be replaced by Z.
@eaplme@eapl.me you wrote:
āThat PHP snippet could be merged into https://twtxt.dev/exts/twt-hash.htmlā
Why, though? AFAIK @andros@twtxt.andros.devās client is on Emacs, @lyse@lyse.isobeef.orgās is on Python (and Golang, for tt2), @movq@www.uninformativ.deās is on Python, and @prologic@twtxt.netās is on Golang. All the client creator needs to know is in the documentation already, coding language agnostic.
si4er3q. See https://twtxt.dev/exts/twt-hash.html, a timezone offset of +00:00 or -00:00 must be replaced by Z.
Scratch that, no bug in jenny. Thereās actually a test case for this. Python normalizes -00:00 to +00:00, so the negative case never happens.
Elliptical Python programming
One thing I love about Python is how it comes with its very own built-in zen. In moments of tribulations, when I am wrestling with crooked code and tangled thoughts, I often find solace in its timeless wisdom. ā« Susam Pal I canāt program and know nothing about Python, but this still made me laugh. ā Read more
Thank you @python_valencia@twtxt.python-valencia.es for letting me show you the secrets of a decentralised plain text social network like twtxt.
I hope you enjoyed the talk! ā¤ļøš


#python #twtxt
I want to present the twtxt feed from Python Valencia: https://twtxt.python-valencia.es/
Technical curiosity: It is generated using n8n, using the official rss.
#welcome
tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I "dropped" heaps of feeds that appeared to be inactive.
Thanks, @movq@www.uninformativ.de!
My backing SQLite database with indices is 8.7 MiB in size right now.
The twtxt cache is 7.6 MiB, it uses Pythonās pickle module. And next to it there is a 16.0 MiB second database with all the read statuses for the old tt. Wow, super inefficient, it shouldnāt contain anything else, itās a giant, pickled {"$hash": {"read": True/False}, ā¦}. What the heck, why is it so big?! O_o
I now subscribed to most feeds in my Go tt reimplementation that I already followed with the old Python tt. Previously, I just had a few feeds for testing purposes in my new config. While transfering, I ādroppedā heaps of feeds that appeared to be inactive.
This might motivate me to actually āfinishā the new client, so that it could become my daily driver. No need to use the old software stack any longer. Letās see how bad this goes.
@movq@www.uninformativ.de Yeah, most of the graphical applications are actually KDE programs:
- KMail ā e-mail client
- Okular ā PDF viewer
- Gwenview ā image viewer
- Dolphin ā file browser
- KWallet ā password manager (I want to check out
passone day. The most annoying thing is that when I copy a password, it says that the password has been modified and asks me whether I want to save the changes. I never do, because the password is still the same. I donāt get it.)
- KPatience ā card game
- Kdenlive ā video editor
- Kleopatra ā certificate manager
Qt:
- VLC ā video player
- Psi ā Jabber client (I happily used Kopete in the past, but that is not supported anymore or so. I donāt remember.)
- sqlitebrowser ā SQLite browser
Gtk:
- Firefox ā web browser
- Quod Libet ā music player (I should look for a better alternative. Canāt remember why I had to move away from Amarok, was it dead? There was a fork Clementine or so, but I had to drop that for some unknown reason, too.)
- Audacity ā audio editor
- GIMP ā image editor
These are the things that are open right now or that I could think of. Most other stuff I actually do in the terminal.
In the pastā¢, I used the Python KDE4 bindings. That was really nice. I could pass most stuff directly in the constructor and didnāt have to call gazillions of setters improving the experience significantly. If I ever wanted to do GUI programming again, Iād definitely go that route. There are also great Qt bindings for Python if one wanted to avoid the KDE stuff on top. The vast majority I do for myself, though, is either CLI or maybe TUI. A few web shit things, but no GUIs anymore. :-)
I have finished 1-9 on Python. If anyone is interested, I could share the code, or in Reddit many people have shared theirs.
In a couple of days Iāll be giving a talk about #twtxt https://www.meetup.com/es-ES/python-valencia-meetup/events/306769708/
@andros@twtxt.andros.dev If something fits in a CSV file, it typically doesnāt require a database. I agree with that. Depending on the application, more complicated queries might benefit from a database, though. I donāt know awk very well, but I could imagine that grep, sed and cut reach their CSV processing limits rather quickly when you have to deal with escaped (multiline) fields.
I only very rarely have to deal with CSV files or databases in my day to day life. Maybe, these classic Unix tools offer some tricks Iām not aware of. When I have some more complicated CSV input, I generally reach for Python.
looks good now!
description = š Full-Stack developer (Mainly Python) ā Writer[...]
Iām developing a tutorial for the Django Girls. Does anyone here have experience with #Django ? #python
The project is a POC (Proof of Concept) that went into production and the company has customers who are using it. The developers had been working for several years, without testing, structure, isolation and so on. The company hired me to transform the project into a real product. There are in my hands 422 python files to transform that they beg me a refactore, architecture and testing. Every developerās bad dream.
My first step is to read and understand the tree because there are apps inside other apps call each other. I am very determined to work on a new repository.
? operator in Go š No. For so many reasons.
@prologic@twtxt.net Which one? I donāt mind the ternary operator at all. In fact, I often find myself missing it in Go. I donāt find the two alternatives particularly elegant:
foo := "eggs"
if bar {
foo = "spam"
}
Or:
var foo string
if bar {
foo = "spam"
} else {
foo = "eggs"
}
To my eye, this just would look a lot nicer:
foo := bar ? "spam" : "eggs"
Or at least as the Pythons do it:
foo = "spam" if bar else "eggs"
The ternary operator especially shines with relatively short expressions.
For many years I have found Flask to be too basic a tool for modern development. But since I create APIs using Flask with Pydantic to validate the input data, some middlewares for parsing and Blueprint to separate the code into modules⦠I must admit that I am super comfortable, fast and easy to test.
#flask #python #pydantic
What is clean architecture? Thatās a good question.
You think of a pattern for ordering code with good decisions isolating technologies (you can change the web framework or database without break the business logic), easy to test (you only test interfaces and use cases), sharing code between frameworks (entities and use cases), scalability, modulations and standardizing names. Clean architecture is not perfect, it has a learning curve and some abstraction in each technology. You can even find rejection with yours colleagues.
I have a good article on this topic.
https://programadorwebvalencia.com/implementando-arquitectura-limpia-en-python/
#python
Yes, itās a mini python cgi script which implements IndieAuth
Yeah, @bender@twtxt.net, I absolutely love it! :-D Monty Python just rocks!
This very knight inspired me to make myself a knight helmet with opening visor out of an old washing machine sheet metal years ago for a theater play. It was really great fun, both making the helmet as well as using it during the week in the play as a silly and shady prince who got all his tracts of land by winning dubious games.
I just couldnāt really hear very well in it. And if somebody hit me on the head or just slightly knocked on the helmet, it was incredibly loud. No fine craftmanship by any means and obviously historically extremely questionable at best, but it did the job well enough. One of the running gags was that I had to open the visor when I wanted to talk. Here are some photos in action, youāll find many more when surfing through the gallery:
- https://wawuwo.de/2016/woche2/montag/017.html#image
- https://wawuwo.de/2016/woche2/dienstag/019.html#image
- https://wawuwo.de/2016/woche2/mittwoch/156.html#image
- https://wawuwo.de/2016/woche2/donnerstag/008.html#image
- https://wawuwo.de/2016/woche2/freitag/036.html#image In one lunch break my page and I decided to dress up and play a game of dice against the kids. However, we used badly cogged dice. We just added a few dots of paint on one of the two dice, so that it had two fours, two fives and two sixes or something like that. I always told my opponents: āYou can choose whatever dice you want. Except for the red one, thatās my lucky dice!ā As well-behaved children, they then selected the blue, unbiased one. And usually lost. However, I remember there was one kid that beat me with four sixes in row. :-D Although we thought, we make it halfway obvious that this game is truly not fair, it took them extremely long to figure out that we had messed with my lucky dice. When they finally did, they got super angry. Some of them were on the brink of beating me up. That was really nice to see their sense of justice kick it. :-)
- https://wawuwo.de/2016/woche2/freitag/169.html#image
@prologic@twtxt.net mediacms! itās janky yeah but it does the job ultimately (even if sometimes videos donāt encode and i gotta do some weird python venv shit to force the encode lolā¦)
base(2) or base(16) in calc to do that. Thatās exhausting after a while.
@movq@www.uninformativ.de Thanks! I already found it and patched it to run in my ancient Python version (no match keyword and exec(ā¦) only allows globals and locals as positional arguments). :-) https://lyse.isobeef.org/tmp/mcalc-patched.py.txt
@movq@www.uninformativ.de Yeah, the Python docs are more like a book. They absolutely shine if you have no idea and read them from top to bottom. The tutorial is baked right in. But they donāt work all that perfect as cheat sheets. I also remember looking for the return types way too long in the past.
I would have thought that this could be easily improved when type hints are in place. And it sure does: https://www.tornadoweb.org/en/stable/httpclient.html#tornado.httpclient.HTTPClient.fetch