If you use C or C++, you have probably learned how to open a file and read data from it. Usually, we read a character or a line at a time. At least, it seems that way. The reality is there are usually quite a number of buffers between you and the hard drive, so your request for a character might trigger a read for 2,048 characters and then your subsequent calls return from the buffer. There may even be layers of buffers feeding buffers.
A modern computer can do so much better than reading using things using old calls like fgetc. Given that your program has a huge virtual address space and that your computer has a perfectly good memory management unit within it, you can ask the operating system to simply map the file into your memory space. Then you can treat it like any other array of characters and let the OS do the rest.
The operating system doesn’t necessarily read the entire file in at one time, it just reserves space for you. Any time you hit a page that isn’t in memory, the operating system grabs it for you invisibly. Pages that you don’t use very often may be discarded and reloaded later. Behind the scenes, the OS does a lot so you can work on very large files with no real effort. The call that does it all is mmap.
Hackaday editors Mike Szczys and Elliot Williams undertake a journey through the week of fantastic hacks. Add a new level of complexity to model rockets by launching them from a silo via pneumatic ram before the combustibles even get involved. The eyes of that sculpture are actually following you — and with laser focus! The Game Boy is a pillar of pop culture for a reason, there’s a superb talk that outlines all of the interesting choices that made the electronics so special. We round out the show with a rousing discussion of a space tow truck and a scholarly look at the sporadic wake patter of Alexa et al.
Take a look at the links below if you want to follow along, and as always tell us what you think about this episode in the comments!
Take a look at the links below if you want to follow along, and as always, tell us what you think about this episode in the comments!
Like everyone else, hackers and makers want to do something to help control the spread of COVID-19. The recent posts on Hackaday dealing with DIY and open source approaches to respirators, ventilators, and masks have been some of the most widely read and commented on in recent memory. But it’s important to remember that the majority of us aren’t medical professionals, and that even the most well-meaning efforts can end up making things worse if they aren’t done correctly.
Which is exactly what [Josef Průša] wanted to make clear about 3D printed medical equipment in his latest blog post. Like us, he’s thrilled to see all the energy the maker community is putting into brainstorming ways we can put our unique skills and capabilities to use during this global pandemic, but he also urged caution. Printing out an untested design in a material that was never intended for this sort of application could end up being more dangerous than doing nothing at all.
The nested design lends itself to mass production.
To say that he and his team are authorities in the realm of fused deposition modeling (FDM) would be something of an understatement. They know better than most what the technology is and is not capable of, and they’re of the opinion that using printed parts in respirators and other breathing devices isn’t viable until more research and testing is done
The safest option is to only use printed parts for structural components that don’t need to be sterile. To that end, [Josef] used the post to announce a newly published design of a printable face shield for medical professionals. Starting with an existing open source design, the Prusa Research team used their experience to optimize the headband for faster and easier printing. They can produce four headbands at once on each of the printers in their farm, which will allow them to make as many as 800 shields per day without impacting their normal business operations. The bottleneck on production is actually how quickly they can cut out the clear visors with their in-house laser, not the time it takes to print the frames.
As the world sits back and waits for Coronavirus to pass, the normally frantic pace of security news has slowed just a bit. Google is not exempt, and Chrome 81 has been delayed as a result. Major updates to Chrome and Chrome OS are paused indefinitely, but security updates will continue as normal. In fact, Google has verified that the security related updates will be packaged as minor updates to Chrome 80.
Chinese Viruses Masquerading as Chinese Viruses
Speaking of COVID-19, researchers at Check Point Research stumbled upon a malware campaign that takes advantage of the current health scare. A pair of malicious RTF documents were being sent to various Mongolian targets. Created with a tool called “Royal Road“, these files target a set of older Microsoft Word vulnerabilities.
This particular attack drops its payload in the Microsoft Word startup folder, waiting for the next time Word is launched to run the next stage. This is a clever strategy, as it would temporarily deflect attention from the malicious files. The final payload is a custom RAT (Remote Access Trojan) that can take screenshots, upload and download files, etc.
While the standard disclaimer about the difficulty of attribution does apply, this particular attack seems to be originating from Chinese intelligence agencies. While the Coronavirus angle is new, this campaign seems to stretch back to 2017. Continue reading “This Week In Security: Working From Home Edition”→
Using a bit of tech to make up for a lack of skill is a time-honoured tradition, otherwise known as cheating among those who acquired the skill the hard way. Learning to wheelie manual a skateboard is usually paid for in bruises, but [blezalex] got around that by letting his electric skateboard handle the balancing act.
At first glance the board looks and rides like an average DIY electric skateboard, with an off-the-shelf a dual hub motor truck, VESC speed controllers and a wireless throttle. The party trick appears when the front wheel is popped off the ground, which activates the secret self-balancing mode. At this point a STM32F401 dev board and MPU-6050 IMU take over control of the motors, which is in turn controlled by leaning forward or backwards, like a hoverboard. The remote throttle turns into a dead man switch, which cuts power to the motors when released.
[blezalex] says he has had less that an hour of skateboard time in his life before getting on this one, which is a good testament of just how well it works. The biggest challenge was in getting the board to turn while on two wheels, which was solved by sensing side-to-side tilt of the board with the IMU and applying proportional differential torque to the wheels. With a bit of practice it’s also possible to smoothly shift between riding modes while moving.
We think this is a really elegant cheat, now we need to build one of our own. Fortunately the STM32 firmware and instructions are all up on GitHub. Building your own electric skateboard has become really simple with the availability of off-the-shelf components. We’ve also seen a bicycle with a wheelie cheat device to prevent you falling on your back
For as many projects as we see using Nixie tubes in new and unusual ways, there’s a smaller but often very interesting cohort of displays that fit into the “Nixie-like” category. These are projects where something other than the discharge of noble gasses is being used to form characters. This scrolling phosphorescent single-character display is one such project, and we think it looks fabulous.
Following the *ixie naming convention characteristic of these builds, [StephenDeVos] dubbed this the “Glixie.” This is on par with the size of a [Dalibor Farny] handmade Nixie, but not so big to be unwieldy. The display modality is glow-in-the-dark film that rotates past a vertical string of UV LEDs, which light up in turn as the cylinder rotates, building up the dot-matrix character column by column. There’s some fading of the first column by the time the whole character is built up, but not enough to be objectionable. We like the whole build, with laser-cut wood and the brass and steel hardware. Check it out in the video below.
Over the last several months, [Eric Strebel] has been working on a concept for an electric-powered infantry combat vehicle. We don’t think he’s been contracted by any nation’s military to design this vehicle, but as a product designer we imagine he does this sort of thing to keep himself sharp. In any event, it’s been fun to watch from the sidelines.
In the latest installment in this series of videos, [Eric] turns his earlier concept art into a functional prototype; albeit at somewhat reduced scale. Still, building any kind of vehicle from the ground up is no easy feat and it’s fascinating to watch the process.
The futuristic faceted look of the vehicle’s armor plate makes for an exceptionally time-consuming build, as he has to cut and glue each piece of foam core into place. Some of the smaller pieces seem to have the tell-tale char marks from a trip through the laser cutter, but in the video after the break you can see that the larger panels are hand cut with a razor.
The plan was originally to just make a static mock-up of the vehicle, but thanks to a pair of remote controlled trucks that [Eric] found at this local Big Box retailer, this foam fighter ended up getting an upgrade. After liberating the motors and gearboxes from the two trucks, he 3D printed axle extensions to take into account the wider track of his vehicle, and built his “tub” around it. While the R/C gear is clearly on the low end of the spectrum, the overall effect looks great as the vehicle is bounding around the yard.