Hacker News Comments on
Where GREP Came From - Computerphile
Computerphile
·
Youtube
·
272
HN points
·
9
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.Yes, Brian Kernighan said it's pronounced "ee-dee": https://www.youtube.com/watch?v=NTfOnGZUZDk
⬐ seanhunter...and that never made any sense to me. Because you don't pronounce "sed" as "ess-ee-dee". So if you pronounce "sed" as "said", you must surely pronounce "ed" as "ed".⬐ kpsThe reason is that it's a descendant of QED — https://en.wikipedia.org/wiki/QED_(text_editor)
⬐ delgaudmPreviously: https://news.ycombinator.com/item?id=17478260
My favourite BWK video is about grep. https://www.youtube.com/watch?v=NTfOnGZUZDk?t=566The last part is very quotable: "They had one grave disadvantage, none of them were Ken Thompson"
Slightly off-topic, but Brian Kernighan has a great video about the origins of grep. If you know anything similar for awk, I'd enjoy watching it!
⬐ yesenadamThere are some SNOBOL books on archive.org I had a look at not long ago, including a detailed manual/tutorial - fascinating, takes you back to <1970. It seems to have been widely used from the mid 60s on, predating the "Unix Epoch". It's pretty cool and Awk resembles it in many ways. The manual starts with many pages telling you how to load all the tapes for the program in correct order!"It was one of a number of text-string-oriented languages developed during the 1950s and 1960s; others included COMIT and TRAC.
SNOBOL4 stands apart from most programming languages of its era by having patterns as a first-class data type (i.e. a data type whose values can be manipulated in all ways permitted to any other data type in the programming language) and by providing operators for pattern concatenation and alternation. SNOBOL4 patterns are a type of object and admit various manipulations, much like later object-oriented languages such as JavaScript whose patterns are known as regular expressions. In addition SNOBOL4 strings generated during execution can be treated as programs and either interpreted or compiled and executed (as in the eval function of other languages).
SNOBOL4 was quite widely taught in larger US universities in the late 1960s and early 1970s and was widely used in the 1970s and 1980s as a text manipulation language in the humanities. ...
SNOBOL4 supports a number of built-in data types, such as integers and limited precision real numbers, strings, patterns, arrays, and tables (associative arrays), and also allows the programmer to define additional data types and new functions. SNOBOL4's programmer-defined data type facility was advanced at the time—it is similar to the records of the earlier COBOL and the later Pascal programming languages.
All SNOBOL command lines are of the form
Each of the five elements is optional. In general, the subject is matched against the pattern. If the object is present, any matched portion is replaced by the object via rules for replacement. The transfer can be an absolute branch or a conditional branch dependent upon the success or failure of the subject evaluation, the pattern evaluation, the pattern match, the object evaluation or the final assignment. It can also be a transfer to code created and compiled by the program itself during a run.label subject pattern = object : transfer
A SNOBOL pattern can be very simple or extremely complex. A simple pattern is just a text string (e.g. "ABCD"), but a complex pattern may be a large structure describing, for example, the complete grammar of a computer language. It is possible to implement a language interpreter in SNOBOL almost directly from a Backus–Naur form expression of it, with few changes. Creating a macro assembler and an interpreter for a completely theoretical piece of hardware could take as little as a few hundred lines, with a new instruction being added with a single line."
⬐ 1vuio0pswjnm7SNOBOL was the first to use so-called "associative arrays". In SNOBOL, we call them "tables".
ok this one yeshttps://www.youtube.com/watch?v=NTfOnGZUZDk
so, does it make me incorrect in general idea?
what about ls? echo?
⬐ vcxyIt happens that the p in pwd actually does historically mean print from multics, but honestly I just do not care about that, let the p mean whatever you want. My inner monologue will always be "present working directory" even though I think that option is totally silly, my brain is stuck with it now.I just thought I was offering an interesting fact about where "grep" comes from.
Computerphile did a great video with Brian Kernighan on "Where GREP Came From"
"Where GREP Came From" by Brian Kernighan from Computerphile:* https://www.youtube.com/watch?v=NTfOnGZUZDk
For those unfamiliar, Kernighan is the "K" in K&R C and the "K" in AWK:
⬐ jcimsGreat interview with Brian on Lex Fridman's podcast - https://www.youtube.com/watch?v=O9upVbGSBFo⬐ mercerI listened to that one last night, and then a few more. He's been in rotation for a while now.I don't know how I ended up subscribing to Lex Fridman's podcast, but it's both wonderful and somewhat bizarre to me.
On the one hand, he comes across as the kind of character you'd expect in a horror film. Meticulous, well-dressed, friendly, but affectless in his speech and oddly emotionless and formal.
But then the actual questions he asks, and the observations he makes, are IMO a step above most interviewers. I can think of a number of 'greater' interviewers, but he's definitely well in the 'very good' range.
My apologies if Fridman reads this comment. I definitely don't want you to stop doing things the way you do :). It's just somewhat different, in a strangely 'boring' way, that I'm not used to from most good podcast hosts that I'm familiar with. Most are, sometimes to the point of irritation, exceedingly affable and chatty.
⬐ throw0101a> On the one hand, he comes across as the kind of character you'd expect in a horror film. Meticulous, well-dressed, friendly, but affectless in his speech and oddly emotionless and formal.Are you aware of the The Report Of The Week channel run by 'Review Brah'?
⬐ evolve2kI found it amusing when he explained how the Editor of the day was pronounced “E D” rather than “Ed” which would in my mind make more sense as short for Editor.I’m sure history is littered with this little micro sticking points.
Fun fact: this problem is why grep was created by Ken Thompson [1].
⬐ neonateThat was on HN yesterday. https://news.ycombinator.com/item?id=17478260⬐ bertiNeat! Kernighan really is pleasant listening as noted on that post.
⬐ ahurmazdaI 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.⬐ Waterluvian⬐ type0I could listen to Prof. Brailsford tell stories for ages. Oral tradition really gives these stories character and context.⬐ mattlMe 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.⬐ curiousgal>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.
⬐ User23This is why I get mad when people piss on RMS. No need to dwell on his defects, he has served our community immeasurably.⬐ krappIf 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.
⬐ mattlNo. 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.⬐ type0> 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...
⬐ User23Wholeheartedly 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.
⬐ bkul_I doubt Stallman will be forgotten, but I'm worried he'll be remembered more as a Cassandra than a great contributor.⬐ ezequiel-garzonWouldn’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.
⬐ mattlMaybe 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.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/
⬐ FfejL⬐ eltoozeroIn 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!
⬐ jedimastert⬐ dorfsmayHe 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.⬐ wglb⬐ monkeyworkIt 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.
⬐ sedachv⬐ srtjstjsjThe Coherent documentation is tops: http://www.nesssoftware.com/home/mwc/manual.phpReally impressive what the people at MWC did with an 8088.
⬐ sverigeWell, 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.)
⬐ dorfsmayI 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.Ed is the standard text editor, so it ought to be familiar.I wonder how his students did at the assignment he mentioned at the end :)⬐ sverhagen⬐ hnarayananI 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.⬐ greenyoda> The original being built on an 8-bit 32kb RAMActually, the PDP/11 was a 16-bit machine.
Such an excellent story teller!⬐ topicseed⬐ BromsklossI 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.⬐ sverige⬐ bchYes, that innovation gets passed over rather quickly, doesn't it?⬐ MetaDarkWell 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.I was most excited to learn that ed(1) is pronounced “eee dee”.⬐ User23⬐ lprdStands to reason really. cd, ls, mv (crush the “move” heresy), ld, and others. Ambiguity creeps in at three characters. Who’s the man?⬐ yjftsjthsd-h⬐ superflyguyThose lack the vowels to be pronounceable. Also ed looks like the first syllable of editor and could reasonable be pronounced as such.⬐ srtjstjsj⬐ jmts"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.⬐ mturmonThe 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.⬐ User23You're not wrong, but it's still pretty clear that the PDP11 crew thought in keystrokes and not syllables.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"
... by literally four people.⬐ cat199... who literally created it.⬐ andremat⬐ Bromskloss... please repeat after me: gif.⬐ mattlI generally go with “GIF with a soft G is the format, GIF with a hard G is the culture.”⬐ kevin_thibedeauEveryone involved in the creation of GIF and CompuShow pronounce it as "jif". Anything else is sacrelige.⬐ ts4zCompuServe.⬐ kevin_thibedeau⬐ mattlCompuShow was the DOS GIF viewer.⬐ ts4zD’oh. Thanks.Those people aren’t part of the lifestyle or culture. I wish they were.What's right is right, even if the majority is wrong. No argumentum ad populum here! :-)I had no idea grep was made over night! Thoroughly enjoyed the video and subbed to the YouTube channel. Thanks for sharing!⬐ dws⬐ usermacExtracted 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?⬐ bariswheelI went down the rabbit hole hard on this YouTube channel, great content.⬐ smadgeKernighan saved the most interesting fact for his last comment: both grep and ed were written in assembly, not C!⬐ jedimastert⬐ cartercoleI 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⬐ NoneNone⬐ textmodetl;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?⬐ webbrahminI watched this video today and here it is on Hacker News. What a coincidence.⬐ amorousf00pKernighan 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.⬐ sverigeHe speaks as clearly as he writes. We need more of that, everywhere.⬐ fjarlqAR = Arnold Robbins, http://www.skeeve.com/
⬐ AdmiralAsshatSo grep exists because someone wanted to do textual analysis on the Federalist papers.