412 points · by conanxin · 2y ago · 260 comments
The analogy of OS as cars (Windows is a station wagon, Linux is a tank) is brought up in the recent Acquired episode on Microsoft, where Vista was a Dodge Viper but Windows 7 was a Toyota Camry, which is what users actually wanted.
"I embraced OS X as soon as it was available and have never looked back. So a lot of 'In the beginning was the command line' is now obsolete. I keep meaning to update it, but if I'm honest with myself, I have to say this is unlikely."
https://slashdot.org/story/04/10/20/1518217/neal-stephenson-...
But people still dredge this quarter century old apocrypha up and use it to pat themselves on the back for being Linux users. "I use a Hole Hawg! I drive a tank! I'm not like those other fellows because I'm a real hacker!"
At the time I was an embedded developer at Microsoft and had been a Windows programmer in the mid 90s. It was pretty clear that there was some dunning Krueger going on here. Neal knew enough about tech to be dangerous, but not really enough to be talking with authority
It's kind of ironic that you're using a post from 20 years ago to invalidate an essay from 25 years ago, about an OS that's been substantially dumbed down in the last 10 years.
Bad corporate blood will tell.
So when Apple started making workstations, I got one. I've been a satisfied customer ever since.
I have no idea whatsoever what dumbing down you're referring to. The way I use macOS has barely changed in the last ten years. In fact, that's a major part of the appeal.
It’s a zsh shell with BSD utils. 99% of my shell setup/tools on Linux just work on macOS. I can easily install the gnu utils if I want 99.9% similarity.
I very happily jump between macOS and Linux, and while the desktop experience is always potentially the best on Linux (IMO nothing compares to hyprland), in practice macOS feels like the most polished Linux distro in existence.
Do people just see, like, some iOS feature and freak out? This viewpoint always seems so reactionary. Whereas in reality, the macOS of the past that you’re pining for is still right there. Hop on a Snow Leopard machine and a Ventura machine and you’ll see that there are far, far more similarities than differences.
Neal said the essay was quickly obsolete, especially in regards to Mac, but I'll always remember this reference about hermetically sealed Apple products. To this day, Apple doesn't want anyone to know how their products work, or how to fix them, to the point where upgrading or expanding internal hardware is mostly impossible.
As for Apple, their openness comes and goes. The Apple II was rather open, the early Macintosh was not. Macintosh slowly started opening up with early NuBus machines through early Mac OS X. Since then they seem to be closing things up again. Sometimes it was for legitimate reasons (things had to be tightened up for security). Sometimes it was for "business" reasons (the excessively tight control over third-party applications for iOS and the incredible barriers to repair).
As for the author's claims about their workings being a mystery, there wasn't a huge difference between the Macintosh and other platforms. On the software level: you could examine it at will. At the hardware level, nearly everyone started using custom chips at the same time. The big difference would have been IBM compatibles, where the chipsets were the functional equivalent of custom chips yet were typically better documented simply because multiple hardware and operating system vendors needed to support them. Even then, by 1999, the number of developers who even had access to that documentation was limited. The days of DOS, where every application developer had to roll their own hardware support were long past. Open source developers of that era were making a huge fuss over the access to documentation to support hardware beyond the most trivial level.
Threre is an implicit supperiority in the text which is just as cringey now as it was at the time, but i think its still a good analogy about different preferences and relationships different people have to their computers.
IME he hates to revisit anything he's already written so this claim is polite but implausible.
I also primarily use Windows and don't have a dog in the fight you mentioned. I might actually dislike Linux more than OSX, though it has been quite a while since I've seriously used the one-button OS.
Setting aside the "more BSD/Mach than Linux", OS X pressed a lot of the same buttons that BeOS did: a GUI system that let you drop to a Unix CLI (in Be's case, Posix rather than Unix, if we're going to be persnickety), but whose GUI was sufficiently complete that users rarely, if ever, had to use the CLI to get things done. Folks who love the CLI (hi, 99% of HN!) find that attitude baffling and shocking, I'm sure, but a lot of people really don't love noodling with text-based UIs. I have friends who've used the Mac for decades -- and I don't mean just use it for email and web browsing, but use it for serious work that generates the bulk of their income (art, desktop publishing, graphic design, music, A/V editing, etc.) -- who almost never open the Terminal app.
> though it has been quite a while since I've seriously used the one-button OS
Given that OS X has supported multi-button mice since 2001, I certainly believe that. :)
Linux and the UNIX derivates are not even cousins. Not related. Not even the same species. They just both look like crabs a la https://en.wikipedia.org/wiki/Carcinisation.
The trouble with the original MacOS was that the underlying OS was a cram job to fit into 128Kb, plus a ROM. It didn't even have a CPU dispatcher, let alone memory protection. So it scaled up badly. That was supposed to be fixed in MacOS 8, "Copeland", which actually made it out to some developers. But Copeland was killed so that Apple could hire Steve Jobs, for which Apple had to bail out the Next failure.
Meanwhile Windows has become those cars with two 27" screen as dashboard, which has bad user experience and full of advertisements.
It's a close analogy, because the Comet was actually the next model of Edsel. They just changed the branding. Same with Vista to 7.
___
[1]: Ironically, the heavy state subsidies for buying an electric car are, like anything else in Norway, financed by... Oil money.
Underneath it was just Windows, but the interface ruined it
I assume if anyone associated with Microsoft compared Vista to anything other than an abject failure, it's because they are - at best - broken or defective people who were involved in the creation of Vista, and therefore not objective and not to be trusted in any way.
Dodge Viper? WTF?
I'm not sure about the analogy though, they might have been thinking of later Viper versions where the complaints would be more about cost, gas mileage, or general impracticality for daily use.
https://youtu.be/WdtK9Sj8ADw?list=PLoTU9_iCGa6go3vsnxlNn1wZS...
Screenshots along with text, then use Microsoft Paint to mark up the screen shots. For example, circling the appropriate menu option in a thick red line. Sadly, I do not know how to graphically convey the double-click operation.
Its a time consuming and error prone process, best used if the buggy GUI application is abandonware. Otherwise, the new version will have the same bug or non-intuitive process but the GUI will be unrecognizable. Probably because some manager, somewhere, read too many HN articles and decided a user-facing refactor was the most important thing they could possibly do.
The usual interpretation is that scripts glue together system commands that don't otherwise incorporate one another. This is tremendously useful and is by itself a huge advantage over GUIs.
But the second sense is that vast libraries of scripts keep developers bound to their previous UI promises. You don't capriciously change command-line options without raising all kinds of ire. I've seen GNU tools (tar comes to mind) in which options have been "deprecated" for decades, yet are still available. I seem to recall a very small number of cases where options had their senses entirely inverted, to much protest, and ultimately abandonment of those tools. In other cases you've got generations of programs which support backwards-compatible options with precursors: exim and postfix with sendmail, ssh with rsh, alpine with pine, off the top of my head. Developer headspace and script compatibility are valuable.
On that note, whilst I find the *BSD's extreme conservatism annoying myself, I can appreciate that it does lead to increased consistency over time as compared with GNU userland.
As an aside, I think a great foundation for a GUI application is a "server" API that the GUI interacts with. You can automate a lot of testing this way and you can give power users the ability to automate workflows. Web apps are already built this way, but if you're making a standalone app you even have the privilege of making a very chatty API, which makes testing even easier.
That said, the best late 90s expression of the core advantage of the GUI over the TUI/CLI is that it demands less of the user:
"recognize and click" vs
"remember and type"
That seems very fundamental to me.
I have not seen as succinct expression of tradeoffs for V(oice)UI or L(LM)UIs
Want to know how to copy and paste quickly? It's Right There in the menu you found the action in. Don't know that yet? Alt + E (underlined in Edit) then some other key to jump to the action in the list, or you now see the list, abort the previous command sequence with Esc, and then start memorizing the new shortcut for Ctrl+c + Ctrl+v.
Maybe the chat interface does away with the first half of the GUI/CLI schemes, skipping over learning the affordance part of the interface.
{ select[i]@dropdown:states > click@button:submit }
The fact that we don't have this (yet) does not mean it is not possible. In fact, given that the current darling of tech LLMs can 'compute visually' based on tokens (text) should make it clear that any 'representation' can ultimately be encoded in text.So a 'record' feature on GUI 'a' can create action encoding that can be emailed to your peer looking at GUI 'b' and 'pasted'.
I feel like it could be done if it was really a goal from day one, and there were things like "record this set of actions as a script" built into the toolkit. Even Applescript was still an afterthought, I think, albeit a very well supported one.
In the meantime, given the comprehensive failure of UI toolkits to support this style, it is completely fair for people to act and speak as if it doesn't exist.
To do that in a gui-centric fashion, the only tools we actually have are textual commands that direct gui action. essentially its a middleman step: if we are already writing our applescript lets say, we might as well just abrogate the actual commands that our applescript is trying to abrogate through the gui system.
As a conceptual framework http://augmentingcognition.com/assets/Kay1977.pdf
Evidently the financial capitalism have worked for a certain period but does not work anymore. So, why keeping committing suicide? We have started to suicide with the WWI. We kept going with WWII and we continue now.
We are still the leader for IT, and we know what does it work, the classic FLOSS/at least open IT model, the one where some sell iron not bits, the one where customers own their systems and bend them as they wish, the one where communication is not owned by some walled gardens but open like on Usenet, classic mails (as opposite to webmails, hiding the decentralized ability for most users who do not own the WebMUA). To continue with the China comparison I've recently bought some battery tools, very cheap crap but enough for domestic usage and I've observed that batteries have a standard connector, I can swap them from different brands issueless, batteries, chargers are "standard". I also own some high end domestic battery tools, who happen to have a damn nfc tag inside the battery tying it to the device, even if inside the battery are classic connected li-ion batteries. The same I observed for BEV, some friends and I have three Chinese BEV from different brands/models and they have a gazillion of common parts. So to say "open/standard pay back" yes, it might erode SOME OEMs margins, but pay back the society at a whole and as a result the OEM itself. The same is valid in software terms. My desktop is Emacs/EXWM, I use as a search&narrow framework consult/orderless/vertico, they simply "plug in" any other packages because the system is a unique application end-user programmable at runtime. You do not need to "specifically support" a package to integrate it. You do not need third party to explicitly support your package to use it together. And what we do instead? Our best to create walled gardens, we have had XMPP, SIP/RTP and now most are on Zoom/Teams/Meet/Slack/Skype/* all walled gardens. Even many push to substitute emails with some new colorful walled garden. Similarly any app try to add features someone else have since it's impossible just using it, like a sexp in a buffer.
As a result modern IT from Unix where the user at least can combine simple tools with some IPCs in script we are limited by cut&paste, drag&drop and not much more. Anything is damn complicated because there are no shared data structure in a shared environment, but any "app" do everything on it's own, often with a gazillion of dependencies who have a gazillion of deps on their own, with a big load of parsers of any kind and even "some standard to pass data" (like JSON) who try to emerge but are still not a shared data structure in an unique integrated environment.
All of this is the old Greenspun's tenth rule and actually is killing our IT innovation, killing one of the last sector we still rules, for the same issues that have killed our industry essentially.
As an aside, but I think relevant and you might find it interesting:
A decade or so I discovered Oberon, the last masterwork of the great genius of programming languages Niklaus "Bucky" Wirth. A complete OS, UI and compiler, in about four and a half thousand lines of code.
I have it running in various forms.
I introduced it to the Squeak Smalltalk community, and when I told them what I was looking for:
« a relatively mature, high-performance, small OS underneath, delivering some degree of portability -- something written in a type-safe, memory-managed language, with multiprocessor support and networking and so on already present, so that these things do not have to be implemented in the higher-level system. »
That is how I found Oberon. They told me such a thing did not and could not exist.
I gave them some links and people were amazed.
It seems deeply obscure in, as you say, the West.
But I have found an active community working on it and developing it. It is in Russia.
It may be that in other countries now the target of Western sanctions, we may inadvertently be fostering some very interesting tech developments...
Bullhorn: "But if you accept one of our free tanks we will send volunteers to your house to fix it for free while you sleep!"
Did Linux distros actually offer support at some point? (By what I assume would be some project contributor ssh-ing into your machine)
My impression was always the arguments were more like "Well yes, but we have this literal building full of technical manuals that describe every bolt and screw of your tank - and we can give you a copy of all of them for free! And think about it - after you have taken some modest effort to read and learn all of them by heart, you'll be able to fix and even modify your tank all on your own! No more dependence on crooked car dealers! And if you need help, we have monthly community meetups you can attend and talk with people just as tank-crazy as you are! (please only attend if you're sufficiently tank-crazy, and PLEASE only after you read the manuals)"
(This was decades ago, the situation has gotten significantly better today)
Ever wonder how Red Hat became a billion-dollar company before it was bought by IBM, and now makes up a huge segment of IBM's revenue stream?
Have you noticed SuSE is still around?
Have you ever speculated on how Canonical keeps its lights on?
Paid support, my naive friend. Linux support is big business and is what keeps the popular distros alive.
https://wiki.archlinux.org/title/Arch_Linux
> Arch developers remain unpaid, part-time volunteers, and there are no prospects for monetizing Arch Linux
I don't think that was the intended implication. I think the analogy is more akin to: "If send us a bug report, we'll fix it and ship a new version that you can download and use for free." In the olden days, you'd have to buy a new version of commercial software if it didn't work for your machine, complementary patches were rare.
I think DEC had one or two. And you could find someone who would meet you somewhere to help you out, it was an exciting time. Also there were lots of install fests for Linux.
Most activity took place on USENET, so getting help was rather easy.
For example, I had asked how I could connect 2 monitors to my 386SX, one controlled by a VGA card, the other via a mono-card, each monitor with a couple of VTs. That was doable with Coherent on install. A day later I got a patch.
Things moved very quickly back then :)
Who would want that?
"Stay away from my house, you freak!" would be the normal reaction. Unless some serious trust is developed, I would not let people into my house while I sleep.
Also the actual usual reaction would have been more like: "hey it is open source, you can fix anything on your tank yourself"
You need a new module to connect with your other devices, just build it yourself, no big deal!
The tank people offer to send someone to look into the car (rsp. tank) but the buyer rejects them from entering their house.
That's significant, because a car is much less private than a house. In the real world, if my car had an issue, it would be perfectly reasonable to give it into the hands of a mechanic, even if I don't know them personally. (And evidently the reputation of the dealership isn't the deciding factor either, otherwise all the independent repair shops wouldn't exist)
On the other hand, I'd be much more wary to let strangers into my house without supervision, because I have far more private and valuable possessions there than in my car.
So the question is whether computers are more like cars or like houses. I'd argue, they sort of blur the line and have definitely moved closer to "house" in the last decades. But it might have been different back then.
Some recent discussion on the border phone search ruling:
> We invite specialists to take part in a professional discussion to identify the causes of Oracle DBMS failure
> System logs and a more complete description of the situation will be posted in the blog. To participate in the discussion, you must fill out the registration form and wait for an invitation to your email.
https://web.archive.org/web/20120716225650/http://www.sbrf.r...
wget -O - https://web.stanford.edu/class/cs81n/command.txt | nroff | less
This essay should be a mandatory reading for all CS students and anyone wanting to call himself hacker.
We should move to the Command Table.
I was a kid at the time, but did many people actually buy windows? I know about the ad-thing where the cast of Friends or whatever bought windows 95, but as I recall even back then the OS just came with the device. The only exception was OSX, which was a “Big Deal,” even non-technical people downloaded it.
Anyway, it is funny to see this in retrospect. Nowadays, operating systems have become so commoditized that you can’t even make a business selling them.
I love Linux but his description is quite optimistic.
Today new OS versions aren't such a big deal, but when Windows 95 came out, and then XP, they were huge, with total interface redesigns.
On the other hand, I don't think people went out of their way as much to buy smaller upgrades like Windows 98.
Yep! Windows did indeed come with machines, but the upgrades were always a big seller. I remember when Windows 3.1 hit the shelves and seemed to be everywhere. Same with Windows 95 but that one was a tougher upgrade because of the increased system requirements.
Definitely. A new boxed OS version would often be the only updates anyone ever applied to their system. Even if you had Internet access, dial-up speeds and limited disk space meant downloading OS updates was often impractical. Even relatively small updates took forever to download.
There was also the relative costs of a computer. A $2,000 computer in 1995 would be about $4,000 in today dollars. Buying an OS update would be a relatively inexpensive way to upgrade the capabilities of your expensive computer without completely replacing it. Going from some Windows 3.1 release to Windows 95 would have been a nice upgrade in system stability for many people. Certainly not everyone but for many.
This is markedly different from how it was in the past when they needed people to get up, go to a store, and buy the disc containing the new version of the OS.
https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...
Not anymore. https://justine.lol/ape.html
In the Beginning was the Command Line (1999) - https://news.ycombinator.com/item?id=37314225 - Aug 2023 (2 comments)
In the Beginning Was the Command Line - https://news.ycombinator.com/item?id=29373944 - Nov 2021 (4 comments)
In the Beginning was the Command Line (1999) - https://news.ycombinator.com/item?id=24998305 - Nov 2020 (64 comments)
In the beginning was the command line (1999) [pdf] - https://news.ycombinator.com/item?id=20684764 - Aug 2019 (50 comments)
In the Beginning Was the Command Line (1999) - https://news.ycombinator.com/item?id=16843739 - April 2018 (13 comments)
In the Beginning Was the Command Line (1999) - https://news.ycombinator.com/item?id=12469797 - Sept 2016 (54 comments)
In the beginning was the command line - https://news.ycombinator.com/item?id=11385647 - March 2016 (1 comment)
In the Beginning was the Command Line, by Neal Stephenson - https://news.ycombinator.com/item?id=408226 - Dec 2008 (12 comments)
In the beginning was the command line by Neil Stephenson - https://news.ycombinator.com/item?id=95912 - Jan 2008 (5 comments)
In the Beginning Was the Command Line - https://news.ycombinator.com/item?id=47566 - Aug 2007 (2 comments)
(Reposts are fine after a year or so; links to past threads are just to satisfy extra-curious readers. In the case of perennials like this one, it's good to have a new discussion every once in a while so newer user cohorts learn what the classics are.)
But this is precisely the same as what is lost in the transition from the
command-line interface to the GUI.
Why are we rejecting explicit word-based interfaces, and embracing
graphical or sensorial ones--a trend that accounts for the success of both
Microsoft and Disney?
But we have lost touch with those intellectuals, and with anything like
intellectualism, even to the point of not reading books any more, though we
are literate.
Elsewhere [0] I have called this concept "post-literacy," and this theme pervades much of Stephenson's work - highly technologically advanced societies outfitted with molecular assemblers and metaverses, populated by illiterate masses who mostly get by through the use of pictographs and hieroglyphic languages (emoji, anyone?). Literacy is for the monks who, cloistered away in their monasteries, still scribble ink scratchings on dead trees and ponder "useless" philosophical quandaries.The structure of modern audiovisual media lends itself to the immediate application of implicit bias. On IRC, in the days of 56k before bandwidth and computer networks had developed to the point of being able to deliver low-latency, high definition audio and video, perhaps even for "real-time" videoconferencing, most of your interactions with others online was mediated through the written word. Nowhere here, unless some party chooses to disclose it, do race, gender, accent, physical appearance, or otherwise, enter into the picture and possibly cloud your judgment of who a person is - or, more importantly, the weight of their words, and whether or not they are correct, or at least insightful; consider Turing's "Computing Machinery and Intelligence" paper which first introduced what is now called the "Turing test," and how it was designed to be conducted purely over textual media as a written conversation, so as to avoid influencing through other channels the interrogator's judgment of who is the man, and who is the machine.
The only real problem is that anyone who has no culture, other than this
global monoculture, is completely screwed. Anyone who grows up watching TV,
never sees any religion or philosophy, is raised in an atmosphere of moral
relativism, learns about civics from watching bimbo eruptions on network TV
news, and attends a university where postmodernists vie to outdo each other
in demolishing traditional notions of truth and quality, is going to come
out into the world as one pretty feckless human being.
Moreover, the confusion of symbols for reality, the precession of digitized, audiovisual content from a mere representation to more-than-real, digital hyperreality (since truth and God are all dead and everything is merely a consensual societal hallucination), leads people to mistake pixels on a screen for actual objects; narrative and spin for truth; influencers, videos, and YouTube personalities for actual people; or words from ChatGPT as real wisdom and insight - much in the same way that Searle's so-called "Chinese room" masquerades as an actual native speaker of Mandarin or Cantonese: "What we're really buying is a system of metaphors. And--much more important--what we're buying into is the underlying assumption that metaphors are a good way to deal with the world." So many ignorant people could be dangerous if they got pointed in the wrong
direction, and so we've evolved a popular culture that is (a) almost
unbelievably infectious and (b) neuters every person who gets infected by
it, by rendering them unwilling to make judgments and incapable of taking
stands.
It simply is the case that we are way too busy, nowadays, to comprehend
everything in detail.
The structure of modern short-form, upvote-driven media, lends itself to the production of short-form messages and takes with laughably small upper bounds on the amount of information they can contain. In a manner reminiscent of "you are what you eat," you think similarly to the forms of media you consume - and one who consumes primarily short-form media will produce short-form thoughts bereft of nuance and critical thinking, and additionally suffer from all the deficits in attention span we have heard of as the next braindead 10-second short or reel robs you of your concentration, and the next, and the next...Beyond the infectious slot machine-like dopamine gratification of the pull-to-refresh and the infinite doomscroll, the downvote has become a frighteningly effective means of squashing heterodoxy and dissent; it is only those messages that are approved of and given assent to by the masses that become visible on the medium. Those who take a principled stand are immediately squashed down by the downvote mob, or worse, suffer from severe censure and invective at the hands of those zealous enforcers of orthodoxy. The downvote mechanism is reminiscent of the three "filters" Chomsky wrote of when he was discussing the mass media in "Manufacturing Consent," and the way advertisers, government, and capital all control and filter what content is disseminated to media consumers.
The message of modern, audiovisual, short-form, upvote-driven social media is bias and group compliance bereft of nuance. If you want to produce and consume novel ideas you are better served by media based on the written word.
He returns to it rather explicitly in _Dodge in Hell,_ with the odyssee through the "Facebooked" wastelands of -- where was it, Idaho / Montana / the Dakotas? Something like that -- where the MAGAfied barely-literate natives hound the scientist / tech-type heroes.
Whenever I see new coders struggle, it usually is because they:
- Don't know the context of what they are executing
- Don't know about the concept of input and output
On the command line, the context is obvious. You are in the context. The working dir, the environment, everything is the same for you as it is for the thing you execute via ./mything.py.Input and output are also obvious. Input is what you type, output is what you see. Using pipes to redirect it comes naturally.
Not being natively connected to context, input and output is often at the core of problems I see even senior programmers struggle with.
While I share the opinion that the command line is _the one true way_ of computing, I don't think this is really all that true. Computers are alien. GUIs are alien. CLIs are alien. Everything is learned. Everything is experience. Everything is culture. Learning, experience, and culture blind us from the experience of the novice. This is "expert blindness".
Why Western Designs Fail in Developing Countries https://youtu.be/CGRtyxEpoGg
https://scholarslab.lib.virginia.edu/blog/novice-struggles-a...
Why add this?
Whats the solution then?
We have already given so much in the western world.
But CLI contexts are only obvious if the computer user is already familiar with the CLI which biases the learned mind to perceive things as obvious when they really are not.
A lot of CLI commands syntax are based on position instead of explicit argument names.
E.g. creating file system links via CLI has opposite syntax positions in Linux vs Windows:
- Linux: ln srcfile targetlink
- Windows : mklink targetlink srcfile
If one goes back & forth between the 2 operating systems, it's easy to mis-type the wrong syntax because the CLI doesn't make it obvious. On the other hand, using a GUI file browser like Ubuntu Nautlius or Windows Explorer lets a novice create links ("shortcuts") without memorizing CLI syntax.This gap of knowledge is also why there is copy&paste cargo-culting of inscrutable ffmpeg, git, rsync, etc commands.
E.g. using ffmpeg to covert a DVD to mp4 by manually concatenating *.VOB files has very cumbersome and error-prone syntax. It's easier to use a visual GUI like Handbrake to click and choose the specific title/chapters to convert.
CLI vs GUI superiority depends on the task and the knowledge level of the user.
Yes, command line suffers from discoverability of which different applications (such as ln/mklink) may not be consistent.
It is one of the bigger problems (imho) of the cli but it doesn't go against GPs point.
The command line does have a learning curve (partly because of the above), but it is also quite rewarding.
The cli excels because it is extremely flexible, with far more options available than a set of buttons could ever display. But discoverability rounds down to 0, and there are footguns. It seems like spreadsheet software has found an almost drop in ui that would greatly enhance the cli.
I'ts just that if I'm going to rely on someone else, I'd prefer for that someone else to be one of the people who has developed and applied their own expertise to that problem domain, rather than a statistical model that only actually knows how likely words are to appear in proximity to each other, and has no capacity to validate its probabilistic inferences against the outside world.
The rest will be prompty fired in the spot.
Quick outline of the course, in case anyone wants a starting point:
* Introduction
Quick history of Unix
* When you log in
Difference between login and interactive shells
System shell files vs user shell files
.zshenv for environment variables like PATH, EDITOR, and PAGER
.zprofile for login shells, we don't use it
.zshrc for interactive shells
Your login files are scripts, and can have anything in them
* Moving Around
** Where am I?
pwd = "print working directory"
stored in variable $PWD
Confusingly, also called current working directory, so you may see CWD or cwd mentioned
** What is here?
ls
ls -al
ls -alt
. prefix to filenames makes them hidden
. is also the current directory!
.. means the parent directory
file tells you what something is
cat displays a file
code opens it in vscode
** Finding my way around
cd
cd -
dirs | sed -e $'s/ /\\\n/g'
** Getting Help From The Man
man 1 zshbuiltins
manpage sections
** PATH
echo $PATH | sed -e $'s/:/\\\n/g'
zshenv PATH setting
which tells you what will be run
** Environment Variables
env | sort
EDITOR variable
** History
ctrl-r vs up arrow
** Permissions
Making something executable
** Prompts
zsh promptinit
zsh prompt -l
** Pipes and Redirection
Iterate to show how pipes work
cat ~/.zshrc | grep PATH
ls -al > ~/.tmp/ls-output.txt
** Commands
*** BSD vs GNU commands
BSD are supplied by Apple, and Apple often uses old versions
GNU are installed via homebrew, and match those commands available in LinuxThere is a level of abstraction that makes sense. What level that is is dependent on your objectives.
it can be a single make command
I think Windows very much wanted to be something different with COM. Instead of starting a shell in the context of the program, you'd connect some external "shell" into the very object graph if your program to inspect it. It turns out to be very difficult, and Windows has largely retreated to commandline centric architecture, but I think there was some essential attempt at foundational innovation there.
I would argue that the commandline has very much proven to be the best trade-off between being useful and being simple, but there is no saying if there exists some alternative.
This is definitively not true for macOS.
If one starts with GUIs and doesn't really understand what is behind, then all kinds of trouble happen.
So I guess, as with any tool, understanding is key.
Another example could be qemu and the GUIs that we have nowadays. One final example would be simply drag and dropping files via Finder instead of using cp/mv
I’m not really religious about anything, but I often end up going back to the CLI for a lot of things because it’s just less of an annoyance.
I've seen people think they have a specific Python environment active just because they were in their project's directory on the command line.
I've seen people not understand that "python -m pip" is a command and even if they are in a directory which has "python" in its name, they still have to type "python" for that command.
PS: The command line might even be an emperor. And the emperor could be naked...
I wrote python-wool as a simple wrapper to python to make that true because it's just easier that way. Direnv can also be configured to do that as well.
Outside of the syntax (which seems to live forever), you have things like non-sane defaults, obscurantist man pages ... the list goes on.
Repeating the same actions in a CLI with no readline is an exercise in frustration, but ... that's not what happens most of the time.
When you’re typing a lot, you really don’t want to do a lot of typing for each step. And the shell scripts were for automating some process, not solving a particular problem (you use a programming language for that). The workflow is to have the references ready in case you forgot something.
That brings up the man pages, which can varies in quality, but, for most software I’ve used, tend to be comprehensive. But they assume that you’re knowledgeable. If you’re not, take some time to read a book about system administration (users, processes, files permissions,…).
And I still think that we can improve. More over, we ought to improve.
“To make a building, you need to have a foundation, something to keep the roof up, and a way for people to move inside.”
CorelDraw feels more efficient because one quickly has what looks like a beautiful, colorful house on the screen. And then one does not understand why the doors don't work correctly.
You sound like someone who never tried to write a cronjob script…
Input maybe, although realizing that instead of typing, you can pipe, is a major conceptual breakthrough when new users are learning to work the command line.
But output? The existence of stdout and stderr as two sources of text with no visible distinction is highly nonobvious and continues to trip me up in practical situations to this very day.
Wow, that seems quite fundamental. Computing 101.
I'm not a "coder" and I spend "99%" of time on the command line. Because I prefer it. Ever since the 80s when I first used a VAX.
On the command line, the context is obvious
Hardly.If you’re lucky, you might know what your current directory is.
More often than not, at any particular point, your command line is paused in the middle of some likely ad hoc multi-step process. A process with a bunch of state stored as opaque blobs of data scattered across the file system. More so exacerbated in my case as those files are likely cleverly named x, x1, x2.
Modern systems benefit from things like command history, scroll back buffers, and similar constructs that can be leveraged to help you, as the user, restore the current context. But for a very long time, many simply returned to a $ and a soulless, cold, blinking cursor callously expecting that you recall you know where you are and what you’re doing.
The tools are there to help you dig and perhaps restore the current context (current directory, latest files, etc.) but that’s a far cry from “obvious”. Lots of folks return, blow their internal call stack, and just start over when they come back from lunch (if practical).
That complicated series of commands you just ran? Copy and paste them into the Jira ticket so the junior employee who makes half your salary can run them next time.
Or, more likely: so that you yourself can remember what you did the next time the problem arises. Or your colleague, who is senior, but does not know this part of the codebase or infra well. Heck, you can even write a shell script, automate things and have your productivity increased!
These things will be just as true and useful in some communist FOSS context as they are in a capitalist system.
If the solution to a problem is as simple as “copy and paste this command”, I want to hand that off to a junior employee so I can go do other things that require more creativity.
Yet events are the primary way anything happens on a computer, whether it’s a user system or a server.
Just in userspace you have;
dmesg -w
tail -f /var/log/messages
There's also dbus to monitor on Linux systems and a lot of kernel hook
tricks you can use to get a message pop up if an event happens.Because it gets annoying to have a process splurge notification stuff to a term you are working in, that's why you have info-bars which many terminal emulators support.
<https://en.wikipedia.org/wiki/Expect>
Much of modern operating systems is events-based and relies on polling for specific actions, devices connecting / disconnecting, etc. Linux device management is based on this, for example. There are numerous scripts which fire as a service is enabled or disabled (networking "ifup" and "ifdown" scripts, for example), or services are started / stopped. Systemd extends these capabilities markedly.
And of course there's a whole slew of conditional processing, beginning with init scripts, [], test, &&, ||, and specific conditional logic within shells, scripting, and programming languages.
Files are not a good abstraction for events. Signals are broken in many ways. And DBus is both extremely clunky to use and non-portable.
There isn’t a built-in event paradigm similar to how streams and pipes are an integral part of the Unix-style CLI.
Why is that? On the low level everything is a state of electronic cells. Files address those cells in a suitable fashion. Modern programming abstractions such as async/await are very simple, but fail miserably if you need something really complex and efficient.
This just seems like an odd non sequitur.
Me: navigate to linked website, see wall of text.
Me: clicks reading mode
Me: *193 - 245 minutes*
Me: bookmark to read later; probably not
Putting it in a browser window gives it bad odds. You can also listen to it:
Begins at 01:30, 25 minutes.
That link is only part 1 (of 7). It's still around 2 and a bit hours of listening in total. https://www.youtube.com/@robertreads4323/videos
In his book The Life of the Cosmos, which everyone should read, Lee Smolin gives the best description I've ever read of how our universe emerged from an uncannily precise balancing of different fundamental constants. The mass of the proton, the strength of gravity, the range of the weak nuclear force, and a few dozen other fundamental constants completely determine what sort of universe will emerge from a Big Bang. If these values had been even slightly different, the universe would have been a vast ocean of tepid gas or a hot knot of plasma or some other basically uninteresting thing--a dud, in other words. The only way to get a universe that's not a dud--that has stars, heavy elements, planets, and life--is to get the basic numbers just right. If there were some machine, somewhere, that could spit out universes with randomly chosen values for their fundamental constants, then for every universe like ours it would produce 10^229 duds.
Though I haven't sat down and run the numbers on it, to me this seems comparable to the probability of making a Unix computer do something useful by logging into a tty and typing in command lines when you have forgotten all of the little options and keywords. Every time your right pinky slams that ENTER key, you are making another try. In some cases the operating system does nothing. In other cases it wipes out all of your files. In most cases it just gives you an error message. In other words, you get many duds. But sometimes, if you have it all just right, the computer grinds away for a while and then produces something like emacs. It actually generates complexity, which is Smolin's criterion for interestingness.
Not only that, but it's beginning to look as if, once you get below a certain size--way below the level of quarks, down into the realm of string theory--the universe can't be described very well by physics as it has been practiced since the days of Newton. If you look at a small enough scale, you see processes that look almost computational in nature.
I think that the message is very clear here: somewhere outside of and beyond our universe is an operating system, coded up over incalculable spans of time by some kind of hacker-demiurge. The cosmic operating system uses a command-line interface. It runs on something like a teletype, with lots of noise and heat; punched-out bits flutter down into its hopper like drifting stars. The demiurge sits at his teletype, pounding out one command line after another, specifying the values of fundamental constants of physics:
universe -G 6.672e-11 -e 1.602e-19 -h 6.626e-34 -protonmass 1.673e-27....
and when he's finished typing out the command line, his right pinky hesitates above the ENTER key for an aeon or two, wondering what's going to happen; then down it comes--and the WHACK you hear is another Big Bang.
The reality is that summarizing text and answering questions about it is one of the best use cases for what we currently call "AI".