• 23 Posts
  • 329 Comments
Joined 5 years ago
cake
Cake day: May 31st, 2020

help-circle

  • somewhat logical, but entirely in practice verb-noun command structure.

    That’s supposed to be “impractical”, not “in practice”, for others reading along.

    For example, the “proper” command to list a directory is: Get-ChildItem
    The “proper” command to fetch a webpage is: Invoke-WebRequest https://example.com/

    In these particular cases, they do have aliases defined, so you can use ls, dir and curl instead, but …yeah, that’s still generally what the command names are like.

    It’s partially more verbose than C#, which is one of the most verbose programming languages out there. I genuinely feel like this kind of defeats the point of having a scripting language in the first place, when it isn’t succinct.
    Like, you’re hardly going to use it interactively, because it is so verbose, so you won’t know the commands very well. Which means, if you go to write a script with Powershell, you’ll need to look up how to do everything just as much as with a full-fledged programming language. And I do typically prefer the better tooling of a full-fledged programming language…


  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlAlways happens
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 days ago

    I’ve been trying to basically build a library that helps you put together a distribution archive.
    And my initial plan for the API looked something like this:

    Distribution::new("my-program")
        .dir("assets")
        .file("favicon.png", |path| build_favicon(path));  // "|path| ..." is a lambda function that gets the target path passed in
    

    So, it would allow you to define the file structure, and for the parts that actually need to be built, you’d provide a lambda function, which it would automatically run or not, depending on whether the inputs changed.

    Right, inputs, what are those? I kind of need my user to tell me. So, I decided to implement the caching as a separate API, which you would call on your own when you get called by the lambda function.

    Then I realized, I kind of don’t need the lambda function then. I could just construct file paths and then my user calls their build_favicon(...) function or similar on their own.

    There is just one crucial problem with that. This is what the file API in the stdlib looks like:

    PathBuf::new("my-program")
        .join("assets")
        .join("favicon.png");
    

    I might not have built anything, really. 🫠


  • Ephera@lemmy.mltoScience Memes@mander.xyzVenn Diagrams
    link
    fedilink
    English
    arrow-up
    1
    ·
    5 days ago

    Pretty sure the green area is supposed to be the overlap of (1) and (2). 🙃

    So, it’s people who know what both a Venn and a Euler diagram are, but don’t necessarily know the difference. One could argue that if you’re in (1) and/or (2), you could reliably answer a quiz question correctly for what a Venn and/or Euler diagram is, therefore you wouldn’t confuse the two.

    So, maybe (3) could expand down like an hourglass, so that part of it is on the overlap and part of it is outside of both (1) and (2)…







  • Ephera@lemmy.mltoTechnology@lemmy.mlSigning in on Microsoft
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 month ago

    That’s a bug in web Outlook. You can work around it by deleting cookies from Outlook before logging in. On Firefox, I always press Ctrl+Shift+H, search for “outlook” and then right-click on an entry → Forget About This Site.

    Don’t ask me why it takes so long for them to fix it…


  • I split my notes/todos into multiple files, but I wrote a small program which basically just creates a file with a randomized name in a flat directory and then opens it in my default editor.
    I just want to be able to start typing right away without worrying where to put the note or what to title it or whatever. Like, I will put a title on it and include some keywords to help me find things again, but I can do that later when I don’t need to noting things down…


  • Ephera@lemmy.mltoMemes@lemmy.mlBus powers
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 months ago

    I have made the first-hand experience of genuinely nothing being in reach to hold onto, but the reason I couldn’t reach anything was that everyone was standing so densely packed, that there was really no way you could possibly fall over anyways.

    I can also recommend not having anxiety in that situation.



  • I find it so bizarre, too. I’ve been using quite a similar autosuggestion feature as part of Fish shell for a few years now. But when an LLM keeps spewing words at me, that’s a whole different shtick. It genuinely just inhibits my thinking, which is a feeling I never had with Fish.

    I guess, one difference is that Fish uses real intelligence, a.k.a. my shell history. If it has a suggestion, the chance is high that it’s actually what I want to do or close to it. And it also shuts the hell up when there’s no good suggestion. I don’t have to be constantly vigilant that what it suggests might be complete garbage.

    And the other difference is probably that it’s *my* intelligence, *my* shell history. I will have thunk the thoughts before which lead to the command it suggests, which brings the brain load much further down again.
    Occasionally, it’ll suggest something where I have no recollection of having run that command before, but knowing that I have, is still really useful and this only happens for niche commands anyways. Most of the suggestions are just stuff which I’ve run a few minutes ago or last week or such, where I won’t have to think about it.

    I guess, it probably also helps that commands have simple formatting, with only a single line and you can mostly read the flags in any order…


  • Ephera@lemmy.mltoScience Memes@mander.xyzkingdom come
    link
    fedilink
    English
    arrow-up
    9
    ·
    2 months ago

    Hmm, is it really that little? The stats look devastating, like e.g. 3 grams per 100 grams, but mushrooms also consist out of 90+ grams of water.

    For example, the button mushroom has:
    100 g total - 91.8 g water - 1.7 g fiber = 6.5g nutrients
    2.89 g protein / 6.5 g nutrients = 44.4% protein

    Comparing that to e.g. canned black beans:
    100 g total - 70.8 g water - 6.69 g fiber = 22.51 g nutrients
    6.91 g protein / 22.51 g nutrients = 30.9% protein








  • Ephera@lemmy.mltoScience Memes@mander.xyzoops
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 months ago

    I feel like it’s just capitalism doing a capitalism. People are self-conscious about their skin, so you can sell them all kinds of crap.
    Even a basic washcloth does a decent job with exfoliating, if you use it regularly. Rub your face dry with a scruffy towel, if you need more than that.

    But of course, there’s hardly any money to be made with reasonably priced products, so you won’t see TV ads for them.