Hardware and programming language memory models are rightly seen as difficult subjects, yet the confusion that surrounds them is a side effect of poor understanding, even amongst experts, and not part of the intrinsic difficulty. While I can't invent the universe to explain shared memory consistency from scratch, I can design a novel computer architecture, together with a set of atomic instruction, to highlight the core problems and how to overcome them. The architecture will be weaker than anything that exists today, and serve as a proving ground for various abstract memory models, including the now ubiquitous C++ memory model. Along the way, I'll introduce new semantics to facilitate efficient synchronization and reasoning about correctness, as well as discuss how to fix problems with the C++ model.more
When I was first introduced to polynomial arithmetic, my teacher said it's very similar to regular arithmetic. In fact, because you don't need to worry about carrying, performing addition, subtraction, and multiplication, is significantly easier. Are polynomials really that similar to numbers in base ? I felt compelled to find out, unaware of the fact that I was about to go down an unfathomably deep rabbit hole. This article will introduce you to various unusual approaches to dividing both polynomials and integers, and the algorithms we'll develop will serve as a foundation for many future explorations.more
Have you ever wondered how the magical cosine and sine buttons on your calculator work? If so, then this article will not only answer this question, but also develop most of trigonometry and rotation transformations along the way. The only prerequisites are a basic understanding of vectors, and general comfort with algebra. Let's roll up our sleeves and begin exploring the fascinating world of rotations!more