In Praise Of RPN (with Python Or C)

HP calculators, slide rules, and Forth all have something in common: reverse polish notation or RPN. Admittedly, slide rules don’t really have RPN, but you work problems on them the same way you do with an RPN calculator. For whatever reason, RPN didn’t really succeed in the general marketplace, and you might wonder why it was ever a thing. The biggest reason is that RPN is very easy to implement compared to working through proper algebraic, or infix, notation. In addition, in the early years of computers and calculators, you didn’t have much to work with, and people were used to using slide rules, so having something that didn’t take a lot of code that matched how users worked anyway was a win-win.

What is RPN?

If you haven’t encountered RPN before, it is an easy way to express math without ambiguity. For example, what’s 5 + 3 * 6?  It’s 23 and not 48. By order of operations you know that you have to multiply before you add, even if you wrote down the multiplication second. You have to read through the whole equation before you can get started with math, and if you want to force the other result, you’ll need parentheses.

With RPN, there is no ambiguity depending on secret rules or parentheses, nor is there any reason to remember things unnecessarily. For instance, to calculate our example you have to read all the way through once to figure out that you have to multiply first, then you need to remember that is pending and add the 5. With RPN, you go left to right, and every time you see an operator, you act on it and move on. With RPN, you would write 3 6 * 5 +.

While HP calculators were the most common place to encounter RPN, it wasn’t the only place. Friden calculators had it, too. Some early computers and calculators supported it but didn’t name it. Some Soviet-era calculators used it, too, including the famous Elektronika B3-34, which was featured in a science fiction story in a Soviet magazine aimed at young people in 1985. The story set problems that had to be worked on the calculator.

Continue reading “In Praise Of RPN (with Python Or C)”

Fuel Cell Turns PET And Carbon Dioxide Into Useful Chemicals

The University of Cambridge has a novel fuel cell design that can grab CO2 from the atmosphere or industrial processes and, combined with waste PET plastic, provides syngas and glycolic acid, a product used in some cosmetics. You can read about the device in a recent paper.

The strange juxtaposition of CO2 and PET is no accident. The processes work together with solar energy. There is no external voltage required, but the cell operates as a photocell to produce electricity from the solar energy. Removing both CO2 and waste plastic from the environment is a good thing.

Syngas is hydrogen and carbon monoxide and finds use in producing methanol and ammonia. It also will work as a fuel that can replace gasoline when gasoline isn’t available. It has a few other uses, like reducing iron ore to sponge iron and even converting methanol to gasoline.

The technology has a ways to go to operate at scale, and we doubt this will ever be a consumer item since you are unlikely to need syngas or glycolic acid in your home or vehicle. But it still is a promising technique to reduce both greenhouse gas and plastic waste in one swoop.

We’ve looked at other ways to grab carbon dioxide and make it useful. If you want to make your own syngas, there are other ways to do it.

How To Land A Model Rocket Vertically

Perhaps most readers will remember when they saw the first SpaceX demonstration of a rocket stage landing vertically on the pad under control. It’s something of a shock to be reminded that their first suborbital demonstration “hops” were around a decade ago, and how quickly what was once so special has become commonplace. We’re now in the era of the more complex model rockets having the same capability, with [BPS.space] managing it last year, and now [TTS Aerospace] sharing a video showing how they achieved the same feat.

The basics of the system revolve around a directed rocket nozzle, but to make it work is a lot more complex than simply hooking up a flight controller and calling it good. The steps in arriving at a landable rocket are examined, with plenty of failures shown along the way. Even the legs are more complex than they might appear, having to combine lightness, ease of unfurling under the power of elastic, and enough strength and give to survive a rough landing.

Those of us from countries where model rocketry is a highly licensed activity can only look on in envy at these projects, and we look forward to seeing where this avenue leads next. We covered the [BPS.space] rocket last year, should you be interested.

Continue reading “How To Land A Model Rocket Vertically”