You are viewing archived messages.
Go here to search the history.

Kartik Agaram 2026-01-25 17:11:54

Most beauty per unit code

Share your favorite short programs that have beautiful output.

Any output modality, any programming language, any units.

Recording of output helpful but not required.

I think a program is more beautiful that doesn't generate identical output each time. But that's just my opinion.

My candidate is ~24 lines of LÖVE or equivalent. I'll share it a little later.

I suppose 10print is another candidate.

William Taysom 2026-01-25 19:14:13

Thank you for asking! This is exactly what I need right now. Here is a Scratch version of my favorite Logo program from my childhood. scratch.mit.edu/projects/605658

Paul Tarvydas 2026-01-25 19:27:56

I currently find a lot of these to be intriguing (click on "More...", too) forthsalon.appspot.com

Marek Rogalski 2026-01-26 01:15:14

For me that would be the formula for squircle - it's shape is just so pleasant to look at... (shadertoy.com/view/ll23DW)

image.png

William Taysom 2026-01-26 16:56:46

Squircles are the bestircles!

Jasmine Otto 2026-01-26 22:51:32

vesicle is ~32 lines of World in Emoji, here's a fresh run

jazztap.github.io/research/vesicle

vesicle 12s.gif

Paul Tarvydas 2026-01-27 03:14:23

@Jasmine Otto Interesting! knee-jerk thoughts and neuron firings:

a. Game of Life with fuzzy logic

b. Brusselator en.wikipedia.org/wiki/Brusselator (ref'd by Dr. Paul LaViolette's Subquantum Kinetics)

Jasmine Otto 2026-01-28 20:45:01

Paul Tarvydas Ooh, I haven't revisited the Brusselator in five years, thanks. I believe Varela et al. took inspiration from them via Foerester's BCL. Particularly from that evocative idea of chemical clocks.

Jasmine Otto 2026-01-28 20:53:03

Back in undergrad, I spent some time chasing down models of Drosophila segmentation as an example of a reaction-diffusion system exquisitely governed by signal hormone expression. So I'm very glad someone got those plots for Wikipedia to turn out. lukaswittmann.com/work/bachelors-thesis-the-brusselator

Paul Tarvydas 2026-01-29 14:04:34

@Jasmine Otto

When I think of The Game of Life, I don’t see “equations”, I see “algorithm”.

When I look at the 4 “rules” of a Brusselator, I see “algorithm”.

(some thoughts, currently inconsistent)

programmingsimplicity.substack.com/p/brusselator-pondring-aloud?r=1egdky

Kartik Agaram 2026-02-01 05:33:04

Here's my answer: 24 lines of LÖVE that simply rotate what you draw 48 times.

N = 48 -- numbers of axes of radial symmetry

Points = {}

Rotate = true

W, H = love.window.getMode()



function love.draw()

  local g = love.graphics

  g.setBackgroundColor(0.2,0.2,0.4)

  g.setColor(0.8,0.8,0.8)

  g.translate(W/2, H/2)

  g.circle('fill', 0,0, 50)

  for i=1,N do

    g.line(-W,0, W,0)

    if #Points >= 4 then

      g.line(Points)

    end

    g.rotate(2*math.pi/N)

    if not Rotate then break end

  end

end



function love.keypressed()

  Rotate = not Rotate

end



function love.mousemoved(x,y)

  if not love.mouse.isDown(1) then

    return

  end

  table.insert(Points, x-W/2)

  table.insert(Points, y-H/2)

end

I think of it as a mandala. The chicken scratches that yield it when seen without all the rotated copies.program. By using a computer you eliminate any possibility of meditation or transcendant peace 🙂 But on the other hand, it takes whatever my kids throw at it and makes it beautiful.

mandala1.png

mandala2.png

Beni Cherniavsky-Paskin 2026-02-01 21:10:10

I'll be unoriginal and cite the classic Munching square. e.g. shadertoy.com/view/Mtsyz2 (I do love the grayscale variants, but the B&W shows the "munching" process best)

EDIT: and the / maze but now I see Kartik already mentioned it. [For more sophisticated maze algorithms, mazesforprogrammers.com is great fun.]

Oleksandr Kryvonos 2026-01-25 23:43:30

today I got inspiration boost from my 3.5yo son

we went to a museum and there he saw several airplanes

he liked them a lot and we played some flight simulator

I promised to him that at home I will setup to him similar app on a phone (on my phone)

I searched in Android/Play store for a while and could not find anything appropriate

I wanted arcade flight simulator without any ads or in game purchases

after 30 minutes of search I realized that I already have an arcade flight simulator

an arcade ** dragon flight game that I made 2 years before he was born

the game is free and has no ads

so we played it and he liked it

and I was like - " I made this and this and that .. I made everything here"

so "how is this relevant to this community?"

---- here is a punch line

yeah graphics are outdated but I crafted it and my son loves it

so this brings a feelings of computing, as a medium for an interactive storytelling

and now i can craft with this new purpose in mind.

-- P.S. I avoid adding link to the game, but you can imagine a lowpoly reinterpretation of Spyro.

William Taysom 2026-01-26 16:53:11

Love it. Probably the most exciting thing about coding agents as such is how they can help lower the bar for bespoke one-offs. For instance instead of just describing an orrery with text, I wanted an interactive one with both reasonable table-top scale for the earth, sun, and moon as well as a realistic scale so you could really see and feel how small the sun and moon are in the sky. Really cool, but without assistance not worth the effort.

Andreas S. 2026-02-01 11:30:31

I love the story about your son. my son is 8 and my daughter is 10.

Andreas S. 2026-02-01 11:32:08

And somehow my related it to this