Programming Leftovers
-
Rlang ☛ Bootstrap vs Standard Error Confidence Intervals
During a recent class a student asked whether bootstrap confidence intervals were more robust than confidence intervals estimated using the standard error (i.e. \(SE = \frac{s}{\sqrt{n}}\)). In order to answer this question I wrote a function to simulate taking a bunch of random samples from a population, calculate the confidence interval for that sample using the standard error approach (the t distribution is used by default, see the cv parameter. To use the normal distribution, for example, set cv = 1.96.), and then also calculating a confidence interval using the boostrap.
-
Trail of Bits ☛ The call for invariant-driven development
We need a paradigm shift toward invariant-driven development to drive the industry toward a more secure future. By embedding invariants—key properties that must always hold—into every stage of the software development lifecycle, you can significantly enhance the robustness of your smart contracts.
In this blog post, we’ll explore what invariant-driven development means, why it’s essential, and how you can adopt this approach to elevate your security practices and build more robust smart contracts.
-
Yoshua Wuyts ☛ A survey of every iterator variant
I'm increasingly of the belief that before we can meaningfully discuss the solution space, we have to first make an effort to build consensus on the problem space. It's hard to plan for a journey together if we don't know what the trip will be like along the way. Or worse: if we don't agree in advance where we want the journey to take us.
In Rust the Iterator trait is the single-most complex trait in the stdlib. It provides 76 methods, and by my estimate (I stopped counting at 120) has around 150 trait implementations in the stdlib alone. It also features a broad range of extension traits like FusedIterator and ExactSizeIterator that provide additional capabilities. And it is itself a trait-based expression of one of Rust's core control-flow effects; meaning it is at the heart of a lot of interesting questions about how we combine such effects.
-
Unix Men ☛ Markdown Italics: Instructions, Pitfalls, and Solutions
It is also used to highlight key points and improve the readability of the overall content. In this article, let us take you through the different ways to use Markdown italics, the best practices, its use cases in documentation, blogs, and programming.
-
Dirk Eddelbuettel ☛ Dirk Eddelbuettel: RcppUUID 1.2.0 on CRAN: Adding Clock-based UUIDs
The RcppUUID package straightforward library binding. As it had dropped off CRAN over a relatively minor issue, I descided to adopted it with the previous 1.1.2 release made quite recently.
This release adds new high-resolution clock-based UUIDs accordingt to the v7 spec. Internally 100ns increments are represented. The resulting UUIDs are both unique and sortable. I added this recent example to the README.md which illustrated both the implicit ordering and uniqueness.
-
Python
-
RIPE ☛ Easy RIPE Atlas Data Analysis with SQL
Not a big fan of pandas dataframe syntax? Prefer to use SQL? Then suffer no more! In this detailed, step-by-step guide using RIPE Atlas public data, find out how DuckDB allows you to use SQL without any DB server on a Jupyter Notebook.
-
Adam Young: Converting a Shell Script to Python
We have a build system that has grown organically. It started as a shell script. We needed to run it from gitlab, so we wrote helper scripts to insulate our code from gitlab. Then we added some helper functions to mimic the gitlab interactions when working with them from the comand line. The helper functions grew until you could not practically run the original shell script without them.
It is a mess.
I want to refactor it.
Refactoring Shell is painful.
I want objects. I want python.
-
-
Golang
-
Linuxiac ☛ Go 1.24 Released with Faster Performance, Better Tooling
It introduces complete support for generic type aliases, significantly enhancing the language’s generic programming capabilities. Now, a type alias can be parameterized in the same way as a defined type.
According to the Go team, this change opens up more concise ways to write and maintain Go code while still preserving readability and clarity.
-
-
Java
-
Unix Men ☛ Java Versions: How to View and Switch Versions
Java is a stable and matured product. It follows a structured release cycle with each version being released every six months and LTS version being rolled out every three years. Here are the most commonly used Java versions: [...]
-
-
Rust
-
The Register UK ☛ 'Key kernel maintainers' still back Rust in the Linux kernel, despite the doubters
he Rust for Linux project is alive and well, despite suggestions to the contrary, even if not every Linux kernel maintainer is an ally.
On Sunday, Miguel Ojeda, who contributes to Rust for Linux and to Linux kernel maintenance, published a "Rust kernel policy" clarifying the status of efforts to integrate Rust code into the open source kernel's largely C codebase.
The document acknowledges the elephant in the room by posing the question, "Do kernel maintainers support Rust in the kernel?" and answering, "Yes, there are key kernel maintainers that support Rust in the kernel."
-