today's leftovers
-
In Other BSDs for 2022/09/03 [Ed: A batch of BSD news for the week]
-
Go 1.19 added an atomic.Pointer type that's a generic type
In Go 1.18, the Go developers were careful to keep generic types out of the standard library, to the point where they decided not to have a 'constraints' package of generics helpers in the standard library, never mind generic versions of slices and maps. As the Go 1.18 release notes say, all three packages were instead put under golang.org/x/exp. However, Go 1.19 turns out to have somewhat quietly changed that, adding the standard library's first public generic type in sync/atomic's new atomic.Pointer[T any] type.
The atomic.Pointer type is a type-safe atomic pointer to a *T, with the type safety assured at compile time. You could previously do atomic pointers through atomic.Value, but that was only type safe at runtime and might panic if you violated type safety (and storing a nil in one was complex (but possible)). The appeal of atomic.Pointer as a generic type is pretty obvious and it also seems unlikely that you could design a better generic type or a better API than the one it uses (which atomic.Value had from Go 1.4 and Go 1.17 (for .CompareAndSwap())). I suspect that all of this adds up to why it was considered safe to add to the standard library in Go 1.19, and thus commit Go to having it there as part of the compatibility guarantee.
-
How to create Python binding for a Rust library | Red Hat Developer
This article continues a series about how to take advantage of the recent Rust support added to Linux.
-
How to create C binding for a Rust library | Red Hat Developer
This article is the second installment of a series about how to take advantage of the recent Rust support added to Linux. The first article in the series, 3 essentials for writing a Linux system library in Rust, describes special considerations that system libraries require when you are writing in Rust. This article demonstrates how to create a C binding so that programmers in C or C++ can call your Rust library. Rust has not conquered the Linux world yet, so our system library needs to provide bindings to other languages.
-
Linux Weekly Roundup #198
Welcome to this week's Linux weekly Roundup. We had a full week in the world of Linux releases with MX Linux 21.2, Absolute Linux 20220825, Bluestar Linux 5.19.4, Nitrux OS 20220831, Garuda Linux 220903, Linuxfx 11.2.22.04.2, deepin 20.7, and Ubuntu 20.04.5 with all it's flavors.