I did a few things again.

So, a few years ago I made a small flask-app, just to keep myself entertained. This was a few years after I did another minimal webapp in React. Since I just migrated to a new set of servers I thought, I fluff those apps a bit. Bring some color into them, upgrade to the latest versions, fix a few bugs and so on. Now I’ve got a set of interesting applications, all managed in the same flask-container, delivering some features that you might find useful....

2023-08-28 · 4 min · 679 words · Jan Kapellen

Python3,float and math, what the hell?

So it was late at night and I was hacking away at my touch-controls for my UnicornHat. I was trying to set the brightness in nine steps between 0.1 and 0.9. When all of a sudden, this happened: >>> foo=0.1 >>> foo+=0.1 >>> print(foo) 0.2 >>> foo+=0.1 >>> print(foo) 0.30000000000000004 So according to my internal senses this looked not very precise. But according to the almighty Stackoverflow and one of my beloved coworkers who can indeed speak ASM fluently, this is in fact very precise (for a float)....

2016-03-14 · 1 min · 183 words · Jan