Just a basic programmer living in California

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

help-circle
  • 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
    12
    ·
    edit-2
    7 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.



  • I used to organize a meetup for Javascript programmers. It was more about sharing information than about debate, but I think there might be overlap with what you want. The format was a regular meeting schedule once a month where 2-3 people would give presentations to show off what they’ve been working on, teach how to use a new framework, or whatever they were interested in. So in a way it has handing out information from on high, but I think because we had different people each meeting sharing their perspective there was a good element of exchange of ideas between peers.

    Now it turns out that people need lots of leadership energy to create room for exchange of ideas. At the beginning I’d get about 6 people at each meeting, few of whom volunteered to step up in front of the group. So what I did was to show up every month, and talked about whatever topic I could come up with. At most of the meetings it was just me talking. When I did get other people to present it was through prodding and hassling. But people were interested enough in the material, and found enough value in just being in the same room with other people with similar interests that people kept coming back. It stayed small like that, growing slowly for maybe 2 years. But then we hit a critical point where there were enough people coming, and people were inspired enough that suddenly we were getting 30-50 people each month, and I had no problem finding volunteers to present. And it wasn’t the same volunteers either - we had a good rotation of different people interested in sharing their ideas. That continued for another 6 years before I moved and passed organizer responsibility over to the next generation.

    My point is that a club like this needs a lot of energy and attention. It’s going to grow slowly. But it will grow if you keep at it, and put in the work. We reached that point where the group became sort of self sufficient in that I didn’t need to be the one making presentations anymore, and I didn’t need to actively seek out volunteers to present. But I still had to put in the work to make sure we had the meeting space available every month, show up to let people in, work out the meeting schedule, get food. Anything like this will die if there isn’t someone holding it together through force of will. But it’s worth it! It was a great experience!

    I know you said you want your club to self-manage. But people need structure. If you ask people to show up and have stimulating discussion they’re going stand around awkwardly not knowing what to talk about. Something like a presentation followed by discussion gives structure that helps people to open up, and explore their own thoughts. Or since you want multiple perspectives maybe a debate or a panel format would work better for you. Get 2 or more volunteers to talk about a specific topic. I highly recommend lining up panelists ahead of time - you’ll have a rough time getting volunteers on the spot. If you prep your debaters ahead of time by asking them to present different views they might be less likely to simply agree with each other. Once your scheduled panelists get ideas flowing it will be easier to encourage attendees to step up to speak. You might have a debate or panel followed by open discussion, or rotating panel seats that people can step up to and leave as they feel inspired. But again, based on my experience I suggest being ready to be the one person standing up and debating yourself for maybe many meetings before the club finds a self-organizing energy.





  • 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.


  • What helps me most is to find a comfortable rhythm, which is a combination of stride cadence and breathing. I’ve read advice on counting strides, and matching breaths to certain steps. It’s hard for me to coordinate all that so I go by feel. If you’re not feeling comfortable maybe try going slower.

    When your legs don’t want to move it could mean that your muscles aren’t warmed up. You might feel better after taking it easy at the start of the run. Or your muscles might be tired from recent exercise. Either way make sure you’re hydrated.