• 0 Posts
  • 19 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle


  • Counterpoint: Yes, parse don’t validate, but CLIs should not be dealing with dependency management.

    I love Python’s argparse because:

    • It’s “Parse, don’t validate” (even supports FileType as a target)
    • It enforces or strongly encourages good CLI design
      • Required arguments should in most situations be positional arguments, not flags. It’s curl <URL> not curl --url <URL>.
      • Flags should not depend on each other. That usually indicates spaghetti CLI design. Don’t do server --serve --port 8080 and server --reload with rules for mix-and-matching those, do server serve --port 8080 and server reload with two separate subparsers.
      • Mutually exclusive flags sometimes make sense but usually don’t. Don’t do --xml --json, do -f [xml|json].
      • This or( pattern of yours IMO should always be replaced by a subparser (which can use inheritance!). As a user the options’ data model should be immediately intuitive to me as I look at the --help and having mutually exclusive flags forces the user to do the extra work of dependency management. Don’t do server --env prod --auth abc --ssl, do server serve prod --auth abc --ssl where prod is its own subparser inheriting from AbstractServeParser or whatever.

    Thinking of CLI flags as a direct mapping to runtime variables is the fundamental mistake here I think. A CLI should be a mapping to the set(s) of behavior(s) of your application. A good CLI may have mandatory positional arguments but has 0 mandatory flags, 0 mutually exclusive flags, and if it implements multiple separate behaviors should be a tree of subparsers. Any mandatory or mutually exclusive flags should be an immediate warning that you’re not being very UNIX-y in your CLI design.


  • I’ve been using the AI to help me with some beginner level rust compilation checks recently.

    I never once got an accurate solution, but half the time it gave me a decent enough keyword to google or broken pattern to fix myself. The other half of the time it kept giving me back my own code proudly telling me it fixed it.

    Don’t worry though, AGI is right around the corner. Just one more trillion dollars bro. One trillion and we’ll provide untold value to the shareholders bro. Trust me bro.


  • Did you even read the article? Even under the VERY GENEROUS interpretation of contract law that contracts can’t be predatory (which is not a particularly popular philosophical stance outside of cyberpunk fiction), AWS MENA fell short of even their typical termination procedures because they accidentally nuked it while doing a dry-run.

    I don’t know where you work but if we did that to a paying customer, even IF there was a technicality through which we could deny responsibility, we would be trying to make it right.


  • The author put it well:

    What if you have petabytes of data? How do you backup a backup? What happens when that backup contains HIPAA-protected information or client data? The whole promise of cloud computing collapses into complexity.

    Multi-region cloud computing is already difficult and expensive enough, multi-cloud is not only technically complex but financially and legally fraught with uncertainties. At that point you’re giving up so much of the promise of cloud computing that you might as well rent rack space somewhere, install bare-metal infra, and pay someone to drive there to manually backup to tape every 3 months.

    This level of technical purity is economically unfeasible for virtually everyone, that’s the whole point of paying a vendor to deal with it for us. And you know who doesn’t need to put up with the insane overhead of multi-cloud setups? That’s right, Amazon, Microsoft, and Google, who will be getting paid for hosting everyone else’s multi-cloud setups while they get to run their huge infra on their own cloud without fear. The last thing GAFAM competitors - especially OSS projects - need is even fewer economies of scale.

    Stop with the victim-blaming, this blunder is squarely on AWS.


  • Is it prejudice if I have extensive first-hand experience with it?

    The worst environment to me (react-native)

    Which is exactly what the Windows start menu runs on, doesn’t it?

    I don’t even care that JS is slow, in most circumstances. I like Python, it’s not any faster necessarily (though it is much easier to debug CPython than V8 when you do eventually run into low-level issues, and python is still a lot better at multithreading than javascript even if the GIL is an issue, but that’s besides the point). My real problem is that the ES “standard” “library” is a complete clusterfuck, absolutely diseased, like engineers heard of the concept of technical debt and decided to build a shrine to it.

    Sure, you can technically use JS decently. That’s hardly an achievement. Any sufficiently fast Turing-complete apparatus can be “used decently” if you start by re-implementing a python interpreter. But the entire ecosystem is fucked. The appeal of javascript, the entire reason it has taken over, is that the lowest bidder is not going to use decently but will do the wildest, most insane shit imaginable to get a product out the door.

    I commented the other day about PHP. Same problem. The language is too easy to use badly. Sure, you can write magnificent code in either, if you have enough experience and discipline to avoid every footgun. But when every other tool in your shop is an unlabeled footgun, maybe it’s time to admit that there are some deep-seated issues.

    Speaking of treating JS like a turing machine; that’s what TypeScript does. And, I have to admit, it solves maybe 40 % of the problems I have with JavaScript. I still don’t like it, because the stdlib and ecosystem still sucks donkey balls and V8 is a subpar JIT interpreter in every way besides raw single-threaded performance, but at least TS itself is decent enough and lends itself to static analysis well enough for senior engineers to have a hope of safely defusing or refactoring away most footguns set off by the junior/offshore devs. Most.


  • “I want predictable behavior for all possible inputs” is hardly a requirement that requires a fortune teller to see coming.

    JavaScript has a particularly insane stdlib because this language wasn’t designed, it is a botched chimera with deformities so severe it should have died 15 times over but people just won’t let it.

    Then to rub salt in the wound this horrific mess became the most popular language in the world by virtue of being the only language for the most popular application ecosystem in the world (the web). So the cancer is spreading and now you can find JavaScript in servers and fucking desktop environments and now your windows start menu takes five seconds to load because fucking react.js is loading the 75 polyfills necessary to make up for the fact that JS’s “standard” library looks like it was designed by 3 cocained-up gibbons.


  • It’s one of a plethora of scripting languages from the '90s which were designed to be the antithesis of “fail fast” and kept going no matter what.

    I guess what with C/C++ being the Mainstream Option at the time, not having to deal with a strict compiler must have felt like freedom. As someone who has had to maintain, cleanup and migrate ancient PHP code, I call it folly. That mindset of “let the programmer just do whatever and keep trucking” breeds awful programming practices and renders static analysis varying degrees of useless, which makes large-scale refactoring hard to automate which is just amazing when your major versions aren’t even remotely FUCKING BACKWARDS COMPATIBLE.

    PHP’s original design is just fundamentally atrocious. It became popular in large part because unmaintainable code is usually someone else’s problem.

    A language that I would definitely use for server-side rendering and that was already good from its first stable release is Go. It was thoughtfully designed and lends itself really well to static analysis, while still being easy to write and decently performant.


  • If I am not mistaken the 47.0.0.0/8 ip block is for Alibaba cloud

    That’s an ARIN block according to Wikipedia so North America, under Northen Telecom until 2010. It does look like Alibaba operate many networks under that /8, but I very much doubt it’s the whole /8 which would be worth a lot; a /16 is apparently worth around $3-4M, so a /8 can be extrapolated to be worth upwards of a billion dollars! I doubt they put all their eggs into that particular basket. So you’re probably matching a lot of innocent North American IPs with this.



  • It can do both, lossiness is toggleable.

    If you’ve seen a picture on Lemmy, you’ve almost certainly seen a WebP. A fair bit of software – most egregiously from Microsoft – refuses to decode them still, but every major browser has supported WebP for years and since superior data efficiency compared to JPG/PNG means is already very widely used on the web. Bandwidth is not that cheap.


  • Nowadays “buggy” is not how I’d describe it, though there were certainly teething issues at the beginning. By now other DEs have learned to deal with it.

    However it’s still true that the GTK4 design is ill-fitting, and very opinionated. Quite exemplary of this are the applications that hardcode the GTK file picker (like Firefox and chrome) even though it’s inferior in every way to the Qt file picker and forces the infuriating GTK “design” choice of doing fuzzy search when you type in the file list instead of jumping to the relevant file. Very annoying when dealing with organized directories especially when no other file browser on my system works that way!


  • Poor sound balance is 95 % bad downmixing.

    Going from 5.1 channels to 2 the media player should first bump up the center channel (the one for dialogue) a fair bit. But they don’t because they use the coefficients from some manual from the fucking 1990s or whatever calibrated for expensive-ass headphones. Some players (e.g. Kodi) do have an option to amplify the center channel.

    The second issue is overly large dynamic range which is inappropriate in noisy environments or when someone may be sleeping nearby. That’s easily solved with an audio compressor. My receiver has a “night mode” that does exactly that.

    Every streaming service should have both of those as easily toggleable options on their media players, but for some reason they don’t. IDK if it’s stupidity on their part or if their licensing contracts disallow “tampering” with the media or what it is but it would solve 95 % of audio balance complaints.


    • Eventually Company decides “agile will fix things”
    • Developers are told to work agile but the only stakeholder they talk to is the PO, who talks to PM, who talks to Sales, who talks to Customers
    • PM&Sales don’t want to deliver an unfinished/unpolished product so they give a review every sprint, by themselves, based on what they think the customer wants (they are Very Clever)
    • A year or two later the project is delivered and the customer is predictably unhappy.
    • Management says “how could this have happened!” and does it all over again.


  • Also English is an odd germanic-romance bastard child that Western Europeans tend to like because it has a decent number of cognates for everyone and a simple grammar IF you’re only aiming for simple conversational English. The barrier to entry is quite low, especially if you don’t give a shit about having a thick accent and straight up mispronouncing tricky words (as anyone knows who had a conversation in English with a non-fluent Italian/Spanish/French person).

    OTOH German used to be relatively widely spoken in Eastern Europe, and Slavic languages also use declensions AFAIK, and also even post WWII German held quite a bit of momentum in academic circles.
    So if the Soviet block had gone the Chinese route and become an economic behemoth instead of withering and dying at the dawn of the Information Age, German being the lingua franca (or at least giving English a run for its money) would have been a distinct possibility IMO.


  • Don’t force me to deal with your shiny language of the day,

    WE HavE LegItImaTe COnCeRNs

    Exact same shit as last time, some cranky old dude with the territorial instinct of a bulldog sabotages anything to do with rust under a very thin layer of so-called technical concerns, yet refuses to partake in constructive discussion. Like, literally, the changeset is just bindings in rust/kernel? What even is there to complain about regarding maintainability of kernel/dma, given that as far as I can tell the rust devs will deal with any future incompatibilities?

    Very shameful for the kernel community that this kind of aggressive sabotage is regular and seemingly accepted. The incessant toxicity is not a good look and very discouraging to anyone thinking of contributing.


  • What? I’m not privy to RedHat/IBM/Google’s internal processes but they are all massive FOSS contributors at least some of which I assume are using Agile internally. The Linux kernel is mostly corpo-backed nowadays.

    The development cycle of FOSS is highly compatible with Agile processes, especially as you tend towards the Linux Kernel style of contributing where every patch is expected to be small and atomic. A scrum team can 100% set as a Sprint Goal “implement and submit patches for XYZ in kernel”.

    Also agile ≠ scrum. If you’re managing a small github project by sorting issues by votes and working on the top result, then congratulations, you’re following an ad-hoc agile process.

    I think what you’re actually mad at is corporate structures. They systematically breed misaligned incentives proportional to the structure’s size, and the top-down hierarchy means you can’t just fork a project when disagreements lead to dead ends. This will be true whether you’re doing waterfall or scrum.