Linux Fu: Leaning Down With Exec

Shell scripting is handy and with a shell like bash it is very capable, too. However, shell scripting isn’t always very efficient. Think about it. If you run grep or tr or sort to do some operation in a shell script, you are spawning a whole new process. That takes time and resources. But there are some answers to reducing — but not eliminating — the problem.

Have you ever written a program like this (in any language, but I’ll use C):

int foo(void)
{
  ...
  bar();

}

You hope the compiler doesn’t write assembly code like this:

_foo: 
....

      call _bar
      ret

Most optimizers should pick up on the fact that you can convert a call like this to a jump and let the ret statement in _bar return to foo’s caller. However, shell scripts are not that smart. If you have a shell script called MungeData and it calls another program or shell script called PostProcess on its last line, then you will have at one time three processes in play: your original shell, the shell running MungeData, and either the PostProcess program or a shell running the script. Not to mention, the processes to do things inside post process. So what do you do?

Continue reading “Linux Fu: Leaning Down With Exec”

Parallel Pis For Production Programming; Cutting Minutes And Dollars Off Of Assembly

Assembly lines for electronics products are complicated beasts, often composed of many custom tools and fixtures. Typically a microcontroller must be programmed with firmware, and the circuit board tested before assembly into the enclosure, followed by functional testing afterwards before putting it in a box. These test platforms can be very expensive, easily into the tens of thousands of dollars. Instead, this project uses a set of 12 Raspberry Pi Zero Ws in parallel to program, test, and configure up to 12 units at once before moving on to the next stage in assembly.

Continue reading “Parallel Pis For Production Programming; Cutting Minutes And Dollars Off Of Assembly”

2019: As The Hardware World Turns

Well, this is it. The end of the decade. In a few days the 2010s will be behind us, and a lot of very smug people will start making jokes on social media about how we’re back in the “Roaring 20s” again. Only this time around there’s a lot more plastic, and drastically less bathtub gin. It’s still unclear as to how much jazz will be involved.

Around this time we always say the same thing, but once again it bears repeating: it’s been a fantastic year for Hackaday. Of course, we had our usual honor of featuring literally thousands of incredible creations from the hacking and making community. But beyond that, we also bore witness to some fascinating tech trends, moments that could legitimately be called historic, and a fair number of blunders which won’t soon be forgotten. In fact, this year we’ve covered a wider breadth of topics than ever before, and judging by the record setting numbers we’ve seen in response, it seems you’ve been just as excited to read it as we were to write it.

To close out the year, let’s take a look at a few of the most popular and interesting stories of 2019. It’s been a wild ride, and we can’t wait to do it all over again in 2020.

Continue reading “2019: As The Hardware World Turns”

Russia’s Newest Weather Satellite May Have Been Killed By Space Junk

For humans and satellites alike, making a living in space is hard. First, there’s the problem of surviving the brief but energetic and failure-prone ride there, after which you get to alternately roast and freeze as you zip around the planet at 20 times the speed of sound. The latter fact is made all the more dangerous by the swarm of space debris, both natural and man-made, that whizzes away up there along with you, waiting to cause an accident.

One such accident has apparently led to the early demise of a Russian weather satellite. Just a few months after launch, Meteor-M 2-2 suffered a sudden orbital anomaly (link to Russian story; English translation). Analysis of the data makes it pretty clear what happened: the satellite was struck by something, and despite some ground-controller heroics which appear to have stabilized the spacecraft, the odds are that Meteor-M 2-2 will eventually succumb to its wounds.

Continue reading “Russia’s Newest Weather Satellite May Have Been Killed By Space Junk”

Chuck peddle father of 6502

Honoring Chuck Peddle; Father Of The 6502 And The Chips That Went With It

Chuck Peddle, the patriarch of the 6502 microprocessor, died recently. Most people don’t know the effect that he and his team of engineers had on their lives. We often take the world of microprocessor for granted as a commonplace component in computation device, yet there was a time when there were just processors, and they were the size of whole printed circuit boards.

Chuck had the wild idea while working at Motorola that they could shrink the expensive processor board down to an integrated circuit, a chip, and that it would cost much less, tens of dollars instead of ten thousand plus. To hear Chuck talk about it, he got a cease-and-desist letter from the part of Motorola that made their living selling $14,000 processor boards and to knock off all of the noise about a $25 alternative.

In Chuck’s mind this was permission to take his idea, and the engineering team, elsewhere. Chuck and his team started MOS Technologies in the 1970’s in Norristown PA, and re-purposed their work on the Motorola 6800 to become the MOS 6502. Lawsuits followed.

Continue reading “Honoring Chuck Peddle; Father Of The 6502 And The Chips That Went With It”

See You On The Dark Side Of The Moon: China’s Lunar Radio Observatory

For nearly as long as there has been radio, there have been antennas trained on the sky, looking at the universe in a different light than traditional astronomy. Radio astronomers have used their sensitive equipment to study the Sun, the planets, distant galaxies, and strange objects from the very edge of the universe, like pulsars and quasars. Even the earliest moments of the universe have been explored, a portrait in microwave radiation of the remnants of the Big Bang.

And yet with all these observations, there’s a substantial slice of the radio spectrum that remains largely a mystery to radio astronomers. Thanks to our planet’s ionosphere, most of the signals below 30 MHz aren’t observable by ground-based radio telescopes. But now, thanks to an opportunity afforded by China’s ambitious lunar exploration program, humanity is now listening to more of what the universe is saying, and it’s doing so from a new vantage point: the far side of the moon.

Continue reading “See You On The Dark Side Of The Moon: China’s Lunar Radio Observatory”

The Birth Of The Modern Robot

When Isaac Asmiov was writing I, Robot, the field of robotics was still in its infancy. As he notes in The Complete Robot, as the field began to mature, it started showing signs of conforming to the popular ideas held by science fiction writers about what robotics ought to be. Notions of humanoid robots, the functions that robots would have in domestic settings, even the ethical quandaries that AI ethicists face today were all themes of early sci-fi writers.

The idea of a robot – at least of automata – predates the field of robotics. The idea of an independent automata may have existed as early as the ancient Egyptians Chinese, and Greeks, who attempted to build self-operated machines that resembled animals and humans. Myths of clay golems in Jewish legends and clay giants in Norse legends perpetuated the idea of an artificial being that could mimic the actions of living creatures. A 400 BC myth from Crete spoke of a man of bronze who guarded their island from pirates.

Continue reading “The Birth Of The Modern Robot”