Hacker’s diary

Invalid Exec Format They gave me a MacBook Pro at work. I built a docker image locally. I pushed it to Amazon cloud to run. I got “invalid exec format” […]

TL;DR make sure to add magic words WSGIApplicationGroup %{GLOBAL} to the Apache config, otherwise import torch will hang. I tried to integrate my PyTorch AI model with my Apache web […]

WordPress themes and software decay

I have discovered a few broken things with my WordPress site. This post, as much of this blog, is mostly description of events, so I won’t forget what exactly happened. […]

I am starting to suspect that ChatGPT is emulating humans too well when it comes to parsing requirements. I asked it to write a Python program that, among other things, […]

This post compares random number generation in “the old days”, and in modern C++. This is how we used to do it: #include <cstdlib.h> srand((unsigned)time(NULL)); // seed the random number […]

Tic-tac-toe screenshot

I was just experimenting with HTML5 canvas. The game is entirely in HTML5/JavaScript, it should work on desktop and on mobile devies. The moves table is pre-generated in C#. Play […]

Coming from C# background, I was trying to understand whether Python allows to pass obj.method where ordinary function is expected, and if yes, how could it possibly work. Consider this […]