✍️Write rieview ✍️Rezension schreiben 🏷️Get Badge! 🏷️Abzeichen holen! ⚙️Edit entry ⚙️Eintrag bearbeiten 📰News 📰Neuigkeiten
Tags:
A few days ago, I wrote some code which has a fairly significant but not necessarily obvious bug. Can you spot it? Let me set the scene: We’re in an event-driven single-threaded application with several fairly loosely-coupled components. The main loop consists of waiting for an incoming event (e.g. from the network), finding the component(s) […]
7.9.2024 19:42Find the bug: KeepAliveTwice a year, we shift our clocks forward or backward by an hour in a bizarre ritual designed to confuse farm animals and make everyone just a little bit less productive and more irritable for some time in spring and autumn every year. Here in the Central European Time zone (spanning from Spain to Poland), […]
26.4.2024 21:00When Lisbon and Damascus were in the same time zoneI thought it might be fun to participate in a game jam, something I’ve never done before. It’s also been quite a while since I’ve made a computer game, though my backups are littered with half-hearted attempts from over the years. The GitHub Game Off 2022 is a one-month event running from 1 November to […]
28.11.2022 19:18All You Have Is A HammerSketch 1: Two triangles △ABC and △DEF This 2D geometry “puzzle” came up recently in a project I’ve been working on. On the face of it, the problem is extremely simple, but it turns out that it’s not at all easy to arrive at the answer in general using a computer program. It’s the sort […]
6.11.2022 20:26Overlapping polygons – an algorithmic challengeI’ve recently rediscovered an interest in Befunge, the well-known two-dimensional esoteric programming language. Just to give you a flavour, in case you don’t know the language, this program prints ‘Hello befunge’: After submitting a Befunge implementation to Dave Plummer’s prime number calculating drag race, I thought I’d try my hand at writing my own interpreter […]
17.8.2021 09:25Exploring the world of BefungeThis article was originally published, in Dutch, in the July 2018 special issue ‘’t Vrije Veld’ of the Nederlandse Tijdschrift voor Natuurkunde (NTvN), the magazine of the Dutch Physical Society NNV. Authors:Thomas JollansMichel Orrit Optical interference is typically seen as an unusual phenomenon which you can only see with a laser and a specialized apparatus, […]
20.6.2019 20:00An interference experiment in your bathroomSince scipy 0.19, scientific Python programmers have had access to scipy.LowLevelCallable, a facility that allows you to use native compiled functions (be they written in C, Cython, or even numba) to speed things like numeric integration and image filtering up. LowLevelCallable supports loading functions from a Cython module natively, but this only works if there […]
4.9.2018 10:00LowLevelCallable and %%cythonBrought to you by yet another aimless YouTube browse: Dan Finkel‘s ‘Penniless Pilgrim’ puzzle in the TED Ed video above is, on the surface, quite simple: You’re a traveller, without a penny to your name. You enter a town with a simple grid-based street layout, like this: You enter the town at the north-west gate, […]
5.6.2018 21:55The Penniless PilgrimWhile aimlessly browsing through YouTube this evening (as you do), I happened upon a video about the Eurostar, which came off to an intriguing start: There are a few places on earth where it’s quicker to travel by train than it is to go by plane, and this is one of them: this is the […]
24.10.2017 23:00Trains between capital citiesThis post was inspired by an off-topic email chain on the python-ideas mailing list involving Steven D’Aprano, Chris Angelico, and me. Here is a copy of the email that started it. Back in the dark ages, names for variables in Python (up to and including version 2.7 that is) and many other programming could include […]
4.6.2017 19:23Unicode Identifiers in Python 3