No Clocks

No Clocks

4140 bookmarks
Newest
Jaymin West
Jaymin West
Agentic Engineer. Engineering the future of AI. Currently: Tidemark FDE. Previously: Rowana (acquired).
·jayminwest.com·
Jaymin West
amoeba/dbc-r
amoeba/dbc-r
Contribute to amoeba/dbc-r development by creating an account on GitHub.
·github.com·
amoeba/dbc-r
BBOX Server
BBOX Server
Composable spatial services
·bbox.earth·
BBOX Server
Partitioning strategies for bigger-than-memory spatial data | Dewey Dunnington
Partitioning strategies for bigger-than-memory spatial data | Dewey Dunnington
There’s a great discussion going on in the GeoParquet repo about how exactly to split up GeoParquet datasets for optimal querying. This post is my adventure giving the partition strategies a shot for practicality.
·dewey.dunnington.ca·
Partitioning strategies for bigger-than-memory spatial data | Dewey Dunnington
Documentation
Documentation
hyperextensible Vim-based text editor
·neovim.io·
Documentation
11 Test Smells That Make Your Tests Lie to You
11 Test Smells That Make Your Tests Lie to You
Learn to recognize problems in R test code that cause your test suite to pass while hiding real bugs. Detect those issues and start writing more trustworthy tests.
·jakubsobolewski.com·
11 Test Smells That Make Your Tests Lie to You
8 Conditions | Advanced R
8 Conditions | Advanced R
8.1 Introduction The condition system provides a paired set of tools that allow the author of a function to indicate that something unusual is happening, and the user of that function to deal with...
·adv-r.hadley.nz·
8 Conditions | Advanced R
Pi Coding Agent
Pi Coding Agent
A terminal-based coding agent
·pi.dev·
Pi Coding Agent
8.4 Handling conditions | Advanced R
8.4 Handling conditions | Advanced R
The book is designed primarily for R users who want to improve their programming skills and understanding of the language. It should also be useful for programmers coming to R from other languages, as help you to understand why R works the way it does.
So far we’ve just signalled conditions, and not looked at the objects that are created behind the scenes. The easiest way to see a condition object is to catch one from a signalled condition. That’s the job of rlang::catch_cnd()
But before we can learn about and use these handlers, we need to talk a little bit about condition objects. These are created implicitly whenever you signal a condition, but become explicit inside the handler.
Built-in conditions are lists with two elements: message, a length-1 character vector containing the text to display to a user. To extract the message, use conditionMessage(cnd). call, the call which triggered the condition. As described above, we don’t use the call, so it will often be NULL. To extract it, use conditionCall(cnd).
Conditions also have a class attribute, which makes them S3 objects.
The protected code is evaluated in the environment of tryCatch(), but the handler code is not, because the handlers are functions. This is important to remember if you’re trying to modify objects in the parent environment.
The handler functions are called with a single argument, the condition object. I call this argument cnd, by convention. This value is only moderately useful for the base conditions because they contain relatively little data. It’s more useful when you make your own custom conditions, as you’ll see shortly.
tryCatch() has one other argument: finally. It specifies a block of code (not a function) to run regardless of whether the initial expression succeeds or fails. This can be useful for clean up, like deleting files, or closing connections. This is functionally equivalent to using on.exit() (and indeed that’s how it’s implemented) but it can wrap smaller chunks of code than an entire function.
The handlers set up by tryCatch() are called exiting handlers, because they cause code to exit once the condition has been caught. By contrast, withCallingHandlers() sets up calling handlers: code execution continues normally once the handler returns. This tends to make withCallingHandlers() a more natural pairing with the non-error conditions. Exiting and calling handlers use “handler” in slighty different senses:
One important side-effect unique to calling handlers is the ability to muffle the signal. By default, a condition will continue to propagate to parent handlers, all the way up to the default handler (or an exiting handler, if provided):
If you want to prevent the condition “bubbling up” but still run the rest of the code in the block, you need to explicitly muffle it with rlang::cnd_muffle():
·bookdown.dongzhuoer.com·
8.4 Handling conditions | Advanced R
Please Shut Up! Verbosity Control in Packages
Please Shut Up! Verbosity Control in Packages
We recently introduced a new paragraph to the development version of our dev guide Provide a way for users to opt out of verbosity, preferably at the package level: make message creation dependent on an environment variable or option (like “usethis.quiet” in the usethis package), rather than on a function parameter. The control of messages could be on several levels (“none, “inform”, “debug”) rather than logical (no messages at all / all messages). Control of verbosity is useful for end users but also in tests. More interesting comments can be found in an issue of the tidyverse design guide.
·ropensci.org·
Please Shut Up! Verbosity Control in Packages
Semantic Compression
Semantic Compression
An introduction to the idea that code should be approached with a mindset towards compressing it semantically, rather than orienting it around objects.
·caseymuratori.com·
Semantic Compression
An Inclusive, Unifying API for Progress Updates
An Inclusive, Unifying API for Progress Updates
A minimal, unifying API for scripts and packages to report progress updates from anywhere including when using parallel processing. The package is designed such that the developer can to focus on what progress should be reported on without having to worry about how to present it. The end user has full control of how, where, and when to render these progress updates, e.g. in the terminal using utils::txtProgressBar(), cli::cli_progress_bar(), in a graphical user interface using utils::winProgressBar(), tcltk::tkProgressBar() or shiny::withProgress(), via the speakers using beepr::beep(), or on a file system via the size of a file. Anyone can add additional, customized, progression handlers. The progressr package uses Rs condition framework for signaling progress updated. Because of this, progress can be reported from almost anywhere in R, e.g. from classical for and while loops, from map-reduce API:s like the lapply() family of functions, purrr, plyr, and foreach. It will also work with parallel processing via the future framework, e.g. lapply(...) |> futurize() and purrr::map(...) |> futurize()', which uses future.apply::future_lapply() and furrr::future_map() internally. The package is compatible with Shiny applications.
·progressr.futureverse.org·
An Inclusive, Unifying API for Progress Updates
PowerShell Logging v2 – Easily create log files
PowerShell Logging v2 – Easily create log files
Sometime back in 2011 when I first started using PowerShell, I developed some standard functions to handle the creating and management of log files for my PowerShell scripts. These functions were s…
·9to5it.com·
PowerShell Logging v2 – Easily create log files