This animated cube contains the data in a 3D LUT: A Look-Up Table, as the name describes, is simply a large table of numbers. Given an input color RᵢGᵢBᵢ, you simply go to the corresponding row in the table and find your new color RⱼGⱼBⱼ. Each dot in the video is an RGB values (each […]
Archives for the ‘Programming’ Category
Is Krita ready for HDR painting?
Thursday, 27 April 2023
Right this minute, you can open up Krita and start a new document in linear ACEScg with either 16fp or 32fp encoding. And it works! You can open floating-point OpenEXR files or use the color picker to choose colors like RGB[3.5, 3.0, 1.5] where normally you would be limited to 0.0–1.0. You can paint in […]
Optimizing Python With Cython
Thursday, 6 May 2021
This is a mirror of a 2015 article I wrote about using Cython. Python is slow. It’s still faster than a lot of other languages, but describing Python code as “fast” will probably get some weird looks from people who use compiled or JITted languages. Still, I love Python for its design and speed at […]
Using TypeScript to check for missing cases
Tuesday, 11 August 2020
TL;DR: use your type system to keep you from forgetting to handle all cases in switch statements and object keys. Often in programming, you have to deal with a list of distinct options. In some languages, this would be expressed by an enum, but in TypeScript it’s more common to express them as specific strings: […]
QListView not accepting drag and drop
Tuesday, 23 June 2020
Python + Qt (in the form of PyQt5 or PySide2) is a weird mash-up of the famously slow interpreted dynamic language plus a heavyweight C++ GUI library. It certainly has its advantages over writing in C++, but I’m really wondering if there aren’t better ways to write cross-platform desktop apps. Anyways, in Qt, you’re supposed […]
100% Unbreakable Encryption is Achievable!
Sunday, 3 May 2020
There were two common cryptography misconceptions that we unlearned in school, and this post is about the first one we learned about. (And Cryptonomicon helped with this one too.) We hear a lot about how “strong” encryption is. That our files would take bazillion years to decrypt via brute force or that our Bitcoin account […]
`git add -p` has made me a better programmer
Wednesday, 5 February 2020
If you don’t know about this already, then file it under your collection of “One Simple Trick articles”… git add -p (AKA git add –patch) will interactively show you each change in your repo and ask you if you want to stage it. Do you ever use git commit –all? Have you ever accidentally committed […]
Things even veteran developers do
Tuesday, 24 September 2019
It can feel overwhelming to be a new software engineer, but many “noob” things are actually “everybody” things. If any of these things happen to you, know that you’re in good company! Forget basic syntax and need to Google it Here’s what my recent search history looks like…
The emperor’s new clothes were built with Node.js
Wednesday, 4 June 2014
There are plenty of people lambasting Node.js (see the infamous “Node.js is cancer”) but proponents tend to misunderstand the message and come up with irrelevant counterpoints. It’s made worse because there are two very different classes of people that use Node.js. The first kind of people are those who need highly concurrent servers that can […]
OpenStreetMap provider CloudMade shuts its doors on small users
Monday, 3 March 2014
(Original email at bottom.) CloudMade, a company selling mapping services (many based on OpenStreetMap data) that competed head-to-head with Google, let its users know that as of May 1st, they’ll stop serving anyone who’s not on an enterprise plan. This is rather sad, because they were one of the main alternatives for custom OpenStreetMap tiles. […]