[{"data":1,"prerenderedAt":359},["ShallowReactive",2],{"project-17083941":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":35,"aspects":36,"strip":41,"post_text":42,"what":43,"said":79,"maker_in_thread":155,"shape":166,"grid":170,"attempts":321,"same_week":322,"maker_shows":157,"maker_hidden":351,"reader_version":352,"card":353},"17083941","mvdan-sh","A complete Bash parser in JavaScript transpiled from Go","title","Show HN: A complete Bash parser in JavaScript transpiled from Go","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fmvdan-sh","npmjs.com","mvdan",1526489359,2018,89,69,491,2155,23,"notable","dev_tools","shell parser","library",[24,25,26,27,28],"bash parser","javascript","go","transpiler","shell","curious",-0.278,{"positive":32,"neutral":33,"mixed":32,"critical":34},0,5,3,8,{"idea":37,"design":39,"docs":40},{"positive":32,"critical":38},1,{"positive":32,"critical":32},{"positive":32,"critical":38},[32,32,32,34,34,34,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,32,38,34,38,32,38],null,{"problem":44,"audience":42,"pricing":42,"motivation":54,"time_to_build":42,"stack":58,"openness":77,"stage":78,"team_size":78},{"value":45,"source":46,"evidence":47},"Parsing Bash scripts in JavaScript","maker",[48,51],{"id":49,"by":11,"text":50},"17085080","This is hacky, but it beats having to write a shell parser from scratch again :) Once wasm support is shipped with Go, I hope to be able to accomplish the same without a…",{"id":52,"by":11,"text":53},"17090397","Yep, I've exchanged a few emails with Andy before, the oilshell author. I started the parser in early 2016, so we were both getting started around the same time. If you look at…",{"value":55,"source":46,"evidence":56},"Avoid writing a shell parser from scratch again",[57],{"id":49,"by":11,"text":50},[59,67,71],{"value":60,"source":46,"evidence":61},"Go",[62,64],{"id":63},"post",{"id":65,"by":11,"text":66},"17084260","I'm not very familiar with JavaScript and npm - looking for suggestions on how to make the package easier to use.",{"value":68,"source":46,"evidence":69},"JavaScript",[70],{"id":63},{"value":72,"source":46,"evidence":73},"gopherjs",[74],{"id":75,"by":11,"text":76},"17085054","Thanks for the suggestions! I'll need to read up on these js\u002Fnode features. One reason that the API is a bit clunky is that it tries to mimic the Go API closely, so that the…","open_source","unknown",{"praise":80,"objections":100,"requests":116,"questions":135,"alternatives":150},[81,93],{"value":82,"source":83,"evidence":84},"Funny, enjoyable headline","commenter",[85,89],{"id":86,"by":87,"text":88},"17085418","munificent","This headline reads like a Markov chain trained to generate Hacker News posts. I love it.",{"id":90,"by":91,"text":92},"17087341","alistproducer2","Hilarious because it's true. This is my favorite comment of the day.",{"value":94,"source":83,"evidence":95},"Love the idea",[96],{"id":97,"by":98,"text":99},"17090040","hestefisk","Love this. Ironic that it is BSD licensed though, considering it parses and runs the world’s probably most popular piece of GPL’ed software (probably second to Linux).",[101,112],{"value":102,"source":83,"evidence":103},"Transpiled JS is large and bloated",[104,108],{"id":105,"by":106,"text":107},"17087168","solarkraft","Luckily the current creation isn't already one.",{"id":109,"by":110,"text":111},"17084719","ClassAndBurn","And now my head hurts.",{"value":113,"source":83,"evidence":114},"Licensing concern: BSD license for a tool parsing GPL software",[115],{"id":97,"by":98,"text":99},[117,128],{"value":118,"source":83,"evidence":119},"More JavaScript-friendly API and documentation with examples",[120,124],{"id":121,"by":122,"text":123},"17084963","crooked-v","Some general thoughts, which may or may not be practical depending on how the transpiling works (I have no idea about go): - Instead of calling .Print(), have the class extend…",{"id":125,"by":126,"text":127},"17089229","z3t4","Thanks for the package! When it comes to JavaScript - the code is the documentation. You look up methods etc in the source code. But as this is 30k lines of generated code it's…",{"value":129,"source":83,"evidence":130},"Use streams and EventEmitter instead of string returns",[131,132],{"id":121,"by":122,"text":123},{"id":133,"by":122,"text":134},"17087075","To help, the short version on \"why\" for EventEmitter, streams, and Promises is that they're three different ways of doing things asynchronously, with different use cases and…",[136,143],{"value":137,"source":83,"evidence":138},"Could it be transpiled to pure Bash",[139],{"id":140,"by":141,"text":142},"17085502","ddtaylor","Not that it's useful or desired, but could one transpile it into pure bash as well? It's Turing complete isn't it?",{"value":144,"source":83,"evidence":145},"Whether a Bash parser is undecidable",[146],{"id":147,"by":148,"text":149},"17087290","Zalastax","An important heads up: \"Parsing Bash is Undecidable\". https:\u002F\u002Fwww.oilshell.org\u002Fblog\u002F2016\u002F10\u002F20.html",[151],{"value":152,"source":83,"evidence":153},"Oil shell parser",[154],{"id":147,"by":148,"text":149},{"comments":156,"answered":157,"key":158},12,2,[159,162,163],{"id":160,"text":161},"17085438","I hope noone notices that most of my code was written by a Markov chain.",{"id":52,"text":53},{"id":164,"text":165},"17086653","I'm not sure I understand what you're saying. If there was a Go->Bash transpiler (or a JS->Bash one), yes, we would theoretically end up with a Bash parser and interpreter in…",{"commenters":167,"max_depth":168,"maker_replies":156,"first_comment_mins":169,"lifespan_hours":167},25,13,27,[171,173,175,176,179,182,184,185,186,187,189,191,195,197,200,202,204,206,208,210,212,214,216,219,221,223,225,228,231,233,236,238,240,242,244,246,249,251,253,255,257,259,262,264,266,268,270,273,275,278,280,282,284,286,288,291,294,295,296,297,299,301,304,306,308,311,313,316,319],[86,32,32,172,87,32],"commenter\u002Fneutral\u002Fnone",[160,32,32,174,11,38],"maker\u002Fneutral\u002Fnone",[90,32,32,172,91,32],[177,32,32,172,178,32],"17087454","tlrobinson",[180,32,32,172,181,32],"17090599","gargravarr",[147,38,34,183,148,32],"project\u002Fneutral\u002Fidea",[52,38,32,174,11,38],[140,157,34,183,141,32],[164,157,32,174,11,38],[105,157,34,188,106,32],"project\u002Fneutral\u002Fnone",[190,157,32,174,11,38],"17090477",[192,34,32,193,194,32],"17085751","other\u002Fneutral\u002Fnone","monocasa",[196,34,32,193,11,38],"17086678",[198,34,32,193,199,32],"17086824","fiddlerwoaroof",[201,34,32,193,178,32],"17087271",[203,34,32,193,194,32],"17087345",[205,34,32,193,178,32],"17087384",[207,34,32,193,194,32],"17087567",[209,34,32,193,178,32],"17087630",[211,34,32,172,194,32],"17087806",[213,34,32,172,178,32],"17088143",[215,34,32,172,194,32],"17088309",[217,34,32,193,218,32],"17088561","Stratoscope",[220,34,32,193,178,32],"17088633",[222,34,32,172,218,32],"17088912",[224,34,32,193,194,32],"17086833",[226,34,32,193,227,32],"17086887","sigjuice",[229,34,32,193,230,32],"17087094","sakuronto",[232,34,32,193,194,32],"17087172",[234,34,32,193,235,32],"17087488","svnsets",[237,34,32,193,194,32],"17087564",[239,34,32,193,227,32],"17087936",[241,34,32,193,178,32],"17087257",[243,34,32,193,194,32],"17087310",[245,34,32,193,178,32],"17087336",[247,34,32,193,248,32],"17087616","omeid2",[250,34,32,193,194,32],"17087870",[252,34,32,193,178,32],"17088195",[254,34,32,193,227,32],"17088056",[256,34,32,174,11,38],"17087043",[258,34,32,193,194,32],"17087070",[260,34,32,193,261,32],"17089978","iforgotpassword",[263,34,32,193,235,32],"17093345",[265,34,32,172,178,32],"17087267",[267,34,32,172,194,32],"17087333",[269,34,32,172,178,32],"17087439",[271,34,32,172,272,32],"17087469","chrisseaton",[274,34,32,172,194,32],"17087572",[276,34,32,193,277,32],"17087887","badsectoracula",[279,34,32,193,194,32],"17087938",[281,34,32,172,277,32],"17090588",[283,34,32,172,272,32],"17087930",[285,34,32,172,194,32],"17088351",[287,34,32,172,272,32],"17090184",[289,34,32,193,290,32],"17089808","boomlinde",[65,292,32,293,11,38],4,"maker\u002Fneutral\u002Fdesign",[121,292,34,293,122,32],[75,292,32,293,11,38],[133,292,32,172,122,32],[298,292,32,293,11,38],"17090442",[125,292,38,300,126,32],"project\u002Fcritical\u002Fdocs",[302,292,32,303,11,38],"17090467","project\u002Fneutral\u002Fdocs",[305,292,34,303,126,32],"17090540",[109,33,38,307,110,32],"project\u002Fcritical\u002Fnone",[309,33,32,193,310,32],"17084858","knodi",[49,33,32,312,11,38],"project\u002Fneutral\u002Fperformance",[314,33,32,193,315,32],"17085526","JepZ",[97,317,38,318,98,32],6,"project\u002Fcritical\u002Fidea",[320,317,32,174,11,38],"17090374",[],[323,328,333,338,343,347],{"id":324,"name":325,"points":326,"category":327},"17080985","The Curious Expedition",458,"games",{"id":329,"name":330,"points":331,"category":332},"17049602","Strimpack",249,"infrastructure",{"id":334,"name":335,"points":336,"category":337},"17065264","rayshader",198,"creative",{"id":339,"name":340,"points":341,"category":342},"17064056","meethub",175,"web_saas",{"id":344,"name":345,"points":346,"category":337},"17081586","Screely",121,{"id":348,"name":349,"points":350,"category":332},"17060272","Peerdium",115,false,"v2",{"id":354,"name":5,"line":6,"ai":351,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":355,"top":18,"kw":356,"maker":11,"domain":10,"tier":19,"attempts":32,"strip":357,"url":9,"mix":358,"praise":82,"objection":102,"sub":21},17083941,-0.28,[24,25,26,27,28],"0003330000000000000000000000000003013101",[32,33,32,34],1793990974324]