←back to thread

Tools: Code Is All You Need

(lucumr.pocoo.org)
313 points Bogdanp | 5 comments | | HN request time: 0s | source
Show context
forrestthewoods ◴[] No.44455498[source]
Unpopular Opinion: I hate Bash. Hate it. And hate the ecosystem of Unix CLIs that are from the 80s and have the most obtuse, inscrutable APIs ever designed. Also this ecosystem doesn’t work on Windows — which, as a game dev, is my primary environment. And no, WSL does not count.

I don’t think the world needs yet another shell scripting language. They’re all pretty mediocre at best. But maybe this is an opportunity to do something interesting.

Python environment is a clusterfuck. Which UV is rapidly bringing into something somewhat sane. Python isn’t the ultimate language. But I’d definitely be more interested in “replace yourself with a UV Python script” over “replace yourself with a shell script”. Would be nice to see use this as an opportunity to do better than Bash.

I realize this is unpopular. But unpopular doesn’t mean wrong.

replies(4): >>44455624 #>>44455730 #>>44455783 #>>44459352 #
hollerith ◴[] No.44455783[source]
Me, too. Also, Unix as a whole is overrated. One reason it won was an agreement mediated by a Federal judge presiding over an anti-trust trial that AT&T would not enter the computer market while IBM would not enter the telecommunications market, so Unix was distributed at zero cost rather than sold.

Want to get me talking reverentially about the pioneers of our industry? Talk to me about Doug Engelbart, Xerox PARC and the Macintosh team at Apple. There was some brilliant work!

replies(1): >>44456728 #
1. nativeit ◴[] No.44456728[source]
> Also, Unix as a whole is overrated. One reason it won was an agreement mediated by a Federal judge presiding over an anti-trust trial that AT&T would not enter the computer market while IBM would not enter the telecommunications market, so Unix was distributed at zero cost rather than sold.

What did Unix win?

replies(1): >>44456948 #
2. hollerith ◴[] No.44456948[source]
Mind share of the basic design. Unix's design decisions are important parts of MacOS and Linux.

Multics would be an example of a more innovative OS than Unix, but its influence on the OSes we use today has been a lot less.

replies(1): >>44458721 #
3. nativeit ◴[] No.44458721[source]
I suppose the deeper question I'd have would be, how would its no-cost distribution prevent better alternatives from being developed/promoted/adopted along the way? I guess I don't follow your line of logic. To be fair, I'm not experienced enough with either OS development nor any notable alternatives to Unix to agree/disagree with your conclusions. My intuition wants to disagree, only because I like Linux, and even sort of like Bash scripts--but I have nothing but my own subjective preferences to base that position on, and I'm actually quite open to being better-informed into submission. ;-)

I'm a pretty old hat with Debian at this point, so I've got plenty of opinions for its contemporary implementations, but I always sort of assumed most of the fundamental architectural/systems choices had more or less been settled as the "best choices" via the usual natural selection, along with the OSS community's abiding love for reasoned debate. I can generally understand the issues folks have with some of these defaults, but my favorite aspect of OS's like Debian are that they generally defer to the sysadmin's desires for all things where we're likely to have strong opinions. It's "default position" of providing no default positions. Certainly now that there are containers and orchestration like Nix, the layer that is Unix is even less visible, and infrastructure-as-code mean a lot of developers can just kind of forget about the OS layer altogether, at least beyond the OS('s) they choose for their own daily driver(s).

Getting this back to the OG point--I can understand why people don't like the Bash scripting language. But it seems trivial these days to get to a point where one could use Python, Lua, Forth, et al to automate and control any system running a nix/BSD OS, and nix OS's do several key things rather well (in my opinion), such as service bootstrapping, lifecycle management, networking/comms, and maintaining a small footprint.

For whatever it's worth, one could start with nothing but a Debian ISO and some preseed files, and get to a point where they could orchestrate/launch anything they could imagine using their own language/application of choice, without ever touching having touched a shell prompt or writing a line of Bash. Not for nothing, that's almost certainly how many Linux-based customized distributions (and even full-blown custom/bespoke OS's) are created, but it doesn't have to be so complicated if one just wants to get to where Python scripts are able to run (for example).

replies(2): >>44458966 #>>44459105 #
4. hollerith ◴[] No.44458966{3}[source]
Most OSes no longer have any users or squeak by with less than 1000 users on their best day ever: Plan 9, OS/2, Beos, AmigaOS, Symbian, PalmOS, the OS for the Apple II, CP/M, VMS, TOPS-10, Multics, Compatible Time-Sharing System, Burroughs Master Control Program, Univac's Exec 8, Dartmouth Time-Sharing System, etc.

Some of the events that help Unix survive longer than most are the decision of DARPA (in 1979 or the early 1980s IIRC) to fund the addition of a TCP/IP networking stack to Unix and the decision in 1983 of Richard Stallman to copy the Unix design for his GNU project. The reason DARPA and Stallman settled on Unix was that they knew about it and were somewhat familiar with it because it was given away for free (mostly to universities and research labs). Success tends to beget success in "spaces" with strong "network externalities" such as the OS space.

>Getting this back to the OG point

I agree that it is easy to avoid writing shell scripts. The problem is that other people write them, e.g., as the recommended way to install some package I want. The recommended way to install a Rust toolchain for example is to run a shell script (rustup). I trust the Rust maintainers not to intentionally put an attack in the script, but I don't trust them not to have inadvertently included a vulnerability in the script that some third party might be able to exploit (particularly since it is quite difficult to write an attack-resistant shell script).

5. hollerith ◴[] No.44459105{3}[source]
OK, consider the browser market: are there any browsers that cost money? If so, I've not heard of it. From the beginning, Netscape Corporation, Microsoft, Opera and Apple gave away their browsers for free. That is because by the early 1990s it was well understood (at least by Silicon Valley execs) that what is important is grabbing mind share, and charging any amount of money would severely curtain the ability to do that.

In the 1970s when Unix started being distributed outside of Bell Labs, tech company execs did not yet understand that. The owners of Unix adopted a superior strategy to ensure survival of Unix by accident (namely, by being sued -- IIRC in the 1950s -- by the US Justice Department on anti-trust grounds).