No Clocks

No Clocks

4334 bookmarks
Newest
Framework vs Library: What are the differences?
Framework vs Library: What are the differences?
Understand the distinction between a framework and a library and make the right choice for your development projects.
·liora.io·
Framework vs Library: What are the differences?
Design Signals: How to Spot Agency in Code - The Passionate Programmer
Design Signals: How to Spot Agency in Code - The Passionate Programmer
There’s a reason most legacy systems feel heavy. It’s not because they’re old. It’s not because they lack patterns. It’s not even because they’re poorly tested. It’s because they lack agency. And once you learn to see that, you can’t unsee it. Why Most Legacy Code Is Procedural in Disguise I’ve reviewed thousands of systems […]
·passprog.com·
Design Signals: How to Spot Agency in Code - The Passionate Programmer
Home
Home
Approval Tests Library - Capturing Human Intelligence [available for Java, C#, VB.Net, PHP, Ruby, Node.JS and Python]
·approvaltests.com·
Home
gpq-tiles
gpq-tiles
Fast GeoParquet → PMTiles converter in Rust
·geoparquet-io.github.io·
gpq-tiles
ezesri - Extract GeoJSON from ArcGIS REST Services
ezesri - Extract GeoJSON from ArcGIS REST Services
Extract GeoJSON from any ArcGIS FeatureServer or MapServer. View metadata, apply filters and download data. No installation required.
·ezesri.com·
ezesri - Extract GeoJSON from ArcGIS REST Services
GeoRust
GeoRust
·georust.org·
GeoRust
3 Package structure and state – R Packages (2e)
3 Package structure and state – R Packages (2e)
Learn how to create a package, the fundamental unit of shareable, reusable, and reproducible R code.
Package development workflows make much more sense if you understand the five states an R package can be in: source bundled binary installed in-memory
You already know some of the functions that put packages into these states. For example, install.packages() can move a package from the source, bundled, or binary states into the installed state. devtools::install_github() takes a source package on GitHub and moves it into the installed state. The library() function loads an installed package into memory, making it available for immediate and direct use.
A source package is just a directory of files with a specific structure. It includes particular components, such as a DESCRIPTION file, an R/ directory containing .R files, and so on. Most of the remaining chapters in this book are dedicated to detailing these components.
A bundled package is a package that’s been compressed into a single file. By convention (from Linux), package bundles in R use the extension .tar.gz and are sometimes referred to as “source tarballs”. This means that multiple files have been reduced to a single file (.tar) and then compressed using gzip (.gz). While a bundle is not that useful on its own, it’s a platform-agnostic, transportation-friendly intermediary between a source package and an installed package.
In the rare case that you need to make a bundle from a package you’re developing locally, use devtools::build(). Under the hood, this calls pkgbuild::build() and, ultimately, R CMD build, which is described further in the Building package tarballs section of Writing R Extensions.
This should tip you off that a package bundle or “source tarball” is not simply the result of making a tar archive of the source files, then compressing with gzip. By convention, in the R world, a few more operations are carried out when making the .tar.gz file and this is why we’ve elected to refer to this form as a package bundle, in this book.
Every CRAN package is available in bundled form, via the “Package source” field of its landing page.
The main differences between a source package and an uncompressed bundle are: Vignettes have been built, so rendered outputs, such as HTML, appear below inst/doc/ and a vignette index appears in the build/ directory. A local source package might contain temporary files used to save time during development, like compilation artefacts in src/. These are never found in a bundle. Any files listed in .Rbuildignore are not included in the bundle. These are typically files that facilitate your development process, but that should be excluded from the distributed product.
Each line of .Rbuildignore is a Perl-compatible regular expression that is matched, without regard to case, against the path to each file in the source package1. If the regular expression matches, that file or directory is excluded. Note there are some default exclusions implemented by R itself, mostly relating to classic version control systems and editors, such as SVN, Git, and Emacs.
We usually modify .Rbuildignore with the usethis::use_build_ignore() function, which takes care of easy-to-forget details, such as regular expression anchoring and escaping. To exclude a specific file or directory (the most common use case), you MUST anchor the regular expression. For example, to exclude a directory called “notes”, the .Rbuildignore entry must be ^notes$, whereas the unanchored regular expression notes will match any file name containing “notes”, e.g. R/notes.R, man/important-notes.R, data/endnotes.Rdata, etc. We find that use_build_ignore() helps us get more of our .Rbuildignore entries right the first time.
.Rbuildignore is a way to resolve some of the tension between the practices that support your development process and CRAN’s requirements for submission and distribution (Chapter 22). Even if you aren’t planning to release on CRAN, following these conventions will allow you to make the best use of R’s built-in tooling for package checking and installation. The files you should .Rbuildignore fall into two broad, semi-overlapping classes: Files that help you generate package contents programmatically. Examples: Using README.Rmd to generate an informative and current README.md (Section 18.1). Storing .R scripts to create and update internal or exported data (Section 7.1.1). Files that drive package development, checking, and documentation, outside of CRAN’s purview. Examples: Files relating to the RStudio IDE (Section 4.2). Using the pkgdown package to generate a website (Chapter 19). Configuration files related to continuous integration/deployment (Section 20.2).
Here is a non-exhaustive list of typical entries in the .Rbuildignore file for a package in the tidyverse: ^.*\.Rproj$ # Designates the directory as an RStudio Project ^\.Rproj\.user$ # Used by RStudio for temporary files ^README\.Rmd$ # An Rmd file used to generate README.md ^LICENSE\.md$ # Full text of the license ^cran-comments\.md$ # Comments for CRAN submission ^data-raw$ # Code used to create data included in the package ^pkgdown$ # Resources used for the package website ^_pkgdown\.yml$ # Configuration info for the package website ^\.github$ # GitHub Actions workflows
If you want to distribute your package to an R user who doesn’t have package development tools, you’ll need to provide a binary package. The primary maker and distributor of binary packages is CRAN, not individual maintainers. But even if you delegate the responsibility of distributing your package to CRAN, it’s still important for a maintainer to understand the nature of a binary package.
Binary packages for macOS are stored as .tgz, whereas Windows binary packages end in .zip. If you need to make a binary package, use devtools::build(binary = TRUE) on the relevant operating system. Under the hood, this calls pkgbuild::build(binary = TRUE) and, ultimately, R CMD INSTALL --build, which is described further in the Building binary packages section of Writing R Extensions. If you choose to release your package on CRAN (Chapter 22), you submit your package in bundled form, then CRAN creates and distributes the package binaries.
An installed package is a binary package that’s been decompressed into a package library (described in Section 3.7). Figure 3.2 illustrates the many ways a package can be installed, along with a few other functions for converting a package from one state to another. This diagram is complicated! In an ideal world, installing a package would involve stringing together a set of simple steps: source -> bundle, bundle -> binary, binary -> installed. In the real world, it’s not this simple because there are often (faster) shortcuts available.
·r-pkgs.org·
3 Package structure and state – R Packages (2e)
Playing with AI Agents in R - cynkra
Playing with AI Agents in R - cynkra
It's local LLM time! What an adventure it has been since I first started exploring local LLMs. With the introduction of various new Llama models, we now have impressive small and large models that run seamlessly on consumer hardware.
·cynkra.com·
Playing with AI Agents in R - cynkra
BaseClaw/SKILL.md at main · jweingardt12/BaseClaw
BaseClaw/SKILL.md at main · jweingardt12/BaseClaw
Win your fantasy league, with the help of AI. Allows for Claude/OpenClaw management of your Yahoo Fantasy Baseball team. - jweingardt12/BaseClaw
·github.com·
BaseClaw/SKILL.md at main · jweingardt12/BaseClaw
rafi/awesome-cli-binaries: Popular modern Linux CLI utilities, with pre-made statically compiled amd64/arm64 binaries and a great ~/.config starting point 🎉
rafi/awesome-cli-binaries: Popular modern Linux CLI utilities, with pre-made statically compiled amd64/arm64 binaries and a great ~/.config starting point 🎉
Popular modern Linux CLI utilities, with pre-made statically compiled amd64/arm64 binaries and a great ~/.config starting point 🎉 - rafi/awesome-cli-binaries
·github.com·
rafi/awesome-cli-binaries: Popular modern Linux CLI utilities, with pre-made statically compiled amd64/arm64 binaries and a great ~/.config starting point 🎉
Optimizing Windows for Productivity and Performance
Optimizing Windows for Productivity and Performance
Hi everyone, I’m Fahadi Jutt, working in IT and always interested in making Windows systems run smoother and more efficiently. I’d love to hear what strategies or tools you use to optimize...
·windowsforum.com·
Optimizing Windows for Productivity and Performance
Reading Remote Data Files
Reading Remote Data Files
Sometimes data arrives as a series of individual files each of which is organized in the same way—which is to say, each of which has the same variables, features, or columns. Imagine a series of tables reporting mandated information about every s...
·r-bloggers.com·
Reading Remote Data Files
Developer Portal
Developer Portal
JSON Template (JSON-T) is a minimal but powerful template language, designed to be paired with a JSON dataset. This data is provided by Squarespace and is dynamically generated, containing all of your site content.
·developers.squarespace.com·
Developer Portal
Error Codes
Error Codes
Making It Go
·patton-tech.com·
Error Codes
Querying PowerShell Gallery and Nuget.org
Querying PowerShell Gallery and Nuget.org
I’ve decided that I want to changeup how I display my projects on the blog, I think I could create a landing page for all my code and then create dedicated locations for things that are published. Additionally I think it would be fun to see some of the stats displayed here, which is easy enough for an individual project, but not for a large group. This got me thinking how can I query nuget.org and powershellgallery.com for a list of packages that I’ve published.
·patton-tech.com·
Querying PowerShell Gallery and Nuget.org
PowerShell: Calculating Folder Sizes
PowerShell: Calculating Folder Sizes
Sometimes all you want to know, or need to know, is how big a folder is in PowerShell. To do that, we'll need to use Get-ChildItem and Measure-Object specifically.The quick and dirtyThe first command...
·gnja.io·
PowerShell: Calculating Folder Sizes
AI Skills for R Package Development
AI Skills for R Package Development
A collection of curated, opinionated skills and agent instructions to improve agentic coding of R packages.
·pkgskills.api2r.org·
AI Skills for R Package Development
Simple Foreign Function Interface using S7 and libffi
Simple Foreign Function Interface using S7 and libffi
Simple Foreign Function Interface for R using libffi and S7 classes. Supports calling C functions with type conversion and struct handling. Includes standard C types (int8, int16, int32, int64, uint variants), platform types (size_t, bool), floating point types, and complex struct types. Experimental header parsing using tinycc as `C` preprocessor enables automatic generation of R bindings from C header files, simplifying package development for C libraries.
·sounkou-bioinfo.github.io·
Simple Foreign Function Interface using S7 and libffi