[{"data":1,"prerenderedAt":359},["ShallowReactive",2],{"project-9578708":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":36,"aspects":37,"strip":43,"post_text":45,"what":46,"said":71,"maker_in_thread":188,"shape":190,"grid":194,"attempts":317,"same_week":322,"maker_shows":32,"maker_hidden":351,"reader_version":352,"card":353},"9578708","Nip","Use JavaScript instead of awk, sed, or grep","title","Show HN: Nip – Use JavaScript instead of awk, sed, or grep","https:\u002F\u002Fgithub.com\u002Fkolodny\u002Fnip","github.com","kolodny",1432150798,2015,42,53,689,2565,27,"shown","dev_tools","command line text processing","cli",[24,25,26,27,28],"javascript cli","awk alternative","sed alternative","text processing","shell pipes","curious",-0.014,{"positive":32,"neutral":33,"mixed":34,"critical":35},4,13,1,5,23,{"idea":38,"docs":39,"design":41,"performance":42},{"positive":32,"critical":35},{"positive":40,"critical":40},0,{"positive":40,"critical":40},{"positive":40,"critical":40},[40,40,40,40,40,40,40,40,40,35,34,35,40,40,40,44,44,34,34,35,40,44,44,44,44,40,44,34,34,40,40,44,44,40,44,44,35,44,40,40],3,null,{"problem":47,"audience":59,"pricing":45,"motivation":45,"time_to_build":45,"stack":64,"openness":70,"stage":70,"team_size":70},{"value":48,"source":49,"evidence":50},"Text processing on the command line with awk, sed, or grep is hard to learn or remember","inferred",[51,55],{"id":52,"by":53,"text":54},"9580891","ajkjk","I like this a lot. ... As a developer who, while (I like to think) competent, hasn't learned to use sed\u002Fawk very well .. I find it aggravating and at times arrogant that…",{"id":56,"by":57,"text":58},"9580445","fineline","Why use this instead of perl\u002Fsed\u002Fawk? Because you program in JS all day long and don't want to look up man pages every time you want to do some simple text processing, that's why.",{"value":60,"source":49,"evidence":61},"JavaScript developers who find awk, sed and grep hard to use",[62,63],{"id":56,"by":57,"text":58},{"id":52,"by":53,"text":54},[65],{"value":66,"source":49,"evidence":67},"JavaScript",[68],{"id":69},"post","unknown",{"praise":72,"objections":82,"requests":123,"questions":138,"alternatives":151},[73],{"value":74,"source":75,"evidence":76},"Useful idea for JavaScript developers who want shell pipes","commenter",[77,81],{"id":78,"by":79,"text":80},"9580373","tylermauthe","This is awesome, simple and powerful. awk and sed are especially annoying to work with -- now I can use one of my favourite languages to do the same tasks. I will shed a single…",{"id":52,"by":53,"text":54},[83,101,112],{"value":84,"source":75,"evidence":85},"Existing tools like awk, sed, grep and Perl already do this better",[86,90,94,98],{"id":87,"by":88,"text":89},"9580403","endgame","Why? (Yes, I read that section on the readme.) If you learn sed and awk you can slice and dice text damn near everywhere. Nip is only going to be useful where you have enough…",{"id":91,"by":92,"text":93},"9580418","ForHackernews","Unless you're really a JS-only developer, it's hard for me to see why this is better than using Perl (or just sed\u002Fawk\u002Fgrep themselves) for text-munging.",{"id":95,"by":96,"text":97},"9580398","vinceguidry","Most *nix machines will have Ruby already installed, it's much better suited, right out of the box, for this kind of work than Javascript is, having descended from Perl and all.",{"id":99,"by":92,"text":100},"9580414","Or just use Perl! Perl is like sed\u002Fawk on steroids, anyway.",{"value":102,"source":75,"evidence":103},"Learning sed or awk is a small cost compared to a new tool",[104,108],{"id":105,"by":106,"text":107},"9580618","eropple","Learning to use sed for that kind of trivial task would take, what, a minute? Maybe two? If you know regex, you know enough of sed to do anything, and if you're not using regex…",{"id":109,"by":110,"text":111},"9580798","falcolas","No, nobody will care. However, you'll care when ten years down the road you will still working around your lack of knowledge about your operating system, when you could be…",{"value":113,"source":75,"evidence":114},"Performance is likely worse than GNU grep",[115,119],{"id":116,"by":117,"text":118},"9580503","selbyk","Hmmm, how performant is it?",{"id":120,"by":121,"text":122},"9580583","acveilleux","There's really not that many possible way to beat GNU grep at least in the regexp matching case. It's as close to the optimal solution as you'll find (especially with `--mmap`)…",[124,131],{"value":125,"source":75,"evidence":126},"Show side-by-side common use case comparisons",[127],{"id":128,"by":129,"text":130},"9580541","threatofrain","I would appreciate some more common use-case side by side comparisons. I've been hesitant to learn awk or sed myself, instead using Ruby, but my intuition tells me that…",{"value":132,"source":75,"evidence":133},"Better documentation with basic examples at the top",[134,135],{"id":52,"by":53,"text":54},{"id":136,"by":53,"text":137},"9582162","I disagree. I don't mind if man pages continue to contain all the content they currently have. Just add a section at the top with basic examples and you halve my effort to start…",[139,147],{"value":140,"source":75,"evidence":141},"Why use this instead of grep, sed or awk",[142,143],{"id":87,"by":88,"text":89},{"id":144,"by":145,"text":146},"9580402","ajays","Wait: ``` nip 'function(l) { return \u002F^var\u002F.test(l); }' ``` is supposed to be better than ``` egrep '^var' ? ```",{"value":148,"source":75,"evidence":149},"How performant is it",[150],{"id":116,"by":117,"text":118},[152,157,165,176,181],{"value":153,"source":75,"evidence":154},"Perl one-liners",[155,156],{"id":99,"by":92,"text":100},{"id":91,"by":92,"text":93},{"value":158,"source":75,"evidence":159},"Ruby",[160,161],{"id":95,"by":96,"text":97},{"id":162,"by":163,"text":164},"9580600","jamesbrennan","I wrote a similar CLI in Ruby (https:\u002F\u002Fgithub.com\u002Fjpb\u002Frb) inspired by the Python equivalent (https:\u002F\u002Fgithub.com\u002FRussell91\u002Fpythonpy). I've never really used rb though - these…",{"value":166,"source":75,"evidence":167},"Python pyp and pythonpy",[168,172],{"id":169,"by":170,"text":171},"9580828","gourneau","A Python version of this is called 'The Pyed Piper', yes it was named before the show :p https:\u002F\u002Fcode.google.com\u002Fp\u002Fpyp\u002F",{"id":173,"by":174,"text":175},"9580405","unclesaamm","I remember seeing someone who did this (for Python) with magic for auto-importing modules. I can't seem to find it for the life of me, but that feature was really nice. I'll give…",{"value":177,"source":75,"evidence":178},"sed, awk and grep",[179,180],{"id":105,"by":106,"text":107},{"id":87,"by":88,"text":89},{"value":182,"source":75,"evidence":183},"The Silver Searcher (ag)",[184],{"id":185,"by":186,"text":187},"9580934","bpicolo","https:\u002F\u002Fgithub.com\u002Fggreer\u002Fthe_silver_searcher",{"comments":40,"answered":40,"key":189},[],{"commenters":191,"max_depth":192,"maker_replies":40,"first_comment_mins":193,"lifespan_hours":36},31,7,312,[195,199,201,204,206,209,211,215,217,219,220,223,225,228,231,232,236,237,239,241,245,248,251,252,255,256,258,261,264,267,271,273,275,277,281,283,285,287,288,290,293,295,297,299,301,303,304,306,308,310,311,313,315],[196,40,40,197,198,40],"9580546","commenter\u002Fneutral\u002Fnone","escape_goat",[200,40,40,197,106,40],"9580579",[202,40,40,197,203,40],"9580598","Killswitch",[105,40,40,205,106,40],"commenter\u002Fcritical\u002Fidea",[207,40,40,197,208,40],"9580657","ams6110",[210,40,40,197,106,40],"9580732",[212,40,40,213,214,40],"9580734","other\u002Fneutral\u002Fnone","jzelinskie",[216,40,40,213,110,40],"9580818",[218,40,40,197,106,40],"9580933",[109,40,40,197,110,40],[221,40,40,197,222,40],"9580910","bronson",[224,40,40,197,110,40],"9582133",[226,40,35,227,198,40],"9580630","project\u002Fpositive\u002Fidea",[229,40,34,230,106,40],"9580715","project\u002Fcritical\u002Fidea",[52,34,35,227,53,40],[233,34,40,234,235,40],"9581152","commenter\u002Fneutral\u002Fdocs","hobarrera",[136,34,40,234,53,40],[238,34,40,197,235,40],"9583211",[240,34,40,197,53,40],"9583347",[242,34,44,243,244,40],"9581250","project\u002Fmixed\u002Fidea","Sanddancer",[246,34,40,213,247,40],"9583467","zimpenfish",[56,249,44,250,57,40],2,"project\u002Fneutral\u002Fidea",[87,44,34,230,88,40],[253,44,40,197,254,40],"9580511","rwallace",[91,32,34,230,92,40],[257,32,35,227,203,40],"9580576",[259,32,40,197,260,40],"9580609","balls2you",[262,32,40,197,263,40],"9580660","riquito",[265,35,44,250,266,40],"9580805","ised",[268,35,44,269,270,40],"9580859","project\u002Fneutral\u002Fdocs","stygiansonic",[173,272,44,250,174,40],6,[144,192,44,274,145,40],"project\u002Fneutral\u002Fdesign",[276,192,44,274,57,40],"9580434",[278,279,40,213,280,40],"9580928",8,"visarga",[128,282,44,269,129,40],9,[169,284,40,213,170,40],10,[95,286,34,230,96,40],11,[99,286,34,230,92,40],[289,286,40,197,96,40],"9580433",[291,286,40,197,292,40],"9580560","kamaal",[294,286,40,197,96,40],"9580930",[296,286,44,274,92,40],"9584435",[298,286,44,250,203,40],"9580573",[300,286,40,197,110,40],"9580788",[302,286,40,197,106,40],"9583114",[162,286,44,250,163,40],[305,286,44,250,235,40],"9581165",[78,307,35,227,79,40],12,[116,33,44,309,117,40],"project\u002Fneutral\u002Fperformance",[120,33,44,309,121,40],[185,33,40,312,186,40],"other\u002Fneutral\u002Fperformance",[314,33,40,312,121,40],"9580962",[316,33,40,213,186,40],"9583222",[318,321],{"id":319,"t":320,"points":34,"comments":40},"5755313",1369282371,{"id":4,"t":12,"points":14,"comments":15},[323,328,332,336,341,346],{"id":324,"name":325,"points":326,"category":327},"9543005","Twenty",666,"games",{"id":329,"name":330,"points":331,"category":20},"9577336","Atom",190,{"id":333,"name":334,"points":335,"category":20},"9545252","Monodraw",141,{"id":337,"name":338,"points":339,"category":340},"9546201","sse.getgin.io",118,"languages",{"id":342,"name":343,"points":344,"category":345},"9546162","Akepa",91,"consumer_social",{"id":347,"name":348,"points":349,"category":350},"9564754","MCServer",64,"infrastructure",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":249,"strip":357,"url":9,"mix":358,"praise":74,"objection":84,"sub":21},9578708,-0.01,[24,25,26,27,28],"0000000005150003311503333031100330335300",[32,33,34,35],1793990924795]