• 0 Posts
  • 18 Comments
Joined 1 year ago
cake
Cake day: June 12th, 2023

help-circle


  • The plan at the time was what the film explicitly said. They were devastatingly effective at taking the Tantive IV. They were devastatingly effective at destroying the sandcrawler (to the point that they couldn’t disguise it as having been attacked by sand people). They were devastatingly effective at nearly hitting the protagonists enough times that they believed they were being shot at for real, when actually they were just being herded onto a ship with a tracker on it so they’d reveal the location of the rebel base they’d spend the first half the film failing to threaten or torture out of Leia. They were devastatingly effective at destroying the rebel’s attack force against the Death Star, and were seconds away from destroying Yavin IV and the rebel base on it when someone used supposedly-extinct space magic to make what the film had previously described as an impossible shot against a tiny target.

    The only time they miss is when the film says they did so on purpose.


  • In A New Hope, the only time stormtroopers miss is when they do so intentionally, when they’re chasing the protagonists off the Death Star, and onto the Millenium Falcon, which has been fitted with a tracking device which they know will be taken straight to the rebel base. They easily overwhelm the guards on the Tantive IV at the beginning of the film even when only a few of them have made it through the breached airlock. The myth that stormtroopers miss comes from people not noticing the scene where Tarkin discusses intentionally letting the rebels escape so they can follow the tracking device back to their base.




  • I think you’ve misunderstood my complaint. I know how you go about composing things in a Unix shell. Within your post, you’ve mentioned several distinct languages:

    • sh (I don’t see any Bash-specific extensions here)
    • Perl-compatible regular expressions, via grep -P
    • printf expressions
    • GNU ps’s format expressions
    • awk

    That’s quite a lot of languages for such a simple task, and there’s nothing forcing any consistency between them. Indeed, awk specifically avoids being like sh because it wants to be good at the things you use awk for. I don’t personally consider something to be doing its job well if it’s going to be wildly different from the things it’s supposed to be used with, though (which is where the disagreement comes from - the people designing Unix thought of it as a benefit). It’s important to remember that the people designing Unix were very clever and were designing it for other very clever people, but also under conditions where if they hit a confusing awk script, they could just yell Brian, and have the inventor of awk walk over to their desk and explain it. On the other hand, it’s a lot of stuff for a regular person to have in their head at once, and it’s not particularly easy to discover or learn about in the first place, especially if you’re just reading a script someone else has written that uses utilities you’ve not encountered before. If a general-purpose programming language had completely different conventions in different parts of its standard library, it’d be rightly criticised for it, and the Unix shell experience isn’t a completely un-analogous entity.

    So, I wouldn’t consider the various tools you used that don’t behave like the other tools you used to be doing their job well, as I’d say that’s a reasonable requirement for something to be doing its job well.

    On the other hand, PowerShell can do all of this without needing to call into any external tools while using a single language designed to be consistent with itself. You’ve actually managed to land on what I’d consider a pretty bad case for PowerShell as instead of using an obvious command like Get-ComputerInfo, you need:

    (Get-WmiObject Win32_ComputerSystem).FreePhysicalMemory / 1024
    

    Even so, you can tell at a glance that it’s getting the computer system, accessing it’s free physical memory, and dividing the number by 1024.

    To get the process ID with the largest working set, you’d use something like

    (Get-Process | Sort-Object WorkingSet | Select-Object -Last 1).Id
    # or
    (Get-Process | Sort-Object WorkingSet)[-1].Id
    

    I’m assuming either your ps is different to mine, or you’ve got a typo, as mine gives the parent process ID as the second column, not the process’ own ID, which is a good demonstration of the benefits of structured data in a shell - you don’t need sed/awk/grep incantations to extract the data you need, and don’t need to learn the right output flag for each program to get JSON output and pipe it to jq.

    There’s not a PowerShell builtin that does the same job as watch, but it’s not a standard POSIX tool, so I’m not going to consider it cheating if I don’t bother implementing it for this post.

    So overall, there’s still the same concept of composing something to do a specific task out of parts, and the way you need to think about it isn’t wildly different, but:

    • PowerShell sees its jurisdiction as being much larger than Bash does, so a lot of ancillary tools are unnecessary as they’re part of the one thing it aims to do well.
    • Because PowerShell is one thing, it’s got a pretty consistent design between different functions, so each one’s better at its job as you don’t need to know as much about it the first time you see it in order to make it work.
    • The verbosity of naming means you can understand what something is at first glace, and can discover it easily if you need it but don’t know what it’s called - Select-String does what it says on the tin. grep only does what it says on the tin if you already know it’s global regular expression print.
    • Structured data is easier to move between commands and extract information from.

    Specifically regarding the Unix philosophy, it’s really just the first two bullet points that are relevant - a different definition of thing is used, and consistency is a part of doing a job well.


  • Powershell isn’t perfect, but I like it a lot more than anything that takes sh as a major influence or thing to maintain backwards compatibility with. I don’t think the Unix philosophy of having lots of small tools that do one thing and do it well that you compose together has ever been achieved as I think being consistent with other tools you use at the same time should be part of doing your thing well, and things like sed, grep and perl all having different regular expression syntax demonstrate inconsistency and are easy to find. I also like that powershell is so verbose as it makes it much easier to read someone else’s script without knowing much powershell, and doesn’t end up getting in the way of actually writing powershell as the autocomplete is really good. I like having a type system and structured data, too.

    Some of these things are brought to a unixier shell with nushell, but I’m not convinced it’ll take off. Even if people use it, it’ll be a long while before you Google a problem and the solution also includes a nushell snippet, whereas for any Windows problem, you’ll typically get a GUI solution and a powershell solution, and only a maniac would give a CMD solution.





  • The perfect, good, mediocre, and just barely tolerable are all enemies. Sometimes bad is better as it doesn’t erode the motivation to solve the problem and means you’re more likely to end up with a good solution later. Often, when people accuse others of letting the perfect be the enemy of the good, the option was neither perfect nor good, just mediocre or barely tolerable. The exception is when one solution can go on to evolve into a better one, but it can still be better to wait until it does before deploying it.

    I’m not convinced this is exactly applicable to the story in the OP, though. The compromise would have eroded the motivation to vote for the original legislation in that election, but probably made it more likely that it could have happened in the next one, and made the consequences of putting it off that long slightly less bad.


  • My point is mainly that the people who are victims of engineered propaganda aren’t going to change their minds if they see a demonstration. If it’s possible at all, it takes a lot of friends and family members who they trust more than their news sources to spend a lot of time and effort to gradually deprogram them. Demonstrations only help when there are people who’ve heard next to nothing about either side of an issue, but would care if they were given some information (not the case with climate change as for all intents and purposes, everyone knows it’s real and a serious problem, or has been convinced it’s imaginary/actually a good thing/isn’t caused by humans), or when there are enough demonstrators to make elected representatives increase their estimate of the number of voters who they need to appease (which needs to be tens or hundreds of millions of people at a single demo - it’s very much a partisan issue around the world, so politicians on the vaguely-more-climate-change-addressing side know the people at a demo won’t vote for the other guy until the demo’s so big that it makes a third party seem like a risk).

    Sorry about the hundred-and-forty-one-word sentence.


  • Persuading the general public to take climate change seriously and oppose the ones causing it is absolutely an important task.

    Do you really think there’s anyone out there who isn’t aware climate change is real and a big problem who could be persuaded that it is? As far as I know, it’s universally accepted, except by people who’re convinced it’s a hoax made up by communists so they can take their guns and make their children chop their genitals off, and there’s not enough of a middle group that they could be persuaded in large enough numbers to swing an election.

    It’s not like it was a couple of decades ago - people are already aware and positions are entrenched. No one’s going to look at a sign and suddenly take things seriously.




  • Plenty of people are calling for Amazon to be stopped, whether it’s by being broken up in a trust-busting operation, fined to the point of bankruptcy for various things including illegal exploitation of its employees, or as an extreme example, starving former Amazon employees simply eating Jeff Bezos. Whether or not someone agrees, and whether they think it applies to brothels, multinational mega-corporations, or any other category of business, it’s not a particularly controversial take that some kinds of business are inherently too exploitative of their employees, and should therefore be unable to legally exist.