[{"data":1,"prerenderedAt":484},["ShallowReactive",2],{"project-8893593":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":5,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":27,"sentiment":28,"stance_mix":29,"scored_comments":33,"aspects":34,"strip":41,"post_text":44,"what":45,"said":77,"maker_in_thread":182,"shape":184,"grid":189,"attempts":446,"same_week":447,"maker_shows":30,"maker_hidden":476,"reader_version":477,"card":478},"8893593","duoco.de","C#-to-JavaScript compiler powered by Microsoft Roslyn","title","Show HN: C#-to-JavaScript compiler powered by Microsoft Roslyn","http:\u002F\u002Fduoco.de","DuoCode",1421340857,2015,155,96,130,2565,6,"notable","languages","c# to javascript compiler","library",[23,24,25,26],"c# to javascript","roslyn","javascript compiler","transpiler","curious",-0.235,{"positive":30,"neutral":31,"mixed":32,"critical":17},1,12,0,19,{"execution":35,"idea":37,"performance":39,"design":40},{"positive":32,"critical":36},4,{"positive":30,"critical":38},2,{"positive":32,"critical":32},{"positive":32,"critical":32},[32,32,30,32,32,32,30,30,32,42,32,32,32,42,42,32,32,32,42,42,32,32,30,32,42,30,43,42,32,32,32,32,32,30,32,32,32,32,32,32],3,5,null,{"problem":46,"audience":52,"pricing":44,"motivation":44,"time_to_build":44,"stack":59,"openness":76,"stage":76,"team_size":76},{"value":47,"source":48,"evidence":49},"Writing web client code in C# instead of JavaScript","inferred",[50],{"id":51},"post",{"value":53,"source":48,"evidence":54},"C# developers targeting the browser",[55],{"id":56,"by":57,"text":58},"8893878","Scarbutt","So is this a Microsoft project? they don't directly say it, but they try to make it sound as it is: \"DuoCode is an alternative compiler, powered by Microsoft® Roslyn, and…",[60,65,69],{"value":61,"source":62,"evidence":63},"C#","commenter",[64],{"id":56,"by":57,"text":58},{"value":66,"source":62,"evidence":67},"Microsoft Roslyn",[68],{"id":56,"by":57,"text":58},{"value":70,"source":62,"evidence":71},"JavaScript",[72],{"id":73,"by":74,"text":75},"8893943","urvader","``` \u002F\u002F JavaScript code generated by DuoCode GetBestMove = function(board, player, winner) ``` That line will garbage the global scope..","unknown",{"praise":78,"objections":90,"requests":117,"questions":132,"alternatives":151},[79],{"value":80,"source":62,"evidence":81},"Looks great and is a cool use of Roslyn",[82,86],{"id":83,"by":84,"text":85},"8893829","WhitneyLand","Well done. I like it but I'm not sure what my use case would be. I mean, if I wanted a cross compile language upgrade how do you decide between something like this and ES6? Also,…",{"id":87,"by":88,"text":89},"8897103","elwell","Cool to see the open-sourcing of Microsoft code already being put to use.",[91,102,113],{"value":92,"source":62,"evidence":93},"Debugging and maintaining generated JS is hard; use TypeScript instead",[94,98],{"id":95,"by":96,"text":97},"8894481","bkjelden","I would encourage anyone looking at a C# to javascript compiler to check out typescript first. I've seen projects use a compiler similar to this, and while writing C# sounds…",{"id":99,"by":100,"text":101},"8894869","jtwebman","I don't find writing JavaScript to be that hard. I don't get all of these compilers like this one, CoffeeScript, and TypeScript. Are people really that lazy that they can't spend…",{"value":103,"source":62,"evidence":104},"Script# and similar tools already exist and were not adopted",[105,109],{"id":106,"by":107,"text":108},"8897618","anprak","Script# has existed for years and heavily used inside Microsoft. Even with that, it was not adopted as a tool for programming JavaScript in Visual Studio. If you need to code…",{"id":110,"by":111,"text":112},"8894915","xenadu02","This isn't new. Microsoft had an unofficial project for a while called Script# (script sharp) that did the same thing. I think they rightly decided it was a better idea to…",{"value":114,"source":62,"evidence":115},"Generated global scope pollution",[116],{"id":73,"by":74,"text":75},[118,125],{"value":119,"source":62,"evidence":120},"Open-source the code",[121],{"id":122,"by":123,"text":124},"8894124","bad_user","I love this trend of building compilers for existing languages that target Javascript. Other 2 languages with fully functional Javascript compilers that are worth checking out: -…",{"value":126,"source":62,"evidence":127},"Support for reflection",[128],{"id":129,"by":130,"text":131},"8893918","rdwallis","In gwt, reflection isn't supported because it makes it hard for the compiler to do dead code elimination. Supporting reflection might make it difficult to reduce the compile size…",[133,137,144],{"value":134,"source":62,"evidence":135},"Is this a Microsoft project?",[136],{"id":56,"by":57,"text":58},{"value":138,"source":62,"evidence":139},"Can C# classes be called from hand-written JS?",[140],{"id":141,"by":142,"text":143},"8893875","mwcampbell","Can C# classes compiled in this way be exposed to JS, so the main program can be in JS with libraries compiled from C#? Or is it assumed that the main program is in C#?",{"value":145,"source":62,"evidence":146},"How are passed functions and callbacks handled?",[147],{"id":148,"by":149,"text":150},"8893803","Osiris","I'm curious how this handles the very common case of passing functions as parameters in JavaScript. I know it's possible in C# but it's much more difficult to do. JavaScript is a…",[152,157,164,171,178],{"value":153,"source":62,"evidence":154},"TypeScript",[155,156],{"id":95,"by":96,"text":97},{"id":110,"by":111,"text":112},{"value":158,"source":62,"evidence":159},"SharpKit",[160],{"id":161,"by":162,"text":163},"8894456","j_s","SharpKit has a 3+ year head-start selling and supporting their solution (available commercially and under GPL3). I have no doubt they have considered transitioning to Roslyn as…",{"value":165,"source":62,"evidence":166},"Saltarelle",[167],{"id":168,"by":169,"text":170},"8894268","dested","I am a huge fan of Saltarelle [1], which has the save level of support as this project. The only thing it seems to be lacking is proper source mapping abilities, which is…",{"value":172,"source":62,"evidence":173},"Script#",[174],{"id":175,"by":176,"text":177},"8893948","danbruc","There is also Script# [1] which unfortunately seems to be no longer maintained. Even the domain of the homepage expired at the end of 2014. I used it for a couple of toy projects…",{"value":179,"source":62,"evidence":180},"ScalaJS and ClojureScript",[181],{"id":122,"by":123,"text":124},{"comments":32,"answered":32,"key":183},[],{"commenters":185,"max_depth":186,"maker_replies":32,"first_comment_mins":187,"lifespan_hours":188},62,8,27,35,[190,192,196,200,203,206,210,214,217,220,223,225,228,230,232,233,236,239,243,245,249,252,254,257,259,262,265,268,270,273,275,278,281,283,286,288,291,293,295,297,300,304,308,311,314,315,318,320,322,325,327,329,331,334,337,340,342,343,345,349,352,354,358,361,366,368,371,374,377,379,382,385,388,390,393,396,398,400,403,405,407,410,412,415,417,420,423,426,428,430,432,434,437,439,442,444],[95,32,32,191,96,32],"commenter\u002Fcritical\u002Fidea",[193,32,32,194,195,32],"8894512","commenter\u002Fneutral\u002Fidea","JeremyMorgan",[197,32,32,198,199,32],"8894538","commenter\u002Fneutral\u002Fnone","nawitus",[201,32,32,198,202,32],"8894847","judah",[204,32,32,198,205,32],"8896541","TazeTSchnitzel",[207,32,42,208,209,32],"8895333","project\u002Fneutral\u002Fexecution","_mtr",[211,32,30,212,213,32],"8896390","project\u002Fcritical\u002Fexecution","jahewson",[215,32,32,198,216,32],"8895753","_random_",[218,32,32,198,219,32],"8895897","solomatov",[221,32,32,198,222,32],"8896818","novaleaf",[224,32,32,198,222,32],"8896811",[226,32,32,194,227,32],"8895876","avodonosov",[229,32,32,194,96,32],"8900494",[161,30,32,231,162,32],"other\u002Fneutral\u002Fidea",[73,38,30,212,74,32],[234,38,42,208,235,32],"8894176","matchu",[237,38,30,212,238,32],"8895619","skrebbel",[240,38,42,241,242,32],"8896248","project\u002Fneutral\u002Fnone","wesnerm2",[244,38,32,198,235,32],"8903292",[246,38,32,247,248,32],"8894311","commenter\u002Fneutral\u002Fexecution","Touche",[250,38,32,247,251,32],"8894727","igl",[122,42,32,253,123,32],"other\u002Fmixed\u002Fnone",[255,42,42,256,57,32],"8894324","project\u002Fneutral\u002Fidea",[258,42,32,198,123,32],"8894765",[260,42,32,261,251,32],"8894366","other\u002Fneutral\u002Fperformance",[263,42,32,264,123,32],"8894733","commenter\u002Fneutral\u002Fperformance",[266,42,32,264,267,32],"8894895","jnbiche",[269,42,32,198,123,32],"8895349",[271,42,32,264,272,32],"8895923","comex",[274,42,32,264,123,32],"8898300",[276,42,32,277,162,32],"8894482","other\u002Fneutral\u002Fnone",[279,42,32,277,280,32],"8895387","sremani",[129,36,42,282,130,32],"project\u002Fneutral\u002Fperformance",[284,36,42,208,285,32],"8894188","SigmundA",[287,36,32,198,130,32],"8894317",[289,36,32,247,290,32],"8895081","JamesXNelson",[292,36,32,277,290,32],"8895065",[294,36,32,198,130,32],"8895338",[296,36,32,277,290,32],"8895504",[298,36,32,277,299,32],"8896067","cromwellian",[301,43,32,302,303,32],"8897777","other\u002Fcritical\u002Fidea","nercury",[305,43,32,306,307,32],"8897851","other\u002Fcritical\u002Fnone","CmonDev",[309,17,32,277,310,32],"8898104","tosh",[312,313,42,282,57,32],"8894167",7,[83,186,42,256,84,32],[316,186,32,277,317,32],"8893939","Sanddancer",[168,319,32,277,169,32],9,[56,321,42,241,57,32],10,[323,321,32,198,324,32],"8893897","slg",[326,321,32,198,57,32],"8893923",[328,321,32,198,317,32],"8893961",[330,321,32,198,324,32],"8893965",[332,321,32,277,333,32],"8893908","Someone1234",[335,321,32,198,336,32],"8893976","bunderbunder",[106,338,30,339,107,32],11,"project\u002Fcritical\u002Fidea",[341,338,32,306,307,32],"8897861",[175,31,32,277,176,32],[110,344,42,256,111,32],13,[346,347,32,231,348,32],"8894018",14,"kingmanaz",[350,347,32,302,351,32],"8894762","JustSomeNobody",[353,347,32,198,290,32],"8895524",[355,356,30,212,357,32],"8894457",15,"h43k3r",[141,359,42,360,142,32],16,"project\u002Fneutral\u002Fdesign",[362,363,43,364,365,32],"8894205",17,"project\u002Fpositive\u002Fidea","hougaard",[148,367,42,360,149,32],18,[369,367,32,198,370,32],"8893819","grokys",[372,367,32,198,373,32],"8893828","recursive",[375,367,32,198,376,32],"8893858","rjbwork",[378,367,32,198,370,32],"8893879",[380,367,32,198,381,32],"8893921","kozhevnikov",[383,367,32,198,384,32],"8896140","jacabado",[386,367,32,198,387,32],"8897658","Gurkenmaster",[389,367,32,198,376,32],"8893972",[391,367,32,198,392,32],"8893982","antihero",[394,367,32,277,395,32],"8895166","dguaraglia",[397,367,32,277,392,32],"8898730",[399,367,32,198,149,32],"8894899",[401,367,32,198,402,32],"8895055","jaked89",[87,33,32,404,88,32],"other\u002Fpositive\u002Fnone",[99,406,30,339,100,32],20,[408,406,32,194,409,32],"8894897","justathrow2k",[411,406,32,194,100,32],"8894995",[413,406,32,198,414,32],"8895048","munificent",[416,406,32,198,409,32],"8895131",[418,406,32,277,419,32],"8895410","aquark",[421,406,32,422,100,32],"8895607","commenter\u002Fpositive\u002Fnone",[424,406,32,194,425,32],"8895605","fsloth",[427,406,32,198,100,32],"8895628",[429,406,32,198,425,32],"8897580",[431,406,32,198,387,32],"8897645",[433,406,32,198,425,32],"8898353",[435,406,32,198,436,32],"8895172","px1999",[438,406,32,198,100,32],"8895596",[440,406,32,198,441,32],"8895986","aquadrop",[443,406,32,198,436,32],"8896078",[445,406,32,422,100,32],"8896205",[],[448,453,457,461,466,471],{"id":449,"name":450,"points":451,"category":452},"8907801","dogmedicationdb",252,"infrastructure",{"id":454,"name":455,"points":456,"category":452},"8923092","switcher",165,{"id":458,"name":459,"points":460,"category":19},"8911217","Silicon",140,{"id":462,"name":463,"points":464,"category":465},"8893238","Timeline.com",123,"productivity",{"id":467,"name":468,"points":469,"category":470},"8918463","Griddle",122,"dev_tools",{"id":472,"name":473,"points":474,"category":475},"8923824","tld-list.com",101,"web_saas",false,"v2",{"id":479,"name":5,"line":6,"ai":476,"cat":19,"year":12,"points":13,"comments":14,"rec":27,"s":480,"top":17,"kw":481,"maker":10,"domain":5,"tier":18,"attempts":32,"strip":482,"url":9,"mix":483,"praise":80,"objection":92,"sub":20},8893593,-0.23,[23,24,25,26],"0010001103000330003300103153000001000000",[30,31,32,17],1794036527401]