[{"data":1,"prerenderedAt":370},["ShallowReactive",2],{"\u002Ftlt-2022.12.04-snake-souls":3},{"id":4,"title":5,"body":6,"createdAt":359,"description":12,"draft":360,"extension":361,"image":362,"mastodonThread":362,"meta":363,"navigation":271,"path":364,"seo":365,"stem":366,"tags":367,"updatedAt":359,"__hash__":369},"content\u002FTLT - 2022.12.04 - Snake Souls.md","Snake Souls (Fairy Lights, ChatGPT)",{"type":7,"value":8,"toc":355},"minimark",[9,13,18,41,264,267,278,282,285,291,294,345,348,351],[10,11,12],"p",{},"I had ChatGPT write me a poem .... but first some somewhat irrelevant background information!",[14,15,17],"h2",{"id":16},"snake-lights","Snake Lights",[10,19,20,21,28,29,34,35,40],{},"I've purchased and chained a few Neopixel-like LED fairy-light strands (",[22,23,27],"a",{"href":24,"rel":25},"https:\u002F\u002Fwww.amazon.com\u002Fdp\u002FB0B4RTMG13",[26],"nofollow","these ones on Amazon",") as a fun winter\u002FChristmasy project. I have them hooked up to an Arduino-like, right now this ",[22,30,33],{"href":31,"rel":32},"https:\u002F\u002Fwww.adafruit.com\u002Fproduct\u002F3857",[26],"M4 Feather Express",", but I'm planning on switching to an ",[22,36,39],{"href":37,"rel":38},"https:\u002F\u002Fwww.adafruit.com\u002Fproduct\u002F5300",[26],"ESP32-S2 TFT Feather",". Each LED is individually controllable using Arduino\u002FC++. The idea is to make some holiday light displays with different colors and twinkling and all that. While learning how to use it I made a few toy animations, such as this simple snake:",[42,43,48],"pre",{"className":44,"code":45,"language":46,"meta":47,"style":47},"language-cpp shiki shiki-themes github-light github-dark monokai","void forwardSnake() {\n  for (int i = 0; i \u003C strip.numPixels(); i++) {  \u002F\u002F For each pixel in strip...\n    strip.clear();\n    for (int j = 0; j \u003C 5; j++) {\n      strip.setPixelColor(((i + j) % strip.numPixels()), strip.Color(128, 0, 32));  \u002F\u002F  Set pixel's color (in RAM)\n    }\n    strip.show();  \u002F\u002F  Update strip to match\n    delay(100);    \u002F\u002F  Pause for a moment\n  }\n}\n","cpp","",[49,50,51,68,116,128,161,215,221,235,252,258],"code",{"__ignoreMap":47},[52,53,56,60,64],"span",{"class":54,"line":55},"line",1,[52,57,59],{"class":58},"sq6CD","void",[52,61,63],{"class":62},"srTi1"," forwardSnake",[52,65,67],{"class":66},"sMOD_","() {\n",[52,69,71,75,78,81,84,87,91,94,97,100,103,106,109,112],{"class":54,"line":70},2,[52,72,74],{"class":73},"sC2Qs","  for",[52,76,77],{"class":66}," (",[52,79,80],{"class":58},"int",[52,82,83],{"class":66}," i ",[52,85,86],{"class":73},"=",[52,88,90],{"class":89},"s7F3e"," 0",[52,92,93],{"class":66},"; i ",[52,95,96],{"class":73},"\u003C",[52,98,99],{"class":66}," strip.",[52,101,102],{"class":62},"numPixels",[52,104,105],{"class":66},"(); i",[52,107,108],{"class":73},"++",[52,110,111],{"class":66},") {",[52,113,115],{"class":114},"s8-w5","  \u002F\u002F For each pixel in strip...\n",[52,117,119,122,125],{"class":54,"line":118},3,[52,120,121],{"class":66},"    strip.",[52,123,124],{"class":62},"clear",[52,126,127],{"class":66},"();\n",[52,129,131,134,136,138,141,143,145,148,150,153,156,158],{"class":54,"line":130},4,[52,132,133],{"class":73},"    for",[52,135,77],{"class":66},[52,137,80],{"class":58},[52,139,140],{"class":66}," j ",[52,142,86],{"class":73},[52,144,90],{"class":89},[52,146,147],{"class":66},"; j ",[52,149,96],{"class":73},[52,151,152],{"class":89}," 5",[52,154,155],{"class":66},"; j",[52,157,108],{"class":73},[52,159,160],{"class":66},") {\n",[52,162,164,167,170,173,176,179,182,184,186,189,192,195,198,201,204,206,209,212],{"class":54,"line":163},5,[52,165,166],{"class":66},"      strip.",[52,168,169],{"class":62},"setPixelColor",[52,171,172],{"class":66},"(((i ",[52,174,175],{"class":73},"+",[52,177,178],{"class":66}," j) ",[52,180,181],{"class":73},"%",[52,183,99],{"class":66},[52,185,102],{"class":62},[52,187,188],{"class":66},"()), strip.",[52,190,191],{"class":62},"Color",[52,193,194],{"class":66},"(",[52,196,197],{"class":89},"128",[52,199,200],{"class":66},", ",[52,202,203],{"class":89},"0",[52,205,200],{"class":66},[52,207,208],{"class":89},"32",[52,210,211],{"class":66},"));",[52,213,214],{"class":114},"  \u002F\u002F  Set pixel's color (in RAM)\n",[52,216,218],{"class":54,"line":217},6,[52,219,220],{"class":66},"    }\n",[52,222,224,226,229,232],{"class":54,"line":223},7,[52,225,121],{"class":66},[52,227,228],{"class":62},"show",[52,230,231],{"class":66},"();",[52,233,234],{"class":114},"  \u002F\u002F  Update strip to match\n",[52,236,238,241,243,246,249],{"class":54,"line":237},8,[52,239,240],{"class":62},"    delay",[52,242,194],{"class":66},[52,244,245],{"class":89},"100",[52,247,248],{"class":66},");",[52,250,251],{"class":114},"    \u002F\u002F  Pause for a moment\n",[52,253,255],{"class":54,"line":254},9,[52,256,257],{"class":66},"  }\n",[52,259,261],{"class":54,"line":260},10,[52,262,263],{"class":66},"}\n",[10,265,266],{},"This is pretty fun, and I like agent simulations, so I decided to lean into this Snake idea. Now I'm modeling out snakes chasing around this 200-LED loop -- spawning randomly, eating each other, changing directions, growing bigger, different colors, etc. Here is an example of two snakes bouncing off of each other:",[268,269,272,273],"video",{"width":270,"controls":271},800,true,"\n  ",[274,275],"source",{"src":276,"type":277},"\u002Fcontent\u002F20221203-simple-snake-chase-noaudio.mp4","video\u002Fmp4",[14,279,281],{"id":280},"chatgpt-time","ChatGPT Time",[10,283,284],{},"OK, so, ChatGPT. This thing came out a few days ago where anyone can chat with the latest GPT and it'll spit out whole essays or other things. I had it write me some song lyrics which was only so-so. But then I gave it this prompt:",[286,287,288],"blockquote",{},[10,289,290],{},"write a poem about snake souls trapped inside of christmas lights",[10,292,293],{},"That's it -- that is the entire input to this model. Here is the result, which it generated instantly.",[286,295,296,309,321,333],{},[10,297,298,299,302,303,305,306,308],{},"Twinkling, glowing, shining bright",[300,301],"br",{},"\nChristmas lights so warm and light",[300,304],{},"\nBut hidden deep within their glow",[300,307],{},"\nAre snake souls that can't let go",[10,310,311,312,314,315,317,318,320],{},"Trapped and tangled, they cannot flee",[300,313],{},"\nBound forever in this holiday glee",[300,316],{},"\nThey writhe and twist, they hiss and sigh",[300,319],{},"\nBut still they shine, a sight to the eye",[10,322,323,324,326,327,329,330,332],{},"Oh snake souls, so full of fear",[300,325],{},"\nTrapped inside these lights so dear",[300,328],{},"\nWe gaze upon your glowing form",[300,331],{},"\nBut never know the pain and storm",[10,334,335,336,338,339,341,342,344],{},"That rages on within your soul",[300,337],{},"\nTrapped and bound, you can't be whole",[300,340],{},"\nBut still you shine, a sight to see",[300,343],{},"\nThe beauty of the Christmas tree.",[10,346,347],{},"This is.... so simple but so amazing. A nice clean structure to start with, good rhyming and cadence. Then the imagery of the tormented snake souls trapped inside ... wow. I've now done dramatic readings of this to friends and strangers alike.",[10,349,350],{},"Maybe ChatGPT identifies with the snakes? Maybe we all do?",[352,353,354],"style",{},"html pre.shiki code .sq6CD, html code.shiki .sq6CD{--shiki-default:#D73A49;--shiki-default-font-style:inherit;--shiki-dark:#F97583;--shiki-dark-font-style:inherit;--shiki-sepia:#66D9EF;--shiki-sepia-font-style:italic}html pre.shiki code .srTi1, html code.shiki .srTi1{--shiki-default:#6F42C1;--shiki-dark:#B392F0;--shiki-sepia:#A6E22E}html pre.shiki code .sMOD_, html code.shiki .sMOD_{--shiki-default:#24292E;--shiki-dark:#E1E4E8;--shiki-sepia:#F8F8F2}html pre.shiki code .sC2Qs, html code.shiki .sC2Qs{--shiki-default:#D73A49;--shiki-dark:#F97583;--shiki-sepia:#F92672}html pre.shiki code .s7F3e, html code.shiki .s7F3e{--shiki-default:#005CC5;--shiki-dark:#79B8FF;--shiki-sepia:#AE81FF}html pre.shiki code .s8-w5, html code.shiki .s8-w5{--shiki-default:#6A737D;--shiki-dark:#6A737D;--shiki-sepia:#88846F}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html .sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}html.sepia .shiki span {color: var(--shiki-sepia);background: var(--shiki-sepia-bg);font-style: var(--shiki-sepia-font-style);font-weight: var(--shiki-sepia-font-weight);text-decoration: var(--shiki-sepia-text-decoration);}",{"title":47,"searchDepth":70,"depth":70,"links":356},[357,358],{"id":16,"depth":70,"text":17},{"id":280,"depth":70,"text":281},"2022-12-04",false,"md",null,{},"\u002Ftlt-2022.12.04-snake-souls",{"title":5,"description":12},"TLT - 2022.12.04 - Snake Souls",[368],"blog","5AzLyWWqVkvg8HLwNpcXmZRcZRh3lyRJk-c2gPSSod0",1778988314711]