The Unix Chainsaw - Gary Bernhardt

Channel:timmonta · Length:31:12 · Published:2015-03-11 · Views:25121

Watch on YouTube

Summary

Gary Bernhardt's Cascadia Ruby Conference 2011 talk on using the Unix shell for practical problem solving. He builds pipelines interactively by iterative refinement, using small tools as levers.

Why HN recommends it

Recommended as a brilliant demonstration of how to think in Unix pipelines.

gave a great talk about practical problem solving with the unix shell — HN, 2019

Testing, debugging & developer tools · Operating systems & kernels

Subtitles (excerpt)

[Applause] Good morning again. So last week, two week two or three weeks ago, this happened. There was some guy in Pioneer Square who was wearing like a a mesh um uh tank top thingy and uh jean shorts and m mismatched chucks. And I was like, "This is atrocious." So Gary decides, you know, he's going to wear a tie, class it up a bit. And uh I don't know. I didn't feel like he could really do much better than I could. So then yesterday, I actually forgot about this. Josh, are you in here? Yeah. Yeah. So he was in fact the only one wearing a tie yesterday. So, I figured I'd better follow through with what I said. And so, yeah. Gary, you ready? Gary Burnhart is going to talk to you about [Applause] Unix. My microphone So, as you can see, I'm sadly not wearing a tie. The shirt I was going to wear it with got totally soy sauce the other day. Sad times. Um, right. So, chainsaws and units. Uh, chainsaws are awesome if you need to kill trees, but sadly chainsaws are also very good at killing people accidentally. Uh, so people fear chainsaws, as they should, because uh, dying is is not such a great thing. People fear powerful tools like Unix as well, probably due to some sort of evolutionary response to powerful things, but Unix cannot kill you.

On Hacker News

Gary Bernhardt[1] gave a great talk about practical problem solving with the unix shell: "The Unix Chainsaw"[2]. "Half-assed is OK when you only need half of an ass." In the talk, he gives several demonstrations a key aspect of why unix pipelines are so practically useful: you build them interactively . A complicated 4 line pipeline started as a single command that was gradually refined into some… — pdkl95, 2019-02
From the same person: - The unix chainsaw, how to use tiny tools[1] as lever upon themselves. No absurd wit as in wat. Simply brilliant. [VIDEO] - Also listed above the wat page, [LINK] : boundaries, a whole new world. More abstract wishful thinking. Still brilliant. — agumonkey, 2016-04
1.) Be curious. Stay curious. Experiment, play with things. Your time during university is likely the best time for this and it will likely get harder later on when you're on the job and there's much more emphasis on finished work than on learning experiences. Also, I'm quite sure that it will be beneficial for you if you familiarize yourself with different ways of thinking (obviously programming… — btschaegg, 2022-01
As others have already menti9oned, running 'bc' isn't actually that expensive. Comparing it to Bitcoin is ridiculous. Let's investigate the actual cost of that sum: $ cat foo.sh #!/bin/bash a="1.5" b="0.5" sum="$(echo "${a} + ${b}" | bc)" echo "The sum of ${a} and ${b} is ${sum}" $ /usr/bin/strace -q -D -w -c ./foo.sh The sum of 1.5 and 0.5 is 2.0 % time seconds usecs/call calls errors syscall --… — pdkl95, 2019-05
I know I've had a few situations where the "play around with the numbers" part happened first. Usually once the actual goal was known the algebra (or similar details) would be obvious... but sometimes the inefficient/toy implementation was good enough. Sometimes half-assed is ok, if it's the the right half of the ass.[1] The wrong half becomes yet another type of technical debt to be refactored "… — pdkl95, 2017-06

Related videos