Surfing The Web Like It’s 1978 — Carbonyl

[Fathy] gets a kick out of doing odd things with Chromium, and Carbonyl is a clever byproduct of that hobby. In this case, it’s what you get when you connect chrome’s renderer to an SVG output module and then convert that SVG to colored characters on a terminal. See, html2svg is an earlier project, taking Chromium’s Skia engine and plugging it into an SVG back-end. And once you have SVG, why not render it to the terminal?


And the results are actually pretty impressive. Imagery is rendered using Unicode 2584, a half-block character. The background and foreground color can be set per character, giving us two controllable pixels per character. Text is handled a bit differently, rendering using the normal text fonts, making for readable pages.

The source is very much a work in progress, but there are some neat ideas already coalescing around the project, like using sixels for better rendering. There’s already decent mouse support and audio output, making for an impressive terminal experience. This might be a project to keep an eye on.

Turn Timing Diagrams Into ASCII Art, For Friendlier Pasting

We all use text-based fields at one time or another, and being limited to ASCII only can end up being a limitation. That’s what led [Luke Wren] to create asciiwave, a fantastic tool that turns WaveDrom timing diagrams into ASCII art. Unlike images, ASCII timing diagrams are suitable for pasting into comment fields, change logs, or anywhere else that accepts text only. [Update: As the author kindly shared in the comments below, this tool’s original niche is pasting into HDL (e.g. Verilog) source code comments, where it has a special kind of usefulness.]

WaveDrom itself is a nifty JavaScript tool that we have covered before. It accepts timing diagrams expressed as JSON data, and renders nicely-readable digital timing diagrams as images directly inside one’s browser.

As cool and useful as that is, images can’t be pasted into text fields. That’s where asciiwave comes in. It reads the exact same format that WaveDrom uses, but generates an ASCII-art timing diagram instead. So if you’ve found WaveDrom useful, but wish you could generate ASCII versions, here’s your solution.

3D ASCII art

Online Tool Turns STLs Into 3D ASCII Art

If you look hard enough, most of the projects we feature on these pages have some practical value. They may seem frivolous, but there’s usually something that compelled the hacker to commit time and effort to its doing. That doesn’t mean we don’t get our share of just-for-funsies projects, of course, which certainly describes this online 3D ASCII art generator.

But wait — maybe that’s not quite right. After all, [Andrew Sink] put a lot of time into the code for this, and for its predecessor, his automatic 3D low-poly generator. That project led to the current work, which like before takes an STL model as input, this time turning it into an ASCII art render. The character set used for shading the model is customizable; with the default set, the shading is surprisingly good, though. You can also swap to a black-on-white theme if you like, navigate around the model with the mouse, and even export the ASCII art as either a PNG or as a raw text file, no doubt suitable to send to your tractor-feed printer.

[Andrew]’s code, which is all up on GitHub, makes liberal use of the three.js library, so maybe stretching his 3D JavaScript skills is really the hidden practical aspect of this one. Not that it needs one — we think it’s cool just for the gee-whiz factor.

Continue reading “Online Tool Turns STLs Into 3D ASCII Art”

Enjoy An ASCII Version Of Star Wars In The Palm Of Your Hand For May The 4th

Everyone by now has probably seen the original — and best; fight us — installment of the Star Wars franchise, and likely the ASCII-art animation version of it that improves greatly on the film by eliminating all those distracting special effects, human actors, and the soundtrack. But what we haven’t had until now is a portable player for ASCIIWars, to enjoy the film in all its character-based glory while you’re on the go.

While this tribute to [Simon Jansen]’s amazing ASCII-art achievement might seem like a simple repackaging of the original, [Frank] actually had to go to some lengths to make this work. After getting [Simon]’s blessing, the build started with a WEMOS D1 Mini, a good platform for the project less for its wireless capabilities and more for its 4 MB of flash memory. A 240×360 TFT LCD display was selected to show the film; the scale of the display made most fonts hard to read, so [Frank] used Picopixel, a font designed for legibility on small screens. The animation file is stored on the SPIFFS file system on the D1’s flash memory, and a few lines of code parse it and send it to the display. The final touch is mounting the whole thing is an old slide viewer, which magnifies the display to make it a little easier to see.

As much as we applaud [Frank]’s tribute to [Simon]’s effort, there’s no reason to confine this to the Star Wars universe. If you read up on the history of ASCII art, which goes surprisingly far back, you might be inspired to render another classic film in ASCIImation and put it on a viewer like this. ASCII-Metropolis, anyone?

Continue reading “Enjoy An ASCII Version Of Star Wars In The Palm Of Your Hand For May The 4th”

ASCII Schematic Diagrams

We wondered recently about those crude ASCII schematics you see in some documentation — are there any dedicated schematic-focused tools to draw them, or are they just hand-crafted using various ASCII-art drawing tools? To our surprise, there is such a tool. It is called AACircuit and was developed by [Andreas Weber]. It has a history going back to 2001 when it was first introduced as ASCIIPaint. Be forewarned, however, the quality of the code may be questionable. According to the notes on [Andy]’s GitHub repository:

WARNING: a lot of spaghetti code ahead

This code was created in 2001-2004 when I taught Borland Delphi 3 to myself. It contains many, many global variables, unstructured and undocumented procedural code and bad variable names.

If you don’t want to wrestle with old and sketchy object-oriented Pascal code, you’re in luck. [Chaos Ordered] has made a Pythonized version which you can get from his GitHub repository. We tried it out and got it working on Ubuntu in short order (after wrestling with a pycairo dependencies). This might not be everyone’s cup of tea, but it has some uses now and then. While we wouldn’t want to document a computer motherboard with ASCII schematics, it’s great for a quick-and-dirty circuit diagrams.

Not exactly schematics, but [Duckman] has some Arduino pinout diagrams he made using ASCII-art. These could be useful when pasted into source code as comments, documenting the pinouts for your project.

Do you recommend any tools for making ASCII schematics, or this just a waste of time?

Real Hackers Videoconference In Terminal

At some point or another, many of us have tried to see how much of our digital lives could be accessed from the comfort of a terminal. We’ve tried Alpine for email, W3M for web browsing, and even watched Star Wars via telnet. But, in the increasingly socially-distant world we find ourselves in today, we find ourselves asking: what about video calling?

Okay, we weren’t asking that. But thankfully [Andy Kong] was, and saw fit to implement it when he and a friend created AsciiZOOM, a “secure, text-based videoconferencing app, accessible from the safety of your terminal.”

As you may have guessed, [Andy]’s solution replaces the conventional video stream we’re all used to with realtime animated ASCII art. The system works by capturing a video stream from a webcam, “compressing” each pixel by converting it into an ASCII character, and stuffing the entire frame into a TCP packet. Each client is connected to a server (meeting room?) which coordinates the packets, sending them back and forth appropriately.

As impressive as it is impractical, the only area in which the project lacks is in audio. [Andy] suggests using Discord to solve that, but here’s hoping we see subtitles in version 2! Will AsciiZOOM be replacing our favorite videoconferencing suite any time soon? No. Are we glad it exists? You betcha.

Continue reading “Real Hackers Videoconference In Terminal”

Mmm… Obfuscated Shell Donuts

In case you grow tired of clear-written, understandable code, obfuscation contests provide a nice change of scenery, and trying to make sense of their entries can be a fun-time activity and an interesting alternative to the usual brainteasers. If we ever happen to see a Simpsons episode on the subject, [Andy Sloane] has the obvious candidate for a [Hackerman Homer] entry: a rotating ASCII art donut, formatted as donut-shaped C code.

The code itself actually dates back to 2006, but has recently resurfaced on Reddit after [Lex Fridman] posted a video about it on YouTube, so we figured we take that chance to give some further attention to this nifty piece of art. [Andy]’s blog article goes in all the details of the rotation math, and how he simply uses ASCII characters with different pixel amounts to emulate the illumination. For those who prefer C over mathematical notation, we added a reformatted version after the break.

Sure, the code’s donut shape is mainly owed to the added filler comments, but let’s face it, the donut shape is just a neat little addition, and the code wouldn’t be any less impressive squeezed all in one line — or multiple lines of appropriate lengths. However, for the actual 2006 IOCCC, [Andy] took it a serious step further with his entry, and you should definitely give that one a try. For some more obfuscated shell animations, check out the fluid dynamics simulator from a few years back, and for a more recent entry, have a look at the printf Tic Tac Toe we covered last month.

Continue reading “Mmm… Obfuscated Shell Donuts”