[{"data":1,"prerenderedAt":178},["ShallowReactive",2],{"project-3147549":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":14,"aspects":35,"strip":40,"post_text":42,"what":43,"said":76,"maker_in_thread":113,"shape":122,"grid":124,"attempts":139,"same_week":140,"maker_shows":41,"maker_hidden":171,"reader_version":172,"card":173},"3147549","My weekend project","Common API for Javascript Engines","title","Show HN: My weekend project - Common API for Javascript Engines","https:\u002F\u002Fgithub.com\u002Fudp\u002FCAJE","github.com","udp",1319410760,2011,5,8,977,1097,90,"shown","languages","javascript engine wrapper","library",[24,25,26,27,28],"javascript engine","embedding","v8","spidermonkey","tracemonkey","roasted",-0.35,{"positive":32,"neutral":33,"mixed":32,"critical":34},0,1,4,{"performance":36,"execution":38,"idea":39},{"positive":32,"critical":37},2,{"positive":32,"critical":32},{"positive":32,"critical":37},[33,32,33,32,41,33,32,33],3,null,{"problem":44,"audience":42,"pricing":42,"motivation":51,"time_to_build":42,"stack":56,"openness":73,"stage":74,"team_size":75},{"value":45,"source":46,"evidence":47},"Writing native bindings that work across different JavaScript engines","maker",[48],{"id":49,"by":11,"text":50},"3147684","True, but this is more of a convenience wrapper than a standard. It can happily wrap existing contexts, so it means that eg. one set of function bindings can be used with both V8…",{"value":52,"source":46,"evidence":53},"Weekend project to wrap multiple JS engines behind one API",[54],{"id":55},"post",[57,65,69],{"value":58,"source":59,"evidence":60},"C++","inferred",[61],{"id":62,"by":63,"text":64},"3147704","apaprocki","I've tried to do this to some extent to prevent native code hooked up to the embedded engine from being tied to one implementation, but it doesn't work very well in practice.…",{"value":66,"source":46,"evidence":67},"SpiderMonkey",[68],{"id":49,"by":11,"text":50},{"value":70,"source":46,"evidence":71},"V8",[72],{"id":49,"by":11,"text":50},"open_source","prototype","solo",{"praise":77,"objections":78,"requests":99,"questions":104,"alternatives":105},[],[79,87,92],{"value":80,"source":81,"evidence":82},"Wrapper hides engine-specific APIs needed for performance and GC control","commenter",[83,84],{"id":62,"by":63,"text":64},{"id":85,"by":63,"text":86},"3147725","For simple things it might work, but if a library wrapper was written using your wrapper instead of the native API then there is a good chance it will not be as performance…",{"value":88,"source":81,"evidence":89},"Abstraction leads to disjoint features and duplicated bindings",[90,91],{"id":62,"by":63,"text":64},{"id":85,"by":63,"text":86},{"value":93,"source":81,"evidence":94},"Rooting approach would hurt performance",[95,96],{"id":62,"by":63,"text":64},{"id":97,"by":63,"text":98},"3147881","For the rooting, you can't know if someone is storing you on the stack unless you get hack-y[1]. So you'd have to assume the opposite, that the caller is storing you on the stack…",[100],{"value":101,"source":81,"evidence":102},"Avoid copying strings and allow peeking at bytes",[103],{"id":62,"by":63,"text":64},[],[106],{"value":107,"source":81,"evidence":108},"Adrian Boeing's PAL portable abstraction layer",[109],{"id":110,"by":111,"text":112},"3147773","pagekalisedown","Reminds me of this: http:\u002F\u002Fwww.adrianboeing.com\u002Fpal\u002F Great in theory, but not worth the effort, so very low rate of adoption.",{"comments":41,"answered":33,"key":114},[115,118,121],{"id":116,"text":117},"3147714","Hmm, I understand where you're coming from, but I'd argue that many applications embedding Javascript engines - particularly libraries trying to provide JS bindings - won't need…",{"id":119,"text":120},"3147836","Understood, but I'm not ready to give up on this just yet :-) I know you think this is a futile effort, but I'd welcome any improvements from someone who knows more about the…",{"id":49,"text":50},{"commenters":41,"max_depth":14,"maker_replies":41,"first_comment_mins":123,"lifespan_hours":37},44,[125,127,129,130,132,134,137,138],[62,32,33,126,63,32],"project\u002Fcritical\u002Fperformance",[116,32,32,128,11,33],"project\u002Fneutral\u002Fidea",[85,32,33,126,63,32],[119,32,32,131,11,33],"maker\u002Fneutral\u002Fexecution",[97,32,41,133,63,32],"project\u002Fneutral\u002Fexecution",[135,33,33,136,111,32],"3147662","project\u002Fcritical\u002Fidea",[49,33,32,128,11,33],[110,33,33,136,111,32],[],[141,146,151,156,161,166],{"id":142,"name":143,"points":144,"category":145},"3154818","listofthingsforsale.com",389,"web_saas",{"id":147,"name":148,"points":149,"category":150},"3146182","Tubalr",98,"creative",{"id":152,"name":153,"points":154,"category":155},"3147157","Bookmarklet to Visualize Hacker News Polls",58,"dev_tools",{"id":157,"name":158,"points":159,"category":160},"3158482","Think Like (a) Git",54,"learning_science",{"id":162,"name":163,"points":164,"category":165},"3155117","Kippt.com",52,"productivity",{"id":167,"name":168,"points":169,"category":170},"3156311","TweetSheet",46,"consumer_social",false,"v2",{"id":174,"name":5,"line":6,"ai":171,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":175,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":176,"url":9,"mix":177,"praise":-1,"objection":80,"sub":21},3147549,[24,25,26,27,28],"10103101",[32,33,32,34],1793990876131]