Just a basic programmer living in California

  • 2 Posts
  • 17 Comments
Joined 7 months ago
cake
Cake day: February 23rd, 2024

help-circle
  • Probably not very similar, but Git Butler is very interesting. It adds its own layer of management so that you can have multiple branches “applied” to your working tree simultaneously. It’s helpful when you have multiple changes that should go into different branches, and some that shouldn’t be committed - it has a system of lanes that help keep track of all that. Or you can test how changes from two branches interact.

    Last time I used it, maybe 6 months ago, it was rough around the edges so I didn’t stick with it. But they’ve done lots of work since then so I’m thinking of giving it another go. It is (last I checked) an all-in tool. When you’re using Butler on a project you probably won’t be able to use other git tools.


  • I think it depends. Lua is great for scripting - like when X happens do Y. I agree that makes sense for a case like Home Assistant. Sometimes you really want the result to be a data structure, not an interactive program, in which case I think more sophisticated configuration (as opposed to scripting) languages might be better.




  • hallettj@leminal.spacetoProgramming@programming.devWhy YAML sucks?
    link
    fedilink
    English
    arrow-up
    13
    ·
    edit-2
    12 days ago

    I agree - YAML is not suitable for complex cases that people use it in, like Terraform and Home Assistant. My pet peeve is a YAML config in a situation that really calls for more abstraction, like functions and variables. I’d like to see more use of the class of configuration languages that support that stuff, like Dhall, Cue, and Nickel.

    There is another gotcha which is that YAML has more room for ambiguity than, say, JSON. YAML has a lot of ways to say true and false, and it’s implicit quoting is a bit complex. So some values that you expect to be strings might be interpreted as something els.




  • To expand on why generics are preferred, just in case you haven’t seen these points yet: the performance downsides of Box<dyn MyTrait> are,

    • methods use dynamic dispatch in this case
    • requires heap allocation

    There is also a possible type theory objection which is that normally there is a distinction between types and traits. Traits are not types themselves, but instead define sets of types with shared behavior. (That’s why the same feature in Haskell is called a “type class”, because it defines a class of types that have something in common.) But dyn turns a trait into a type which undermines the type/trait distinction. It’s useful enough to justify being in the language, but a little unsettling from a certain perspective.






  • A commit followed by a reset or commit --amend later is one more step than a worktree --add. Plus there have been lots of times when I’ve had some changes staged, and some unstaged debugging or experimental changes that I want to make sure not to commit, and thinking about how to pack all that away neatly so I could get back where I was seemed sufficiently obnoxious that I avoided doing whatever would have required a quick branch switch. Worktree would have let me pick up where I left off without having to think about it.




  • Yes, this is what I think of when I think of a “dead man’s switch”. It relates to the concept of a physical device that deactivates or activates if you let go of a switch, like a light saber for example.

    I think an interval of weeks would be more convenient than hours to avoid false positives. But I think Patrick Stewart’s character did daily check-ins in the movie Safe House. The dead man’s switch was actually the central plot point in that movie.