Codebuff转发了
James Grugett and I let random strangers on the internet write and run code on our laptop. We were inspired by Twitch Plays Pokemon, where people wrote commands in a stream chat and they'd run on someone's Pokemon game. We thought: what if we did that with Codebuff? What would people make? So we hacked together a script that takes chat messages from Twitch, inputs them into Codebuff to make code changes, then hot reloads a website to show the difference. In the span of a couple hours, our website: - got rick rolled.?Anthropic was very good at resisting attempts to embed the infamous Rick Astley video, but chat was very persistent. Eventually they figured out they could clear Codebuff's context and then translate the request into another language. - broke in wonky ways. This was on us, we had some app issues that mismatched some divs and wiped progress, but chat was a good sport about it and undid the problematic code. - slowed down to a crawl. At one point, chat had created a list of thousands of checkboxes, and a nefarious actor asked it to create orders of magnitude more, which of course caused our computer to lag and get hot. So yeah, even though Codebuff did a great job at mitigating attacks, I definitely don't recommend just letting anonymous people code stuff on your computer. But.... The cool stuff was more than worth the issues. Together, we inspired one another to make: - a throwback game inspired by "One Million Checkboxes" (see: https://lnkd.in/gZJWz89P), which directly inspired... - a throwback to A "Game of Life" (see https://lnkd.in/gixQUQgx if you're a young 'un), which used the checkboxes from our game before as alive/dead markers. Someone turned them into ?? and ??, which you can see in the video below. - a physics orbital simulation. this one was fun too, we ended up with a mini solar system with a ton of little planets in just a few minutes. It was magical –?we all collaborated to make cool stuff, each person driving their own vision forward. Like a group painting, where each person imparts their style and taste to a canvas, and the result became something more than the sum of its parts. The coolest part? One of our players Nathan Arthur was inspired afterwards to remake the game of life (see: https://lnkd.in/gF4tiyKD) and also turn it into a maze (see: https://lnkd.in/gXgX_q2u)! We definitely want to do more streams, we just need to patch up the system to better handle the issues I highlighted above, first. The internet is fun, yo. Here's my favorite clip, btw: