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
FreeDOS 1.4 released
With FreeDOS being, well, DOS, you’d think there wasn’t much point in putting out major releases and making big changes, and you’d mostly be right. However, being a DOS clone doesn’t mean there isn’t room for improvement within the confines of the various parts and tools that make up DOS, and that’s exactly where FreeDOS focuses its attention. FreeDOS 1.4 comes about three years after 1.2. This version includes an updated FreeCOM, Install program, and HTML Help system. This also includes i … ⌘ Read more
Sometimes, we spend months stuck in inertia, distracted by screens and routine. So I’d like to give you a simple reminder: creating-in whatever form-is what makes you feel alive.
The beauty of working on projects is not in their ‘success’, but in the simple act of working on them. Whether it’s writing, cooking, programming or redecorating the house: play with ideas without pressure, engage in an activity to test, fail and discover without judgement.
In the end, what remains is not a perfect product, but the satisfaction of completion and valuable lessons.
Find a project, no matter how small, and let it take you without expectations.
I’m a long-term mpd user (some 16+ years), but for $reasons
I have to compile it myself now – and, boy, that is one heavy program. Takes several minutes to build. 😳
Executive order on Smithsonian targets funding programs with ‘improper ideology’
Comments ⌘ Read more
Playing multimedia with Dillo
What if you want to use a web browser like Dillo, which lacks JavaScript support and can’t play audio or video inside the browser? Dillo doesn’t have the capability to play audio or video directly from the browser, however it can easily offload this task to other programs. This page collects some examples of how to do watch videos and listen to audio tracks or podcasts by using an external player program. In particular we will cover mpv with yt-dlp which supports YouTube … ⌘ Read more
@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
pass
one 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. :-)
Although, most software I use is decentish in that regard.
Is that because you mostly use Qt programs? 🤔
I wish Qt had a C API. Programming in C++ is pain. 😢
@kat@yarn.girlonthemoon.xyz Pointers can be a bit tricky. I know it took me also quite some time to wrap my head around them. Let my try to explain. It’s a pretty simple, yet very powerful concept with many facets to it.
A pointer is an indirection. At a lower level, when you have some chunk of memory, you can have some actual values sitting in there, ready for direct use. A pointer, on the other hand, points to some other location where to look for the values one’s actually after. Following that pointer is also called dereferencing the pointer.
I can’t come up with a good real-world example, so this poor comparison has to do. It’s a bit like you have a book (the real value that is being pointed to) and an ISBN referencing that book (the pointer). So, instead of sending you all these many pages from that book, I could give you just a small tag containing the ISBN. With that small piece of information, you’re able to locate the book. Probably a copy of that book and that’s where this analogy falls apart.
In contrast to that flawed comparision, it’s actually the other way around. Many different pointers can point to the same value. But there are many books (values) and just one ISBN (pointer).
The pointer’s target might actually be another pointer. You typically then would follow both of them. There are no limits on how long your pointer chains can become.
One important property of pointers is that they can also point into nothingness, signalling a dead end. This is typically called a null pointer. Following such a null pointer calls for big trouble, it typically crashes your program. Hence, you must never follow any null pointer.
Pointers are important for example in linked lists, trees or graphs. Let’s look at a doubly linked list. One entry could be a triple consisting of (actual value, pointer to next entry, pointer to previous entry).
_______________________
/ ________\_______________
↓ ↓ | \
+---+---+---+ +---+---+-|-+ +---+---+-|-+
| 7 | n | x | | 23| n | p | | 42| x | p |
+---+-|-+---+ +---+-|-+---+ +---+---+---+
| ↑ | ↑
\_______/ \_______/
The “x” indicates a null pointer. So, the first element of the doubly linked list with value 7 does not have any reference to a previous element. The same is true for the next element pointer in the last element with value 42.
In the middle element with value 23, both pointers to the next (labeled “n”) and previous (labeled “p”) elements are pointing to the respective elements.
You can also see that the middle element is pointed to by two pointers. By the “next” pointer in the first element and the “previous” pointer in the last element.
That’s it for now. There are heaps ;-) more things to tell about pointers. But it might help you a tiny bit.
Ctrl+Left
to jump a word left, I get 1;5D
in my tt2 message text. My TERM
is set to rxvt-unicode-256color
. In tt
, it works just fine. When I change to TERM=xterm-256color
, it also works in tt2
. I have to read up on that. Maybe even try to capture these sequences and rewrite them.
@movq@www.uninformativ.de Hahaha, that name is certainly fitting! :-D
Yeah, I should revert that and try to figure out which programs misbehaved. But that’s something for future Lyse. 8-) Right now, I just redefine TERM
in my Makefile when the USER
happens to be me.
Ctrl+Left
to jump a word left, I get 1;5D
in my tt2 message text. My TERM
is set to rxvt-unicode-256color
. In tt
, it works just fine. When I change to TERM=xterm-256color
, it also works in tt2
. I have to read up on that. Maybe even try to capture these sequences and rewrite them.
@lyse@lyse.isobeef.org There’s a reason it’s called “(n)curses”. 😏 The only advice I can give is to never fiddle with reassigning control sequences and $TERM
variables. Leave $TERM
at whatever value the terminal itself sets and use an appropriate terminfo file for it. If there are programs misbehaving, they probably blindly assume XTerm and should be fixed (or have XTerm as a hard requirement). If you try to fix this on your end, it’ll likely just break other programs. 🥴
Ctrl+Left
to jump a word left, I get 1;5D
in my tt2 message text. My TERM
is set to rxvt-unicode-256color
. In tt
, it works just fine. When I change to TERM=xterm-256color
, it also works in tt2
. I have to read up on that. Maybe even try to capture these sequences and rewrite them.
Well, some time ago I put this in my ~/.Xdefaults:
URxvt.keysym.Control-Up: \033[1;5A
URxvt.keysym.Control-Down: \033[1;5B
URxvt.keysym.Control-Left: \033[1;5D
URxvt.keysym.Control-Right: \033[1;5C
Probably to behave more like XTerm and fix a few other issues I had with other programs. But, it turns out, tcell expects the original sequence: https://github.com/gdamore/tcell/blob/main/terminfo/r/rxvt/term.go#L487
Hmm.
Java 24 released
Oracle, the company owned by a guy who purchased a huge chunk of the Kingdom of Hawaii from the Americans, has released Java 24. I’ll be honest and upfront: I just don’t care very much at all about this, as the only interaction I’ve had with Java over the past, I don’t know, 15 years or so, is either because of Minecraft, or because of my obsession with ancient UNIX workstations where Java programs pop up in the weirdest of places. I know Java is massive and used everywhere, but going through the … ⌘ Read more
i love everything pico.sh i wish i had more of a use for their services but the paste service is SUPER handy omg i finally had a reason to use it (to send a friend my unfinished failed marvel API bash program lol) and it’s epic. i love SSH i love TUI apps they are the best
spreadsheet program for terminal https://github.com/andmarti1424/sc-im
A more robust raw OpenBSD syscall demo
Ted Unangst published dude, where are your syscalls? on flak yesterday, with a neat demonstration of OpenBSD’s pinsyscall security feature, whereby only pre-registered addresses are allowed to make system calls. Whether it strengthens or weakens security is up for debate, but regardless it’s an interesting, low-level programming challenge. The original demo is fragile for multiple reasons, and requires manually locating and entering addresses for each bu … ⌘ Read more
NetBSD on a JavaStation
Back when Java was still a new programming language, Sun had the idea of building a computer specifically designed for Java, unique processor running byte-code as its native machine code and all. This whole endeavour proved to be more complicated than Sun had hoped, and as such, they eventually abandoned the idea of a Java processor in favour of plain SPARC. When the JavaStation shipped, it was a regular SPARC workstation without a hard drive, running something called JavaOS from fla … ⌘ Read more
C++ creator calls for help to defend programming language from ‘serious attacks’
Bjarne Stroustrup, creator of C++, has issued a call for the C++ community to defend the programming language, which has been shunned by cybersecurity agencies and technical experts in recent years for its memory safety shortcomings. C and C++ are built around manual memory management, which can result in memory safety errors, such as out of bounds reads and writes, though bo … ⌘ Read more
Short summary of Project2025 and Trump’s plans for the US:
Abolish the Federal Reserve
Why? To end what is seen as an unelected, centralized body that exerts too much influence over the economy and monetary policy, replacing it with a more transparent, market-driven approach.Implement a national consumption tax
Why? To replace the current federal income tax system, simplify taxation, and increase government revenue through a broader base that includes all consumers.Lower corporate tax rates
Why? To promote business growth, increase investment, and stimulate job creation by reducing the financial burden on companies.Deregulate environmental policies
Why? To reduce government intervention in the economy, particularly in energy and natural resources sectors, and to foster a more business-friendly environment.Restrict abortion access
Why? To align with conservative pro-life values and overturn or limit abortion rights, seeking to restrict the practice at a federal level.Dismantle LGBTQ+ protections
Why? To roll back protections viewed as promoting LGBTQ+ rights in areas like employment and education, in line with traditional family values.Eliminate diversity, equity, and inclusion (DEI) programs
Why? To end policies that are seen as divisive and to promote a merit-based system that prioritizes individual achievements over group identity.Enforce stricter immigration policies, including mass deportations and detentions
Why? To prioritize border security, reduce illegal immigration, and enforce existing laws more aggressively, as part of a broader strategy to safeguard U.S. sovereignty.Eliminate the Department of Education
Why? To reduce federal control over education and shift responsibilities back to local governments and private sectors, arguing that education decisions should be made closer to the community level.Restructure the Department of Justice
Why? To ensure the department aligns more closely with the administration’s priorities, potentially reducing its scope or focus on areas like civil rights in favor of law-and-order policies.Appoint political loyalists to key federal positions
Why? To ensure that government agencies are headed by individuals who are committed to advancing the administration’s policies, and to reduce the influence of career bureaucrats.Develop training programs for appointees to execute reforms effectively
Why? To ensure that political appointees are equipped with the knowledge and skills necessary to implement the proposed changes quickly and effectively.Provide a 180-day transition plan with immediate executive orders
Why? To ensure that the incoming administration can swiftly implement its agenda and make major changes early in its term without delay.
Do y’all agree with any/all/some of these poliices? Hmmm 🤔
Does anybody know a right mouse click save and reduce a screen saver image to a smaller file, say 50KB?
My usual method is slow, place in image program and re-save it smaller.
I used to have a Window’s way to reduce file images from 1MB to 50 KB with right mouse click.
I finally got Ubuntu Software to find Kolourpaint and it installed, now when I run the APP nothing happens.
Dead, zip narda.
Stupid program , what is wrong?
Did the Windows 95 setup team forget that MS-DOS can do graphics?
One of the reactions to my discussion of why Windows 95 setup used three operating systems (and oh there were many) was my explanation that an MS-DOS based setup program would be text-mode. But c’mon, MS-DOS could do graphics! Are you just a bunch of morons? Yes, MS-DOS could do graphics, in the sense that it didn’t actively prevent you from doing graphics. You were still responsible for everything you … ⌘ Read more
JotaleaOS: a very tiny hobby operating system
JotaleaOS is an open source, minimalistic, experimental operating system made by Jotalea, designed for extreme low-resource environments. It does not support external programs or games, as it lacks a standard application execution environment. The system is entirely self-contained, running only its built-in commands. ↫ JotaleaOS website Exactly what is says on the tin: a tiny operating system created entirely as a learning experience. That’s … ⌘ Read more
that’s a fair point.
Perhaps, since Twitter in 2006 never implemented read flags, every derivative microblogging system never saw that as an expected feature. This is curious because Twitter started with SMS, where on our phones we can mark messages as read or unread.
I think it all comes from the difference between reading an email (directed to you) vs. reading public posts (like a blog or a ‘wall,’ where you don’t mark posts as read). It’s not necessary to mark it as ‘read’, you just jump over it.
Reading microblogging posts in an email program is not common, I think, and I haven’t really used it, so I cannot say how it works, and whether it would be better for me or not.
However, I’ve used Thunderbird as a feed reader, and I understand the advantages when reading blog posts.
About read flags being simple, well… we just had a discussion this morning about how tracking read messages would require a lot of rethinking for clients such as timeline
where no state is stored. Even considering some kind of ‘notification of unread messages or mentions’ is not expected for those minimalist client, so it’s an interesting compromise to think about.
@eapl.me@eapl.me Read flags are so simple, yet powerful in my opinion. I really don’t understand why this is not a thing in most twtxt clients. It’s completely natural in e-mail programs and feed readers, but it hasn’t made the jump over to this domain.
Well, that’s another bug: The search https://twtxt.net/search?q=%22LOOOOL%2C+great+programming+tutorial+music%22 yields the wrong hash. It should have been poyndha instead.
cli/q: 🌱 A simple programming language. - q - Projects I really like this little q lang that Ed has created ❤️ Really nice and simpler, great design and implementation and really lovely cross-platform compiler supporting DOS, Windows, Darwin and Linux on AMD64 and ARM64 💪
Android 16’s Linux Terminal will soon let you run graphical apps, so of course we ran Doom
Regardless, the fact that Android’s Linux Terminal can run graphical apps like Doom now is good news. Hopefully we’ll be able to run more complex desktop-class Linux programs in the future. I tried running GIMP, for example, but it didn’t work. Eventually, Android should be able to run Linux apps as well as Chromebooks can, as I believe one of the goals … ⌘ Read more
Google begins requiring JavaScript for Google Search
Google says it has begun requiring users to turn on JavaScript, the widely used programming language to make web pages interactive, in order to use Google Search. In an email to TechCrunch, a company spokesperson claimed that the change is intended to “better protect” Google Search against malicious activity, such as bots and spam, and to improve the overall Google Search experience for users. The spokesperson noted that, with … ⌘ Read more
Google Begins Requiring JavaScript For Google Search
Google says it has begun requiring users to turn on JavaScript, the widely-used programming language to make web pages interactive, in order to use Google Search. From a report: In an email to TechCrunch, a company spokesperson claimed that the change is intended to “better protect” Google Search against malicious activity, such as bots and spam, and to improve the over … ⌘ Read more
Alright, I have a little 8086 assembler for my toy OS going now – or rather a proof-of-concept thereof. It only supports a tiny fraction of the instruction set. It was an interesting learning experience, but I don’t think trying to “complete” this program is worth my time.
The whole thing is just a learning project, I don’t want to actually make a usable OS. There are a few more things I want to have a look at and then I’ll eventually move on to 386/amd64 later this year (hopefully).
@kat@yarn.girlonthemoon.xyz To improve you shell programming skills, I highly recommend to check out shellcheck
: https://github.com/koalaman/shellcheck It points out common errors and gives some suggestions on how to improve the code. Some details in shell scripting are very tricky to get right at first. Even after decades of shell programming, I run into “corner cases” every now and then.
E.g. in getlyr
’s line 7 it warns:
echo -e $(gum style --italic --foreground "#f4b8e4" "'$artist', '$song'")
^-- SC2046: Quote this to prevent word splitting.
For more information:
https://www.shellcheck.net/wiki/SC2046 -- Quote this to prevent word splitt...
Most likely not all that problematic in this application, but it’s good to know about this underlying concept. Word splitting is basically splitting tokens on whitespace, this can lead to interesting consequences as illustrated by this little code:
$ echo $(echo "Hello World")
Hello World
$ echo "$(echo "Hello World")"
Hello World
In the first case the shells sees two whitespace-separated tokens or arguments for the echo
command. This basically becomes echo Hello World
. So, echo
joins them by a single space. In the second one it sees one argument for the echo
command, so echo
simply echos this single argument that contains three spaces.
Chess Zoo
⌘ Read more
The editor can launch a new shell now:
https://movq.de/v/6ec68b50dd/los86-edit-shell.mp4
Trivial to implement but super useful. It allows for simple but meaningful dev cycles: Edit source code, run/test it, back to editor. That’s what I do in the video.
(The Brainfuck program is silly, but I got nothing else at the moment.)
The I/O cache is also getting better. All that back and forth doesn’t hit the disk at all, once cached.
This whole thing is much more fun and interesting when you run it from a real floppy disk. It’s a 5.25” floppy in the video (so it’s actually floppy 😅). Disk seek times can be catastrophic and you don’t notice any of this on modern disks.
@movq@www.uninformativ.de Woohoo, noice! Now you can ship, even sell it! :-D
All kidding aside, even though I never wrote a proper brainfuck program myself, I do like that. :-) Keep it going.
My OS has a Brainfuck interpreter now and this counts as a programming language, right? We’re feature complete now. 😂
rose put crack in apt because jesus christ i just find myself mindlessly chanting “apateu apateu” under my breath at the most random times. some brain programming shit
@movq@www.uninformativ.de woah it’s like a cheatsheet with explanations! java is kind of arcane magic sorcery to me so i’m having trouble understanding it but i have that with most programming languages. this is like so much easier to actually look at and read instead of my eyes glazing over lol
@movq@www.uninformativ.de That’s so damn cool mate! I went through the code, but this lowlevel stuff is really not my favorite cup of tea. Having said that, it was actually really nice to see the abstractions and APIs work together and how things are getting indeed very readable in the userland programs. That’s easy to track in this extremely tiny OS implementation. Excellent work, keep on hacking!
Now, you just have to quickly add a network stack and then can write a twtxt client for it! ]:->
@prologic@twtxt.net oh it’s ok! thank you for the explanation! i think for me when it comes to programming i learn best by doing, so like written examples or talking about it helps less, BUT baseline explanations like what a pointer is does help! i was so confused and i still need to fix the error i’m having but i will figure it out!
@movq@www.uninformativ.de Wow, quite an elaborate editor you’ve programmed there!
Okay, this is pretty cool. My 8086 toy OS running on my old Pentium from an actual floppy disk. 😍 I just love that sound and the feeling of using floppies. This brings back so many memories from my early DOS days.
The cp-unopt
program copies a file and intentionally uses small unaligned reads/writes (hopefully triggers more bugs).
The I/O cache works “okay-ish”, I guess. When sha1
runs, it has to do a few reads for the first file and basically none for the second one. Both could have been served entirely from the cache, theoretically. (But even just having an I/O cache in the first place speeds up things dramatically.)
Notice how there’s an EA
file. That’s a left-over from OS/2, because I copied some files to the floppy using OS/2. In other words, my FAT12 implementation survives OS/2 writing to it. 🥳 (But I guess it should show up as EA DATA.SF
. My current code starts at the left and stops at the first space.)
https://movq.de/v/d4d50d3c74/los86-on-p133-from-floppy-small2.mp4
Thanks @bender@twtxt.net for the feedback. I fixed and expanded the article. I’m sorry for my poor interaction. Furthermore, I’m reading and writing while programming a client in Emacs.
Sunset:
No, of course not. This is the gingerbread in the oven with my digicam’s sunset program. The second photo shows the colors more like they are in reality. It surprises me every year how absolutely sticky this dough is. Holy cow! Close to impossible to spread it evenly in the baking tray. https://lyse.isobeef.org/tmp/lebkuchen-2024-12-20/