[{"data":1,"prerenderedAt":363},["ShallowReactive",2],{"project-17484253":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":45,"post_text":47,"what":48,"said":63,"maker_in_thread":158,"shape":163,"grid":168,"attempts":316,"same_week":324,"maker_shows":165,"maker_hidden":355,"reader_version":356,"card":357},"17484253","Brutal.js","a small framework for building brutalist web applications","title","Show HN: Brutal.js – a small framework for building brutalist web applications","https:\u002F\u002Fgithub.com\u002Fdosyago-coder-0\u002Fbrutal.js","github.com","dosy",1531063964,2018,62,54,681,2155,32,"notable","languages","javascript library","library",[24,25,26,27,28],"javascript","brutalist web","html templates","tagged templates","xss","roasted",-0.537,{"positive":32,"neutral":33,"mixed":32,"critical":34},0,9,15,24,{"idea":37,"execution":39,"privacy":41,"performance":42,"docs":44},{"positive":32,"critical":38},12,{"positive":32,"critical":40},2,{"positive":32,"critical":32},{"positive":32,"critical":43},1,{"positive":32,"critical":32},[43,32,43,43,32,43,32,32,43,43,32,43,46,43,32,46,46,46,32,43,46,32,32,32,32,46,32,32,32,32,32,43,46,43,43,32,43,32,43,32],3,null,{"problem":47,"audience":47,"pricing":47,"motivation":47,"time_to_build":47,"stack":49,"openness":62,"stage":62,"team_size":62},[50],{"value":51,"source":52,"evidence":53},"JavaScript","inferred",[54,58],{"id":55,"by":56,"text":57},"17484478","franciscop","I tried making something like this (JSX with Template Literals) few times, they are languishing in unfinished JSFiddles. The main issue was making it XSS-safe by default, which…",{"id":59,"by":60,"text":61},"17484848","richjdsmith","Reminds me in an odd way of Stimulus JS. (https:\u002F\u002Fstimulusjs.org\u002F) Actually, in the current project I am working on, I have been using Stimulus JS and VanillaJS™ exclusively and…","unknown",{"praise":64,"objections":73,"requests":112,"questions":122,"alternatives":130},[65],{"value":66,"source":67,"evidence":68},"Tagged template approach is interesting and a good learning example","commenter",[69],{"id":70,"by":71,"text":72},"17484639","wybiral","I was wondering how they pulled of the R`` expressions because I didn't realize that JS added \"tagged templates\" like this [1]. So if nothing I learned something new by reading…",[74,93,101],{"value":75,"source":67,"evidence":76},"Brutalism does not need a framework; the concept is a poor fit for JS frameworks",[77,81,85,89],{"id":78,"by":79,"text":80},"17484459","b_b","Might just be me, but it feels a little weird that brutalist design needs a framework. But perhaps I'm misconstruing the design\u002Flook of it to how it is actually built, in which…",{"id":82,"by":83,"text":84},"17485039","warent","Agreed. Not to sound too harsh, but this \"framework\" (actually a library) smells very strongly of bandwagon. Why should I use this when I could use something like Hyperapp or…",{"id":86,"by":87,"text":88},"17485469","rutierut","Yes, could not agree more, Brutalism is quite hot right now (although HN seems to hold a bit of an alternative definition about what Brutalism entails) which really seems like…",{"id":90,"by":91,"text":92},"17485110","corodra","Let's beat that dead horse. Part of the pillars of brutalist web design is \"no framework\". Sugarless sweetener now made from sugar cane!",{"value":94,"source":67,"evidence":95},"Possible XSS vulnerability from unescaped template interpolation",[96,97],{"id":55,"by":56,"text":57},{"id":98,"by":99,"text":100},"17484927","jamescostian","Demo 2 seems to be a problem with jsfiddle: https:\u002F\u002Fjsfiddle.net\u002FhegLkz4s\u002F22\u002F It's also already been reported: https:\u002F\u002Fgithub.com\u002Fjsfiddle\u002Fjsfiddle-issues\u002Fissues\u002F963 You're right…",{"value":102,"source":67,"evidence":103},"Not true to the brutalist web philosophy of plain HTML and CSS",[104,108],{"id":105,"by":106,"text":107},"17484658","tzahola","A brutalist website - by definition - should hardly contain any JS\u002FCSS.",{"id":109,"by":110,"text":111},"17484953","tarboreus","I think this is kind of missing the point. The movement toward brutalism tries to bring back the uniqueness of sites on the early web in all their bizarre diversity. It's also…",[113],{"value":114,"source":67,"evidence":115},"Make template interpolation escape by default, or throw on unsafe strings",[116,119],{"id":117,"by":56,"text":118},"17487112","Does it throw if a template returns a string? While it's a cool feature to be able to do this, it's also quite dangerous (specially when dealing with beginners for this library)…",{"id":120,"by":56,"text":121},"17494118","Ah cool, that works as well from a security point of view. I slightly prefer throwing, but that is highly opinionated.",[123],{"value":124,"source":67,"evidence":125},"What is the XSS attack vector?",[126],{"id":127,"by":128,"text":129},"17484561","dothis","What is the attack vector?",[131,142,150,154],{"value":132,"source":67,"evidence":133},"lit-html",[134,138],{"id":135,"by":136,"text":137},"17485178","numtel","Lit-html seems like a more fleshed-out version of this: https:\u002F\u002Fgithub.com\u002FPolymer\u002Flit-html",{"id":139,"by":140,"text":141},"17486743","spankalee","lit-html, a similar HTML templating with template literals library, achieves \u002Fmostly\u002F XSS-safe by default by never interpolating dynamic data before parsing, but interpolating…",{"value":143,"source":67,"evidence":144},"React",[145,146],{"id":55,"by":56,"text":57},{"id":147,"by":148,"text":149},"17489013","kvczor","I don't get the example code. It is possible to write even simpler code in React than it is showed in the documentation. const ButtonWidget = ({name}) => (\u003Cbutton onClick={() =>…",{"value":151,"source":67,"evidence":152},"Hyperapp or Preact",[153],{"id":82,"by":83,"text":84},{"value":155,"source":67,"evidence":156},"Stimulus JS",[157],{"id":59,"by":60,"text":61},{"comments":43,"answered":32,"key":159},[160],{"id":161,"text":162},"17487976","Merged your PR!",{"commenters":164,"max_depth":165,"maker_replies":43,"first_comment_mins":166,"lifespan_hours":167},41,5,30,31,[169,171,175,178,181,184,187,189,192,194,197,198,199,200,203,205,207,211,212,214,216,218,220,221,225,229,234,237,241,243,247,250,252,255,259,261,263,266,268,270,274,278,281,282,284,287,290,293,297,301,305,309,311,314],[78,32,43,170,79,32],"project\u002Fcritical\u002Fidea",[172,32,32,173,174,32],"17484522","commenter\u002Fneutral\u002Fidea","dewey",[176,32,32,173,177,32],"17484643","devmunchies",[179,43,43,170,180,32],"17485650","krsdcbl",[182,43,43,170,183,32],"17485840","antonvs",[185,43,32,186,180,32],"17486011","commenter\u002Fcritical\u002Fidea",[188,43,43,170,183,32],"17486444",[190,43,32,173,191,32],"17486472","robinsloan",[193,43,32,173,183,32],"17488133",[195,43,32,173,196,32],"17485932","epicide",[109,40,43,170,110,32],[82,40,43,170,83,32],[86,40,43,170,87,32],[201,40,32,173,202,32],"17485392","pvg",[55,46,43,204,56,32],"project\u002Fcritical\u002Fexecution",[127,46,32,206,128,32],"commenter\u002Fneutral\u002Fprivacy",[208,46,46,209,210,32],"17485353","project\u002Fneutral\u002Fprivacy","rictic",[98,46,43,204,99,32],[161,46,32,213,11,43],"maker\u002Fpositive\u002Fexecution",[139,46,32,215,140,32],"other\u002Fneutral\u002Fexecution",[117,46,46,217,56,32],"project\u002Fneutral\u002Fexecution",[219,46,46,217,140,32],"17487213",[120,46,46,217,56,32],[222,223,32,173,224,32],"17484605",4,"calibas",[226,165,32,227,228,32],"17485013","other\u002Fneutral\u002Fidea","foxhop",[230,231,46,232,233,32],"17484491",6,"project\u002Fneutral\u002Fidea","chowes",[235,231,43,170,236,32],"17484584","Mahn",[238,239,46,232,240,32],"17484812",7,"sergiotapia",[59,242,32,227,60,32],8,[244,33,32,245,246,32],"17484827","other\u002Fneutral\u002Fnone","dictum",[248,33,32,245,249,32],"17485106","ChefboyOG",[70,251,32,245,71,32],10,[253,251,32,254,183,32],"17486520","other\u002Fcritical\u002Fidea",[256,257,46,232,258,32],"17484404",11,"nsx147",[260,257,32,245,174,32],"17484422",[262,257,32,245,177,32],"17484430",[264,257,32,245,265,32],"17484495","iamdave",[267,257,32,245,177,32],"17484631",[269,257,32,245,265,32],"17484744",[271,257,32,272,273,32],"17484710","other\u002Fcritical\u002Fdesign","stef25",[275,257,32,276,277,32],"17484908","other\u002Fneutral\u002Fdesign","bjourne",[279,257,32,272,280,32],"17485042","vincnetas",[90,38,43,170,91,32],[135,283,46,232,136,32],13,[285,283,43,286,140,32],"17486491","project\u002Fcritical\u002Fperformance",[147,288,46,289,148,32],14,"project\u002Fneutral\u002Fdocs",[291,34,43,170,292,32],"17485756","_bxg1",[294,295,32,227,296,32],"17485603",16,"lcnmrn",[298,299,43,170,300,32],"17485238",17,"kowdermeister",[302,303,32,245,304,32],"17484974",18,"omegote",[306,307,32,245,308,32],"17485325",19,"reilly3000",[105,310,43,170,106,32],20,[312,310,32,245,313,32],"17484720","amelius",[315,310,32,245,106,32],"17484921",[317,318,321],{"id":4,"t":12,"points":14,"comments":15},{"id":319,"t":320,"points":40,"comments":32},"17573388",1532075919,{"id":322,"t":323,"points":43,"comments":43},"17677278",1533270427,[325,330,335,340,345,350],{"id":326,"name":327,"points":328,"category":329},"17487552","Browsh",967,"dev_tools",{"id":331,"name":332,"points":333,"category":334},"17470037","Hacker News job trends",371,"data",{"id":336,"name":337,"points":338,"category":339},"17509601","Solving Rush Hour",223,"games",{"id":341,"name":342,"points":343,"category":344},"17506753","Markdown New Tab",218,"productivity",{"id":346,"name":347,"points":348,"category":349},"17505559","Oathkeeper",174,"infrastructure",{"id":351,"name":352,"points":353,"category":354},"17508151","Online challenge",143,"learning_science",false,"v2",{"id":358,"name":5,"line":6,"ai":355,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":359,"top":18,"kw":360,"maker":11,"domain":10,"tier":19,"attempts":46,"strip":361,"url":9,"mix":362,"praise":66,"objection":75,"sub":21},17484253,-0.54,[24,25,26,27,28],"1011010011013103330130000300000131101010",[32,33,32,34],1794036567606]