[{"data":1,"prerenderedAt":222},["ShallowReactive",2],{"project-9724658":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":15,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":27,"sentiment":28,"stance_mix":29,"scored_comments":34,"aspects":35,"strip":41,"post_text":43,"what":44,"said":79,"maker_in_thread":140,"shape":145,"grid":149,"attempts":185,"same_week":186,"maker_shows":178,"maker_hidden":214,"reader_version":215,"card":216},"9724658","CandyJS","transparent bridge between Go and JavaScript","title","Show HN: CandyJS – transparent bridge between Go and JavaScript","https:\u002F\u002Fgithub.com\u002Fmcuadros\u002Fgo-candyjs","github.com","mcuadros",1434447151,2015,72,15,376,2565,"notable","languages","language bridge","library",[23,24,25,26],"go javascript bridge","duktape","embedded scripting","golang","curious",-0.012,{"positive":30,"neutral":31,"mixed":32,"critical":33},1,5,0,2,8,{"performance":36,"execution":37,"idea":38,"design":39,"docs":40},{"positive":32,"critical":30},{"positive":32,"critical":30},{"positive":30,"critical":32},{"positive":32,"critical":32},{"positive":32,"critical":32},[30,32,30,31,32,42,32,42,32,32,42,32,42,32,42],3,null,{"problem":45,"audience":55,"pricing":43,"motivation":59,"time_to_build":43,"stack":63,"openness":78,"stage":78,"team_size":78},{"value":46,"source":47,"evidence":48},"Lets Go programs run JavaScript plugins or rules without a compile step, sharing data structures between the two","maker",[49,52],{"id":50,"by":11,"text":51},"9725133","the main goal of CandyJS is allow to other developers build extendable programs without the requirement of compile. A good example could be a chan bot in Go with plugins written…",{"id":53,"by":11,"text":54},"9725159","True in some cases I fold back to JSON: https:\u002F\u002Fgithub.com\u002Fmcuadros\u002Fgo-candyjs\u002Fblob\u002Fmaster\u002Fbase.go#L272 But the main goal of the project is be fully transparent more than the…",{"value":56,"source":47,"evidence":57},"Go developers who want extendable programs with JS plugins",[58],{"id":50,"by":11,"text":51},{"value":60,"source":47,"evidence":61},"Allow developers to build extendable programs in Go with JS plugins without compiling",[62],{"id":50,"by":11,"text":51},[64,68,72],{"value":65,"source":47,"evidence":66},"Go",[67],{"id":53,"by":11,"text":54},{"value":69,"source":47,"evidence":70},"JavaScript",[71],{"id":50,"by":11,"text":51},{"value":73,"source":47,"evidence":74},"Duktape",[75],{"id":76,"by":11,"text":77},"9726829","v8worker, was one of the evaluated projects, but V8 is not very fast compiling... takes several mins. With go-duktape, you can compile CandyJS just lake a normal Go package…","unknown",{"praise":80,"objections":93,"requests":105,"questions":113,"alternatives":127},[81],{"value":82,"source":83,"evidence":84},"Nice, simple project compared to earlier bridges","commenter",[85,89],{"id":86,"by":87,"text":88},"9725113","ivan4th","Nice project! One little remark: I see you're being slightly lazy and using JSON to save some value conversion work. One problem is that this is not very good from a performance…",{"id":90,"by":91,"text":92},"9724764","chrisfarms","I built a package to bridge spidermonkey\u002FGo last year[0]. I ended up doing most of the communication via JSON (after several less stable versions using reflect) which was fine…",[94,101],{"value":95,"source":83,"evidence":96},"JSON-based value conversion is slow and breaks on NaN values",[97,98],{"id":86,"by":87,"text":88},{"id":99,"by":87,"text":100},"9725615","Unfortunately NaN behavior seems to be hard-wired in encoding\u002Fjson code. The proper way to fix it is perhaps taking encoding\u002Fjson sources and converting marshalling\u002Funmarshalling…",{"value":102,"source":47,"evidence":103},"Roughly 4.5 times slower than pure Go due to reflection cost",[104],{"id":50,"by":11,"text":51},[106],{"value":107,"source":83,"evidence":108},"Explain why Go methods are exposed with camelCase names",[109],{"id":110,"by":111,"text":112},"9724714","manucorporat","cool! why and how are the Go methods called with camelcase names? ``` var engine = gin.default(); engine.get(\"\u002Fback\", CandyJS.proxy(function(ctx) { var future = time.date(2015,…",[114,121],{"value":115,"source":83,"evidence":116},"Why Duktape instead of a V8 binding like v8worker",[117],{"id":118,"by":119,"text":120},"9726196","tav","Great work! But is there any reason that you didn't build on top of the really nice V8 binding https:\u002F\u002Fgithub.com\u002Fry\u002Fv8worker instead of Duktape?",{"value":122,"source":83,"evidence":123},"Do pooled contexts share state",[124],{"id":125,"by":11,"text":126},"9725097","Hi Chris, thanks for your support. Your packages looks like very interesting, I couldn't find it before. About the pool of workers, they share the stack? Or how you keep the same…",[128,132,136],{"value":129,"source":83,"evidence":130},"go-duktape \u002F spidermonkey bridge by chrisfarms",[131],{"id":90,"by":91,"text":92},{"value":133,"source":83,"evidence":134},"v8worker",[135],{"id":118,"by":119,"text":120},{"value":137,"source":47,"evidence":138},"lazlo chat bot plugin system",[139],{"id":50,"by":11,"text":51},{"comments":31,"answered":42,"key":141},[142,143,144],{"id":53,"text":54},{"id":125,"text":126},{"id":50,"text":51},{"commenters":146,"max_depth":42,"maker_replies":31,"first_comment_mins":147,"lifespan_hours":148},6,16,7,[150,152,154,156,158,160,163,167,170,173,175,176,177,179,182],[86,32,30,151,87,32],"project\u002Fcritical\u002Fperformance",[53,32,32,153,11,30],"maker\u002Fneutral\u002Fdesign",[99,32,30,155,87,32],"project\u002Fcritical\u002Fexecution",[90,30,31,157,91,32],"project\u002Fpositive\u002Fidea",[125,30,32,159,11,30],"commenter\u002Fneutral\u002Fnone",[161,30,42,162,91,32],"9725161","project\u002Fneutral\u002Fdesign",[164,33,32,165,166,32],"9725013","other\u002Fneutral\u002Fidea","nathan_f77",[168,33,42,169,87,32],"9725062","project\u002Fneutral\u002Fidea",[171,33,32,172,166,32],"9725077","commenter\u002Fpositive\u002Fnone",[50,33,32,174,11,30],"project\u002Fneutral\u002Fperformance",[118,42,42,162,119,32],[76,42,32,162,11,30],[110,178,42,162,111,32],4,[180,178,32,181,11,30],"9724743","project\u002Fneutral\u002Fdocs",[183,178,42,184,111,32],"9724793","maker\u002Fneutral\u002Fdocs",[],[187,192,196,201,206,211],{"id":188,"name":189,"points":190,"category":191},"9705446","Retroospect",221,"productivity",{"id":193,"name":194,"points":195,"category":19},"9707190","Readlang",178,{"id":197,"name":198,"points":199,"category":200},"9706949","kolodny\u002Fexercises",127,"learning_science",{"id":202,"name":203,"points":204,"category":205},"9706633","marklib",93,"dev_tools",{"id":207,"name":208,"points":209,"category":210},"9727186","Cloudstitch",84,"web_saas",{"id":212,"name":213,"points":14,"category":205},"9710958","Tota11y",false,"v2",{"id":217,"name":5,"line":6,"ai":214,"cat":19,"year":13,"points":14,"comments":15,"rec":27,"s":218,"top":15,"kw":219,"maker":11,"domain":10,"tier":18,"attempts":32,"strip":220,"url":9,"mix":221,"praise":82,"objection":95,"sub":20},9724658,-0.01,[23,24,25,26],"101503030030303",[30,31,32,33],1793990926102]