home.social

#pkgdev — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #pkgdev, aggregated by home.social.

  1. Is there an accepted best pattern for repeatedly running code until some timeout is reached?This is the pattern that we use at the moment, but putting conditions inside the while loop feels like there might be a way to put this into some kind of object that can be more easily inspected? Here's some code that we use at the moment

    ```r
    while (not_finished(draws, n_effective) &
    not_timed_out(start_time, time_limit)) {
    n_samples <- new_samples(draws, n_effective)
    draws <- extra_samples(
    draws,
    n_samples,
    verbose = verbose,
    one_by_one = one_by_one
    )
    }
    ```

    #rstats #rse #researchsoftwareengineering #pkgdev

  2. I just wanted to celebrate this little victory in {greta} - I'm not sure when the last time I had all builds pass muster, but I finally got all green lights!

    #rstats #pkgdev