How to Pass Callback Functions to String.replace() in JavaScript

Did you know that the string .replace() method accepts a callback function? I just discovered it today and thought I’d share. What do you need this function for? Why does it exist? I’ll answer all these questions as you go through this article. The replace() Method The replace() string method

Boot up classic Mac OS in your browser window with the “Infinite Mac” project

The Infinite Mac project emulating a classic System 7 Mac.

Enlarge / The Infinite Mac project emulating a classic System 7 Mac. (credit: Infinite Mac)

For retro computing enthusiasts, there’s no substitute for unearthing ancient hardware and computing like it’s 1999. But as with old video games, emulation offers a much more convenient way to run old software. Now, running System 7 or Mac OS 8 on a virtual 68k Mac is more convenient than ever, thanks to a clever project dubbed “Infinite Mac.”

What makes the project unique isn’t necessarily that it’s browser-based; it has been possible to run old DOS, Windows, and Mac OS versions in browser windows for quite a while now. Instead, it’s the creative solutions that developer Mihai Parparita has come up with to enable persistent storage, fast download speeds, reduced processor usage, and file transfers between the classic Mac and whatever host system you’re running it on. Parparita details some of his work in this blog post.

Beginning with a late 2017 browser-based port of the Basilisk II emulator, Parparita wanted to install old apps to more faithfully re-create the experience of using an old Mac, but he wanted to do it without requiring huge downloads or running as a separate program as the Macintosh.js project does. To solve the download problem, Parparita compressed the disk image and broke it up into 256K chunks that are downloaded on demand rather than up front.

Read 3 remaining paragraphs | Comments

How to Create a Rate Limiter using Bucket4J and Redis

In this tutorial we will learn how to implement rate limiting in a scaled service. We will use the Bucket4J [https://github.com/vladimir-bukhtoyarov/bucket4j] library to implement it and we will use Redis [https://redis.io/] as a distributed cache. Why Use Rate Limiting? Let’s get started with some basics to make sure we

Robotic dog will be on patrol in Pompeii

Robotic dog will be on patrol in Pompeii

Enlarge (credit: Archaeological Park of Pompeii)

The nearby volcano blackened the sky and swallowed the city in clouds of ash; centuries later, robot dogs now prowl the ruins, guarding the city’s dead against the ravages of time.

That’s not a movie plot. It’s what’s actually happening at the 2,000-year-old Roman ruins of Pompeii, in Southern Italy. Boston Dynamics’ robot dog, Spot, will help archaeologists and preservation crews by patrolling the 66-hectare site for signs of erosion, damage, and looting.

“They’re good dogs, Brent”

The volcanic ash that buried Pompeii in 79 CE turned a thriving Roman coastal city into a well-preserved tomb—and a time capsule. Today, the archaeological site is one of the most famous in the world, and it continues to reveal new glimpses of life in a cosmopolitan Roman city during the empire’s heyday, like an ancient fast-food counter excavated in 2020.

Read 13 remaining paragraphs | Comments

What is a Full Stack Developer? 2022 Full Stack Engineer Guide

Full-stack developer roles are among the most highly sought after positions in the current job market. But what exactly is full-stack web development, and how do you become a full-stack developer? In this article, you will first learn what the term full-stack means. Then, you will see some suggested technologies

Boston Dynamics’ “Stretch” robot hits production, and it’s already sold out

Stretch is ready for warehouse work.

Enlarge / Stretch is ready for warehouse work. (credit: Boston Dynamics)

Boston Dynamics has launched its second commercial robot. After debuting its four-legged robot dog, Spot, on the market in 2020 for $75,000, it’s now showing off the commercial version of Stretch, a warehouse box-moving robot that is available for purchase.

Stretch arrived in prototype form in March 2021, and after a year of on-the-job trials and more development, it was refined into a commercial product. The purpose of the bot is still the same: it’s a box mover. Stretch is a warehouse worker that is meant to quickly take over unloading trucks, depalletizing boxes, and building orders without any need to build additional infrastructure.

Box-moving arms are nothing new, but they are usually stationary, which means you have to bolt them to the floor in a specific spot and design your warehouse around the robot location. Stretch is mounted on a big, wheeled base, so it has more human-like flexibility in what it can do throughout the day. You can have Stretch drive right into a truck and do some box unloading in the morning and then move on to the order building later in the afternoon. The base is the same size as a pallet, so it can go just about anywhere in a warehouse.

Read 7 remaining paragraphs | Comments

Find the soul