@lyse@lyse.isobeef.org Oh, no, this is vastly exaggerated. Neil deGrass Tyson says, the earth is smoother than a cue ball (billiard): https://www.youtube.com/watch?v=OMP5dNsZ-6k
That would make for a very dull OpenGL program, though. š
@movq@www.uninformativ.de Agreed, finding the right motivation can be tricky. You sometimes have to torture yourself in order to later then realize, yeah, that was actually totally worth it. Itās often hard.
I think if you find a project or goal in general that these kids want to achieve, that is the best and maybe only choice with a good chance of positive outcome. I donāt know, like building a price scraper, a weather station or whatever. Yeah, these are already too advanced if they never programmed, but you get the idea. If they have something they want to build for themselves for their private life, that can be a great motivator Iāve experienced. Or you could assign āem the task to build their own twtxt client if they donāt have any own suitable ideas. :-)
Showing them that you do a lot of your daily work in the shell can maybe also help to get them interested in text-based boring stuff. Or at least break the ice. Lead by example. The more I think about it, the more I believe this to be very important. Thatās how I still learn and improve from my favorite workmate today in general. Which Iām very thankful of.
Remembered a fun little āhello worldā program I made in 2018:
https://movq.de/v/a1c4a819e6/vid.mp4
(It runs smoothly. My computer just isnāt fast enough for a smooth X11 screengrab at that resolution.)
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.
@xuu@txt.sour.is Hahaha, thatās cool! You were (and still are) way ahead of me. :-)
We started with a simple traffic light phase and then added pedestrian crossing buttons. But only painting it on the canvas. In our computer room there was an actual traffic light on the wall and at the very end of the school year our IT basics teacher then modified the program to actually control the physical traffic light. That was very impressive and completely out of reach for me at the time. That teacher pulled the first lever for me ending up where I am now.
@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.
I should probably clarify: Which language/platform? Something graphical or web-based right from the beginning or do you start with a console program?
To the parents or teachers: How do you teach kids to program these days? š¤
TacOS: an x86_64 UNIX-like OS from scratch
TacOS is a UNIX-like kernel which is able to run DOOM, among various other smaller userspace programs. It has things like a VFS, scheduler, TempFS, devices, context switching, virtual memory management, physical page frame allocation, and a port of Doom. It runs both on real hardware (tested on my laptop) and in the Qemu emulator. ā« TacOS GitHub page TacOS ā great name ā is written in C, and explicitly a hobby and toy project. The codeās licensed ⦠ā Read more
āHow I use Kate Editorā
I love the Kate Text editor. I use it for pretty much all the programming projects I do. Kate has been around for long time now, about 20 years! At least earliest blog post for it I could find was written in 2004. I wanted to go over my workflow with it, why I like it so much and hopefully get more people to try it out. ā« Akseli Lahtinen Programmers and developers tend to be very set in their ways and have their preferred workflows ā which profession doesnāt, honestly ā and since there ⦠ā Read more
CISA extends funding to ensure āno lapse in critical CVE servicesā
CISA says the U.S. government has extended MITREās funding to ensure no continuity issues with the critical Common Vulnerabilities and Exposures (CVE) program. The announcement follows a warning from MITRE Vice President Yosry Barsoum that government funding for the CVE and CWE programs was set to expire today, April 16, potentially leading to widespread disruption across the cybersecurity industry. ⫠⦠ā Read more
USL ā A Universal Scripting Language That Outputs to 111 Programming Languages
Comments ā Read more
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.
Hasochism: The pleasure and pain of dependently typed Haskell programming pdf
Comments ā Read more
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
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. :-)
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.