[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"project-28636540":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":85,"maker_in_thread":179,"shape":187,"grid":192,"attempts":297,"same_week":298,"maker_shows":274,"maker_hidden":326,"reader_version":327,"card":328},"28636540","Go Playground WASM","Go playground powered by WASM that runs in the browser","title","Show HN: Go playground powered by WASM that runs in the browser","https:\u002F\u002Fgo-playground-wasm.vercel.app\u002F","go-playground-wasm.vercel.app","zackoverflow",1632437260,2021,140,41,364,2533,15,"notable","dev_tools","online code playground","web_app",[24,25,26,27],"go playground","webassembly","goscript","browser go interpreter","curious",0.014,{"positive":31,"neutral":32,"mixed":33,"critical":31},3,7,0,13,{"idea":36,"execution":38,"performance":39,"design":40},{"positive":33,"critical":37},1,{"positive":37,"critical":37},{"positive":37,"critical":33},{"positive":33,"critical":37},[33,37,33,33,33,33,31,33,31,42,31,37,33,42,31,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,31,37,31,31,42],5,null,{"problem":45,"audience":52,"pricing":43,"motivation":60,"time_to_build":43,"stack":65,"openness":82,"stage":83,"team_size":84},{"value":46,"source":47,"evidence":48},"Running Go code in the browser without a local toolchain","inferred",[49],{"id":50,"by":11,"text":51},"28636663","This is a little experiment demonstrating the capabilities of the goscript project (https:\u002F\u002Fgithub.com\u002Foxfeeefeee\u002Fgoscript) by compiling it to wasm. Here's the source code…",{"value":53,"source":47,"evidence":54},"Go programmers wanting to try code quickly",[55,56],{"id":50,"by":11,"text":51},{"id":57,"by":58,"text":59},"28641512","lanecwagner","awesome! I made one just like it about a year ago: https:\u002F\u002Fapp.qvault.io\u002Fplayground\u002Fgo it actually powers some of the courses in go that I've written as well",{"value":61,"source":62,"evidence":63},"Demonstrate goscript capabilities by compiling it to wasm","maker",[64],{"id":50,"by":11,"text":51},[66,70,78],{"value":67,"source":62,"evidence":68},"Go",[69],{"id":50,"by":11,"text":51},{"value":71,"source":72,"evidence":73},"Rust","commenter",[74],{"id":75,"by":76,"text":77},"28639718","lelandbatey","From looking at it for like 20 seconds (I ain't no serious rustacean, so forgive if I'm wrong) I think they're using just a growable pool (as vectors) of each fundamental type in…",{"value":79,"source":62,"evidence":80},"WebAssembly",[81],{"id":50,"by":11,"text":51},"open_source","prototype","unknown",{"praise":86,"objections":105,"requests":122,"questions":134,"alternatives":149},[87,98],{"value":88,"source":72,"evidence":89},"Fast execution",[90,94],{"id":91,"by":92,"text":93},"28638737","orsenthil","How come this is so fast? I feel like the processing faster than I would get on an native compiled and run program. Are there any benchmarks?",{"id":95,"by":96,"text":97},"28639712","sudhirj","Speculation here, but I think WASM lends itself very well to JIT compilation, and V8 has one of the best compiler teams in the world.",{"value":99,"source":72,"evidence":100},"Works after Safari fix",[101],{"id":102,"by":103,"text":104},"28637379","guessmyname","Perfect! The updated version works. Nice project. Thanks for sharing.",[106,115],{"value":107,"source":72,"evidence":108},"Safari i64\u002FBigInt error at launch",[109,112],{"id":110,"by":103,"text":111},"28637245","``` [Error] TypeError: i64 not allowed as return type or argument to an imported function [f] ut (framework-a4fd281a1981cd6d009d.js:1:16748) [f] mt…",{"id":113,"by":11,"text":114},"28638298","Couldn't find a list but I tested it on brave, chrome, firefox, safari and it was safari that was having troubles",{"value":116,"source":72,"evidence":117},"Output box too small to view results",[118],{"id":119,"by":120,"text":121},"28639553","zimpenfish","Having a bigger \u002F resizeable output box would help too - running the Fibonacci example, all I can see is \"0\" unless I manage to find the tiny box with its invisible boundary to…",[123,130],{"value":124,"source":72,"evidence":125},"Add line numbers to source view",[126],{"id":127,"by":128,"text":129},"28639090","jillesvangurp","Nice, maybe add some line numbers to the source view. Makes dealing with compile errors a bit easier.",{"value":131,"source":72,"evidence":132},"Resizable output box",[133],{"id":119,"by":120,"text":121},[135,145],{"value":136,"source":72,"evidence":137},"Which GC does goscript use",[138,142],{"id":139,"by":140,"text":141},"28637626","mappu","What GC is used in goscript? The upstream one, a Rust GC\u003C> one, maybe the mini one from TinyGo, or something else custom?",{"id":143,"by":11,"text":144},"28638283","I poked around earlier and found this file: https:\u002F\u002Fgithub.com\u002Foxfeeefeee\u002Fgoscript\u002Fblob\u002Fmaster\u002Fvm\u002Fsrc\u002Fgc.rs Perhaps someone can shed more light on how exactly it works",{"value":146,"source":72,"evidence":147},"Why is it so fast",[148],{"id":91,"by":92,"text":93},[150,154,161,168],{"value":151,"source":72,"evidence":152},"Go playground in qvault.io",[153],{"id":57,"by":58,"text":59},{"value":155,"source":72,"evidence":156},"yaegi REPL",[157],{"id":158,"by":159,"text":160},"28639524","chakkepolja","There's an REPL called yaegi, but it's pretty primitive (no autocompletion etc.. when I tried). There seems to be another interpreter that seems to be able to provide some…",{"value":162,"source":72,"evidence":163},"gomacro interpreter",[164],{"id":165,"by":166,"text":167},"28640155","gobookdev","I made this extension for VS Code that also saves the outputs to markdown, so you can save it straight to blog posts:…",{"value":169,"source":72,"evidence":170},"TinyGo",[171,175],{"id":172,"by":173,"text":174},"28638170","todd3834","I wonder how tinygo works for wasm. I’m not sure how much of the bloat is runtime (which I assume is smallish) vs how much of the standard library is just included by default.",{"id":176,"by":177,"text":178},"28638437","justinclift","Tinygo produces very small binaries (kb rather than mb), through using the LLVM tool chain (which does tree shaking), and only (presently) supporting a subset of the standard…",{"comments":42,"answered":180,"key":181},2,[182,183,184],{"id":50,"text":51},{"id":143,"text":144},{"id":185,"text":186},"28637344","Thanks, this is a problem with some browsers not supporting BigInt \u003C-> Wasm i64 conversion, I just made some changes that should fix it",{"commenters":188,"max_depth":189,"maker_replies":42,"first_comment_mins":190,"lifespan_hours":191},32,6,12,31,[193,195,199,203,206,209,212,214,216,217,219,221,223,225,226,230,231,233,236,240,243,246,247,249,251,252,256,257,258,261,264,267,269,272,276,279,281,283,285,286,289,294],[50,33,33,194,11,37],"project\u002Fneutral\u002Fidea",[196,33,37,197,198,33],"28637146","project\u002Fcritical\u002Fidea","chabad360",[200,33,33,201,202,33],"28637235","other\u002Fneutral\u002Fnone","edoceo",[204,33,33,201,205,33],"28641031","rdrey",[207,33,33,201,208,33],"28641960","zxcvbn4038",[210,33,33,201,211,33],"28643566","InvaderFizz",[139,33,31,213,140,33],"project\u002Fneutral\u002Fexecution",[143,33,33,215,11,37],"maker\u002Fneutral\u002Fdocs",[75,33,31,213,76,33],[91,33,42,218,92,33],"project\u002Fpositive\u002Fperformance",[95,33,31,220,96,33],"project\u002Fneutral\u002Fperformance",[110,37,37,222,103,33],"project\u002Fcritical\u002Fexecution",[185,37,33,224,11,37],"maker\u002Fpositive\u002Fexecution",[102,37,42,224,103,33],[227,37,31,228,229,33],"28637602","maker\u002Fneutral\u002Fexecution","ffhhj",[113,37,33,228,11,37],[232,37,33,201,229,33],"28638371",[234,37,33,201,235,33],"28640374","CryZe",[237,37,33,238,239,33],"28639560","commenter\u002Fneutral\u002Fnone","AlexAndScripts",[241,180,33,201,242,33],"28638715","gizdan",[244,180,33,201,245,33],"28638971","stonewareslord",[158,180,33,201,159,33],[248,180,33,201,242,33],"28640607",[250,180,33,201,159,33],"28650929",[165,180,33,201,166,33],[253,31,33,254,255,33],"28638108","other\u002Fneutral\u002Fperformance","whoisjohnkid",[172,31,33,254,173,33],[176,31,33,254,177,33],[259,31,33,201,260,33],"28641294","pjmlp",[262,31,33,254,263,33],"28638181","kjksf",[265,31,33,254,266,33],"28638981","slimsag",[268,31,33,201,255,33],"28641032",[270,31,33,201,271,33],"28642030","singularity2001",[273,274,33,201,275,33],"28642431",4,"zz865",[277,274,33,201,278,33],"28642566","kaoD",[280,274,33,201,275,33],"28643882",[127,42,31,282,128,33],"project\u002Fneutral\u002Fdesign",[119,42,37,284,120,33],"project\u002Fcritical\u002Fdesign",[57,189,31,194,58,33],[287,32,31,282,288,33],"28650717","8eye",[290,291,42,292,293,33],"28637467",8,"maker\u002Fpositive\u002Fnone","fsckboy",[295,291,33,296,11,37],"28638303","maker\u002Fneutral\u002Fnone",[],[299,303,308,312,317,322],{"id":300,"name":301,"points":302,"category":20},"28670252","Tidy Viewer",392,{"id":304,"name":305,"points":306,"category":307},"28680136","Extract Table",217,"data",{"id":309,"name":310,"points":311,"category":20},"28669703","SQLite Playground",213,{"id":313,"name":314,"points":315,"category":316},"28697828","Ampie",194,"productivity",{"id":318,"name":319,"points":320,"category":321},"28683231","Firezone",183,"infrastructure",{"id":323,"name":324,"points":325,"category":316},"28627374","Lucky Resume Maker",119,false,"v2",{"id":329,"name":5,"line":6,"ai":326,"cat":20,"year":13,"points":14,"comments":15,"rec":28,"s":330,"top":18,"kw":331,"maker":11,"domain":10,"tier":19,"attempts":33,"strip":332,"url":9,"mix":333,"praise":88,"objection":107,"sub":21},28636540,0.01,[24,25,26,27],"0100003035310530000000000000000000031335",[31,32,33,31],1794036611572]