Programming Leftovers
-
Redowan Delowar ☛ Quicker startup with module-level __getattr__
This morning, someone on Twitter pointed me to PEP 5621, which introduces __getattr__ and __dir__ at the module level. While __dir__ helps control which attributes are printed when calling dir(module), __getattr__ is the more interesting addition.
-
James G ☛ Showing incremental progress for longer actions
Showing feedback is an essential part of user experience design. When a user takes an action, it should be clear to the user that the action has been recognised by the system and that, as a result, something is happening.
-
DJ Adams ☛ Restricting access via facets with masked elements
Watching the inaugural episode of The Art & Science of CAP, in particular around 39 mins in, Daniel was showing an example of a projection where some of the details of the entity -- upon which the projection was being made -- were deliberately restricted.
-
Fabian “ryg” Giesen ☛ BC7 optimal solid-color blocks
That’s right, it’s another texture compression blog post! I’ll keep it short. By “solid-color block”, I mean a 4×4 block of pixels that all have the same color. ASTC has a dedicated encoding for these (“void-extent blocks”), BC7 does not. Therefore we have an 8-bit RGBA input color and want to figure out how to best encode that color with the encoding options we have. (The reason I’m writing this up now is because it came up in a private conversation.)
-
Tim Coates ☛ (Why) Pascal Deserves a Second Look
Special Note: When I mention Pascal, I’m including versions like Delphi, Free Pascal, Lazarus, and others that have developed over the years. And regardless of which version you use, these variations of Pascal each bring something unique to the table. Together, they keep Pascal relevant and versatile, offering a range of tools for both new and experienced developers.
Pascal is not new or trendy; it’s practically the antithesis of what most developers are drawn to today. And yet, its age doesn’t make it obsolete or irrelevant. Pascal has a lot to offer, especially to learners. It’s designed with readability and clarity in mind, which makes it excellent for grasping the fundamentals of programming. When we talk about programming fundamentals—like variables, loops, and control structures—Pascal presents these concepts in a way that feels grounded and accessible. For new programmers, Pascal is a structured, disciplined language that teaches you how to think about coding without a lot of distracting complexities.
-
R
-
Rlang ☛ Global discret grids
We will do statistical binning on a hexagonal grid, but not just any grid. Geodesic Discrete Global Grid Systems (Kimerling et al. 1999; Sahr, White, and Kimerling 2003) allow to use hierarchical equal-area hexagon1 grids.
-
Rlang ☛ Comparison of spatial patterns in categorical raster data for overlapping regions using R
This is the fourth part of a blog post series on comparing spatial patterns in raster data. More information about the whole series can be found in part one.
-
Rlang ☛ Death penalty
-