Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)E
Posts
9
Comments
175
Joined
2 yr. ago

  • Yeah agreed on the 100 lines, or some other heuristic in the direction of "this script will likely continue to grow in complexity and I should switch to a language that's better suited to handle that complexity".

  • This just looks like the average Norwegian

  • I think I mentioned it, but inverse: The only data type I'm comfortable with in bash are simple string scalars; plus some simple integer handling I suppose. Once I have to think about stuff like "${foo[@]}" and the like I feel like I should've switched languages already.

    Plus I rarely actually want arrays, it's way more likely I want something in the shape of

     python
        
    @dataclass(frozen=True)
    class Foo:
        # …
    
    foos: set[Foo] = …
    
      
  • -e is great until there’s a command that you want to allow to fail in some scenario.

    Yeah, I sometimes do

     bash
        
    set +e
    do_stuff
    set -e
    
      

    It's sort of the bash equivalent of a

     
        
    try { 
      do_stuff()
    } 
    catch { 
      /* intentionally bare catch for any exception and error */
      /* usually a noop, but you could try some stuff with if and $? */ 
    }
    
      

    I know OP is talking about bash specifically but pipefail isn’t portable and I’m not always on a system with bash installed.

    Yeah, I'm happy I don't really have to deal with that. My worst-case is having to ship to some developer machines running macos which has bash from the stone ages, but I can still do stuff like rely on [[ rather than have to deal with [ . I don't have a particular fondness for using bash as anything but a sort of config file (with export SETTING1=... etc) and some light handling of other applications, but I have even less fondness for POSIX sh. At that point I'm liable to rewrite it in Python, or if that's not availaible in a user-friendly manner either, build a small static binary.

  • At the level you're describing it's fine. Preferably use shellcheck and set -euo pipefail to make it more normal.

    But once I have any of:

    • nested control structures, or
    • multiple functions, or
    • have to think about handling anything else than simple strings that other programs manipulate (including thinking about bash arrays or IFS), or
    • bash scoping,
    • producing my own formatted logs at different log levels,

    I'm on to Python or something else. It's better to get off bash before you have to juggle complexity in it.

  • There also are some stories from js devs about how async/await reduced the spaghetti factor of their code a lot. So yeah, similar stories all around I think, even though async/await obviously isn't a magical thing with no downsides

  • Yeah, Rust is ultimately a different project than Go, and I suspect much of the success of Go is down to stuff like good tooling, default GC, native static binaries, generally easy concurrency, rather than stuff like having as bare-bones a language as otherwise possible. I'd suspect having a focus on fast compilation also helps draw in people from interpreted languages.

    It's easy to write a Kubernetes microservice that performs adequately with Go, and that's all a lot of people & teams need.

  • Yeah, the Go creators seem to generally mean "resembles C" when they use words like "simple", which could explain stuff like going "why do you need generics when you can just cast?" for, what, ten years?

    I remember trying some Plan9 stuff and bouncing off it, including acme. I guess it's the kind of thing that makes sense to Pike but not to me. Not sure what gophers in general think of it (but wikipedia lists at least Russ Cox as a user).

  • This comes off as a weird mash of ideas, and it's not clear what they mean by "traditional programming languages"—the link seems to include Typescript, which is younger than Rust, which is _not_presented as a "traditional" programming language.

    The whole thing comes off as … something a Murdoch-owned site would dream up, maybe?

  • Depends on your problem. Newer languages seem to have much better docs than in the old days, so languages like Rust, Go and Typescript seem very underrepresented by Stackoverflow activity compared to public Github activity.

  • Too recent. Let Gore win back in 2000.

  • Or at the very least avoid car ownership and overuse:

    When you use a 3500-pound car to transport your 150-pound self around, 96 percent of the weight of that clump of matter is the car. You’re moving 25 times more junk around than you need to, and thus using 25 times more energy to do it.

    Imagine that you’re hungry for lunch, so you go to a restaurant. But you don’t just order yourself a blackened salmon salad for $15.00. You order twenty five salads for $375.00! Then, you eat one of them, and leave the other 24 blackened salmon salads, $360.00 worth of food, to get collected by the waiter and slopped unceremoniously into a big black garbage bag. All that fine wild-caught Alaskan Salmon, lovingly seasoned and grilled. All the fine crumbles of feta cheese, the mango salsa, diced green onion, shaved peppers, rich zingy dressing, and everything else the chef worked on for hours – plopped into the slimy garbage bag. This is exactly what you are doing, every time you drive!

    Of course, a lot of people, especially in North America, don't really have an alternative, and they'll be financially and bodily worse off for it.

  • Y-10K

    Jump
  • Ah, so we didn't have to wait until 2038.

  • Or at the very least lift the seat.

    Guessing they also don't close the lid so they get to spray themselves with whatever's in the bowl when they flush. And then don't wash their hands before leaving.

  • Different targets, though. The house and probably state legislatures where there are plenty of seats to elect would do well with proportional representation. For stuff that's really single seat, they could go with parliamentarism (house elects president), but more likely they'd want some single-seat election that works better than FPTP (and without the college)

  • Yeah, that's what I do for complex stuff. Aliases are pretty handy too, but I use them for stuff like "v=nvim" and "vd=nvim -d". Also one function for fd to "nvim $(rf -l $1)"

  • There are people who don't really enjoy food either. They might be fantasizing about replacing all eating with just taking a pill, or they might be soylent enthusiasts.

    There are also people who don't enjoy any music; misophonics.

  • And very old. Part of the sales pitch for the COmmon Business-Protected Language was that anyone could learn to code in almost plain English.

    Also, the stuff they wind up making is the kind of stuff that people with no coding experience make. Cooking up an ugly website with terrible performance and security isn't much harder than making an ugly presentation with lots of WordArt. But it never was, either.

    Between COBOL and LLM-enhanced "low code" we had other stuff, like that infamous product from MS that produced terrible HTML. At this point I can't even recall what it was called. The SharePoint editor maybe?

  • Similarly, Steam has some option about "adult only games" that doesn't seem to mean "you don't have to keep asking me my birthday for 'grim' games", i.e. games you have to verify you're an adult to see, instead it seems to mean "show me porn games".

    This kind of bowdlerised English or whatever it's called is usually weird and confusing to us non-natives. Like, it's apparently OK to have the puerile stuff, you just can't be normal about it?

    "Adult" doesn't imply genital stuff to the rest of us, USA.