news
Programming Leftovers
-
Sebastian ☛ oh, apparently it's not possible to portably check for string-to-float conversion errors in standard c
the linux man pages for these functions literally don't mention this at all, and there actually is a reason why which i'll get to in a sec, but what the standard is saying is, if math_errhandling doesn't advertise support for errno (as is the case on musl, for instance), the string to float conversion functions don't set errno on error. furthermore, if the result underflows, the function isn't required to report an error at all.
-
Dayvi Schuster ☛ We Were Not All Terrible Developers
-
Dan Langille ☛ Migrated your repo from subversion to git? Here’s how I migrated my working copies.
The same steps work for any Subversion working copy whose repository has been converted to git.
-
Clinton Blackburn ☛ A rant about APIs
I have had the displeasure of integrating with a few different APIs over the past few weeks while working to automate Vori’s onboarding flow. These APIs have been for systems including contract rendering and e-signature collection, invoicing/billing systems, CRMs, card processors and gateways, and card terminal providers.
They all kinda suck in their own ways. This would be somewhat acceptable if they were doing novel work in new fields, but these are all APIs for solutions that have existed for a decade or more. It’s also frustrating because the developers could simply copy existing, better, APIs and practices, and come out ahead!
-
Eli Bendersky ☛ Monte-Carlo simulations
Monte Carlo simulations (or methods) is the technique of applying randomness and the Law of large numbers to the solution of various scientific and engineering problems. One of its first documented uses was by Stanislaw Ulam and John von Neumann for nuclear weapon simulations after WWII [1].
In this post I want to provide examples of some simple uses of Monte Carlo simulations. We'll start with the classical example of calculating the value of ×
-
Steinar H Gunderson ☛ Steinar H. Gunderson: Decompilation patterns, part 5: Nested if/goto
Here's a pattern that sometimes comes up: [...]
-
Python
-
Qt ☛ Qt for Python Release: 6.12 is here!
Qt for Python 6.12 is here, alongside the Qt 6.12 LTS release. This is the biggest release we have had in a while. If you haven't read what's new in Qt itself, check out the general announcement.
-
Daniel Lemire ☛ Faster Python startup with lazy imports
When a Python program starts, it needs to load all its dependencies (import). With the upcoming version of Python, it is possible to use lazy imports instead. lazy import json lazy from decimal import Decimal In this instance, the name json is no longer the module, but a mere placeholder object.
-
-
Rust
-
Rust Weekly Updates ☛ This Week In Rust: This Week in Rust 672
Hello and welcome to another issue of This Week in Rust!
-
-
R / R-Script
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: myman 0.10.0 on CRAN: Three new waves of posts!
A new and exciting version of our still-new package myman reached CRAN this morning, and has been built for r2u and on r-universe. The matching Python package has also been updated. The package offers nineteen hundred eighty four “My man …” posts by Kevin Kruse
A sample usage illustration shows how to extract by pattern, and shows posts from the two most recent waves: [...]
-
Rlang ☛ The Pit of Success, and What a Data Science Language Would Need to Make It
I came across this framing in a talk that I was recently recommended and I further recommend it to anyone interested in the topic: Functional architecture – The pits of success – Mark Seemann. It put a name to something I had been circling around for years.
I had been arguing a version of the same point long before I knew the term. In my 2022 post titled Functional programming explains why containerization is needed for reproducibility, I argued that a pipeline is only as reproducible as the functions it is built from, and that even a pure function hides inputs such as the R version, the package versions, and the operating system. Containers are one way to make those hidden inputs explicit. In another 2022 post on learnings from functional programming, I made a related case for writing functions that fail early and never reach into the global environment. Both posts were, in a sense, attempts to build a pit of success out of habits and tooling. Neither was framed that way, and I think the framing is more useful.
-