Nip

Dev tools

command line text processing

SHOW HN2015

42points
53comments
#689of 2,565 in 2015
Top 27%of 2015 by points

How HN took it

CuriousMostly questions and neutral comments

4 positive, 13 neutral or asking, 1 mixed, 5 critical, out of 23 comments about the project. Thread score -0.01.

Idea: 4 for, 5 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful idea for JavaScript developers who want shell pipes

    From 2 comments
    • 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…
      tylermauthe on HN
    • I like this a lot. ... As a developer who, while (I like to think) competent, hasn't learned to use sed/awk very well .. I find it aggravating and at times arrogant that…
      ajkjk on HN

Objections

  • Existing tools like awk, sed, grep and Perl already do this better

    From 4 comments
    • 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…
      endgame on HN
    • 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/awk/grep themselves) for text-munging.
      ForHackernews on HN
    • 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.
      vinceguidry on HN
    • Or just use Perl! Perl is like sed/awk on steroids, anyway.
      ForHackernews on HN
  • Learning sed or awk is a small cost compared to a new tool

    From 2 comments
    • 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…
      eropple on HN
    • 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…
      falcolas on HN
  • Performance is likely worse than GNU grep

    From 2 comments
    • Hmmm, how performant is it?
      selbyk on HN
    • 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`)…
      acveilleux on HN

Requests

  • Show side-by-side common use case comparisons

    From 1 comment
    • 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…
      threatofrain on HN
  • Better documentation with basic examples at the top

    From 2 comments
    • I like this a lot. ... As a developer who, while (I like to think) competent, hasn't learned to use sed/awk very well .. I find it aggravating and at times arrogant that…
      ajkjk on HN
    • 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…
      ajkjk on HN

Questions

  • Why use this instead of grep, sed or awk

    From 2 comments
    • 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…
      endgame on HN
    • Wait: ``` nip 'function(l) { return /^var/.test(l); }' ``` is supposed to be better than ``` egrep '^var' ? ```
      ajays on HN
  • How performant is it

    From 1 comment

Alternatives named

  • Perl one-liners

    From 2 comments
    • Or just use Perl! Perl is like sed/awk on steroids, anyway.
      ForHackernews on HN
    • 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/awk/grep themselves) for text-munging.
      ForHackernews on HN
  • Ruby

    From 2 comments
    • 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.
      vinceguidry on HN
    • I wrote a similar CLI in Ruby (https://github.com/jpb/rb) inspired by the Python equivalent (https://github.com/Russell91/pythonpy). I've never really used rb though - these…
      jamesbrennan on HN
  • Python pyp and pythonpy

    From 2 comments
    • A Python version of this is called 'The Pyed Piper', yes it was named before the show :p https://code.google.com/p/pyp/
      gourneau on HN
    • 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…
      unclesaamm on HN
  • sed, awk and grep

    From 2 comments
    • 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…
      eropple on HN
    • 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…
      endgame on HN
  • The Silver Searcher (ag)

    From 1 comment

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/9578708)