Live data from Hacker News

A Bourne-style shell built from scratch in 35 minutes [video]

destroyallsoftware.com

41–50 of 71 posts

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#41
I'm surprised there are no comments about the video itself.

How was this video made? Imagine trying to make it. What would you do? You need to write the code, but do you do it before or after you write the script? Or do you write the script after you write up the code so you know how to produce it?

Everything flows so smoothly. It's mesmerizing to watch. It's like code appears as fast as he can talk. But in a natural way, where it seems like it's typed as he's talking. But he certainly isn't typing it in realtime.

I'd like to make videos like this too, so I'd like to learn more about how to produce one.

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#42

I'm surprised there are no comments about the video itself. How was this video made? Imagine trying to make it. What would you do? You need to write the code, but do you do it before or after you write the script? Or do you write the script after you write up the code so you know how to produce it? Everything flows so smoothly. It's mesmerizing to watch. It's like code appears as fast as he can talk. But in a natural…

[deleted]

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#44
post #43

I'm impressed that destroyallsoftware is able to put their screencast library behind a $30/mo paywall. Am I the only one who thinks that's high?

No I agree, but then again that's a dollar a day and apparently he could buy a house in Seattle out of DAS so.. there must be enough people that are fine with that price to make a living.

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#46
post #12
post #3

There is more to writing a shell than simply reading commands and executing them after fork()ing. TTY handling must be done right¹ and interrupt and signal handling is rather tricky to get right as well². (Not to mention, of course, that a Unix shell is very cumbersome to use without pipes and redirection. EDIT: Pipes are implemented, but not redirection?) 1. http://www.linusakesson.net/programming/tty/ 2. https://ww…

If the implementation done in less than an hour is not featureful enough for you, obviously you don't have to use it. Doesn't reflect the value in this type of post on HN. If it was insufficiently pedagogical, or failed to give people the impression that shells are just software and They Can Do It Too, then I would understand the critique more, as those are clearly the goals.

I was trying to notify readers that the description is rather inaccurate; The HN title claims “Bourne-style shell”, and the article claims “shell in the style of the Bourne shell, Bash, zsh, etc.”, but a working shell actually requires TTY and signal handling; they’re not really optional features.

Sure, if all you’re doing is implementing a program with a command line interface like ftp(1), kermit(1), sftp(1), etc. that do not run arbitrary subprocesses, and do not need to handle being arbitrarily interrupted, then sure, implement away. I would suggest the Python “cmd” library as a good way to get started quickly. But for a login shell, used to run other programs, there are more complex considerations.

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#48

I'm surprised there are no comments about the video itself. How was this video made? Imagine trying to make it. What would you do? You need to write the code, but do you do it before or after you write the script? Or do you write the script after you write up the code so you know how to produce it? Everything flows so smoothly. It's mesmerizing to watch. It's like code appears as fast as he can talk. But in a natural…

That typing is in realtime! I rehearse screencasts until they flow naturally like you see here; there's no content editing and no script. I basically record the whole thing from beginning to end, over and over, until it doesn't change significantly from run to run and I don't feel it catching anywhere.

I do edit out pauses to breathe, to drink water, sometimes to double-check my thinking about what to do next, and occasionally to open a second terminal and check something.

Destroy All Software is six years old, so I've had a lot of practice. Most DAS screencasts require a couple hours of initial silent prep, then around 10 full runs from beginning to end. When it starts to flow well (run #5, give or take), I fire up ScreenFlow and start doing each run as if it might be the final published version (because it might actually be). With these longer "from scratch" screencasts, I only make one or two attempts per day; by then my throat and brain are both pretty tired.

I also live stream these on Twitch before making the final version, so you can see the sausage being made if you like! It's basically the same as what you saw in this video, but the pauses are there, you get to hear me become confused sometimes and comment on my mistakes, and there's a bit of Q&A afterward. The schedule isn't fixed, but I try to tweet with a couple hours' notice (https://twitter.com/garybernhardt).

Re: A Bourne-style shell built from scratch in 35 minutes [video]

#50
post #43

I'm impressed that destroyallsoftware is able to put their screencast library behind a $30/mo paywall. Am I the only one who thinks that's high?

I think, for the quality, it's on the lower end. Most such services that I subscribe to (or have in the past) are $20-30 per month. The quality of both the production and content is easily worth the money. Even more so now that there are 4 seasons of some really high-quality screencasts from the past.

The value I've personally got out of DAS is incredible.

Post reply on HN