-
Heads are going to roll. No idea why.
-
To get accustomed to some rough terrain in my half marathon race in September, I’ll run my 73 minutes run at base tempo on similar oneven footpaths coming Wednesday (see map). It won’t be as brutal as the Kustloop, but I suppose it’s a better preparation than only training on asphalt.
-
The Lion, the Witch, and the Wardrobe was written by C.S. Lewis in 1950, which is 75 years ago. Good enough reason for me to be rereading the entire book series The Chronicles of Narnia. I already read The Magician’s Nephew before going to sleep in the past weeks.
-
Content piracy is on the rise, and Disney+ had a 4 billion loss. I think those two things are related through something called subscription fatigue. If you make it harder to watch content, and (young) people have less discretionary income, guess what they’ll do? It’s not hard to guess.
-
Serving smoothies endlessly on my Pixoo-64 64 x 64 pixel art frame. Drawn in Procreate on an iPad.
-
I’ll be running my own half marathon race, because the half marathon race later today has been neutered to a 15 km run (not race) because of the sudden heat. I’ll leave as soon as Maahir has eaten his veterinarian cat food in a few minutes from when I’m posting this message.
-
It looks like my race next Sunday will be canceled due to high temperatures. I asked to the organizers if runners could run on their own and get credit for it, as in run your own race during the COVID-19 pandemic. I don’t expect a response, but I had to try. I can see the potential problems.
-
Finished reading: The Complete Sherlock Holmes (Barnes & Noble Leatherbound Classic Collection) by Sir Arthur Conan Doyle 📚
-
It had been six months since I ran a sub-2 hours half marathon (and got a hip injury from over-training). I got a modest 485th place out of 739 runners. The goal for 2025 is a sub-4 hours marathon.
-
The thing with artificial intelligence based on LLMs is a lack of intent. Data, however comprehensive, has no personal goals to achieve. The question is then how to give—not seemingly, but verifiably—real intent to a machine, so it becomes more useful. Also, what’s “verifiable real?” I have no clue.
-
I guess companies are slapping plus to their products to extract more money from users through subscriptions, following Apple’s questionable lead. Of course, they are reselling a free resource—their users' data—under the guise of being of use to paying users, while non-paying users are missing out.
-
I now have to take off my Garmin watch before I start drawing art, because when I come into a flow, the watch registers it as “asleep.” It messed up my training readiness, since a three hours sleep period is deemed “too short and detrimental.” That is computers judging personal health for you.
-
I drew this stylized head of B.A. Baracus of the 1980s hit series The A-Team, played by Mr T.
-
Testing primality with Free Pascal
I refined my Free Pascal program to accept 64-bit unsigned integers, which allows up to 19 decimal digits. However, testing with Big Primes, it is only usable up to 15 decimal digits on my Raspberry Pi 4. Any bigger primes take forever to test, in human perspective. The problem seems to be in how primes are generated in the primality test. The prime number generator uses a simple algorithm of odd numbers greater than one, and less than the square root of of the number of which its primality is tested. For small numbers it’s fine, but for larger numbers testing with odd numbers instead of actual prime numbers is a bit of waste of precious CPU time.
Still, being able to test primality with a relatively simple algorithm is rather awesome as a first attempt.
The slow-down in the algorithm is not caused by testing primality, but by the inefficiency of generating prime numbers. So I need a faster algorithm to do just that. I’ve looked around, but it requires me to learn new concepts in mathematics. I could do that, or, come back to it later when I’m more versed in writing in Pascal, or even stop here, since I don’t really have any incentives to create a full-blown efficient prime number generator, in other words, reinvent the wheel.
program isPrime3; uses crt; const zero : qword = 0; one : qword = 1; two : qword = 2; three : qword = 3; var num : qword; again : char; function isprime(num : qword) : boolean; var iscomposite : boolean; test : qword; begin if num = one then isprime := false else if (num = two) or (num = three) then isprime := true else if (num mod two) = zero then isprime := false else begin iscomposite := false; test := three; while (test * test) <= num do begin if (num mod test) = zero then iscomposite := true; test := test + two; end; isprime := not iscomposite; end; end; begin again := 'Y'; while (again ='y') or (again = 'Y') or (again = chr(13)) do begin num := zero; while num < one do begin write('Give a whole positive number: '); readln(num); end; if isprime(num) then writeln(num, ' is prime') else writeln(num, ' is not prime'); write('again? [Y/n] '); again := readkey; writeln(again); end; end.
P.S. I fixed a bug that caused a press on the Enter key to exit the program, instead of continuing it as I meant it to do. Checking additionally for the Enter key
chr(13)
was easy enough. There are still bugs, though, but it’s usable enough for now, as throw-away code, not meant for application in a realworld app.P.P.S.S. You can test this code on TutorialsPoint, which has a Pascal IDE, you could type the source code in, or copy and paste it from this article.
-
I refined yesterday’s Pascal program to have somewhat more functionality, and found a way to turn the contents of a terminal window into a PNG. It is a bit unwieldy, though. I’m curious how Timeline will possibly balk on this. I suppose @manton will have to tweak things a bit.
-
More Pascal programming in Free Pascal on Raspberry Pi OS. Apparently, the robot understands programming, since the alt description is spot on.
-
Remember Pascal? It’s still around. Here I’m running Free Pascal in a RaspberryPi OS terminal window.
-
A modest place to relax in the mornings. Most of this was given to me, both new and second-hand, except for the plants, which I bought a month ago for less than 30 Euros.
-
It seems the basis of good 2D animation is solid drawing skills. Without it, the result will be poor, or, at best, occasionally hit, but mostly miss. I know where to spend my time in the coming months. I only hope I don’t lose my Divoom Master Pixel Artist status with still images.
-
I made a rough animation in the Animatic app on iPad and traced the frames into a pixel animation with Pixaki. It took much longer than I expected, but I’m pleased with the (very rough) result running on my Pixoo64 LED panel.