A Gentle Introduction To Ncurses For The Terminally Impatient

Considered by many to be just a dull output for sequential text, the command-line terminal is a veritable canvas to the creative software developer. With the cursor as the brush, entire graphical user interfaces can be constructed, or even a basic text-based dashboard on which values can be updated without redrawing the entire screen over and over, or opting for a much heavier solution like a GUI.

Ncurses is one of the most well-known and rather portable Terminal User Interface (TUI) libraries using that such cursor control, and more, can be achieved in a fairly painless manner. That said, for anyone coming from a graphical user interface framework, the concepts and terminology with ncurses and similar can be confusingly different yet overlapping, so that getting started can be somewhat harrowing.

In this article we’ll take a look at ncurses’ history, how to set it up and how to use it with C and C++, and many more languages supported via bindings.

Continue reading “A Gentle Introduction To Ncurses For The Terminally Impatient”

How Discord Was Ported To Windows 95 And NT 3.1

On the desktop, most people use the official HTML and JavaScript-based client for Discord in either a browser or a still-smells-like-a-browser Electron package. Yet what if there was a way to use a third-party client and even run it on Windows XP, Windows 95, and NT 3.1? This is exactly what [iDontProgramInCpp] did with their Discord Messenger project.

Fortunately, as a web ‘app’ the Discord API is readily accessible and they don’t seem to be in a rush to ban third-party clients. But it did require a bit of work to add newer versions of TLS encryption to Windows XP and older. Fortunately OpenSSL still supports these older platforms, so this was not a major hurdle and Windows XP happily ran this new Discord client. That left porting to older Windows versions.

Most of the challenge lies in writing shims for API calls that do not exist on these older platforms when backporting software from Windows XP to older Windows versions, and GCC (MinGW) had to be used instead of MSVC, but this also was a relatively minor detail. Finally, Windows NT 3.1 was picked as the last challenge for Discord Messenger, which ran into MSVCRT runtime issues and required backporting features to the NT 3.1 version that was still part of the OS back then.

[MattKC] covers the project in a recent video, as well as the AeroChat client which targets Windows Live Messenger fans.  Hopefully the API that allows these projects to operate doesn’t get locked down, as third-party clients like these bring their own unique advantages to the Discord ecosystem.

Continue reading “How Discord Was Ported To Windows 95 And NT 3.1”

Making Corrugated Cardboard Stronger And Waterproof

As useful as corrugated cardboard is, we generally don’t consider it to be a very sturdy material. The moment it’s exposed to moisture, it begins to fall apart, and it’s easily damaged even when kept dry. That said, there are ways to make corrugated cardboard a lot more durable, as demonstrated by the [NightHawkInLight]. Gluing multiple panels together so that the corrugation alternates by 90 degrees every other panel makes them more sturdy, with wheat paste (1:5 mixture of flour and water) recommended as adhesive.

Other tricks are folding over edges help to protect against damage, and integrating wood supports. Normal woodworking tools like saws can cut these glued-together panels. Adding the wheat paste to external surfaces can also protect against damage. By applying kindergarten papier-mâché skills, a custom outside layer can be made that can be sanded and painted for making furniture, etc.

Continue reading “Making Corrugated Cardboard Stronger And Waterproof”

Upgrade Your Filament Dryer With A Swiveling Filament Port

Many FDM filament dryers have a port through which you can guide the filament. This handy feature allows you to print from the spool without removing it from the dryer, saving time and limiting exposure to (moist) air. Unfortunately, these exit ports aren’t always thought out very well, mostly in terms of the angle with the spool as it unrolls. The resulting highly oblique orientation means a lot of friction of the filament on the side of the port. This issue is addressed in a recent [Teaching Tech] video, with a simple, low-cost solution.

The basic idea is to have a swiveling port, inspired by a spherical bearing. The design shown in the video uses a PC4-M6 pneumatic connector to pass the PTFE tube. Connector choice is critical here, as many PC4-M6 pneumatic connectors won’t accommodate the PTFE.  As a fallback, you can drill out a connector to enable this.

Once the connector is sorted, you need a 13 mm (~0.5″) step drill bit to widen the opening in the filament dryer. This ready-to-print version has 10 degrees of freedom in any direction, but you can adapt it to fit your needs. With this mod installed, the angle with which the filament enters the port should remain as close to zero as possible, preventing both friction and damage to the port and filament.

Continue reading “Upgrade Your Filament Dryer With A Swiveling Filament Port”

Adaptive Keyboards & Writing Technologies For One-Handed Users

After having been involved in an accident, [Kurt Kohlstedt] suffered peripheral neuropathy due to severe damage to his right brachial plexus — the network of nerves that ultimately control the shoulder, arm, and hand. This resulted in numbness and paralysis in his right shoulder and arm, with the prognosis being a partial recovery at best. As a writer, this meant facing the most visceral fear possible of writing long-form content no longer being possible. While searching for solutions, [Kurt] looked at various options, including speech-to-text (STT), before focusing on single-handed keyboard options. Continue reading “Adaptive Keyboards & Writing Technologies For One-Handed Users”

Upgrading An Old Espresso Machine

The Francis! Francis! X1 espresso machine in its assembled state. (Credit: Samuel Leeuwenburg)

Recently, [Samuel Leeuwenburg] got his paws on a Francis! Francis! X1 (yes, that’s the name) espresso machine. This is the espresso machine that is mostly famous for having been in a lot of big TV shows in the 1990s. In the early 2000s, the X1 even became a pretty good espresso machine after the manufacturer did some more tinkering with it, including changing the boiler material, upgrading the pump, etc.

In the case of the second-hand, but rarely used, machine that [Samuel] got, the machine still looked pretty good, but its performance was pretty abysmal. After popping the machine open the boiler turned out to be pretty much full of scale. Rather than just cleaning it, the boiler was upgraded to a brass version for better heat retention and other perks.

Continue reading “Upgrading An Old Espresso Machine”

The Switch 2 Pro Controller: Prepare For Glue And Fragile Parts

The Switch 2 Pro controller’s battery is technically removable, if you can get to it. (Credit: VK’s Channel, YouTube)

For those of us who have worked on SNES and GameCube controllers, we know that these are pretty simple to get into and maintain. However, in the trend of making modern game controllers more complex and less maintainable, Nintendo’s new Switch 2 Pro controller is giving modern Xbox and PlayStation controllers a run for their money in terms of repair complexity. As shown in a teardown by [VK] on YouTube (starting at nine minutes in), the first step is a disappointing removal of the glued-on front plate. After that you are dealing with thin plastic, the typical flimsy ribbon cables and a lot of screws.

The main controller IC on the primary PCB is an ARM-based MediaTek MT3689BCA Bluetooth SoC, which is also used in the Switch 2’s Joy-Cons. The 3.87 V, 1070 mAh Li-ion battery is connected to the PCB with a connector, but getting to it during a battery replacement might be a bit of a chore.

Continue reading “The Switch 2 Pro Controller: Prepare For Glue And Fragile Parts”