News for hackers. Stuff that matters.
Re:You Are Not Paid to Write Code by z3t4 on Thursday November 17, 2016 @04:02AM (#12975701)
The other day I had problems with grep, so I rewrote it in JavaScript ... I could have used awk, but at least my script is more then double as fast as awk. I think it's some sort of procrastination and being self managed. Reminds me that I should get off HN and start working.
Re:You Are Not Paid to Write Code by croon on Thursday November 17, 2016 @06:35AM (#12976482)
> I could have used awk, but at least my script is more then double as fast as awk.

I find this very hard to believe. Are you sure your awk implementation was okay?

Re:You Are Not Paid to Write Code by z3t4 on Thursday November 17, 2016 @04:13PM (#12981644)
I used this:

  awk '/pattern/' file
I could upload my JavaScript to Github if anyone is interested.
Re:You Are Not Paid to Write Code by travv0 on Thursday November 17, 2016 @09:02AM (#12977478)
What problem did you have that the easiest way to solve it was by rewriting grep?
Re:You Are Not Paid to Write Code by z3t4 on Thursday November 17, 2016 @04:36PM (#12981900)
I was investigating an e-mail problem, searching log files across several e-mail servers ... Did it go through this server, or that server ? After a lot of frustration I found out grep didn't show all matches ... I does report the right amount with the -c argument though.
Re:You Are Not Paid to Write Code by TeMPOraL on Thursday November 17, 2016 @10:50AM (#12978470)
... in JavaScript, of all things? And it's somehow fast?