HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
harthur
replace
JavaScript2013–2022
harthur / replace · Archived

replace

Command line search and replace utility

11Distinct people
11Mentions
0Explicit recommenders
747GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Command line search and replace utility

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 12:54:37 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year11 dated mentions

Observed mentions: 2013-01-24 03:01:21 UTC to 2022-11-07 09:03:28 UTC.

02468102013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20172018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC909
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC000
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC000
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC000
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC000
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202

What Hacker News says

11 sources
I can't help but feel like I'm missing context here. The project (https://github.com/harthur/replace) seems like a vaguely reasonable "grep with a simpler interface and a regex syntax I'm already familiar with" kind of utility. It's far from a central example of the dependency bloat that people usually mock about Node.js--it uses the standard library for all the actual filesystem and regex work, and just has a couple dependencies for normal things like command-line parsing and ANSI color codes. Has the project been significantly rewritten and cleaned up following these posts? Was there some absurd hype cycle for this thing that didn't deliver? Did the Internet get mad at this person for some unrelated reason? What happened here?
In Being Ridiculed for My Open Source Project (2013)
> The consensus on HN was that there was nothing wrong with her code, but that she was being picked on solely for being a girl False. They did not know she was a woman when they made fun of the code. And that was not the consensus. [1] In fact, if they had known that she was a woman, they would have known better than to criticize. Us men in tech are well aware by now that you have to shelter women from the real world, lest they shatter into a million pieces. Your delusions of persecution are staggering. [1] Here is what they saw, no indication of femaleness: https://github.com/harthur/replace > I’m not entirely sure what drives someone to the conclusion that because “harthur”, which turns out to be be “Heather”, is a woman, that by default, I would intentionally discriminate against [Women]. Not every single thing on the internet is abou
Read the rest
t gender equality, or about a minority. In fact, the only reason I’m writing this post is because this kind of continued behavior on the internet is one of the primary reasons this is such a problem. See http://justcramer.com/2013/01/24/being-wrong-on-the-internet... And here is the relevant thread: https://news.ycombinator.com/item?id=5106767
In How A 17-Year-Old Girl Won a Hackathon
I just gave the code a quick look and I find this `eval` usage not too cool: https://github.com/harthur/replace/blob/master/replace.js#L4... It relies on the fact that you can provide javascripts String#replace a "replace function" (1). The author just evals the contents of a command line provided file into a variable called `replaceFunc`. Beside that, there's not a lot that can be pointed out as "bad", at least by just reading it lightly (5-10 mins). [1] https://developer.mozilla.org/en-US/docs/JavaScript/Referenc...
In If You Call Out Bad Code, Make Sure It's Bad First
I looked at the actual code and, although I'm no expert with Node, it looks pretty reasonable. The only things I can find to criticize was the word "replacize", which makes me cringe much like "performancing" or "optimizely", and the use of == instead of ===. But I think reasonable people could disagree about those things. Someone who isn't me might think "replacize" is sufficiently humorous to retain, for example. The nesting goes a little deeper than I would like: https://github.com/harthur/replace/blob/master/replace.js#L9... is 7 indents deep, for example, where I think something like 4 indents is a place where I should stop and start questioning what I'm doing. But three of those indents are a tradeoff forced by the node.js async API: anything that has to wait on the result of an asynchronous operation must necessarily be in anoth
Read the rest
er function, and you can choose whether to nest that function deeper or to move it somewhere unrelated and give it a name; and you have to use error codes instead of exceptions for error handling from those operations. The program actually includes a synchronous version of the same code, where the line corresponding to line 90 above is https://github.com/harthur/replace/blob/master/replace.js#L1..., the blank line following "var text = fs.readFileSync(file, "utf-8");". If that fails, it throws an exception, so the "if" block isn't needed, and the code that follows doesn't need to be nested. This is the agony and the ecstasy of Node: everything is (normally) asynchronous, giving you unwanted levels of nesting, but on the other hand, everything is asynchronous, so you can process the files in the order that the filesystem finds it most convenient to return them to you in. I wouldn't be surprised if it turned out that Heather's code was typically much, much faster than find | xargs -P sed, simply because it was able to productively manage many more outstanding I/O requests at once. Line 90 also points to a pitfall that often befalls us with parallelism: at some point parallelism stops being productive, so you have to limit it. In this case, Heather's code throws the ball back to the user and suggests that they rerun their command in synchronous mode — albeit having partially completed the replacement task, which might be a bad failure mode, depending on whether your replacement is idempotent.
In What It's Like To Be Ridiculed For Open Sourcing A Project
He didn't merely say the project "wasn't good", he implied it in a snarky, very unconstructive way. Here's his quote from twitter: >Ever wanted to make sed or grep worse? http://github.com/harthur/replace In the world I live in, that's called being an asshole. Look, I'm not saying these guys should apologize (in fact, if this is how they apologize it's probably best they don't), I'm simply stating that they're dicks. I know a lot of computer programmers just like them. Edit: And I hate working with people like them. I don't care how brilliant they are, programming is a team sport in most places. If you're a jerk I don't want you on my team, no matter how many awesome sed scripts you can whip up.
In What It's Like To Be Ridiculed For Open Sourcing A Project
I might be an emotionless robot or something, but I don't get the furore over this. Everyone writes crap code sometimes (viz. github.com/007 aka craptown USA). Just because you are "exceedingly talented" or have "well-used" projects doesn't mean everything you write is rainbows and unicorns. If your project is useful to you, then screw everyone else - why care what they think? https://github.com/harthur/kittydar is useless but brilliant. I'll be bookmarking it for the next time I need feature detection in JS, and because it mentions HOG descriptors. https://github.com/harthur/replace is useful but not-brilliant. I'll bookmark the 'sed' or 'awk' manpage instead.
In What It's Like To Be Ridiculed For Open Sourcing A Project
OK... I usually don't involve myself in drama, but I looked at the code: https://github.com/harthur/replace/blob/master/replace.js Out of all the code could say "eyes bleeding" that doesn't even come close? Only thing that stands out is the naming of "replacize". I can understand if you hate JavaScript syntax and love sed, but I fail to see why anyone would pick on this out of all the other code out there. There's no shortage of crappy code in the world! (not that you should make fun of any of it on twitter)
In I'm sorry
First up a clickable link to the project: https://github.com/harthur/replace --- When I see a project that reinvents the wheel I tend to think that the author needed a very particular wheel and decided to start with first principles. And even if it seems useless to me - open sourcing it lets me see how this wheel was created, and maybe learn something from it. And of course sometimes someone reinvents `grep` as brilliantly as `ack` and I end up using it every day.
In What It's Like To Be Ridiculed For Open Sourcing A Project

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.