[{"data":1,"prerenderedAt":349},["ShallowReactive",2],{"project-25088683":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":35,"aspects":36,"strip":44,"post_text":46,"what":47,"said":84,"maker_in_thread":164,"shape":175,"grid":179,"attempts":311,"same_week":312,"maker_shows":34,"maker_hidden":341,"reader_version":342,"card":343},"25088683","Stargate (Dwitter 20584)","A Stargate in 140 chars of JavaScript","title","Show HN: A Stargate in 140 chars of JavaScript","https:\u002F\u002Fwww.dwitter.net\u002Fd\u002F20584","dwitter.net","tomxor",1605309137,2020,377,55,96,3028,4,"legend","creative","generative art demo","other",[24,25,26,27,28],"javascript code golf","dwitter","demoscene","canvas animation","generative art","mixed",0.178,{"positive":32,"neutral":33,"mixed":34,"critical":18},11,10,2,27,{"docs":37,"idea":40,"execution":42,"performance":43},{"positive":38,"critical":39},1,0,{"positive":41,"critical":39},3,{"positive":34,"critical":34},{"positive":38,"critical":34},[39,39,41,45,45,41,39,39,45,39,45,39,41,45,39,38,41,41,45,41,39,45,41,45,45,45,39,41,38,45,41,39,39,39,39,39,39,38,39,39],5,null,{"problem":46,"audience":48,"pricing":46,"motivation":60,"time_to_build":46,"stack":67,"openness":81,"stage":82,"team_size":83},{"value":49,"source":50,"evidence":51},"Code golfers and demoscene fans","inferred",[52,56],{"id":53,"by":54,"text":55},"25089915","kortex","Mind-blowing work! Is there any kind of tools for \"reverse engineering\" or otherwise unrolling\u002Fprettifying dweets so I can study them better? It's really cool but I barely know…",{"id":57,"by":58,"text":59},"25092420","patrec","As someone who's written a lot of impressive dweets -- what do you recommend for someone wanting to start out with this type of coding? Just going to dwitter and trying to…",{"value":61,"source":62,"evidence":63},"Exploring tiny code and finding interesting visual patterns","maker",[64],{"id":65,"by":11,"text":66},"25092592","Pulling apart dweets is a good way to get started and learn new techniques. Whenever I see a dweet I don't yet understand, I can't resist immediately pulling it to pieces -…",[68,77],{"value":69,"source":62,"evidence":70},"JavaScript",[71,74],{"id":72,"by":11,"text":73},"25089675","I'll try to give a rough overview of what's going on here. The function z produces the puddle (ahem - \"event horizon\") through a technique I accidentally found from \"orthogonal\"…",{"id":75,"by":11,"text":76},"25089394","Dwitter sets up a minimal shim with a canvas `c` and 2d context `x`, and some shortcuts to math functions sin `S`, cos `C`, tan `T`, and then runs a 60 FPS loop with time `t`.…",{"value":78,"source":62,"evidence":79},"HTML canvas 2D",[80],{"id":75,"by":11,"text":76},"unknown","launched","solo",{"praise":85,"objections":110,"requests":129,"questions":137,"alternatives":156},[86,102],{"value":87,"source":88,"evidence":89},"Impressive and cool work in tiny code","commenter",[90,94,98],{"id":91,"by":92,"text":93},"25089754","holler","never heard of this website, really cool! and amazed at what you can do with 140 chars of javascript and some math :D",{"id":95,"by":96,"text":97},"25090157","btbuildem","Nice to see that the spirit of mid-90s demo scene never really died.",{"id":99,"by":100,"text":101},"25090518","downsouthkakona","This is actually really cool, nice work komrade",{"value":103,"source":88,"evidence":104},"Clever use of fillRect and bitwise tricks",[105,106],{"id":72,"by":11,"text":73},{"id":107,"by":108,"text":109},"25092012","CapsAdmin","Thanks! I tried deobsfucating as much as I could, but I had to go. https:\u002F\u002Fjsfiddle.net\u002Fomgz5xjd\u002F16\u002F I also missed tomxor's explanation which made things more clear. Initially I…",[111,118],{"value":112,"source":88,"evidence":113},"Dwitter's CSP blocks pasting the code into the console",[114],{"id":115,"by":116,"text":117},"25089342","knodi123","how can a person actually run this? If I paste it into my JS console, I just see Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an…",{"value":119,"source":88,"evidence":120},"Uses significant memory and CPU for the effect",[121,125],{"id":122,"by":123,"text":124},"25089666","PTOB","I love it. And it only uses 61MiB of RAM!",{"id":126,"by":127,"text":128},"25092117","bartread","And an entire CPU core. I still love it as well though.",[130],{"value":131,"source":88,"evidence":132},"Add execution of 140-character snippets to Nitter",[133],{"id":134,"by":135,"text":136},"25089843","app4soft","Just curious, is it possible add execution of 140 chars snippets (in JS, Py, etc.) as feature to Nitter?[0] [0] https:\u002F\u002Fgithub.com\u002Fzedeus\u002Fnitter",[138,146],{"value":139,"source":88,"evidence":140},"How to run the code outside Dwitter",[141,142],{"id":115,"by":116,"text":117},{"id":143,"by":144,"text":145},"25089434","gregsadetsky","What @tomxor said! To try it out, go to https:\u002F\u002Fexample.com and run the following setup code first: ``` c = document.createElement('canvas'); document.body.appendChild(c); x =…",{"value":147,"source":88,"evidence":148},"How the eval unescape packing works",[149,153],{"id":150,"by":151,"text":152},"25089312","lxe","Why does escape'ing and un-escape'ing that string result in code?",{"id":154,"by":11,"text":155},"25089461","There is a critical bit of regex in between. In short this technique unpacks two ASCII characters from each unicode point of the input string. Any ASCII safe code can be packed…",[157],{"value":158,"source":88,"evidence":159},"ShaderToy",[160],{"id":161,"by":162,"text":163},"25091052","trollied","Check out ShaderToy if you haven't seen it before: https:\u002F\u002Fwww.shadertoy.com\u002Fbrowse",{"comments":165,"answered":166,"key":167},13,6,[168,171,172],{"id":169,"text":170},"25088711","``` z = n => n--&&C(T\u002F2+S*T\u002FR+t*9)*C(T\u002F4-z(n)*2)-r\u002F6 for (c.width=192,R=48,i=8064; i--;) x.fillRect( S+96, T+54, C(Math.atan2(S=i%97-R,T=i\u002F97-R,r=(S*S+T*T)**.5)*9)*20-r&44&&…",{"id":72,"text":73},{"id":173,"text":174},"25090035","Thanks! I've never found prettifiers to help much. Often there isn't much in the way of indentation or newlines for a formatter to be able to objectively insert. I mainly rely on…",{"commenters":176,"max_depth":177,"maker_replies":165,"first_comment_mins":18,"lifespan_hours":178},33,7,58,[180,182,184,186,187,190,194,196,197,198,202,205,209,212,216,219,220,221,223,224,225,227,228,229,232,234,236,237,238,241,244,247,249,251,252,255,259,262,264,268,271,272,275,278,280,283,286,288,291,293,296,301,304,306,309],[169,39,39,181,11,38],"project\u002Fneutral\u002Fnone",[72,39,39,183,11,38],"project\u002Fneutral\u002Fidea",[53,39,41,185,54,39],"maker\u002Fneutral\u002Fdocs",[173,39,39,185,11,38],[188,39,45,189,54,39],"25090076","maker\u002Fpositive\u002Fdocs",[191,39,45,192,193,39],"25092194","project\u002Fpositive\u002Fidea","algorias",[195,39,39,183,11,38],"25092239",[57,39,41,185,58,39],[65,39,39,185,11,38],[199,39,39,200,201,39],"25090398","other\u002Fneutral\u002Fnone","visarga",[203,39,39,200,204,39],"25091093","rendall",[206,39,45,207,208,39],"25091710","maker\u002Fpositive\u002Fnone","sq2",[210,39,39,211,11,38],"25093059","project\u002Fneutral\u002Fdocs",[213,39,45,214,215,39],"25095755","project\u002Fpositive\u002Fexecution","lifthrasiir",[217,38,41,211,218,39],"25089502","fishtoaster",[134,38,39,200,135,39],[107,38,41,211,108,39],[222,38,41,181,108,39],"25094080",[95,34,45,192,96,39],[161,41,39,200,162,39],[115,18,38,226,116,39],"project\u002Fcritical\u002Fexecution",[75,18,39,211,11,38],[143,18,41,211,144,39],[230,18,41,211,231,39],"25090314","girvo",[233,18,45,214,144,39],"25096467",[235,18,39,200,231,39],"25105653",[150,45,41,183,151,39],[154,45,39,211,11,38],[239,45,45,207,240,39],"25090081","jugg1es",[242,45,41,181,243,39],"25090562","scintill76",[245,166,41,183,246,39],"25091073","nbevans",[248,166,39,192,11,38],"25092143",[250,166,45,207,246,39],"25109573",[91,177,45,192,92,39],[122,253,45,254,123,39],8,"project\u002Fpositive\u002Fperformance",[256,253,39,257,258,39],"25090840","commenter\u002Fneutral\u002Fnone","datalist",[260,253,39,261,11,38],"25091884","project\u002Fneutral\u002Fperformance",[126,253,41,263,127,39],"project\u002Fmixed\u002Fperformance",[265,266,38,226,267,39],"25092828",9,"littlecranky67",[269,266,39,270,11,38],"25092859","project\u002Fneutral\u002Fexecution",[99,33,45,207,100,39],[273,32,41,274,135,39],"25089706","project\u002Fmixed\u002Fnone",[276,32,39,200,277,39],"25089845","hombre_fatal",[279,32,39,200,135,39],"25089857",[281,32,39,200,282,39],"25090268","postalrat",[284,32,39,257,285,39],"25090287","14u2c",[287,32,39,257,135,39],"25090350",[289,32,39,290,285,39],"25090915","commenter\u002Fneutral\u002Fprivacy",[292,32,39,200,135,39],"25092081",[294,32,39,290,295,39],"25090557","dahart",[297,298,38,299,300,39],"25090909",12,"project\u002Fcritical\u002Fperformance","wojciii",[302,298,38,299,303,39],"25090914","Dylan16807",[305,298,39,200,11,38],"25092042",[307,298,39,200,308,39],"25093871","convolvatron",[310,298,39,200,11,38],"25094130",[],[313,318,323,328,332,336],{"id":314,"name":315,"points":316,"category":317},"25110879","gh-pages-url-shortener",355,"dev_tools",{"id":319,"name":320,"points":321,"category":322},"25099847","LibreASR",233,"ai",{"id":324,"name":325,"points":326,"category":327},"25139833","Podcast API",223,"data",{"id":329,"name":330,"points":331,"category":20},"25071643","dosylogo",174,{"id":333,"name":334,"points":335,"category":317},"25138872","Scratch.js",169,{"id":337,"name":338,"points":339,"category":340},"25127468","Twelve70",158,"consumer_social",false,"v2",{"id":344,"name":5,"line":6,"ai":341,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":345,"top":18,"kw":346,"maker":11,"domain":10,"tier":19,"attempts":39,"strip":347,"url":9,"mix":348,"praise":87,"objection":112,"sub":21},25088683,0.18,[24,25,26,27,28],"0035530050503501335305355503153000000100",[32,33,34,18],1794036598397]