Windows 10 The Hard Way: On A Phone

Sure, there are — or were — Windows phones. But [neozed] wanted something different. An earlier project ran Windows 10 on the Raspberry Pi 4 with some tricks, but those are sometimes hard to come by lately, so the next project was to put one on a Xiaomi PocoPhone F1.

The choice of phone wasn’t an accident. There was enough support and information on the Snapdragon 845 to pull the trick off, and this is one of the phones that looked like it should work. They were pretty inexpensive on eBay and have 128 GB of flash and 6 GB of RAM.

After a few false starts, the phone yielded to fastboot mode. Loading UEFI firmware allows you to re-partition the disks using a PC. With the partitions set up, you must find an ARM Windows 10 image to load. Sounds simple, but as you’ll see in the post, the devil is always in the details. Combined with a USB dock, the end result is a tiny Windows computer. However, it does seem like a lot of work. Even the original poster says: “TL;DR don’t do it… get a used Surface X instead.”

We’ve seen old phones repurposed before, of course. Or, go the other way: start from scratch and build a new phone. We won’t judge, either way.

Pratt Parsing For Algebraic Expressions

Parsing algebraic expressions is always a pain. If you need to compute, say, 2+4*2, the answer should be the same as (2 + (4 *2)), not ((2 + 4) * 2) — in other words, the right answer is 10, not 12. The classic way to do this is to use two stacks and a table of precedences for the operators. However, [Martin Janiczek] prefers to use Pratt Parsers and wants to show you how they work.

The parser is named after [Vaughn Pratt]. The algorithm works with a table of precedence where operators with higher precedence have higher numbers. It then builds a left and right portion of a string, using recursion. So if you consider 2+4*2, you wind up, on the first pass, with (2+ parse(4*2)). The second parse returns a full expression to produce: (2+(4*2)).

Continue reading “Pratt Parsing For Algebraic Expressions”

The Chess Computer From 1912

Who was [Leonardo Torres Quevedo]? Not exactly a household name, but as [IEEE Spectrum] points out, he invented a chess automaton in 1920 that would foreshadow the next century’s obsession with computers playing chess.

Don’t confuse this with the infamous Mechanical Turk, which appeared to be a chess computer but was really a guy hiding inside a fake chess computer. The Spanish engineer’s machine really did play a modified end game. The chessboard was vertical, and pegs represented pieces. There were mechanical arms to move the pegs. The device actually dates back to 1912, with a public demonstration in Paris in 1914. Given [Quevedo’s] native language, the machine was called El Ajedrecista.

Continue reading “The Chess Computer From 1912”

Freq Out With LTSpice

We always enjoy [FesZ’s] videos, and his latest about FREQ function in LTSpice is no exception. In fact, LTSpice doesn’t document it, but it is part of the underlying Spice system. So, of course, you can figure it out or just watch the video below. The FREQ keyword allows you to change component attributes in a frequency-depended way.

Of course, capacitors and inductors are frequency dependent by design. But the FREQ technique allows you to adjust things like voltage sources or resistance in arbitrary ways. By default, you must specify the frequency response data in decibels, which isn’t always convenient. However, [FesZ] shows you how to use other methods to express them using modifiers to the command.

Continue reading “Freq Out With LTSpice”

Vintage Computer Festival Southwest: Bil And Al’s Excellent Adventure

There was a time when seeing an actual computer was a big deal. They were in air-conditioned rooms with raised floors and locked doors. Even at a university, you were likely only to get access to a keypunch machine or a terminal. Then small computers came out, but computer stores were few and far between. Now you can go to any local store that sells electronics and put your hands on hardware that would have been black magic in those days. But the computers back then were also much easier to understand completely. Look at your main computer today. Do you know all the assembly language instructions for it? Can you access the GPU and the MMU? Could you build your own memory for it? Sure, you don’t have to do those things, but it was fun knowing that you could. That seemed to be the overwhelming sentiment among the attendees we spoke to at the Vintage Computer Festival last weekend: We like computers that we can completely understand and troubleshoot.

If you weren’t one of the 900 or so attendees, we can help. Check out our video summary, dive into even more interviews with Bil Herd and guests on our YouTube channel, or just keep reading. The festival happens at several locations throughout the year, but this was the first time one has been in the Southwest for about ten years!

Continue reading “Vintage Computer Festival Southwest: Bil And Al’s Excellent Adventure”

Demo Relativity For A C-Note

If you are a science fiction fan, you probably hate the theory of relativity. After all, how can the Enterprise get to a new star system every week if you can’t go faster than the speed of light? [Nick Lucid] wants to set you straight: it is real, and you can prove it to yourself for under $100.

The idea uses muons created in our atmosphere by cosmic rays colliding with gasses in the atmosphere. So how do you detect muons yourself? [Nick] shows you how to do it with a fish tank, dry ice, and rubbing alcohol. If that sounds like a cloud chamber, you aren’t wrong.

A cloud chamber is undeniably cool, but how does it prove relativity? You’ll see several kinds of particles interacting with your cloud chamber, but you can tell which ones are muons by the size and motion of the streaks. The muons don’t last very long. So you’d expect very few muons to make it to the surface of the Earth. But they not only reach the surface but go deep under it, as well.

So how do you explain it? Relatively. The muon experiences its average 2.2 microseconds lifetime in what appears to us to be over 150 microseconds, even if it is moving relatively slowly for a muon. Some muons are faster or live longer, so we see a lot of them hit the Earth every minute of every day. This is due to time dilation and also explains length contraction because the muon moves at a certain speed, yet it appears to go further to us than to the muon.

Coincidentally, we recently discussed this same effect relative to using muons for underground navigation. If you want an easier way to count muons with a computer, you can build a detector for about the same price as the cloud chamber.

Continue reading “Demo Relativity For A C-Note”

A Browser Approach To Parsing

There are few rites of programmer passage as iconic as writing your first parser. You might want to interpret or compile a scripting language, or you might want to accept natural-language-like commands. You need a parser. [Varunramesh] wants to show you parser combinators, a technique used to make practical parsers. But the demonstration using interactive code cells in the web page is nearly as interesting as the technique.

Historically, you parse tokens, and this technique can do that too, but it can also operate directly on character streams if you prefer. The idea is related to recursive descent parsing, where you attempt to parse certain things, and if those things fail, you try again.

Continue reading “A Browser Approach To Parsing”