226 points · by signa11 · 3y ago · 157 comments
I had always assumed it was the other way round, and some people simply don't know what a duct is so they substitute a similar-sounding, more common word.
Duck tape kind of sucks for most temporary applications as it leaves so much residue behind. Gaffer tape is an awesome replacement (although quite a bit pricier).
Their acceptance speech was written in Seussian rhyme. "Do not use duct tape on ducts. Do not use it: t'won't stay stuck."
Also +1 for Gaffer tape, especially for audio/video.
And then so many people post “facts” about a clearly fuzzy issue and proceed to argue about who’s “right”. I’m getting real blegg/rube vibes from the whole argument here.
https://www.lowes.com/pd/3M-2-5-in-W-x-150-ft-L-HVAC-Tape/40...
This is how I always understood the situation, and then I've recently discovered the issue is further "muddied" by a brand name/trademark "Duck Tape" also, so that's fun...
But I grew up calling it "gaffer's tape", because it was popularly used by gaffers on film and TV sets.
It's a nice waterproof alternative to oil based materials as the cotton swells when wet to seal its own seams.
> She is often misattributed as the inventor of duct tape. However, numerous variations of adhesive cotton duck tape had existed for decades, nor did she invent the specific formulation of the popularized duct tape.
Duct tape has kinda become a general term for all cloth-based tapes though, so you can indeed find duct tape not intended for ducts, but the fact the name was originally “duck tape” has nothing to do with that.
[0] https://tapeuniversity.com/products/foil-tapes/ul181ap-ul181...
The part I quoted says that duck tape is made of cloth and therefore is not duct tape.
I think people get confused because there is a brand of duct tape named Duck Tape. But even the Duck Tape packaging calls it a "duct tape".
Gaffer Duck
Donald Duck
These toons stick together
FWIW I've been using *nix machines for decades, and very rarely have I had the need to use structured data between commands. Yes, it would make things cleaner or more robust in certain cases, but in practice there are common ways of handling this. E.g. most tools support outputting or inputting null-terminated lines.
The world would be a much happier place if -print0 (or whatever) was universal, but no such luck.
The Unix philosophy as usually stated includes the rule "write programs that work together".
Most Unix commands don't work together in any meaningful sense. For example, `ps | kill` will not terminate all processes, as one might naively expect.
I'd say this is a clear violation of both the letter and the spirit of the Unix philosophy.
I know people who can't be bothered to learn these tools and write complete programs to solve problems instead of a shell one-liner.
Looks similar.
Edit: My brain skipped words while typing.
Probably dt will never be able to do things that awk can't do... At least for the non-trivial things. But I think it will be able to do some things with a more readable/declarative syntax.
I'll fill this out later, but imagine dt as trying to be a shell-friendly Functional Programming riff on awk, with first-class functions and no need to regex match or BEGIN etc. At the end of the day, assuming it catches on, I suspect choosing dt will probably be more often about taste
Which is the exact point in time when I solve the problem by using a real programming language.
I write shell-scripts when the current tools solve the problem easily. I distribute shell scripts to colleagues (never customers) only when I absolutely do not want to install extra software on their system.
I avoid awk and perl because if I'm going to introduce a second language to a tool, I'm not going to pick the niche ones everyone only learns opportunistically if at all. At that point I'd rather pick something my colleagues are deeply familiar with.
And on a small level, writing these little binaries that truly do one thing and do it well and that I understand intimately is a private joy.
dt [ "," split ] pls prints split
dt [ "," split ] map pls prints stack underflow
I think I could definitely use this if it had better docs and I could figure out how to.
hello,world,one
maybe,baby,you
awk -F, '{ print $2 }' Lshould give
world
baby
(tested on https://busybox.net/live_bbox/live_bbox.html )How so? I tried to seriously learn Bash a few days ago, and once I learned about word splitting, [[ ]] vs. [ ], "${MY_VAR}" just to properly reference a variable it seemed even more full of technical debt that Wat-full [1] Javascript. I figured it would be obsoleted by a modern shell language alternative by the time I will be 30 (currenty 18), it's not worth it, and gave up. I think the bar should not be Turing completeness for a programming language to be decent.
The help command is the only other resource you need, imo.
There is no 'wat' situation for a tool you really are proficient with.
push(1); push(2); push(3); multiply-top-of-the-stack(); add-top-of-the-stack();
So `status pls` means: call the function status (which leaves its results on the stack) and print the top of the stack with new-lines (multiple lines if it's an array).Then `status upcase pls` would do something like the above, but it calls a "to uppercase" function before printing.
Being able to filter, sort, or transform properties of the objects passed over makes it much more straightforward to work with than bash et al.
The memory overhead with sets of objects and their properties vs vanilla strings is significant though and easy to bump up against when working with large data sets. Best to try to keep all of the processing for that dataset in a single pipeline if you can. But that’s tradeoffs.
I had an idea where I'd make wrappers for all the popular commands that would accept JSON structured data instead of raw binary data and "do the right thing". And that way you could take advantage of it without having to change your shell tooling. And they'd all accept an extra argument called either --structured-out or --unstructured-out which would either emit JSON or render the output back to a "flat" string, as appropriate.
There have been so many nice CLI tools these last 10 years. Quality of life kind of nice. ag/rg, fzf, entr, up, lf...
Go and rust have been appreciated enablers, even though ruby/python/js demonstrated the concepts, with somewhat poor performances and UX.
Did some fancy DB work for them on OS/2 and early AS/400s in the '90s.
Names are hard.
And wait until you hear what the most popular open source alternative to Photoshop is called...
(I got sufficiently competent at perl before really noticing sed and awk existed that I'm pretty terrible at the latter two, so YMMV etc.)
I'd suggest that a functional shell like es-shell is more interesting than this experiment =)
As an aside, I wish I was cool enough for lobste.rs!
> Dt: Duct tape for your Unix pipes
^^^^ Excuse me, is it "duct" or "duck" tape?
I mean sure, "duct tape" and "duck tape" are both fine. "Duct tape" is the more common name today. The older name is "duck tape" after the duck cloth under the adhesive.
As an aside: If you care about such things, make sure to read up on how today's common version became popular. A 51-year-old woman named Vesta Stoudt, mother of 8, mailed her idea for a better ammunition box seal to the president (who approved production) after her bosses didn't do anything with the suggestion.And on a completely unrelated note, one of the greater stories of quasi-forgotten sacrifice of a mother for her son is the story of a woman in 1850s travelling around 2,000 kilometres by foot, by horse, by any means to get her son enrolled into university, dying shortly after: her name was Maria Dmitrievna Mendeleeva, her son's name was Dmitri Ivanovich Mendeleev [3], that Mendeleev.
[1] https://en.wikipedia.org/wiki/Vesta_Stoudt
[2] https://hsm.stackexchange.com/a/13154
[3] https://chemaust.raci.org.au/article/julyaugust-2019/mother%...