Newsletter

Gorilla Newsletter 91

Pong in 240 Favicons - Psychedelic Graphics - XOR Deep Dive - JesseSort: a New Sorting Algo - History of Algorithmic Composition - Size Coding Botto - Intricacies of a Calculator App - Bluesky's Lossy Timelines - NASA's 10 Rules for Software Development - Creativity and AI - LLM from Scratch

Gorilla Newsletter 91

Welcome back everyone 👋 and a heartfelt thank you to all new subscribers who joined in the past week!

This is the 91st issue of the Gorilla Newsletter—a weekly online publication that sums up everything noteworthy from the past week in generative art, creative coding, tech, and AI.

If it's your first time here, we've also got a Discord server where we nerd out about all sorts of genart and tech things — if you want to connect with other readers of the newsletter, come and say hi: here's an invite link!

📣
Heads up, I'll be tied up IRL again next weekend — hence no newsletter! But I might share some of the interesting things I find over on Discord

That said, cue the news 👇

All the Generative Things

Running Pong in 240 Browser Tabs · eieio.games
What should you do with your unclosed browser tabs? I ran pong in mine.

Recently there's been a new creative indie trend (I don't know what else to call it) of doing stuff inside of the favicon of a webpage — rather than doing stuff inside the webpage itself 😆 this started with Tru Narla programming an entire game of Flappy Bird inside of the page's favicon:

Link to Post | Link to Page

So, where do you even start with recreating Pong across several favicons? Not only do you need to arrange the tabs you also need to actually display the game in them. Nolan uses AppleScript to automate the process of opening and arranging the tabs, having them self-assemble into 8x30 grid, then using web workers and broadcast channels to project individual square areas of a canvas into the favicon grid, as you might've already guessed, synchronizing them ended up being quite a challenge.

Make sure to also check out the thread he made on the topic:

Link to Thread

In the introductory part part Ben provides us with a breakdown of how computers interpret UV coordinates, as well as how UV mapping works, in essence, wrapping flat 2D graphics and textures onto 3D models, particularly useful in video games (Ben seems to be in the process of developing one). In the first proper chapter, Ben tackles sinusoidal animation of colors and how to create trippy repeating patterns.

Link to Article

One interesting application is in computer graphics actually. In the mid‑1980s, when home computer systems were extremely limited by memory and color depth, one innovative and efficient drawing method revolved around XOR: Rather than storing entire screen images to keep track moving objects, reversible XOR drawing was used, where each pixel of a moving object is combined with the background, such that drawing it twice would automatically erase it. Even though it would sometimes produce minor artifacts like missing pixels where lines crossed, it was a reasonable price to pay.

Moving-line animation using XOR drawing

One other interesting appearance Simon highlights is the game of Nim (or Nim-Sum); a simple two-player game where each player takes turns removing (or "nimming") any number of objects from one of several piles (at least one), where the goal is to avoid being the player who can’t make a move because all the counters are gone.

This sounds much simpler than it actually is — the key to winning ends up being calculating the “nim-sum,” which is found by applying the XOR operator to the numbers of objects in all the piles. If the nim-sum is zero, it means the current position is losing if both players play perfectly, while a nonzero nim-sum means there is a winning strategy.

The unique winning move here is to take 3 counters from the pile of 12. But why?

There's also a good Wikipedia entry on the game of Nim.

GitHub - lewj85/jessesort
Contribute to lewj85/jessesort development by creating an account on GitHub.

JesseSort operates in two main phases; first it goes through a given unsorted list and assigns each item to a specific group, called a band, by comparing against a set of key values that make up the first and last item of each band — where these key values are stored in a separate list known as the base array. The Rainbow is thus simply an organized collection of these bands — lists of items in almost sorted order.

Link to the pre-print paper

This way the algorithm can quickly determine the appropriate group for each new item simply by looking at those boundary values, before merging them into a final sorted list. Jesse claims that his sort performs comparably well to well-known sorting algos like QuickSort and MergeSort in worst case scenarios, but can take advantage of data that's already partly organized — outperforming traditional methods in practical settings.

The discussions in the accompanying Hacker News item are as always quite heated. Apparently there's also unspoken rules about the naming conventions of sorting algorithms 🤔

Link to Hacker News item

I particularly enjoyed this quote from Brian Eno in the introduction, one that I haven't encountered before, but that I believe will resonate with many of those that make generative art today:

"Since I have always preferred making plans to executing them, I have gravitated towards situations and systems that, once set into operation, could create music with little or no intervention on my part. That is to say, I tend towards the roles of planner and programmer, and then become an audience to the results" -Brian Eno (Alpern, 1995).

The important thing I want to share is that I took a satirical a stab at tsubuyakifying (size-coding) one of them — the replies got quite out of hand with some of the size-coding legends like Piter Pasma, Frank Force, and Koma Tebe pitching in with their own attempts at it, check them out here.

Link to post

If I find the time I might even write a little post about it, if you're curious about P5 size-coding, I have this older post of mine about it here.

Dev & Web Tech

Link to thread

The first challenge right off the bat are imprecise floating point numbers; for instance, you can't actually represent fractions like 0.3 or big numbers like 10^100. And although you can circumvent these imprecision problems using bignums, that let you represent very large numbers, there's more problems — like irrational numbers such as π for example, how do you handle these precisely?

The solution Boehms found was Recursive real arithmetic (RRA); a technique where each real number is represented as a function that, when given a precision, computes an approximation guaranteed to be within that error margin — in essence a kind of arithmetic that can generate real numbers to any desired level of accuracy. That's just the tip of the iceberg however, I'll leave you to explore the rest of the thread for yourself — now if you ever want, or have to, build a calculator app, you have a starting point 😆

When Imperfect Systems are Good, Actually: Bluesky’s Lossy Timelines
By examining the limits of reasonable user behavior and embracing imperfection for users who go beyond it, we can continue to provide service that meets the expectations of users without sacrificing scalability of the system.

Bluesky's database is fragmented into smaller shards that group users together (so that the database can scale horizontally) — each shard being capable of handling its own load perfectly well in theory, however, when some users abnormally follow hundreds of thousands of other users, it creates a huge load, slowing everything down for all other users on the same shard.

To solve this, instead of trying to update every single follower perfectly, the system is allowed to skip updates at random at a rate relative to the number of inbound writes — as a result, Jaz was able to improve the overall performance dramatically, reducing P99s by over 96%.

Besides that, these rules provide a glimpse into a different kind of programming that I'm happy I don't have to do — I don't think I could handle the stress of writing software that people's lives depends on ☠️ I can also recommend the Hacker News discussions about the post with some insightful perspectives.

uchū — the color palette for internet lovers
uchū is the color palette for internet lovers, by NetOperator Wibby.

AI Corner

Ge Wang: GenAI Art Is the Least Imaginative Use of AI Imaginable
The prevailing public mindset that AI is only a labor-saving tool betrays a lack of understanding of why people create and a lack of imagination of this technology’s potential.

Ge believes that the challenges and frustrations involved in making art are what make the process meaningful and fulfilling — if we simplify things too much, AI services can strip away the personal growth and satisfaction that come from working through these creative difficulties.

GitHub - plexe-ai/smolmodels: ✨ build ml models in natural language and minimal code
✨ build ml models in natural language and minimal code - plexe-ai/smolmodels

Music for Coding

After last week's recommendation I explored some of the other bands signed by Gondwana Records, one of them being GoGo Penguin, a British instrumental trio from Manchester with an incredibly dynamic sonic range; a modern, cinematic dimension of jazz that I've come to particularly enjoy these days.

The live performance I linked here is absolutely sublime, the double-bass riff that kicks off "Everything is Going to Be OK" at 14:15 gave me real shivers, and then in the track after "An Unbroken Thread of Awareness" they just incorporate a modular synth sound seamlessly with their playing. Besides that, it's really impressive how the band’s able to fill up so much mix space with just a piano, double bass, and drums!

And that's a wrap — hope you've enjoyed this week's curated assortment of genart and tech shenanigans!

Now that you find yourself at the end of this Newsletter, consider forwarding it to some of your friends, or sharing it on the world wide webs—more subscribers means that I get more internet points, which in turn allows me to do more internet things!

Otherwise come and say hi over on TwiX, Mastodon, or Bluesky and since we've also got a Discord now, let me shamelessly plug it here again. If you've read this far, thanks a million! And in case you're still hungry for more generative art things, you can check out last week's issue of the newsletter here:

Gorilla Newsletter 90
Getting into Pen Plotting - Shader Programming with Rick & Morty - GPU Conditional Branching Misconception - Simulating Water over Terrain - The Art of Data Viz - Thinkserver - Gorton Font - Leaking Youtube Emails - Knob.js - The End of Programming - Freya Holmér on Generative AI

You can also find a backlog of all previous issues here:

Newsletter - Gorilla Sun
Weekly recap of Gorilla Articles, Art and other interesting things from the world of generative art and creative coding.

Cheers, happy coding, and again, hope that you have a fantastic week! See you in the next one!

~ Gorilla Sun 🌸