[{"data":1,"prerenderedAt":279},["ShallowReactive",2],{"project-17175186":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":34,"aspects":35,"strip":41,"post_text":43,"what":44,"said":93,"maker_in_thread":153,"shape":160,"grid":165,"attempts":241,"same_week":242,"maker_shows":37,"maker_hidden":271,"reader_version":272,"card":273},"17175186","Sucrase","Sucrase, 20x faster smaller-scoped alternative to Babel","title","Show HN: Sucrase, 20x faster smaller-scoped alternative to Babel","https:\u002F\u002Fgithub.com\u002Falangpierce\u002Fsucrase","github.com","alangpierce",1527545681,2018,88,32,497,2155,24,"notable","dev_tools","javascript transpiler","library",[24,21,25,26,27],"babel alternative","typescript compiler","jsx transform","fast build","curious",0.278,{"positive":31,"neutral":32,"mixed":33,"critical":33},3,4,0,7,{"execution":36,"performance":38,"idea":39},{"positive":37,"critical":33},2,{"positive":33,"critical":33},{"positive":40,"critical":33},1,[33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,31,33,31,33,31,42,33,31,42,33,42,33],5,null,{"problem":45,"audience":60,"pricing":43,"motivation":70,"time_to_build":43,"stack":77,"openness":91,"stage":92,"team_size":92},{"value":46,"source":47,"evidence":48},"Babel is slow for compiling modern JS and language extensions during builds and tests","commenter",[49,53,57],{"id":50,"by":51,"text":52},"17176764","btown","Is there a good way to use this from Webpack? Edit: https:\u002F\u002Fgithub.com\u002Falangpierce\u002Fsucrase\u002Fblob\u002Fmaster\u002Fintegrations\u002Fwebpack-loader\u002F",{"id":54,"by":55,"text":56},"17177988","fiatjaf","Thank you for making this. Babel really needs some alternatives. It would be great to have a Browserify plugin (I'm not asking for anything, just speaking my thoughts).",{"id":58,"by":11,"text":59},"17176890","That's the hope! To be honest, I haven't worked with Jest a lot, and the plugin is sort of a first pass to get things working on the Apollo codebase (which uses Jest), so e.g. it…",{"value":61,"source":62,"evidence":63},"JavaScript developers using Webpack, Jest, Mocha or Rollup","inferred",[64,68,69],{"id":65,"by":66,"text":67},"17176574","fold_left","I could imagine using the jest plugin, could be useful as a presumably faster alternative to babel-jest.",{"id":50,"by":51,"text":52},{"id":58,"by":11,"text":59},{"value":71,"source":72,"evidence":73},"Pick a well-scoped subset of Babel's job and do it much faster","maker",[74],{"id":75,"by":11,"text":76},"17180030","Adding to what Rich said, Sucrase takes a fair amount of inspiration from Bublé, and has a similar high-level approach of \"pick a well-scoped subset of what Babel solves, and…",[78,87],{"value":79,"source":72,"evidence":80},"JavaScript",[81,84],{"id":82,"by":11,"text":83},"17177148","See https:\u002F\u002Fgithub.com\u002Falangpierce\u002Fsucrase\u002Fissues\u002F216 for some investigation I did into webassembly. V8 seems to be pretty good at optimizing your JS code if you give it long…",{"id":85,"by":11,"text":86},"17179762","Yep, hopefully this will motivate more of a performance focus in general. To be clear, Sucrase's parser is a slimmed-down fork of Babel's parser, so Sucrase wouldn't be possible…",{"value":88,"source":72,"evidence":89},"Babel parser fork",[90],{"id":85,"by":11,"text":86},"open_source","unknown",{"praise":94,"objections":106,"requests":116,"questions":121,"alternatives":133},[95,99],{"value":96,"source":47,"evidence":97},"Welcome alternative to Babel with a performance focus",[98],{"id":54,"by":55,"text":56},{"value":100,"source":47,"evidence":101},"Excited about the project, planning to use it with TypeScript",[102],{"id":103,"by":104,"text":105},"17178688","rich_harris","Bublé creator here. The obvious big difference is that this supports TypeScript and Flow, which Bublé doesn't. Bublé is designed to compile a subset of ES6+ into ES5 (the subset…",[107],{"value":108,"source":72,"evidence":109},"Webpack build times gain is modest because Webpack's own parsing stays slow",[110,113],{"id":111,"by":11,"text":112},"17176821","Yep, looks like you found the plugin! Note that if you're using Webpack 4, you won't need webpack-object-rest-spread-plugin anymore, since it uses the newest Acorn, which should…",{"id":114,"by":11,"text":115},"17177034","I'm not very optimistic about webpack build times getting dramatically better with Sucrase in its current state. I've seen more clear benefits when running tests using…",[117],{"value":118,"source":47,"evidence":119},"Browserify plugin",[120],{"id":54,"by":55,"text":56},[122,129],{"value":123,"source":47,"evidence":124},"How does it compare to Bublé?",[125],{"id":126,"by":127,"text":128},"17178378","bpierre","How does it compare to Bublé? https:\u002F\u002Fbuble.surge.sh\u002Fguide\u002F",{"value":130,"source":47,"evidence":131},"Is there a good way to use it from Webpack?",[132],{"id":50,"by":51,"text":52},[134,138,142,149],{"value":135,"source":47,"evidence":136},"Babel",[137],{"id":54,"by":55,"text":56},{"value":139,"source":47,"evidence":140},"Bublé",[141],{"id":126,"by":127,"text":128},{"value":143,"source":47,"evidence":144},"Closure Compiler",[145],{"id":146,"by":147,"text":148},"17177080","tjallingt","Some examples of \"transpilers\" targeting Javascript but writen in other languages: https:\u002F\u002Fgithub.com\u002Fgoogle\u002Fclosure-compiler https:\u002F\u002Fgithub.com\u002FBuckleScript\u002Fbucklescript…",{"value":150,"source":47,"evidence":151},"BuckleScript",[152],{"id":146,"by":147,"text":148},{"comments":34,"answered":32,"key":154},[155,156,159],{"id":82,"text":83},{"id":157,"text":158},"17179687","My general intuition is that you shouldn't expect JS to beat Java or .NET, but you should expect it to be by far the fastest among similarly-dynamic languages. Browsers have been…",{"id":111,"text":112},{"commenters":161,"max_depth":162,"maker_replies":34,"first_comment_mins":163,"lifespan_hours":164},20,8,391,31,[166,170,172,175,178,180,183,186,188,189,192,195,198,200,202,204,206,208,211,214,217,219,220,223,225,227,229,231,235,237,239,240],[167,33,33,168,169,33],"17177050","other\u002Fneutral\u002Fperformance","nicoburns",[146,33,33,171,147,33],"other\u002Fneutral\u002Fnone",[173,33,33,168,174,33],"17178743","kevinb7",[176,33,33,168,177,33],"17181358","chenglou",[82,33,33,179,11,40],"maker\u002Fneutral\u002Fperformance",[181,33,33,168,182,33],"17177279","carlmr",[184,33,33,168,185,33],"17177885","ricardobeat",[187,33,33,168,182,33],"17178381",[157,33,33,168,11,40],[190,33,33,168,191,33],"17177775","cromwellian",[193,33,33,168,194,33],"17177851","venning",[196,33,33,171,197,33],"17177899","amelius",[199,33,33,168,194,33],"17177931",[201,33,33,168,197,33],"17177948",[203,33,33,168,194,33],"17178003",[205,33,33,168,191,33],"17183620",[207,33,33,171,191,33],"17183614",[209,33,33,171,210,33],"17179020","bpicolo",[212,33,33,168,213,33],"17178119","jbergens",[215,33,33,168,216,33],"17180968","Jweb_Guru",[50,40,31,218,51,33],"project\u002Fneutral\u002Fexecution",[111,40,33,179,11,40],[221,40,31,179,222,33],"17176867","the_duke",[114,40,33,224,11,40],"maker\u002Fmixed\u002Fperformance",[126,37,31,226,127,33],"project\u002Fneutral\u002Fidea",[103,37,42,228,104,33],"project\u002Fpositive\u002Fidea",[75,37,33,230,11,40],"maker\u002Fneutral\u002Fidea",[232,31,31,233,234,33],"17185132","project\u002Fneutral\u002Fperformance","gymshoes",[54,32,42,236,55,33],"project\u002Fpositive\u002Fexecution",[85,32,33,238,11,40],"maker\u002Fneutral\u002Fexecution",[65,42,42,236,66,33],[58,42,33,238,11,40],[],[243,247,252,257,262,267],{"id":244,"name":245,"points":246,"category":20},"17146451","Wired-elements",650,{"id":248,"name":249,"points":250,"category":251},"17173051","Crypto51",581,"finance_crypto",{"id":253,"name":254,"points":255,"category":256},"17147272","Parabola.io",291,"web_saas",{"id":258,"name":259,"points":260,"category":261},"17189652","Writing Streak",262,"productivity",{"id":263,"name":264,"points":265,"category":266},"17180686","Recursive Recipes",250,"consumer_social",{"id":268,"name":269,"points":270,"category":261},"17149371","Clippi.io",208,false,"v2",{"id":274,"name":5,"line":6,"ai":271,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":275,"top":18,"kw":276,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":277,"url":9,"mix":278,"praise":96,"objection":108,"sub":21},17175186,0.28,[24,21,25,26,27],"00000000000000000000303035035050",[31,32,33,33],1794036566396]