Earlier quoted context omitted.
I've had the same idea. It would (I guess) rewriting the kernel from the ground up to turn every stream into two streams ? Telecoms uses both concepts (in-band signaling and out-of-band signaling) but I guess the Unix developers didn't get the memo ?
> I've had the same idea. It would (I guess) rewriting the kernel from the ground up to turn every stream into two streams ? Many (but not all) Unix implementations already have support for “record-oriented pipes” in the kernel, it is just that support has rarely been used. Linux has record-oriented Unix domain sockets (SOCK_SEQPACKET), but few use them. > Telecoms uses both concepts (in-band signaling and out-of-ban…
Dt: Duck tape for your Unix pipes
151–160 of 162 posts
Re: Dt: Duck tape for your Unix pipes
#152Earlier quoted context omitted.
TIL that " duck tape" is actually the correct/original version, and " duct tape" is a modern derivative. 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.
Ironically the kind of tape you actually use on metal ducting isn't even duck tape, instead it's a thin aluminum foil tape. 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).
Also +1 for Gaffer tape, especially for audio/video.
Re: Dt: Duck tape for your Unix pipes
#153Earlier quoted context omitted.
Presumably it's meant to be used when you're writing a shell script and you have some problem in front of you that would be trivial to solve in a real programming language and you find yourself saying a sentence starting with "I just wanna…" and rage-googling or asking ChatGPT or whatever.
Would be great if it could show some things it can do that awk can’t. Because awk is typically my Swiss Army knife if I run into these situations.
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
Re: Dt: Duck tape for your Unix pipes
#154Earlier quoted context omitted.
Would be great if it could show some things it can do that awk can’t. Because awk is typically my Swiss Army knife if I run into these situations.
I think it's written by someone who finds pipes and awk too awk ward to work with. 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.
Actually it's exactly the opposite, it's born out of a love for pipes, and shells, and tools like awk. If you know anyone working at Amazon, ask them to search "11 years of work in a weekend" for a tale of shell heroics that I wrote about while I worked there.
dt is intended to be a new tool in the "shell one-liners" category, just with concatenative FP semantics. :) It will not be everyone's cup of tea, and I will still love and use awk when appropriate
Re: Dt: Duck tape for your Unix pipes
#155up: Ultimate Plumber for shell https://github.com/akavel/up
Re: Dt: Duck tape for your Unix pipes
#156Trivia: "DT" is Japanese slang for "dōtei" ("童貞", means "virgin"). Names are hard.
Re: Dt: Duck tape for your Unix pipes
#157[flagged]
> During World War II, Revolite (then a division of Johnson & Johnson) developed an adhesive tape made from a rubber-based adhesive applied to a durable duck cloth backing. This tape resisted water and was used to seal some ammunition cases during that period. > "Duck tape" is recorded in the Oxford English Dictionary as having been in use since 1899 and "duct tape" (described as "perhaps an alteration of earlier duc…
Re: Dt: Duck tape for your Unix pipes
#158[flagged]
Maybe at least read the link next time before wasting all of our times commenting (everyone who read your useless comment, multiplied by the amount of time it takes to read it). The very thing you touched on is literally mentioned in like the 2nd paragraph.
Re: Dt: Duck tape for your Unix pipes
#159Earlier quoted context omitted.
Anyone else immediately thought of the attention hack wrt. to duck vs. duct? The hack is based on the opservation that any content with little, weird mistakes or errors get outsized attention.
In that case, I fell for it
Re: Dt: Duck tape for your Unix pipes
#160I either use Bash (which is actually a decent programming language if you spend the time to learn it properly) or Python.
> Bash (which is actually a decent programming language) 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…
The help command is the only other resource you need, imo.