Wolfram Computation Meets Knowledge

The Winners of the 2021 One-Liner Competition

The Wolfram Language is renowned for simplicity and brevity, and nowhere was that more apparent than at the 10th annual One-Liner Competition, held at the Wolfram Virtual Technology Conference. The contest challenges conference attendees to create the best program possible in 128 characters or fewer (the original length limit of a tweet). With prizes awarded for the three best submissions, competition this year was fierce, but the judges, with only minor bloodshed, were able to settle on a slate of awardees.

As a reminder, submissions were to be linear strings of 128 characters or fewer, with no 2D typesetting constructs allowed. The judging criteria were highly personal and dependent on the capricious whims of the six individual judges (with impartial moderation provided by emcee Daniel Lichtblau), but it included brevity, aesthetics, originality and surprising use of the Wolfram Language. Wolfram employees were not eligible to compete.

Without further ado, here are the winners….

Honorable Mention

Benny Cheng: Bifurcation Diagram (126 characters)

This submission holds a special place in the heart of this judge, who fondly remembers producing the same diagram in teenage coding experiments in the 1990s using QBasic. What is not so fondly remembered is the length of time and code needed to make such drawings given the tools available to an amateur of the time. How far we’ve come!


The judging panel also agreed that the image output just looks cool. The use of 16 characters to add BackgroundBlack seems worth it. October is Spooky Month, after all.

Third Place

James Lu: Minute Repeater Computa UltraTerse (122 characters)

Our third-place winner takes the telling of a story to a higher level in the description of his submission. Here are his own words:

“Minute Repeater” is a combination of mechanical watches and one of the most fascinating accomplishments of Haute Horlogerie. At the press of a button, a minute repeater watch chimes out the hour, followed by the quarter hour and minutes. For example, if the time is 3:34am, then the minute repeater will sound three low tones representing three hours, two sequences of dual-tones representing 2 × 15 = 30 minutes, and four high tones representing four minutes: “ding, ding, ding; ding+dong, ding+dong; ding, ding, ding, ding.” Such watches originated before night illumination became widely available and were invaluable for the visually impaired. In the current day, while minute repeater watches have lost their practical utility, they are still highly sought after by watch enthusiasts due to their intricacy and novelty.

The mechanisms underlying minute repeater watches are ingenious and require both technical facility as well as musicality on the part of the watchmaker to listen to and confirm the harmony of the striking sounds. Furthermore, the pinnacle of achievement for minute repeater movements is their ability to fit into a small watch case. As a tribute to this mechanism, I’ve utilized the computational “gears” of the Wolfram Language and implemented a terse code succinct enough to fit into a 128-character “case.” At the press of “evaluate,” this minute repeater watch tells time in a manner that harkens back to an earlier age but relies on modern computation.

Sound@Flatten@ MapThread

Judges loved the history lesson and appreciated the accessibility applications of this program for the sight-impaired. Note the clever use of infix notation in #1~Table~#2 to save one character over Table[#1,#2].

Second Place

Michael Sollami: Poor Man’s Vacation (126 characters)

Everyone needs a vacation now and then, right? And in the time of COVID, perhaps virtual travel is the best we can hope for. This submission allows the user to dynamically choose a vacation spot somewhere on the globe and then displays images obtained through WebImageSearch to show you what you might see if you traveled there. Note the definition d=Dynamic here, which allows an overall savings of four characters. By joining code with \[NewLine] characters rather than semicolons, as in a CompoundExpression, the author allows us to view multiple linked Dynamic expressions simultaneously—a neat idea!

d = Dynamicd@x~LocatorPane~GeoGraphics

First Place

Michael Sollami: Chessboard in a Tweet (128 characters)

Who would have thought that one could build a functional chessboard in the Wolfram Language with only 128 characters?! In this elegant code, first-place winner Michael Sollami does just that. Take a look at the code and its output:


Remarkably, one can play a game on this board. The click-and-drag functionality needed to interact with the pieces in the front end is provided entirely through Locator used within Graphics, showing the power of the Wolfram Language when coupled with the dynamic capabilities of the Wolfram front end. Judges were very impressed with the functional programming here to make everything fit within the character limit. The use of Raster and Array with an appropriate grayscale function condenses the code for visualizing the board itself (without pieces) to a mere 27 characters. In the first argument of Array, the author takes clever advantage of the prefix form of Plus, whereby +## is equivalent to #1+#2, but uses three fewer characters. Also of note is that the chess piece figures, being standard UTF-8 characters, count as one character apiece as per the contest rules. Why not grab a friend and try a game?

What Are You Waiting For?

After seeing what the Wolfram Language can do in a very small amount of code—check out all of this year’s submissions—we hope you’ve been inspired to have a little fun and create something unique of your own. If you come up with your own one-liner, Wolfram Tweet-a-Program, described here, is a great way to share it with the world.

Thanks to all who participated, and congratulations to this year’s winners!


Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.


  1. That chess in a tweet is pretty genius.