• 13 Posts
  • 571 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle
  • I find these videos give a very visual explanation and help to put you into the right mindset: http://intorust.com/
    (You can skip the first two videos.)

    Sort of when it clicked for me, was when I realized that your code needs to be a tree of function calls.
    I mean, that’s what all code is anyways, with a main-function at the top calling other functions which call other functions. But OOP adds a layer to that, i.e. objects, and encourages to do all function calls between objects. You don’t want to do that in Rust. You kind of have to write simpler code for it to fall into place.

    To make it a bit more concrete:
    You will have functions which hold ownership over some data, typically because they instantiated a struct. These sit at the root of a sub-tree, where you pass access to this data down into further functions by borrowing it to them.

    You don’t typically want to pass ownership all over the place, nor do you typically want to borrow (or pass references) to functions which are not part of this sub-tree.
    Of course, there’s situations where this isn’t easily possible, e.g. when having two independent threads talking to each other, and then you do need Rc or Arc, but yeah, the vast majority of programming problems can be solved with trees of function calls.



  • Hmm, I don’t know anything about Whoogle, but from other privacy-conscious search engines, I would expect it to work when you use that URL in your bookmark.

    Three things I can imagine:

    • Something in your hosting stack strips the URL parameters, like maybe your reverse proxy, if you use one. You might be able to see in the Whoogle or web server logs, which URLs actually reach it. Might need to set it to debug/trace logging.
    • Maybe there’s a flag in the Whoogle configuration you need to enable to accept these preference URLs.
    • It’s a bug in that Whoogle version.






  • What I don’t like about the genre, is that I’m bad at it. 🙃

    More seriously, I do find it kind of frustrating at times. Restarting ten times in a roguelike, no problem, because it’s always a new challenge.
    But if I miss the same jump ten times, or have to retry the same platforming passage ten times, you’ll see me getting impatient, which means I’ll fail the next ten attempts, too…


  • Ephera@lemmy.mltoProgrammer Humor@lemmy.mlDesigners cry quietly
    link
    fedilink
    arrow-up
    45
    arrow-down
    3
    ·
    6 days ago

    I, unfortunately, have to use GitHub at $DAYJOB and this is me. I navigate most of the webpage via the URL bar now.

    Basically, let’s say I’m working on a repo github.com/tomato/sauce/ and want to navigate to the Releases page.

    Via the webpage:

    1. Type github.com into the URL bar.
    2. Don’t find tomato/sauce/ in the list of recent repos, even though it’s the only repo I work on.
    3. Click on some other repo that’s at least in the tomato/ org.
    4. Navigate up to the tomato/ org.
    5. Find the sauce/ repo in the list.
    6. Traverse half the fucking screen to hit the “Releases” heading in the middle of the About-section.

    Via the Firefox URL bar:

    1. Type gi→t→s→r→.
    2. Hit Enter.

    I admit, it’s hard to compete with the latter, but I wouldn’t know how to navigate that way, if the former wasn’t so terrible.



  • Personally, I’ve found Poetry somewhat painful for developing medium-sized or larger applications (which I guess Python really isn’t made for to begin with, but yeah).

    Big problem is that its dependency resolution is probably a magnitude slower than it should be. Anytime we changed something about the dependencies, you’d wait for more than a minute on its verdict. Which is particularly painful, when you have to resolve version conflicts.

    Other big pain point is that it doesn’t support workspaces or multi-project builds or whatever you want to call them, so where you can have multiple related applications or libraries in the same repo and directly depending on each other, without needing to publish a version of the libraries each time you make a change.

    When we started our last big Python project, none of the Python tooling supported workspaces out of the box. Now, there’s Rye, which does so. But yeah, I don’t have experience yet, with how well it works.







  • Ah, yeah, I don’t think there was anything in the app. I guess, they could’ve mentioned it in the changelog, which gets shown in the app by default after an update.

    But yeah, I think we’ll have to excuse a bit of a bumpy ride here. I know, it says “Mozilla” on there now, but to my knowledge, it’s still just the one core dev…