Redox on desktop.

Who Wants A Rusty Old Smartphone?

If we’re talking about oxidized iron… probably nobody. If we’re talking about Rust the programming language, well, that might be a different story. Google agrees, and is working on bringing the language into Android. That’s not enough for [Paul Sanja], who has the first Redox OS smartphone.

It’s alive!

Redox OS is a Unix-like operating system written entirely in Rust, and somehow we haven’t covered it until now. Unlike Asterinas, a project to recreate the Linux kernel in Rust, Redox has few pretensions of being anything but its own thing, and that’s great! On desktop, Redox has a working windowing system and many utilities, including a basic browser in the form of NetSurf.

It’s claims to be source-compatible with Linux and BSD programs, and partially POSIX compliant. A certain someone around here might want to try it as a daily driver. The header image is a desktop screenshot, because there’s more to see there and it fits our aspect ratio.

On smartphones, it… boots. Some smartphones, anyway. It’s actually a big first step. That booting is possible is actually thanks to the great work put in by the Postmarket OS team to get Uboot working on select android devices. That uboot loader doesn’t need to load the Linux-based Postmarket OS. It can be used for anything compatible. Like, say, Redox OS, as [Paul] shows us.

Of course, Redox OS has no drivers for the touchscreen or anything else, so at the moment that rusty smartphone can only boot to a login screen. But thanks to Rust, you can rest assured that login screen hasn’t got any memory leaks! Jokes aside, this is a great start and we’re hoping to see more.

Redox is a promising project on mobile or desktop, and its development seems a much better use of time and effort than fighting over Rust in the Linux kernel.

Jenny’s Daily Drivers: KDE Linux

Over this series test-driving operating systems, we’ve tried to bring you the unusual, the esoteric, or the less mainstream among the world of the desktop OS. It would become very boring very quickly of we simply loaded up a succession of Linux distros, so we’ve avoided simply testing the latest Debian, or Fedora.

That’s not to say that there’s no space for a Linux distro on these pages if it is merited though, as for example we marked its 30th anniversary with a look at Slackware. If a distro has something interesting to offer it’s definitely worth a look, which brings us to today’s subject.

KDE Linux is an eponymous distro produced by the makers of the KDE Plasma desktop environment and associated applications, and it serves as a technical demo of what KDE can be, a reference KDE-based distribution, and an entirely new desktop Linux distribution all in one. As such, it always has the latest in all things KDE, but aside from that perhaps what makes it even more interesting is that as an entirely new distribution it has a much more modern structure than many of the ones we’re used to that have their roots in decades past. Where in a traditional distro the system is built from the ground up on install, KDE Linux is an immutable base distribution, in which successive versions are supplied as prebuilt images  on which the user space is overlaid. This makes it very much worth a look. Continue reading “Jenny’s Daily Drivers: KDE Linux”

Think You Need A New PC For Windows 11? Think Again

As the sun sets on Windows 10 support, many venues online decry the tsunami of e-waste Windows 11’s nonsensical hardware requirements are expected to create. Still more will offer advice: which Linux distribution is best for your aging PC? [Sean] from Action Retro has an alternate solution: get a 20 year old Sun Workstation, and run Windows 11 on that. 

The Workstation in question from 2005 is apparently among the first Sun made using AMD’s shiny new 64-bit Opteron processor. Since Windows has no legacy 32-bit support– something it shares with certain Linux distributions– this is amongst the oldest hardware that could conceivably install and run Redmond’s latest.

And it can! Not in unaltered form, of course– the real hack here is courtesy of [ntdevlabs], whose “Tiny11” project strips all the cruft from Windows 11, including its hardware compatibility checker. [ntdevlabs] has produced a Tiny11Builder script that is available on GitHub, but the specific version [Sean] used is available on Archive.org.

[Sean] needed the archived version of Tiny11 because Windows 11 builds newer than 22H2 use the POPCNT operation, which was not present in AMD’s first revision of the x86_64 instruction set. POPCNT is part of Intel’s SSE4 extension from 2007, a couple years after this workstation shipped.

If you’re sick of being told to switch to Linux, but can’t stomach staying with Windows either, maybe check out Haiku, which we reported as ready for daily driving early last year.

Continue reading “Think You Need A New PC For Windows 11? Think Again”

UTF-8 Is Beautiful

It’s likely that many Hackaday readers will be aware of UTF-8, the mechanism for incorporating diverse alphabets and other characters such as 💩 emojis. It takes the long-established 7-bit ASCII character set and extends it into multiple bytes to represent many thousands of characters. How it does this may well be beyond that basic grasp, and [Vishnu] is here with a primer that’s both fascinating and easy to read.

UTF-8 extends ASCII from codes which fit in a single byte, to codes which can be up to four bytes long. The key lies in the first few bits of each byte, which specify how many bytes each character has, and then that it is a data byte. Since 7-bit ASCII codes always have a 0 in their most significant bit when mapped onto an 8-bit byte, compatibility with ASCII is ensured by the first 128 characters always beginning with a zero bit. It’s simple, elegant, and for any of who had to deal with character set hell in the days before it came along, magic.

We’ve talked surprisingly little about the internals of UTF-8 in the past, but it’s worthy of note that this is our second piece ever to use the poop emoji, after our coverage of the billionth GitHub repository.

Emoji bales: Tony Hisgett, CC BY 2.0.

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.

What Is The Fourier Transform?

Over at Quanta Magazine [Shalma Wegsman] asks What Is the Fourier Transform?

[Shalma] begins by telling you a little about Joseph Fourier, the French mathematician with an interest in heat propagation who founded the field of harmonic analysis in the early 1800s.

Fourier’s basic insight was that you can represent everything as a sum of very basic oscillations, where the basic oscillations are sine or cosine functions with certain parameters. [Shalma] explains that the biology of our ear can do a similar thing by picking the various notes out from a tune which is heard, but mathematicians and programmers work without the benefit of evolved resonant hairs and bone, they work with math and code.

[Shalma] explains how frequency components can be discovered by trial and error, multiplying candidate frequencies with the original function to see if there are large peaks, indicating the frequency is a component, or if the variations average to zero, indicating the frequency is not a component. [Shalma] tells how even square waves can be modeled with an infinite set of frequencies known as the Fourier series.

Taking a look at higher-dimensional problems [Shalma] mentions how Fourier transforms can be used for graphical compression by dropping the high frequency detail which our eyes can barely perceive anyway. [Shalma] gives us a fascinating look at the 64 graphical building blocks which can be combined to create any possible 8×8 image.

[Shalma] then mentions James Cooley and John Tukey and the development of the Fast Fourier Transform in the 1960s. This mathematical tool has been employed to study the tides, to detect gravitational waves, to develop radar and magnetic resonance imaging, and to support signal processing and data compression. Even quantum mechanics finds use for harmonic analysis, and [Shalma] explains how it relates to the uncertainty principle. The Fourier transform has spread through pure mathematics and into number theory, too.

[Shalma] closes with a quote from Charles Fefferman: “If people didn’t know about the Fourier transform, I don’t know what percent of math would then disappear, but it would be a big percent.”

If you’re interested in the Fourier transform and want to dive deeper we would encourage you to read The Fastest Fourier Transform In The West and Even Faster Fourier Transforms On The Raspbery Pi Zero.

Header image: Joseph Fourier, Attributed to Pierre-Claude Gautherot, Public domain.

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.