[{"data":1,"prerenderedAt":216},["ShallowReactive",2],{"project-11721265":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":33,"aspects":34,"strip":38,"post_text":39,"what":40,"said":63,"maker_in_thread":130,"shape":139,"grid":142,"attempts":171,"same_week":178,"maker_shows":208,"maker_hidden":209,"reader_version":210,"card":211},"11721265","LoadJS","A tiny async loader for modern browsers","title","Show HN: LoadJS – A tiny async loader for modern browsers","https:\u002F\u002Fgithub.com\u002Fmuicss\u002Floadjs","github.com","andres",1463572733,2016,25,14,1074,2264,48,"shown","languages","javascript loader library","library",[24,25,26,27],"javascript loader","async script loading","script dependencies","minified javascript","curious",0,{"positive":31,"neutral":32,"mixed":29,"critical":31},1,3,5,{"execution":35,"docs":36,"idea":37},{"positive":29,"critical":29},{"positive":31,"critical":29},{"positive":29,"critical":31},[32,29,29,32,29,32,29,29,29,33,31,29,29,29],null,{"problem":41,"audience":39,"pricing":39,"motivation":39,"time_to_build":39,"stack":50,"openness":61,"stage":62,"team_size":62},{"value":42,"source":43,"evidence":44},"Loading JavaScript files asynchronously with dependency ordering in a very small footprint","inferred",[45,47],{"id":46},"post",{"id":48,"by":11,"text":49},"11727650","I just shaved off another 3 bytes so LoadJS is now 503 bytes (minified + gzipped). HN - If you see a way to get below 500 bytes please let me know!…",[51],{"value":52,"source":43,"evidence":53},"JavaScript (ES5)",[54,58],{"id":55,"by":56,"text":57},"11727764","barsonme","Using ES5 features? Because arrow functions would make it smaller. Also using an if\u002Felse instead of continue saves 4 bytes. Using arrow functions shaves off another 2 bytes.…",{"id":59,"by":11,"text":60},"11727794","That's a good suggestion but it looks like the minifier removes \"continue\" automatically: https:\u002F\u002Fraw.githubusercontent.com\u002Fmuicss\u002Floadjs\u002Fmaster\u002Fdist\u002Floadjs.min.js Arrow…","open_source","unknown",{"praise":64,"objections":82,"requests":100,"questions":105,"alternatives":115},[65,75],{"value":66,"source":67,"evidence":68},"Tiny size and clever byte-shaving","commenter",[69,73,74],{"id":70,"by":71,"text":72},"11721473","brudgers","Curious as to how 84 bytes were shaved since the previous posting. https:\u002F\u002Fnews.ycombinator.com\u002Fitem?id=9941182",{"id":48,"by":11,"text":49},{"id":55,"by":56,"text":57},{"value":76,"source":67,"evidence":77},"Would like CDNjs distribution",[78],{"id":79,"by":80,"text":81},"11744401","maxpert","Nice work would love to see it delivered via CDNjs",[83,89],{"value":84,"source":67,"evidence":85},"Sequential loading may not work since dynamically added scripts default to async",[86],{"id":87,"by":11,"text":88},"11729451","How does dysel do sequential loading? Dynamically loaded script tags default to async=true so I think this code loads\u002Fexecutes scripts asynchronously:…",{"value":90,"source":67,"evidence":91},"Adds bloat; native async script tags may suffice",[92,96],{"id":93,"by":94,"text":95},"11727580","fbdjfhhcbd","For what purpose? Just stop layering bloat.",{"id":97,"by":98,"text":99},"11730427","romanovcode","1. If you need four hundred dependant scripts to load a page you're doing something wrong. 2. Why can't you just use \u003Cscript async src=\"\u002Fjs\u002Fscript.js\">\u003C\u002Fscript> and be done with…",[101],{"value":102,"source":67,"evidence":103},"Distribute via CDNjs",[104],{"id":79,"by":80,"text":81},[106,110],{"value":107,"source":67,"evidence":108},"How the library shaved bytes since the previous version",[109],{"id":70,"by":71,"text":72},{"value":111,"source":112,"evidence":113},"Can it go below 500 bytes","maker",[114],{"id":48,"by":11,"text":49},[116,123],{"value":117,"source":67,"evidence":118},"LABjs",[119],{"id":120,"by":121,"text":122},"11727399","teknologist","For wider browser support I've always relied on LABjs. It's been around for ages and has to be among the most stable JS libraries out there despite having to deal with all those…",{"value":124,"source":67,"evidence":125},"dysel",[126],{"id":127,"by":128,"text":129},"11728508","sunrising","check out https:\u002F\u002Fgithub.com\u002Fsun2rise\u002Fdysel too",{"comments":131,"answered":132,"key":133},4,2,[134,137,138],{"id":135,"text":136},"11722279","Here are some of the changes: ``` * Replaced for-loops with while-loops [1] * Removed un-necessary code in the script loading function [2][3] * Removed setTimeout wrapper [4][5]…",{"id":48,"text":49},{"id":59,"text":60},{"commenters":140,"max_depth":131,"maker_replies":131,"first_comment_mins":18,"lifespan_hours":141},10,72,[143,145,147,149,150,151,153,155,156,158,160,162,166,168],[70,29,32,144,71,29],"project\u002Fneutral\u002Fexecution",[135,29,29,146,11,31],"maker\u002Fneutral\u002Fexecution",[48,31,29,148,11,31],"project\u002Fpositive\u002Fexecution",[55,31,32,144,56,29],[59,31,29,146,11,31],[152,31,32,144,56,29],"11727865",[120,132,29,154,121,29],"other\u002Fneutral\u002Fnone",[127,32,29,154,128,29],[87,32,29,157,11,31],"commenter\u002Fcritical\u002Fexecution",[79,131,33,159,80,29],"project\u002Fpositive\u002Fdocs",[93,33,31,161,94,29],"project\u002Fcritical\u002Fidea",[163,33,29,164,165,29],"11728619","commenter\u002Fneutral\u002Fidea","King-Aaron",[97,33,29,167,98,29],"commenter\u002Fcritical\u002Fidea",[169,33,29,164,170,29],"11743193","michaelmior",[172,177],{"id":173,"t":174,"points":175,"comments":176},"9941182",1437736875,21,8,{"id":4,"t":12,"points":14,"comments":15},[179,184,189,194,199,204],{"id":180,"name":181,"points":182,"category":183},"11707120","Kajero",217,"dev_tools",{"id":185,"name":186,"points":187,"category":188},"11712751","HungryBot",202,"ai",{"id":190,"name":191,"points":192,"category":193},"11683121","Lever OS",191,"infrastructure",{"id":195,"name":196,"points":197,"category":198},"11680823","Speech Coaching App",176,"productivity",{"id":200,"name":201,"points":202,"category":203},"11697418","Sharp11",113,"creative",{"id":205,"name":206,"points":207,"category":193},"11687407","Deploy Docker Image to AWS Elastic Beanstalk",81,7,false,"v2",{"id":212,"name":5,"line":6,"ai":209,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":29,"top":18,"kw":213,"maker":11,"domain":10,"tier":19,"attempts":132,"strip":214,"url":9,"mix":215,"praise":66,"objection":84,"sub":21},11721265,[24,25,26,27],"30030300051000",[31,32,29,31],1794036544393]