Link collection: 13

Posted on Aug 13, 2022

Mateusz

3Hz Computer, Hold the Transistors

Half way through skimming over this article I said out loud “Oh my, this is going to be good”. I’ve stopped what I was doing, made myself coffee and sat down for a pleasant read through. The idea presented in the blog post rides the fine line between hardware and software perfectly. What makes it even more special is the fact that we’ve come to understand hardware as black chips that we can’t see do their work and we just observe the input going in and output going out as voltage levels. Here the hardware is something which you can handle - the Curta calculator. Seeing it for the first time on a Numberphile video was a love at first sight. A piece of genius engineering so incredibly simple but at the same time so complex that it’s like art, you feel it but you’re unable to describe it with simple words. Knowing the context in which this calculator was created and existed makes it even more infamous in my mind. Developed after the second World War, the same one in which one of the first computers ever was created. This meant that the Curta calculator was a genius idea before the war and a fun toy after it - if you want to know more read about the history of it. Had Alan Turing not pushed computers into the spotlight of our lifes would university students use Curta-like calculators for their computations instead of cheap Casios?

Curta is as the author presents only an ALU (Arithmetic Logic Unit) the memory (expect the IO registers) as well as operations are carried out by a human. Computers control their ALUs with assembly so extending that you can control a Curta (an ALU) with a custom Curta ISA you define. Having an ISA you can start writing programs and execute them on a steel brick with gears. Since an operator (a human) is more-or-less Turing complete you can (possibly) write programs in C and compile them to Curta assembly and compute any computable number with the help of a hand crank.

Stepping down from the clouds I just want to express how interesting it is that run-time optimization is present even in programming a 1940-1950 calculator. If you don’t want to read the entire article I’d still advise to read about digit-by-digit square root calculation.

Handles are the better pointers

There is a lack of guidance for the C language compared to the rest of the pack. Mostly it’s expected that such a simple language is not going to have people raving about how to use it. Once you’re using it you can essentially say that 80% of what there is to know you already know. As a result of having such a simple language that does not steer the user in any direction is the overall lack of ideas and confidence when it comes to structuring your programs. In tandem comes the fact that talking about different ways to approaching a design is simple because stuff like templates, RAII, OOP and all the other things that are present in let’s say C++ just don’t exists. This makes the design front and center and any ambiguity is essentially removed.

From experience I can say that small changes like “use handles which are opaque instead of pointers” lead to completely new world view and new way of structuring. Blogs like these motivate me to write whatever just to see how this particular approach to structure will behave.

Context is Everything

Defining strict constraints on a problem is the most important thing one could do to make his job easier. Knowing that generic solutions to any problems are almost always worse in any problem space is crucial in any engineering profession. Tightening your constraints as much as you can allows you to remove additional unnecessary work for you and as well your CPU when it comes to programming. The talk is sharing an optimization story through most of it but uses that history as a tool to hammer the point home that the more you can assume and the more you know what kind of problem you’re dealing with the bigger gains are to reap.

Antoni

Everything on tip of my joystick

Have you ever had this feeling that you watched a movie / listened to the song / played a game in the past and you don’t remember the name of it? That is exactly what happened to me lately. I had some free time in the evening and decided to play a game which I remember playing in the beginning of the 2020 (before you know what started). I played it on my friend’s Epic Games account and remembered very well the gameplay, so I thought finding it would be piece of cake. What came to my surprise, it was not.

I looked through my Epic Games library and it was not there, as expected. I started googling around looking for exploration games, I was putting phrases about how I played this game in the search engine but without a success. In this game I was able to be any creature in the universe, so the results gave me mostly games about space exploration or games with animals. I tried finding games similar to InnerSpace, which seemed very close to what I was looking for. Once again, without a success. But still, I was calm, I was sure that my friend has it in his Epic library so I was few click away from it… Couldn’t have been more wrong, it was not there.

So what to do now? net-enjoyer I am indeed so I ask the internet: “how to find the game I don’t know the name of ?” One of the tips were to post a question on reddit r/tipofmyjoystick (pun intended). Then I asked:

[PC][2017-2019] Explore the universe by being different creatures or things

In less than an hour I got the answer: Everything

That’s it, in 2022 if you know what and where to ask you get the answer. It mostly comes down to information gathering, because knowledge and understanding is completely different animal. If something is quantifiable piece of information it can be obtained on the internet.

Internet is the information breakthrough, one of the greatest, if not the greatest invention of all time. But we should not forget that it is still a fancy tool to obtain information. Our psychological attitude to such cutting-edge technology is just adapting, we are digital dinosaurs, someone in the future will look on us and wonder how were we able to put up all this cognitive overhead that internet currently puts on us. Because at the end of the day, it is still a tool to get the information we need, not to spend your whole day on, build your world-view or reason about the reality. This place should still be your own mind, I hope I will never forget about it.

I wonder without the answer just for now:

Do we need something better than the internet? Can we even utilize something better than the internet?