r/programming • • Jun 25 '20

A bug with a surprisingly cool side effect

https://youtu.be/us1IqknNYmw
5.0k Upvotes

249 comments sorted by

View all comments

Show parent comments

9

u/[deleted] Jun 25 '20

Yeah, it's just a case of having that transient phase at the beginning which corrects the orbits until we end up in the steady-state. Very cool. I imagine that programming something which never collides at all would be an interesting challenge.

2

u/grensley Jun 25 '20

You just program it the same and don't display it until it doesn't crash!

1

u/[deleted] Jun 25 '20

Sure, but that's something of a hack!

1

u/grensley Jun 25 '20

Or is it “running the algorithm to completion”?

Could optimize by accelerating the clock until its stable. Ship it.