Computer Related / Education

Multi-dimensional, dynamically sized arrays in C (and C++) the right way

Die shot of the 2023 Intel Meteor Lake architecture.

Recently a Twitter user posted a project they had been working on where they implemented a multi-dimensional array to store frames of a movie. They used the variable int ****video to store this data, and were immediately mocked by software Twitter. This is definitely the wrong way to do multi-dimensional arrays, but I’ve also seen material, even textbooks, that incorrectly teach it this way. I can easily imagine the above-mentioned Twitter user was simply taught wrong. (In fact, I think it’s very likely.) So today I want to talk about the correct way to do multi-dimensional, dynamically sized arrays

Biology / Computer Related / Mathematics / etc.

The Mathematics of Disease Modeling

As theCOVID-19 situation has unfolded, one thing that has helped me process what’s going on is a look at the basics of how experts are making predictions about the severity of the epidemic. I wrote up a little of my findings. Maybe this writeup will help you process too. You can find the writeup, which is a  mix of math and code, on github. https://github.com/Yurlungur/mathematics-of-epidemics Stay safe out there, everyone. We’re all in this together.

Computer Related / Mathematics / numerical analysis / etc.

Tidbit: Radio Waves Bouncing Off of an F-15

I’m afraid I don’t have time to write very much this week. So instead, I leave you with a little hint of the sort of thing I’m thinking about. The above picture is from a paper I just read. It shows a simulation of radio waves bouncing off of an F-15 fighter jet. The simulation was effected by first building the jet out of many tiny pyramids linked together at the faces (shown on the left). Then, a set of five waves or so was allowed to exist inside each pyramid. When you take all of these waves together,

Computer Related / Electronics / logic / etc.

Non-Digital Computers

Non-Digital Computers This is the last installment of my many-part series on computers. Last time we used the notion of a Turing machine to define what a computer is. We discovered something surprising: that not all computers need to be digital, or even electronic! A computer can be mechanical,  made of dominoes, or even just a rules system in a card game. To give you of a flavor of how inclusive the definition of a computer really is, I’ll now give you a whirlwind tour of some notable examples of non-digital computers. The Antikythera Mechanism In April of 1900,

Computer Related / Education / logic / etc.

What Is A Computer, Really?

Look at the picture above. Believe it or not, that person is operating an extremely sophisticated mechanical calculator, capable of generating tables that evaluate functions called “polynomials.” Although a graphing calculator can do that, a pocket calculator certainly can’t. The device above is a mechanical purpose-built computer! This article is the next installment of my series on computing. In the previous parts, we learned about Boolean logic, the language computers think in. We then learned how to implement this logic electronically and, using our newfound understanding of electronics, how to make computer memory so that computers can record results

Computer Related / logic / Mathematics / etc.

The Turing Machine

This is the sixth part in my multi-part series on computing. In the previous parts, we learned about Boolean logic, the language computers think in. We then learned how to implement this logic electronically. And finally, we learned how to make computer memory, so that computers can record results of calculations. Now before we conclude the series, we’re going to take a quick detour into computational theory and the Turing machine. Alan Turing’s Machine of the Mind In 1936, mathematician, WWII codebreaker, and all around awesome guy Alan Turing wanted to investigate a problem in formal logic. Specifically, he

Computer Related / Science And Math

A Parallel Computing Primer

So, Jonah is moving and he asked me to write a guest post. Jonah’s recent articles about computing prompted me to write about distributed computing. The question I will answer is: how do you go from computing with a sequential program to computing on many core machines (aka Parallel Computation)? Parallel Computation First of all, what is parallel computation? In a nutshell, parallel computation is the science which allows you to use a many processors to compute faster. You certainly would want to do this if you worked on the stock market where the faster you are at calculating

Computer Related / Electronics / logic / etc.

The Boolean Circuit and Electronic Logic, Part 2

If the presence of electricity can be made visible in any part of the circuit, I see no reason why intelligence may not be transmitted instantaneously by electricity. ~Samuel Morse This is the fourth part in my multi-part series on how computers work. Computers are thinking machines, but they can’t do this on their own. We need to teach them how to think. And for this, we need a language of logic. In the first part of the series, I introduced this language of logic, Boolean algebra. In the second part, I described how to formulate complex logical statements

Computer Related / Condensed Matter / History / etc.

The Boolean Circuit and Electronic Logic, Part 1

Living in a vacuum sucks. ~Adrienne E. Gusoff This is the third part in my multi-part series on how computers work. Computers are thinking machines, but they can’t do this on their own. We need to teach them how to think. And for this, we need a language of logic. In the first part of the series, I introduced this language of logic, Boolean algebra. In the second part, I described how to formulate complex logical statements using Boolean algebra. Now, in part three, I lay the groundwork for how we can implement simple Boolean logic using electronics. In

Computer Related

R.I.P. Douglas Engelbart

Did you use a mouse recently? Did you type on a keyboard? Did you click on a link? Connect to a computer network? Odds are, if you’re reading this, you have. You can thank Douglas Engelbart (1925–2013) for all of these inventions and more. In December 1950, Engelbart had it all. He was engaged to be married,  had a good job as a radar technician, and was generally doing well for himself. At this point, he decided that this wasn’t good enough. He decided he wanted to improve the world and that, although they were in their infancy, computers