Programming Leftovers
-
Martin Hähne ☛ Creating A Guestbook To Crowd Source Alt Texts - Part 1 (Architecture & Setup)
If you've never heard about alt text: It is used by people (not only) using screen readers to be able to understand what an image is about. So alt text is a short description of what you see on the image.
Anyways, I have not added alt-text to my dog pics.[1] But I have come up with a way how YOU can help me to add alt texts to DailyDogos: A guestbook that instead of some kind of "Are you human" check asks that people provide alt text to a random dog pic![2]
-
Mat Duggan ☛ Help Me Help You, Maintainers
I, as a person, have a finite amount of time on this Earth. I want to help you, but I need the process to help you to make some sort of sense. It also has to have some sort of consideration for my time and effort. So I'd like to propose just a few things I've run into over the last few years I'd love if maintainers could do just to help me be of service to you.
-
[Old] Meat Fighter ☛ The MAD Computer Program
Most of the program consists of coordinate-pairs, the end-points of line-segments. It's unfortunate that the article did not describe how the numerical values were determined. They may have traced the image with a puck, a mouse-like device used for CAD work that detects absolute position. Or the image might have been printed onto a transparency and fixed to the front of a monitor to serve as a template. Then, they could have incrementally entered coordinates directly into BASIC, tweaking as necessary, until the entire transparency was covered. A third possibility is that the entire thing was worked out using nothing more than graph paper, a ruler and a pencil.
-
Perl / Raku
-
Perl ☛ 2025-03-06 [Older] Once more unto the Wide character (U+XXXX) in substitution (s///)
-
Perl ☛ 2025-03-06 [Older] This week in PSC (182) | 2025-03-06
-
Perl ☛ 2025-03-06 [Older] obfuscating Perl for fun and profit
-
Perl ☛ 2025-03-04 [Older] Class data for cheapskates
-
Perl ☛ 2025-03-02 [Older] 3D Object Scripting using OpenSCAD and Perl
-
Perl ☛ 2025-03-01 [Older] Slurp in Perl
-
Perl ☛ 2025-03-01 [Older] Announce Perl.Wiki.html V 1.24
-
-
Python
-
HowTo Geek ☛ 8 Tips and Tricks for Using Python as a Calculator App
You may have heard that you can use Python's interactive mode as a calculator. There are plenty of functions that let you turn Python into a scientific or even a graphing calculator.
8 Calculate Exponents, Roots, and Logarithms
Exponents, roots, and logarithms are common math operations are some of the functions you can use in Python to replace a handheld scientific calculator.
-
Nelson Elhage ☛ Performance of the Python 3.14 tail-call interpreter
When the tail-call interpreter was announced, I was surprised and impressed by the performance improvements, but also confused: I’m not an expert, but I’m passingly-familiar with modern CPU hardware, compilers, and interpreter design, and I couldn’t explain why this change would be so effective. I became curious – and perhaps slightly obsessed – and the reports in this post are the result of a few weeks of off-and-on compiling and benchmarking and disassembly of dozens of different Python binaries, in an attempt to understand what I was seeing.
At the end, I will reflect on this situation as a case study in some of the challenges of benchmarking, performance engineering, and software engineering in general.
-
-
Golang
-
Daniel Lemire ☛ An overview of parallel programming (Go edition)
In practice, the software we write runs on several processors. Unfortunately, much of what we take for granted on a single processor becomes false when there are more than one processor. For example, if two processors modify the same piece of memory, what is the state of the memory after the modifications? It is difficult to tell in general. It is possible that the modification of one processor could overwrite any modification done by the other processor. The reverse could be true: the modification done by the other processor could win out. Or, maybe both processors will attempt the modification and the result will be a confused state that corresponds to nothing we would like to see. We call such accesses a ‘data race’: a situation where two or more processors in a program access the same memory location simultaneously, and at least one of those accesses is a write operation, without proper synchronization.
It gets more difficult when you want two or more processors to meaningfully modify the same memory. For example, suppose that you have a variable that counts the number of products sold. Maybe you have different processors incrementing this one variable.
-