[{"data":1,"prerenderedAt":164},["ShallowReactive",2],{"project-11646071":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":33,"aspects":34,"strip":37,"post_text":30,"what":38,"said":56,"maker_in_thread":97,"shape":108,"grid":110,"attempts":124,"same_week":129,"maker_shows":156,"maker_hidden":157,"reader_version":158,"card":159},"11646071","Xo","A sed-like command line utility that composes regex matches","title","Show HN: Xo, a sed-like command line utility that composes regex matches","https:\u002F\u002Fgithub.com\u002Fezekg\u002Fxo","github.com","ezekg",1462562046,2016,8,7,1991,2264,88,"shown","dev_tools","command line text processing","cli",[24,25,26,27,28],"regex","sed alternative","command line","go regular expressions","text processing","quiet",null,{"positive":32,"neutral":33,"mixed":32,"critical":32},0,3,{"performance":35,"idea":36},{"positive":32,"critical":32},{"positive":32,"critical":32},[33,32,33,32,33,32,32],{"problem":39,"audience":30,"pricing":30,"motivation":30,"time_to_build":30,"stack":48,"openness":55,"stage":55,"team_size":55},{"value":40,"source":41,"evidence":42},"Pipes text through regex matches with replacement formatting, similar to sed","maker",[43,45],{"id":44},"post",{"id":46,"by":11,"text":47},"11646074","Some fun examples of what you can do with `xo`, Hello world: ``` echo 'Hello! My name is C3PO, human cyborg relations.' | xo '\u002F^(\\w+)! my name is (\\w+)\u002F$1, $2!\u002Fi' # => Hello,…",[49],{"value":50,"source":41,"evidence":51},"Go",[52],{"id":53,"by":11,"text":54},"11646138","Definitely performance. Go doesn't support negative\u002Fpositive lookaheads (for performance\u002Fefficiency reasons, apparently), so that's really the only downside I've found with Go's…","unknown",{"praise":57,"objections":63,"requests":74,"questions":75,"alternatives":87},[58],{"value":59,"source":60,"evidence":61},"Useful regex-based examples such as config parsing and fallback values","commenter",[62],{"id":46,"by":11,"text":47},[64],{"value":65,"source":60,"evidence":66},"Not line-oriented; reads full stdin before matching in some cases",[67,71],{"id":68,"by":69,"text":70},"11646843","voaie","Obviously it is not line-oriented. So the selling points are? 1. custom delimiters 2. special syntax for fallback values 3. extended regular expression with Unicode support More?",{"id":72,"by":69,"text":73},"11648149","By mentioning sed and line-oriented, I means you don't have to read all content of stdin (i.e. full buffering) before matching.",[],[76,83],{"value":77,"source":60,"evidence":78},"What does Go regex offer over Perl regex?",[79],{"id":80,"by":81,"text":82},"11646111","oleks","I typically fall back to perl when sed isn't quite versatile\u002Fcross-platform enough. What do Go regular expressions offer over Perl regular expressions? (Performance, I imagine.)",{"value":84,"source":60,"evidence":85},"What are the selling points beyond sed?",[86],{"id":68,"by":69,"text":70},[88,92],{"value":89,"source":60,"evidence":90},"Perl",[91],{"id":80,"by":81,"text":82},{"value":93,"source":60,"evidence":94},"sed",[95,96],{"id":80,"by":81,"text":82},{"id":68,"by":69,"text":70},{"comments":98,"answered":99,"key":100},4,2,[101,102,105],{"id":53,"text":54},{"id":103,"text":104},"11646920","Well, it can be line-oriented. It just depends on the regexp pattern and flags specified, i.e. `\u002F^somePattern\u002FsomeFormatter\u002F` vs `\u002F^somePattern\u002FsomeFormatter\u002Fms` (`m` flag to…",{"id":106,"text":107},"11648297","Okay yes, you're correct; xo does not buffer stdin, because the regular expression pattern may span the entire contents.",{"commenters":33,"max_depth":98,"maker_replies":98,"first_comment_mins":32,"lifespan_hours":109},9,[111,113,116,118,120,121,122],[80,32,33,112,81,32],"project\u002Fneutral\u002Fperformance",[53,32,32,114,11,115],"project\u002Fcritical\u002Fperformance",1,[68,115,33,117,69,32],"project\u002Fneutral\u002Fidea",[103,115,32,119,11,115],"maker\u002Fneutral\u002Fdocs",[72,115,33,112,69,32],[106,115,32,112,11,115],[46,99,32,123,11,115],"project\u002Fpositive\u002Fdocs",[125,128],{"id":126,"t":127,"points":99,"comments":115},"10904022",1452801876,{"id":4,"t":12,"points":14,"comments":15},[130,134,138,143,148,152],{"id":131,"name":132,"points":133,"category":20},"11667494","BitKeeper",384,{"id":135,"name":136,"points":137,"category":20},"11662057","Minoca OS",168,{"id":139,"name":140,"points":141,"category":142},"11664933","Hydrogen",154,"infrastructure",{"id":144,"name":145,"points":146,"category":147},"11652454","dial2verify-twilio",147,"security_privacy",{"id":149,"name":150,"points":151,"category":20},"11658444","Gitsome",85,{"id":153,"name":154,"points":155,"category":147},"11660781","Hackchain",83,6,false,"v2",{"id":160,"name":5,"line":6,"ai":157,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":30,"top":18,"kw":161,"maker":11,"domain":10,"tier":19,"attempts":99,"strip":162,"url":9,"mix":163,"praise":59,"objection":65,"sub":21},11646071,[24,25,26,27,28],"3030300",[32,33,32,32],1794036544009]