A Lorenz Teletype Shows Us Its Secrets

When we use the command line on Linux, we often refer to it as a terminal. It’s a word with a past invoking images of serial terminals, rows of green-screened machines hooked up to a central computer somewhere. Those in turn were electronic versions of mechanical teletypes, and it’s one of these machines we’re bringing you today. [DipDoT] has a Lorenz teletype from the 1950s, and he’s taking us through servicing and cleaning it, eventually showing us its inner workings.

The machine in question had been in storage for many years, but remained in good condition. To be this long out of use though meant it needed a thorough clean, so he sets about oiling the many hundreds of maintenance points listed in a Lorenz manual. It’s a pleasant surprise for us to see keyboard and printer unit come away from the chassis for servicing so easily, and by stepping it through its operation step by step we can see how it works in detail. It even incorporates an identifier key — think of it as a mechanical ROM that stores a sequence of letters — which leads him to believe it may have come from a New York news office. The video is below the break, and makes for an interesting watch.

He’s going to use it with a relay computer, but if you don’t have one of those there are more modern ways to do it.

Continue reading “A Lorenz Teletype Shows Us Its Secrets”

InfinityTerminal Brings Infinite Horizontal Scrolling

The creator of infinite vertical scrolling in social media, [Aza Raskin], infamously regrets his creation that has helped to waste a tremendous amount of human attention and time on the Internet. But that’s vertical scrolling. [bujna94] has created infinityTerminal, a program with infinite scrolling, but in the horizontal direction instead. This tool has had the opposite effect to go along with its opposite orientation: increased productivity and improved workflow.

The impetus for infinityTerminal is [bujna94]’s need for many simultaneous SSH sessions, and the fact that no other terminal program can support an indefinite number of visible terminal windows. This application starts with four terminal windows in a 2×2 grid, and allows the user to open more terminals, two at a time, to form a 2xN grid. As many terminals as needed will open in pairs in the horizontal direction with smooth, trackpad-compatible scrolling and automatic color-coded backgrounds for servers accessed by SSH.

For anyone with a similar dislike of tabs like [bujna94], this might be worth trying out. It’s built with Electron, xterm.js, and node-pty.

There are a few more details about the project on a Reddit post. [Bujna94] also made it completely open source and freely available with the files on a GitHub page, and welcomes anyone to try out his creation that wants to. For more terminal magic, we’d also recommend checking out Notcurses, a terminal application capable enough to output SNES-level detail natively.

Send Images To Your Terminal With Rich Pixels

[darrenburns]’ Rich Pixels is a library for sending colorful images to a terminal. Give it an image, and it’ll dump it to your terminal in full color. While it also supports ASCII art, the cool part is how it makes it so easy to display an arbitrary image — a pixel-art rendition of it, anyway — in a terminal window.

How it does this is by cleverly representing two lines of pixels in the source image with a single terminal row of characters. Each vertical pixel pair is represented by a single Unicode ▄ (U+2584 “lower half block”) character. The trick is to set the background color of the half-block to the upper pixel’s RGB value, and the foreground color of the half-block to the lower pixel’s RGB. By doing this, a single half block character represents two vertically-stacked pixels. The only gotcha is that Rich Pixels doesn’t resize the source image; if one’s source image is 600 pixels wide, one’s terminal is going to receive 600 U+2584 characters per line to render the Rich Pixels version.

[Simon WIllison] took things a step further and made show_image.py, which works the same except it resizes the source image to fit one’s terminal first. This makes it much more flexible and intuitive.

The code is here on [Simon]’s tools GitHub, a repository for software tools he finds useful, like the Incomplete JSON Pretty Printer.

Everything In A Linux Terminal

Here at Hackaday Central, we fancy that we know a little something about Linux. But if you’d tasked us to run any GUI program inside a Linux terminal, we’d have said that wasn’t possible. But, it turns out, you should have asked [mmulet] who put together term.everything.

You might be thinking that of course, you can launch a GUI program from a terminal. Sure. That’s not what this is. Instead, it hijacks the Wayland protocol and renders the graphics as text. Or, if your terminal supports it, as an image. Performance is probably not your goal if you want to do this. As the old saying goes, “It’s not that the dog can sing well; it’s that the dog can sing at all.”

If, like us, you are more interested in how it works, there’s a write up explaining the nuances of the Wayland protocol. The article points out that Wayland doesn’t actually care what you do with the graphical output. In particular, “… you could print out the graphics and give them to a league of crochet grandmas to individually tie together every single pixel into the afghan of legend!” We expect to see this tested at an upcoming hacker conference. Maybe even Supercon.

We generally don’t like Wayland very much. We use a lot of hacks like xdotool and autokey that Wayland doesn’t like. We also think people didn’t understand X11’s network abilities until it was too late. If you think of it as only a video card driver, then you get what you deserve. But we have to admit, we are humbled by term.everything.

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”

Terminal DAW Does It In Style

As any Linux chat room or forum will tell you, the most powerful tool to any Linux user is a terminal emulator. Just about every program under the sun has a command line alternative, be it CAD, note taking, or web browsing. Likewise, the digital audio workstation (DAW) is the single most important tool to anyone making music. Therefore, [unspeaker] decided the two should, at last, be combined with a terminal based DAW called Tek.

Tek functions similarly to other DAWs, albeit with keyboard only input. For anyone used to working in Vim or Emacs (we ask you keep the inevitable text editor comment war civil), Tek will be very intuitive. Currently, the feature set is fairly spartan, but plans exist to add keybinds for save/load, help, and more. The program features several modes including a multi-track sequencer/sampler called the “arranger.” Each track in the arranger is color coded with a gradient of colors generated randomly at start for a fresh look every time.

Modern audio workflows often span across numerous programs, and Tek was built with this in mind. It can take MIDI input and output from the JACK Audio Connection Kit, and plans also exist to create a plugin server so Tek could be used with other DAWs like Ardor or Zrythm. Moreover, being a terminal program opens possibilities for complicated shell scripting and other such Linux-fu.

Maybe a terminal DAW is not your thing, so make sure to check out this physical one instead!

Retrotechtacular: Point-of-Sale Through The Years

In days gone by, a common retail hack used by some of the less honorable of our peers was the price tag switcheroo. You’d find some item that you wanted from a store but couldn’t afford, search around a bit for another item with a more reasonable price, and carefully swap the little paper price tags. As long as you didn’t get greedy or have the bad luck of getting a cashier who knew the correct prices, you could get away with it — at least up until the storekeeper wised up and switched to anti-tamper price tags.

For better or for worse, those days are over. The retail point-of-sale (POS) experience has changed dramatically since the time when cashiers punched away at giant cash registers and clerks applied labels to the top of every can of lima beans in a box with a spiffy little gun. The growth and development of POS systems is the subject of [TanRu Nomad]’s expansive video history, and even if you remember the days when a cashier kerchunked your credit card through a machine to take an impression of your card in triplicate, you’ll probably learn something.

Continue reading “Retrotechtacular: Point-of-Sale Through The Years”