Hacker News new | past | comments | ask | show | jobs | submit login
Where grep came from [video] (youtube.com)
250 points by signa11 on July 7, 2018 | hide | past | favorite | 59 comments



Kernighan is so nice to listen to compared to some of the the hot air balloons in software today. I use awk everywhere (and have for many years) and am deeply indebted to BK and AR for their work on and custody of that language.


AR = Arnold Robbins, http://www.skeeve.com/


He speaks as clearly as he writes. We need more of that, everywhere.


I hope these videos will live on for many years to come. Absolutely amazing and rich oral history of many things we take for granted in our daily lives.


>many things we take for granted in our daily lives.

The entitlement we live in nowadays vis à vis technology continues to blow my mind, from some condescending attitudes towards free software that forms the building block of a myriad of products to the "disappointment" some consumers express when a new released chip isn't twice as fast as the old iteration. There's a lot going on behind the scene and even by saying so I am underestimating just how much our civilisation has put in effort into the things that we use on a daily basis and pay to attention to.


This is why I get mad when people piss on RMS. No need to dwell on his defects, he has served our community immeasurably.


If you're talking about people making fun of his weight or appearance or other strange behaviors, then I agree.

But RMS didn't descend from Mount Sinai with the Four Freedoms carved into stone by the finger of God or anything. He's just a man with an opinion, and his ideas are not above criticism regardless of what he's done for the community.


No. But he did live in a community of sharing that was destroyed by proprietary software and he has spent 45 years developing free software. So many should pay his ideas more respect than they do because they like to make it about his person life.


Wholeheartedly agree!

This entire thing we have going wouldn't be possible without the GNU project. And GNU would never have happened without RMS. The man is a giant. A giant with huge glaring flaws, but every single one of us that did anything with unix-like OSes in the past 30 years owes the man.

Sadly I fear that much like Peirce, Stallman will be forgotten by history because of the acumen of his primary detractors.


Wouldn’t the BSDs have happened sooner or later without GNU, and without Linus? I’m grateful for the contributions of both men (who by the way have expressed quite different ideological stances), but I still think it’s an interesting question.

Edit: grammar.


Maybe yes. But BSD was encumbered by the AT&T nonsense for approximately a third of the free software community’s history. That’s a long time to sit around and do nothing.


I doubt Stallman will be forgotten, but I'm worried he'll be remembered more as a Cassandra than a great contributor.


> But he did live in a community of sharing that was destroyed by proprietary software ...

Outside software industry and computer enthusiasts no one has even heard of RMS. As for Gatesian Basic conundrum [0] of the past he could as well been forgotten if not for emergence of Linux, maybe he should be lucky be called the father of open source although I understand that he considers it to be an insult.

The common Windows10 user might be okay in having no control over their computing and merely licencing their OS [1], but I would argue that's because they don't comprehend what they're agreeing on. It's sad that computer literacy is that astonishingly low. Agreeing to some entity to have the ultimate power of your computing environment is like having to agree to someone else to have the power over the fabric of your though processes. We're still in the digital middle ages, feudal society where MS, FB, Google have the final say in the spheres of their domination exactly like the churches or kings would decide over their people.

[0]. https://en.wikipedia.org/wiki/Open_Letter_to_Hobbyists [1]. https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/U...


I could listen to Prof. Brailsford tell stories for ages. Oral tradition really gives these stories character and context.


Me too. I’m in a couple of them and a lot of people have told me they found them enjoyable and learned more about free software as a result.


Great remark at the end: "they had one great disadvantage: none of them were Ken Thompson"

Aside from retrocomputing is there any actual use for ed in this day and age though? https://sanctum.geek.nz/arabesque/actually-using-ed/


In a sense, yes. 'sed' is basically 'ed' for streams. Not exactly the same syntax & commands, but very very close.


Wait, that’s Brian Kernighan?

The K in K&R C Programming???

Mind blown, what an excellent dude!


He actually has a lot of really awesome oral history/lecture videos on that same channel. He's an incredible "casual oral history" storyteller.


If ed looked familiar is because you use a derivative of it in vim, in ex-mode. You can also run ex standalone, which is great to automate file changes.

https://en.wikipedia.org/wiki/Ex_(text_editor)


Ed is the standard text editor, so it ought to be familiar.

https://www.gnu.org/fun/jokes/ed-msg.html


It looks familiar to me because I wrote a tutorial for it for Coherent and used it for many years before David Conroy wrote MicroEmacs.

vim, not so much.


Well, if you went down the emacs path in 1985 when MicroEmacs was released (near as I can tell anyway), that was six years before vim was released, so I think you meant to say "vi," not "vim."

Some of us still use plain old vi and not vim, which is why I'm a little touchy about it, I guess. (I mean, what do you need with all those damn plugins, anyway? Might as well use emacs in that case.)


I moved from vi and vi clones to vim for its Unicode support, but then started learning all its more advanced operations and have been enjoying them since then.


The Coherent documentation is tops: http://www.nesssoftware.com/home/mwc/manual.php

Really impressive what the people at MWC did with an 8088.


I wonder how his students did at the assignment he mentioned at the end :)


I can only imagine the learning opportunities just from comparing their results with the real grep. The original being built on an 8-bit 32kb RAM nothing little environment is not something many people are naturally inclined to optimize for anymore. And for people to even implement any kind of non-trivial spec, in this case presented as another working application, I imagine every result was different, and incompatible.


> The original being built on an 8-bit 32kb RAM

Actually, the PDP/11 was a 16-bit machine.


Such an excellent story teller!


I love his videos on Computerphile! Incredible source of hardcore computing knowledge.


The small step from ed to regular expressions seems like a giant leap in sophistication to me.


Well Ken Thompson didn't actually invent the idea of regular expressions, but he was probably one of the first people to implement them in software. Regular languages and expressions were first formalized in 1951 by Stephen Kleene and I assume Ken Thompson used this research to implement them.


Yes, that innovation gets passed over rather quickly, doesn't it?


I was most excited to learn that ed(1) is pronounced “eee dee”.


... by literally four people.


What's right is right, even if the majority is wrong. No argumentum ad populum here! :-)


... who literally created it.


... please repeat after me: gif.


I generally go with “GIF with a soft G is the format, GIF with a hard G is the culture.”


Everyone involved in the creation of GIF and CompuShow pronounce it as "jif". Anything else is sacrelige.


Those people aren’t part of the lifestyle or culture. I wish they were.


CompuServe.


CompuShow was the DOS GIF viewer.


D’oh. Thanks.


Stands to reason really. cd, ls, mv (crush the “move” heresy), ld, and others. Ambiguity creeps in at three characters. Who’s the man?


From the video [1]:

"The UNIX text editor was called 'eee-dee' - it's not pronounced 'ed', at least by those in the know - it's pronounced 'eee-dee'. This was written by Ken Thompson, and I think it was basically a stripped down version of an editor called QED"

[1] https://youtu.be/NTfOnGZUZDk?t=113


Those lack the vowels to be pronounceable. Also ed looks like the first syllable of editor and could reasonable be pronounced as such.


You're not wrong, but it's still pretty clear that the PDP11 crew thought in keystrokes and not syllables.


"ed" (and the ED in QED)'s name was also chosen as an abbreviation for "editor". But the creators chose to pronounce the abbreviation differently.


The octal dumper od is pronounced oh-dee, the assembler is ay-ess, the archiver is ay-arr. OTOH, the delayed execution command is “at”, but that is a full word anyway.


I had no idea grep was made over night! Thoroughly enjoyed the video and subbed to the YouTube channel. Thanks for sharing!


Extracted from working code overnight, which in those days on that equipment was still quite an accomplishment.


https://youtu.be/NTfOnGZUZDk?t=505 to jump to it and did you notice... is he wearing a Casio watch from that same time period?


I went down the rabbit hole hard on this YouTube channel, great content.


Kernighan saved the most interesting fact for his last comment: both grep and ed were written in assembly, not C!


I actually didn't know that either! I wonder if grep & ed actually predate C...It's also very possible that K&R might have thought about C as a toy or novelty at the time.


I named my whole company after grep: grepwords.com and I had never knew this... cool history to learn


tl;dr The idea for grep, like sed, began in the mind of Lee McMahon. The program grep was implemented by Thompson. I recall reading that the program sed was first implemented by Ritchie, and later McMahon himself. Is this correct?


I watched this video today and here it is on Hacker News. What a coincidence.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: