• 0 Posts
  • 37 Comments
Joined 2 years ago
cake
Cake day: October 5th, 2023

help-circle



  • Of all the weapons in the vast Soviet arsenal nothing was more profitable than Avtomat Kalashnikova model of 1947, more commonly known as the AK-47, or Kalashnikov.

    It’s the world’s most popular assault rifle, a weapon all fighters love. An elegantly simple nine pound amalgamation of forged steel and plywood, it doesn’t break, jam, or overheat. It will shoot whether it’s covered in mud or filled with sand.

    It’s so easy even a child can use it, and they do.

    The Soviets put the gun on a coin, Mozambique put it on their flag. Since the end of the Cold War, the Kalashnikov has become the Russian people’s greatest export. After that comes vodka, caviar, and suicidal novelists. One thing is for sure; no one was lining up to buy their cars.

    ~ Lord of War




  • I guess I’m just legitimately confused about how to feel about it all.

    The freedom of Lemmy and the fediverse let’s people choose how to interact with it.

    If a user is looking for a free to use , open source, ad-free experience then that’s their choice.

    If others are happy to pay for an app because they prefer the experience that app provides them they can choose to do so.

    I also wouldn’t spend time in my day coming into defend organizations that want to monetize on open source community projects either.

    OP read that Boost may contain code used for tracking, then started spewing some conspiracy that “Boost is tracking your data for profiling and more!” without any proof or any actual research.

    This isn’t a case of defending some giant corporation, it’s just stopping tedious drama before it spreads.

    If you check OPs profile they’ve been spreading this for over a week. When I first saw this thread the masses were heavily upvoting the conspiracy and downvoting anyone disagreeing.









  • I completely agree, you’ve summed up my view far better than I could.

    There’s also a controversial approach that if you’re debating with someone and you believe in the points you’re making then you should upvote even the comments you disagree.

    By doing so the full thread of comments is ranked higher so more people see the incredibly clever points you’re articulating.

    This isn’t so relevant on Lemmy right now because it’s still small so you might read all comments on ba post. But it made a massive difference on reddit where there were thousands of comments. So the algorithm becomes very selective.






  • So, you don’t know Python at all AND you don’t know Bash, but you feel compelled to talk about how one is so much better than the other?

    I have plenty of experience with Bash, hence why I was eager to question the implication that bash was less complicated than other solutions.

    You’re correct that I don’t know python, but I do have plenty of familiarity with PHP, JS, C#, and Rust. From my experience with those languages I guessed that python probably has similar libraries for making API calls.

    Thanks for providing the actual examples. Looking at them I’m curious if you still think I’m wrong?

    In my opinion the bash is much more difficult to understand than the python and therefore it’s more likely for bugs to creep in. For example I think curl_exit_code=$? should be called immediately after the curl command as the way it’s presently written isn’t it capturing the exit code of the tail command?

    You’ve explicitly called --connect-timeout and --max-time. imo it only comes from experience that you need to add these options. I had a script that had been funcitoning without issue for months then suddenly started to hang and it was a while before I figured out that the defaults for curl had no timeout so it didn’t gracefully fail like I would expect.

    These are the kind of traps that I fall into all the time with bash and it’s painful to debug.

    response=$(
      curl \
        --silent \
        --write-out "\n%{http_code}" \
        --connect-timeout "$CONNECT_TIMEOUT" \
        --max-time "$MAX_TIME" \
        "$API_URL"
    )
    
    http_body=$(echo "$response" | sed '$d')        
    http_code=$(echo "$response" | tail -n1)
    
    curl_exit_code=$?