• 0 Posts
  • 70 Comments
Joined 3 years ago
cake
Cake day: June 9th, 2023

help-circle
  • I don’t understand why this works, but it does

    What was happening before was this: Git received your commits and ran the shell script. It directed the script’s output stream back to Git so that it could relay it back over the connection to display on your local terminal with remote: stuck in front of it. Backgrounding the npx command was working, the shell was quitting without waiting for npx to finish. However, Git wasn’t waiting for the shell script to finish, it was waiting for the output stream to close, and npx was still writing to it. You backgrounded the task but didn’t give npx a new place to write its output to, so it kept using the same output stream as the shell.

    Running it via bash -c means “don’t run this under this bash shell, start a new one and have it just run this one command rather than waiting for a human to type a command into it.”

    The & inside the quote is doing what you expect, telling the subshell to background this task. As before, it’ll quit once the command is running, as you told it not to wait.

    The last bit is &> /dev/null which tells your original, first shell that you want this command to write somewhere else instead. Specifically, the special file /dev/null, which, like basically everything else in /dev/, is not really a file, it’s special kernel magic. That one’s magic trick is that when you write to it, everything works as expected except all the data is just thrown away. Great for things like this that you don’t want to keep.

    So, the reason this works is you’re redirecting the npx output elsewhere, it just goes into a black hole where no one is actually waiting for it. The subshell isn’t waiting for the command to finish, so it quits almost immediately. And then the top level shell moves on after the subshell has finished.

    I don’t think the subshell is necessary, if you do &> /dev/null & I think it’d be the same effect. But spawning a useless shell for a split second happens all the time anyway, probably not worth worrying about too much.


  • In Haskell, that’s “unit” or the empty tuple. It’s basically an object with no contents, behavior, or particular meaning, useful for representing “nothing”. It’s a solid thing that is never a surprise, unlike undefined or other languages’ nulls, which are holes in the language or errors waiting to happen.

    You might argue that it’s a value and not a function, but Haskell doesn’t really differentiate the two anyway:

    value :: String
    value = "I'm always this string!"
    
    funkyFunc :: String -> String
    funkyFunc name = "Rock on, "++name++", rock on!"
    

    Is value a value, or is it a function that takes no arguments? There’s not really a difference, Haskell handles them both the same way: by lazily replacing anything matching the pattern on the left side of the equation with the right side of the equation at runtime.


  • chaos@beehaw.orgtoMemes@lemmy.mlWhere is the lie?
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    28 days ago

    The far right loves a strong man, and by definition there can be only one of those, prefers when “the natural order” is followed, and thinks the ends always justify the means. That keeps them pretty cohesive with the establishment right, who are making buckets of money under the system as it is now and are okay with just about anything else as long as that doesn’t change. When they fight, it’s because the far right is trying to do something stupid enough that the establishment thinks it risks their money or power, or the establishment is holding the far right back from fully implementing their “natural order” worldview, but there’s a lot of overlap where both can be happy, because the establishment really has no morals at all and are happy to use the far right to gain power if all they have to do is throw them some red meat every once in a while.

    The left’s a very different story. On the far left, people are very principled, to the point where compromise or partial wins feel hollow because the only real win would be the entire principle being adopted en masse. It makes it harder to work together, because even groups with the same goals can get frustrated by the way the other one is doing it, or because the other group is going to keep going while the other wants to stop sooner. And the establishment left has a fair amount in common with the establishment right, they find the right’s goals uncouth and mean, but they do still fundamentally believe in capitalism and don’t want to upend the system. That leaves a lot less common ground and a lot more infighting overall.


  • I got the .net and .org of my last name, and offered $50 to the owner of the .com as he wasn’t doing anything with it. Kind of a lowball, admittedly, but I would’ve gone up to a hundred or two. Instead, he told me it was worth thousands, which, lol, but then he didn’t renew it, which I only found out because a random third person reached out to me as the owner of the .net offering me the .com. Turns out they hadn’t actually bought it yet, though, so instead I scooped it up and now I’ve got the trifecta!


  • chaos@beehaw.orgtoMemes@lemmy.mlBurgerland would never lie /s
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    2 months ago

    I’d believe that people are living happy, fulfilling lives there, sure, people usually find a way to do that regardless of their situation. But I’m pretty sure it’s not just propaganda that the same damn family has been in charge for the better part of a century, and that alone is enough for me to conclude that it is a fundamentally broken system that, even if it somehow isn’t as repressive and evil as it’s portrayed, will get there eventually.









  • Fan art is generally protected because of a rule called “fair use”, which allows people to use copyrighted work without permission. For example, if you briefly quote a book, the author won’t have success if they go after you for copying from their book, even though you clearly did. Generally speaking, a person making fan art and not selling it is going to be protected under fair use. The law wants creators to have control of the thing they created, but we all live in a shared culture and we all deserve to participate in the art we experience, so there’s some wiggle room, and this has been the case long before AI was a thing.

    What these AI companies are doing, on the other hand… well, it hasn’t really been tested in court yet, but they’re doing a lot more than single images or brief quotes, and they’re doing it for money, so they’ll likely have some work to do.


  • Ah, I didn’t see that edit, apologies, had the page loaded for a while before replying.

    Isn’t that the same leverage that the earliest labor unions used because it was all they had? It seems to fit very well, actually. There’s a smaller but more powerful group in charge of them, workers get little to no direct say in company policy or who they are managed by and have to hope they’re listened to when asked how things are going. There certainly isn’t a second C-suite waiting in the wings to be put into power if the first one disappoints, the current powers-that-be would be insane to allow something as chaotic as that. If the CEO’s got a good track record of listening, the pay’s pretty good and satisfaction is high, and they’re kept in line with picket lines when it’s necessary, is this company an extension of the working class like China’s government is?

    I’m comparing and contrasting quite a bit with my new job, which fits much more closely with what my idea of something worker-controlled would be. It’s fully employee owned, so profits go either back into the business or into our pockets as bonuses. There’s as little hierarchy as possible, the closest thing to a manager isn’t ever going to “put” you on a project, you’re free to find one that you like and wants you to join. Company decisions involve everyone equally, and there’s freedom to loudly speak your mind about policies and procedures if you disagree with them. That’s closer to the country I’d want to live in, not the one where my influence is akin to answering corporate surveys and getting to choose which of 3 approved managers I want to work under, or go on strike if I’m really not happy.



  • But this doesn’t answer my question, the only mechanism for people’s input seems to be elections and polling, and it conspicuously omits the fact that elections only allow party-approved candidates. Maybe the powers-that-be have a great track record of listening and respecting the will of the people, and are beloved by all as a result, but that doesn’t actually put the people in control, it just means the ones actually in control are being nice. When the government and the people have a fundamental disagreement about the path forward, what piece am I missing that makes the government the one to back down?


  • I’m trying to get to how it’s democratic and worker-controlled in your eyes because it’s hard to see for me, as people don’t seem to get to choose much in the system as designed. What’s the mechanism for average people to change a government policy that they disagree with? If the party does start to lose touch with what the workers need or start working against their interests, how do the workers course-correct it?


  • Yeah, those don’t count, if they’re required to align with the party then they’re just subcommittees or something, not actual political parties.

    I promise I’m keeping my mind open, but all of these answers seem indistinguishable from authoritarian rule, which was kinda my original point. The same organization has to rule in perpetuity because foreign influence would subvert the interests of the country if there were other options, quite lucky that they locked in the right one. Practically all one billion people are aligned on this and agree that this system is working for them, but no, they will not be allowing that to be tested at the ballot box or in a media environment where people can speak their mind, it might all fall apart despite how unified they are. It’s a party controlled by the workers and acting for their interests, with total control of the levers of power, they just felt like keeping some ultra-rich and ultra-powerful folks around for a laugh, not because they’re the ones who actually have the power.

    Honestly, shit’s so bad in the west that I’m kinda open to the idea that maybe a totalitarian government that recognizes it needs to keep workers decently happy to allow them to rule is, in fact, better than what we’ve got going on now, but it’s really hard to go as far as saying that it’s an active, ongoing, consensual choice by the workers to never give themselves a choice.