Quantcast
Channel: Probably Dance
Browsing latest articles
Browse All 12 View Live

Image may be NSFW.
Clik here to view.

Reasons why Babies Cry in the First Three Months, How to Tell The Cries...

I have twin daughters that just turned three months old. I decided to write up the list that I wish I had before they were born. Just reasons why they cry, how to tell the cries apart, and what to do...

View Article


Image may be NSFW.
Clik here to view.

Sudoku Variants as Playful Proof Practice

Doing mathematical proofs is kinda fun. Unfortunately they only make you do a few fun ones in school, then they get frustrating and tedious. So I have long been looking for a game that is about doing...

View Article


Finding the “Second Bug” in glibc’s Condition Variable

I continue to have no time for big programming projects, so here is a short blog post. Two years ago I looked into a bug in the glibc implementation of condition variables: Sometimes...

View Article

Fine-grained Locking with Two-Bit Mutexes

Lets say you want to have a mutex for every item in a list with 10k elements. It feels a bit wasteful to use a std::mutex for each of those elements. In Linux std::mutex is 40 bytes, in Windows it’s...

View Article

Image may be NSFW.
Clik here to view.

Beautiful Branchless Binary Search

I read a blog post by Alex Muscar, “Beautiful Binary Search in D“. It describes a binary search called “Shar’s algorithm”. I’d never heard of it and it’s impossible to google, but looking at the...

View Article


Two Kids Put Me on a Two Sleep Schedule

I’m writing this at 2am, having already slept from 9pm to 1am. I will sleep again from 4am to 7am. This is apparently called “biphasic sleep”, which I first heard about in the 2022 article The...

View Article

Image may be NSFW.
Clik here to view.

Transform Matrices are Great and You Should Understand Them

The title of this blog post is obvious for any game programmer, but I notice that people outside of games often write clumsy code because they don’t know how transform matrices work. Especially when...

View Article

How I use LLMs to program

Studies have shown that LLMs help novice programmers more than experienced programmers. This matches my experience. At work I see that interns or new hires have some LLM window open almost all the...

View Article


Image may be NSFW.
Clik here to view.

Initial CUDA Performance Surprises

I am somehow very late to learning CUDA. I didn’t even know until recently that CUDA is just C++ with a small amount of extra stuff. If I had known that there is so little friction to learning it, I...

View Article


Image may be NSFW.
Clik here to view.

Why Does Integer Addition Approximate Float Multiplication?

Here is a rough approximation of float multiplication (source): float rough_float_multiply(float a, float b) { constexpr uint32_t bias = 0x3f76d000; return...

View Article
Browsing latest articles
Browse All 12 View Live