Programming Leftovers
-
Rlang ☛ Making Your Programs More Powerful with #include and #define for C
C programming is one of the oldest and most influential programming languages, known for its structured programming, recursion, and portability. As a beginner C programmer, you’re about to embark on an exciting journey into a language that has shaped the world of software development. Two essential tools that will make your C programs more powerful and efficient are the #include and #define directives. In this article, we’ll explore how these preprocessor commands can enhance your code and streamline your programming process.
-
Filippo Valsorda ☛ Accumulated Test Vectors
I like tests. I especially like reusable test vector libraries. Sometimes test vectors are lovingly handcrafted to target obscure edge-cases. Those vectors belong in Wycheproof or with the upstream specification. Sometimes though vectors are produced by sheer brute force. Enumerate every possible input and check the output. Try a million random inputs and see what happens. Combine all possible input sizes for every parameter. Make one very, very large input.
-
>Smug Lisp Weenie ☛ Why I like Tcl
In this blurb, I'll try to convince you that Tcl isn't just an old clunky language for contrarian weirdos and that it is in fact a hidden gem for the power-hungry hacker who wants a simple (but not barren!) glue language, like a mix of sh and Scheme.
-
GNOME ☛ Christian Hergert: GCC/Clang Indirect Functions
There is this extremely neat feature in GCC 10+ and Clang 9+ that allows you to determine which function should be patched in at runtime. Procress startup code will call your user-defined function to figure out which function should be used for the environment.
-
Hubert Figuière ☛ Hubert Figuière: Dev Log September 2024
A long overdue dev log. The last one was for September 2023. That's a year. Stuff in life has happened.
Compiano
In November I switched Compiano to use pipewire directly for sound. This mean removing bits of UI too.
I should look at a release, but I have a few blockers I need to tackle. One key element is that there is a mechanism to download the soundbanks and for now it doesn't ask consent to do so. I don't want a release without this.
-
Perl / Raku
-
Arne Sommer ☛ Luhn's Existence with Raku
Note the elegant syntax for iterating over more than one element at a time (in [5]). I could have done this with gather/take, and that would have removed the ugly trailing zero hack.
So, here it is, for comparison.
-
-
Python
-
Ubuntu Handbook ☛ Python 3.13.0 Released! New Interactive Shell & Free-threaded Mode
Python, the popular free open-source programming language, finally announced 3.13.0 stable this Monday! Python 3.13 introduced new interactive shell. It’s enabled by default and based on code from the PyPy project. When you start the new shell in an interactive terminal, it uses colors by default for prompts and tracebacks and supports multi-line editing.
-
Sam Thursfield: PyCon España 2024
This year PyCon Spain happened just down the road from me in Vigo, and I was able to attend with a few folk from Codethink. Python conferences are usually great as there’s so much variety in the talks and the bar for quality is also quite high.
I’m not sure when the videos will be out and they’ll anyway be in Spanish, but here are some notes for the talks I found most interesting. (Codethink sponsors our attendence to conferences on the basis that we write an internal report afterwards, which is where most of these notes came from).
-
-
Shell/Bash/Zsh/Ksh
-
pico.sh LLC ☛ pipe: authenticated pubsub over ssh
The simplest authenticated pubsub system. Send messages through user-defined topics (aka channels). By default, topics are private to the authenticated ssh user. The default pubsub model is multicast with bidirectional blocking, meaning a publisher (pub) will send its message to all subscribers (sub) for a topic. There can be many publishers and many subscribers on a topic. Further, both pub and sub will wait for at least one event to be sent or received on the topic.
-
Hugues ☛ Modern PATH environment variable
The PATH environment variable is read by the shell or libc to find and execute programs, this is how the shell can find /bin/ls when ls is typed in a terminal.
-