[{"data":1,"prerenderedAt":219},["ShallowReactive",2],{"project-8187067":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":28,"sentiment":29,"stance_mix":30,"scored_comments":35,"aspects":36,"strip":42,"post_text":43,"what":44,"said":62,"maker_in_thread":128,"shape":138,"grid":142,"attempts":182,"same_week":183,"maker_shows":31,"maker_hidden":211,"reader_version":212,"card":213},"8187067","DesignToJS","An extension of JavaScript in a day","title","Show HN: I built an extension of JavaScript in a day","https:\u002F\u002Fgithub.com\u002Fbinlain\u002Fdesigntojs","github.com","chmod775",1408214268,2014,26,17,1076,2272,48,"shown","languages","javascript compile-to-js","library",[24,25,26,27],"javascript","transpiler","async functions","sweet.js","curious",-0.175,{"positive":31,"neutral":32,"mixed":33,"critical":34},2,5,0,3,10,{"idea":37,"execution":39,"design":40,"docs":41},{"positive":38,"critical":38},1,{"positive":33,"critical":33},{"positive":38,"critical":38},{"positive":33,"critical":38},[34,33,34,33,32,34,33,38,38,33,32,34,33,34,33,38,33],null,{"problem":43,"audience":43,"pricing":43,"motivation":43,"time_to_build":45,"stack":51,"openness":59,"stage":60,"team_size":61},{"value":46,"source":47,"evidence":48},"built in a day","maker",[49],{"id":50},"post",[52],{"value":53,"source":54,"evidence":55},"JavaScript","inferred",[56],{"id":57,"by":11,"text":58},"8187582","1. uh... oh 2. I'm not sure if I understand your correctly, but it should work if you wrap it in (). I actually have that very same example in 'broken.js' [0] 3. Sure. As you can…","open_source","prototype","unknown",{"praise":63,"objections":72,"requests":94,"questions":113,"alternatives":119},[64],{"value":65,"source":66,"evidence":67},"Congratulations on building something useful in a day; documentation and examples look excellent","commenter",[68],{"id":69,"by":70,"text":71},"8187574","pearknob","Firstly, congratulations on making something useful in one day. Great job. I skimmed over the documentation\u002Fexamples and this is excellent.",[73,80,87],{"value":74,"source":66,"evidence":75},"README example output does not match the documented behavior",[76],{"id":77,"by":78,"text":79},"8187538","arknave","Looks like the readme example doesn't work. I didn't compile the djs sayHello function to verify it matches the given javascript, but running sayHello(\"nyc\") spits out ``` Hello…",{"value":81,"source":66,"evidence":82},"Syntax may clash with JavaScript's standard labeled statements",[83],{"id":84,"by":85,"text":86},"8188696","phpnode","This looks cool but I think your syntax clashes with JS's standard LabeledStatement",{"value":88,"source":66,"evidence":89},"GitHub classifies .djs files as DogeScript",[90],{"id":91,"by":92,"text":93},"8187296","m90","You'll have a hard time fighting GitHub classifying `.djs` as DogeScript.... Nevertheless, good luck with the project and everything.",[95,102,109],{"value":96,"source":66,"evidence":97},"Build on Sweet.js macros so it works with other JS flavors like JSX",[98],{"id":99,"by":100,"text":101},"8187569","dmitrig01","1. Instead of implementing it in vanilla JavaScript, consider creating a Sweet.js macros (or series of macros), so it can be used with other flavors of JS as well (e.g. JSX, etc)…",{"value":103,"source":66,"evidence":104},"Clarify async behaviour inside conditionals",[105,106],{"id":99,"by":100,"text":101},{"id":107,"by":100,"text":108},"8187676","Sorry, should have clarified on 2. As an expansion of one of the examples given: ``` loadAndPrintFile: (contents) { if (!contents) { fs.readFile() -> (error!, contents) }…",{"value":110,"source":66,"evidence":111},"Support static functions on classes",[112],{"id":99,"by":100,"text":101},[114],{"value":115,"source":66,"evidence":116},"What happens when an async function is inside a conditional?",[117,118],{"id":99,"by":100,"text":101},{"id":107,"by":100,"text":108},[120,124],{"value":121,"source":66,"evidence":122},"Sweet.js macros",[123],{"id":99,"by":100,"text":101},{"value":125,"source":66,"evidence":126},"CoffeeScript-style promise macros with bluebird",[127],{"id":107,"by":100,"text":108},{"comments":129,"answered":38,"key":130},6,[131,132,135],{"id":57,"text":58},{"id":133,"text":134},"8187706","The JavaScript result of your example looks like this: (again, beautified because DesignToJS crams everything in one line to preserve the line numbers of your actual code): ```…",{"id":136,"text":137},"8190250","Now that is good to know, thank you. I'll make that change asap.",{"commenters":139,"max_depth":129,"maker_replies":129,"first_comment_mins":140,"lifespan_hours":141},9,67,117,[143,145,147,149,150,153,156,157,159,161,164,166,170,172,175,178,180],[99,33,34,144,100,33],"project\u002Fneutral\u002Fidea",[57,33,33,146,11,38],"maker\u002Fneutral\u002Fexecution",[107,33,34,148,100,33],"project\u002Fneutral\u002Fexecution",[133,33,33,146,11,38],[151,33,32,152,100,33],"8187889","project\u002Fpositive\u002Fdesign",[154,33,34,146,155,33],"8189717","asynchrony",[136,33,33,146,11,38],[91,38,38,158,92,33],"project\u002Fcritical\u002Fidea",[77,31,38,160,78,33],"project\u002Fcritical\u002Fdocs",[162,31,33,163,11,38],"8187570","project\u002Fneutral\u002Fdocs",[69,34,32,165,70,33],"project\u002Fpositive\u002Fidea",[167,168,34,146,169,33],"8187325",4,"tshadwell",[171,168,33,146,11,38],"8187337",[173,168,34,146,174,33],"8187659","woogley",[176,168,33,177,169,33],"8207721","commenter\u002Fneutral\u002Fnone",[84,32,38,179,85,33],"project\u002Fcritical\u002Fdesign",[181,32,33,146,11,38],"8190291",[],[184,189,194,198,203,207],{"id":185,"name":186,"points":187,"category":188},"8187791","GIFyoutube",577,"creative",{"id":190,"name":191,"points":192,"category":193},"8178660","Tuff.gb",260,"games",{"id":195,"name":196,"points":197,"category":20},"8192801","Satellizer",221,{"id":199,"name":200,"points":201,"category":202},"8178940","Ad Detector",204,"security_privacy",{"id":204,"name":205,"points":206,"category":20},"8192287","Scraperjs",192,{"id":208,"name":209,"points":210,"category":20},"8176672","Way.js",162,false,"v2",{"id":214,"name":5,"line":6,"ai":211,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":215,"top":18,"kw":216,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":217,"url":9,"mix":218,"praise":65,"objection":74,"sub":21},8187067,-0.17,[24,25,26,27],"30305301105303010",[31,32,33,34],1793990910541]