Is there a (real) shell whose code is relatively short and self contained and would be valuable to read? This was always something I wanted to do but never quite spent time to look for a good one to explore.
It depends on what you are looking for. My recommendation for learning "how is X done in a shell" is the OpenBSD ksh: https://github.com/ibara/oksh
It's what they use for /bin/sh, it has everything that a complete shell needs (including a mechanism for providing command completions) and has code that is much easier to read than bash or zsh.
Although not the same... Destroy All Software has videos on building your own shell using Ruby. I watched it to learn and it was a lot of fun to watch him basically building a shell, I'm not really a Ruby guy, but it was easy to grasp. It's not free, you would need a subscription, but its worth the watch otherwise.
I think there's a good one if you search around for "xv6 sh.c". Hard to tell immediately from a google search just now since there are many implementations (people do it in school) and github's currently blocking requests from my phone.
Also helpful may be running strace on your shell, then reviewing the output line by line to make sure you understand each. This is a VERY instructive exercise to do in general.
I don't understand all these sites with moving parts even with muted soon, like if everything was a collection of GIFs. NYT followed this path and started to insert muted clips preheminently on their page one, very very annoying.
It is like a guy seeing headlines "wapo is losing" money and feeling ashamed in its "genius entrepreneur's ego / could never be wrong" and taking revenge on whoever he can take revenge and inflict pain just for the sake of it.
It is vibe justice for people, when you run Agents and don't check by yourself the code produced or the people jailed. Despite the appearancs your program don't really work and soon or later you find it to your expense.
Sometimes life is also to let it express partial, unfinished ideas, opinions and maybe later let our brain refine them on its own tempo. It never has been uncommon.
I don't understand what is the purpose of these bots? Nihilism? Vandalism? At first I doubted when people were saying that such and such comments was AI generated, I didn't understand the goal, the motives so I thought it couldn't be ; but lately I understood how dead wrong I was, we are submerged, I came to realize that we are eaten by a sea of these useless comments.
the motive is probably more depressing. a normal human who just wants human interaction. people interacting with something "you" wrote just feels nice and people like that stuff.
reply