Russ Allbery: Review: The Exiled Fleet
| Series: | Divide #2 |
| Publisher: | Tor |
| Copyright: | 2021 |
| ISBN: | 1-250-23635-5 |
| Format: | Kindle |
| Pages: | 421 |
| Series: | Divide #2 |
| Publisher: | Tor |
| Copyright: | 2021 |
| ISBN: | 1-250-23635-5 |
| Format: | Kindle |
| Pages: | 421 |
I've finally landed a patch/feature for HLedger I've been working on-and-off
(mostly off) since around March.
HLedger has a powerful CSV importer which you configure with a set of rules.
Rules consist of conditional matchers (does field X in this CSV row match
this regular expression?) and field assignments (set the resulting
transaction's account to Y).
motivating problem 1
Here's an example of one of my rules for handling credit card repayments. This
rule is applied when I import a CSV for my current account, which pays the
credit card:
if AMERICAN EXPRESS
account2 liabilities:amex
This results in a ledger entry like the following
2023-10-31 AMERICAN EXPRESS
assets:current - 6.66
liabilities:amex 6.66
My current account statements cover calendar months. My credit card period
spans mid-month to mid-month. I pay it off by direct debit, which comes out
after the credit card period, towards the very end of the calendar month.
That transaction falls roughly halfway through the next credit card period.
On my credit card statements, that repayment is "warped" to the start of the
list of transactions, clearing the outstanding balance from the previous
period.
When I import my credit card data to HLedger, I want to compare the result
against a PDF statement to make sure my ledger matches reality. The repayment
"warping" makes this awkward, because it means the balance for roughly half
the new transactions (those that fall before the real-date of the repayment)
don't match up.
motivating problem 2
I start new ledger files each year. I need to import the
closing balances from the previous year to the next, which I do by exporting
the final balance from the previous year in CSV and importing that into the
new ledgers in the usual way.
Between 2022 and 2023 I changed the scheme I use for account
names so I need to translate between the old and the new in
the opening balances. I couldn't think of a way of achieving this in the
import rules (besides writing a bespoke rule for every possible old account
name) so I abused another HLedger feature instead, HLedger
aliases. For example
I added this alias in my family ledger file for 2023
alias /^family:(.*)/ = \1
These are ugly and I'd prefer to get rid of them.
regex match groups
A common feature of regular expressions is defining match groups which can
be referenced elsewhere, such as on the far-side of a substitution. I added
match group support to HLedger's field assignments.
addressing date warping
Here's an updated version rule from the first motivating problem:
if AMERICAN EXPRESS
& %date (..)/(..)/(....)
account2 liabilities:amex
comment2 date:\3-\2-16
We now match on on extra date field, and surround the day/month/year components
with parentheses to define match groups. We add a second field assignment too,
setting the second posting's "comment" field to a string which, once the match
groups are interpolated, instructs HLedger to do date warping (I wrote about
this in date warping in HLedger)
The new transaction looks like this:
2023-10-31 AMERICAN EXPRESS
assets:current - 6.66
liabilities:amex 6.66 ; date:2023-10-16
getting rid of aliases
In the second problem, I can strip off the unwanted account name prefixes at
CSV import time, with rules like this
if %account2 ^family:(.*)$
account2 \1
When!
This stuff landed a week ago in early November, and is not yet in a Hledger release.
![]() |
| Photo by Pixabay |
Given a typical install of 3 generic kernel ABIs in the default configuration on a regular-sized VM (2 CPU cores 8GB of RAM) the following metrics are achieved in Ubuntu 23.10 versus Ubuntu 22.04 LTS:
2x less disk space used (1,417MB vs 2,940MB, including initrd)
3x less peak RAM usage for the initrd boot (68MB vs 204MB)
0.5x increase in download size (949MB vs 600MB)
2.5x faster initrd generation (4.5s vs 11.3s)
approximately the same total time (103s vs 98s, hardware dependent)
For minimal cloud images that do not install either linux-firmware or modules extra the numbers are:
1.3x less disk space used (548MB vs 742MB)
2.2x less peak RAM usage for initrd boot (27MB vs 62MB)
0.4x increase in download size (207MB vs 146MB)
Hopefully, the compromise of download size, relative to the disk space & initrd savings is a win for the majority of platforms and use cases. For users on extremely expensive and metered connections, the likely best saving is to receive air-gapped updates or skip updates.
This was achieved by precompressing kernel modules & firmware files with the maximum level of Zstd compression at package build time; making actual .deb files uncompressed; assembling the initrd using split cpio archives - uncompressed for the pre-compressed files, whilst compressing only the userspace portions of the initrd; enabling in-kernel module decompression support with matching kmod; fixing bugs in all of the above, and landing all of these things in time for the feature freeze. Whilst leveraging the experience and some of the design choices implementations we have already been shipping on Ubuntu Core. Some of these changes are backported to Jammy, but only enough to support smooth upgrades to Mantic and later. Complete gains are only possible to experience on Mantic and later.
The discovered bugs in kernel module loading code likely affect systems that use LoadPin LSM with kernel space module uncompression as used on ChromeOS systems. Hopefully, Kees Cook or other ChromeOS developers pick up the kernel fixes from the stable trees. Or you know, just use Ubuntu kernels as they do get fixes and features like these first.
The team that designed and delivered these changes is large: Benjamin Drung, Andrea Righi, Juerg Haefliger, Julian Andres Klode, Steve Langasek, Michael Hudson-Doyle, Robert Kratky, Adrien Nader, Tim Gardner, Roxana Nicolescu - and myself Dimitri John Ledkov ensuring the most optimal solution is implemented, everything lands on time, and even implementing portions of the final solution.
Hi, It's me, I am a Staff Engineer at Canonical and we are hiring https://canonical.com/careers.
Lots of additional technical details and benchmarks on a huge range of diverse hardware and architectures, and bikeshedding all the things below:
A lot of time has passed since my previous post on my work to make dhcpcd the drop-in replacement for the deprecated ISC dhclient a.k.a. isc-dhcp-client. Current status:
It is more important to recognize what direction people are moving than where they are.I support trains and transit. I ve donated money and written letters to politicians. But, realistically, there will never be transit here. People in my county are unable to move all the way to transit. But what can we do? Plenty. We bought an EV. I ve been writing letters to the board of our local electrical co-op advocating for relaxation of rules around residential solar installations, and am planning one myself. It may well be that our solar-powered transportation winds up having a lower carbon footprint than the poster s transit use. Pick your favorite cause. Whatever it is, consider your strategy: What do you do with someone that is very far away from you, but has taken the first step to move an inch in your direction? Do you yell at them for not being there instantly? Or do you celebrate that they have changed and are moving?
Like each month, have a look at the work funded by Freexian s Debian LTS offering.


Check it out on GitHub, or get the release tarball or read the documentation or release notes!
release elements that reference downloadable data without an artifact block, which has not been supported for a while. For all of these, I checked to remove only things that had close to no users and that were a significant maintenance burden. So as a rule of thumb: If your XML validated with no warnings with the 0.16.x branch of AppStream, it will still be 100% valid with the 1.0 release.
Another notable change is that the generated output of AppStream 1.0 will always be 1.0 compliant, you can not make it generate data for versions below that (this greatly reduced the maintenance cost of the project).

developer_name tag. With AppStream 1.0, this is changed a bit. There is now a developer tag with a name child (that can be translated unless the translate="no" attribute is set on it). This allows future extensibility, and also allows to set a machine-readable id attribute in the developer element. This permits software centers to group software by developer easier, without having to use heuristics. If we decide to extend the developer information per-app in future, this is also now possible. Do not worry though the developer_name tag is also still read, so there is no high pressure to update. The old 0.16.x stable series also has this feature backported, so it can be available everywhere. Check out the developer tag specification for more details.
scale attribute, to indicate an (integer) scaling factor to apply. This feature was a breaking change and therefore we could not have it for the longest time, but it is now available. Please wait a bit for AppStream 1.0 to become deployed more widespread though, as using it with older AppStream versions may lead to issues in some cases. Check out the screenshots tag specification for more details.
environment attribute on the respective screenshot tag. This was also a breaking change, so use it carefully for now! If projects want to, they can use this feature to supply dedicated screenshots depending on the environment the application page is displayed in. Check out the screenshots tag specification for more details.
references tag, you can associate the AppStream component with a DOI (Digital object identifier) or provide a link to a CFF file to provide citation information. It also allows to link to other scientific registries. Check out the references tag specification for more details.
appstreamcli utility also has much improved support for relation checks, and I wrote about these changes in a previous post. Check it out!
With these changes, I hope this feature will be used much more, and beyond just drivers and firmware.
Welcome to the October 2023 report from the Reproducible Builds project. In these reports we outline the most important things that we have been up to over the past month. As a quick recap, whilst anyone may inspect the source code of free software for malicious flaws, almost all software is distributed to end users as pre-compiled binaries.
Between October 31st and November 2nd, we held our seventh Reproducible Builds Summit in Hamburg, Germany!
Our summits are a unique gathering that brings together attendees from diverse projects, united by a shared vision of advancing the Reproducible Builds effort, and this instance was no different.
During this enriching event, participants had the opportunity to engage in discussions, establish connections and exchange ideas to drive progress in this vital field. A number of concrete outcomes from the summit will documented in the report for November 2023 and elsewhere.
Amazingly the agenda and all notes from all sessions are already online.
The Reproducible Builds team would like to thank our event sponsors who include Mullvad VPN, openSUSE, Debian, Software Freedom Conservancy, Allotropia and Aspiration Tech.
Russ Cox posted a fascinating article on his blog prompted by the fortieth anniversary of Ken Thompson s award-winning paper, Reflections on Trusting Trust:
[ ] In March 2023, Ken gave the closing keynote [and] during the Q&A session, someone jokingly asked about the Turing award lecture, specifically can you tell us right now whether you have a backdoor into every copy of gcc and Linux still today?Although Ken reveals (or at least claims!) that he has no such backdoor, he does admit that he has the actual code which Russ requests and subsequently dissects in great but accessible detail.
Rahul Bajaj, Eduardo Fernandes, Bram Adams and Ahmed E. Hassan from the Maintenance, Construction and Intelligence of Software (MCIS) laboratory within the School of Computing, Queen s University in Ontario, Canada have published a paper on the Time to fix, causes and correlation with external ecosystem factors of unreproducible builds.
The authors compare various response times within the Debian and Arch Linux distributions including, for example:
Arch Linux packages become reproducible a median of 30 days quicker when compared to Debian packages, while Debian packages remain reproducible for a median of 68 days longer once fixed.A full PDF of their paper is available online, as are many other interesting papers on MCIS publication page.
On the NixOS Discourse instance, Arnout Engelen (raboof) announced that NixOS have created an independent, bit-for-bit identical rebuilding of the nixos-minimal image that is used to install NixOS. In their post, Arnout details what exactly can be reproduced, and even includes some of the history of this endeavour:
You may remember a 2021 announcement that the minimal ISO was 100% reproducible. While back then we successfully tested that all packages that were needed to build the ISO were individually reproducible, actually rebuilding the ISO still introduced differences. This was due to some remaining problems in the hydra cache and the way the ISO was created. By the time we fixed those, regressions had popped up (notably an upstream problem in Python 3.10), and it isn t until this week that we were back to having everything reproducible and being able to validate the complete chain.Congratulations to NixOS team for reaching this important milestone! Discussion about this announcement can be found underneath the post itself, as well as on Hacker News.
Seth Larson published a blog post investigating the reproducibility of the CPython source tarballs. Using diffoscope, reprotest and other tools, Seth documents his work that led to a pull request to make these files reproducible which was merged by ukasz Langa.
arm64 hardware from Codethink
Long-time sponsor of the project, Codethink, have generously replaced our old Moonshot-Slides , which they have generously hosted since 2016 with new KVM-based arm64 hardware. Holger Levsen integrated these new nodes to the Reproducible Builds continuous integration framework.
ext4 filesystem images. [ ]
distro-info is a Debian-oriented tool that can provide information about Debian (and Ubuntu) distributions such as their codenames (eg. bookworm) and so on. This month, Benjamin Drung uploaded a new version of distro-info that added support for the SOURCE_DATE_EPOCH environment variable in order to close bug #1034422. In addition, 8 reviews of packages were added, 74 were updated and 56 were removed this month, all adding to our knowledge about identified issues.
Bernhard M. Wiedemann published another monthly report about reproducibility within openSUSE.
edje_cc (race condition)elasticsearch (build failure)erlang-retest (embedded .zip timestamp)fdo-client (embeds private keys)fftw3 (random ordering)gsoap (date issue)gutenprint (date)hub/golang (embeds random build path)Hyprland (filesystem issue)kitty (sort-related issue, .tar file embeds modification time)libpinyin (ASLR)maildir-utils (date embedded in copyright)mame (order-related issue)mingw32-binutils & mingw64-binutils (date)MooseX (date from perl-MooseX-App)occt (sorting issue)openblas (embeds CPU count)OpenRGB (corruption-related issue)python-numpy (random file names)python-pandas (FTBFS)python-quantities (date)python3-pyside2 (order)qemu (date and Sphinx issue)qpid (sorting problem)rakudo (filesystem ordering issue)SLOF (date-related issue)spack (CPU counting issue)xemacs-packages (date-related issue)file -i returns text/plain, fallback to comparing as a text file. This was originally filed as Debian bug #1053668) by Niels Thykier. [ ] This was then uploaded to Debian (and elsewhere) as version 251.
The Reproducible Builds project operates a comprehensive testing framework (available at tests.reproducible-builds.org) in order to check packages and other artifacts for reproducibility. In October, a number of changes were made by Holger Levsen:
#debian-reproducible-changes IRC channel. [ ][ ][ ]systemd-oomd on all Debian bookworm nodes (re. Debian bug #1052257). [ ]schroots. [ ]arm64 machines from Codethink. [ ][ ][ ][ ][ ][ ]#reproducible-builds on irc.oftc.net.
rb-general@lists.reproducible-builds.org
Until now, I haven't hacked my Kobo Libra 2 ereader, despite knowing it
is a relatively open device. The default document reader (Nickel) does
everything I need it to. Syncing the books via USB is tedious, but I don't do
it that often.
Via Videah's blog post My E-Reader
Setup, I learned of
Plato, an alternative document reader.
Plato doesn't really offer any headline features that I need, but it cost
me nothing to try it out, so I installed it (fairly painlessly) and launched
it just once. The library view seems good, although I've not used it much:
I picked a book and read it through1, and I'm 60% through another2. I tend to
read one ebook at a time.
The main reader interface is great: Just the text3.
Page transitions are really, really fast. Tweaking the backlight intensity
is a little slower than Nickel: menu-driven rather than an active scroll
region (which is convenient in Nickel but easy to accidentally turn to 0%
and hard to recover from in pitch black).
Now that I've started down the road of hacking the Kobo, I think I will explore
wifi-syncing the library, perhaps using a variation on the hook scripts shared
in Videah's blog post.
gitsigns is a Neovim plugin
which adds a wonderfully subtle colour annotation in the left-hand gutter to
reflect changes in the buffer since the last git commit1.
My long-term habit with Vim and Git is to frequently background Vim (^Z) to invoke
the git command directly and then foreground Vim again (fg). Over the last few
years I've been trying more and more to call vim-fugitive from
within Vim instead. (I still do rebases and most merges the old-fashioned way).
For the most part Gitsigns is a nice passive addition to that, but it can also
do a lot of useful things that Fugitive also does. Previewing changed hunks in a
little floating window, in particular when resolving an awkward merge conflict, is
very handy.
The above picture shows it in action. I've changed two lines and added another
three in the top-left buffer. Gitsigns tries to choose colours from the currently
active colour scheme (in this case, tender)
struct drm_property. We extended the color
management interface exposed to userspace by leveraging existing resources and
connecting them with driver-specific functions for managing modeset properties.
On the AMD DC layer, the interface with hardware color blocks is established.
The AMD DC layer contains OS-agnostic components that are shared across
different platforms, making it an invaluable resource. This layer already
implements hardware programming and resource management, simplifying the external
developer s task. While examining the DC code, we gain insights into the color
pipeline and capabilities, even without direct access to specifications.
Additionally, AMD developers provide essential support by answering queries and
reviewing our work upstream.
The primary challenge involved identifying and understanding relevant AMD DC
code to configure each color block in the color pipeline. However, the ultimate
goal was to bridge the DC color capabilities with the DRM API. For this, we
changed the AMD DM, the OS-dependent layer connecting the
DC interface to the DRM/KMS framework. We defined and managed driver-specific
color properties, facilitated the transport of user space data to the DC, and
translated DRM features and settings to the DC interface. Considerations were
also made for differences in the color pipeline based on hardware capabilities.
AMD s display driver supports the following pre-defined transfer functions (aka named fixed curves):
- OETF: the opto-electronic transfer function, which converts linear scene light into the video signal, typically within a camera.
- EOTF: electro-optical transfer function, which converts the video signal into the linear light output of the display.
- OOTF: opto-optical transfer function, which has the role of applying the rendering intent .
These capabilities vary depending on the hardware block, with some utilizing hardcoded curves and others relying on AMD s color module to construct curves from standardized coefficients. It also supports user/custom curves built from a lookup table.
- Linear/Unity: linear/identity relationship between pixel value and luminance value;
- Gamma 2.2, Gamma 2.4, Gamma 2.6: pure power functions;
- sRGB: 2.4: The piece-wise transfer function from IEC 61966-2-1:1999;
- BT.709: has a linear segment in the bottom part and then a power function with a 0.45 (~1/2.22) gamma for the rest of the range; standardized by ITU-R BT.709-6;
- PQ (Perceptual Quantizer): used for HDR display, allows luminance range capability of 0 to 10,000 nits; standardized by SMPTE ST 2084.
In the AMD Display Core Next hardware pipeline, we encounter two hardware
blocks with color capabilities: the Display Pipe and Plane (DPP) and the
Multiple Pipe/Plane Combined (MPC). The DPP handles color adjustments per plane
before blending, while the MPC engages in post-blending color adjustments.
In short, we expect DPP color capabilities to match up with DRM plane
properties, and MPC color capabilities to play nice with DRM CRTC properties.
Note: here s the catch there are some DRM CRTC color transformations that
don t have a corresponding AMD MPC color block, and vice versa. It s like a
puzzle, and we re here to solve it!
struct
dpp_color_caps
and struct
mpc_color_caps.
The AMD Steam Deck hardware provides a tangible example of these capabilities.
Therefore, we take SteamDeck/DCN301 driver as an example and look at the Color
pipeline capabilities described in the file:
driver/gpu/drm/amd/display/dcn301/dcn301_resources.c
/* Color pipeline capabilities */
dc->caps.color.dpp.dcn_arch = 1; // If it is a Display Core Next (DCN): yes. Zero means DCE.
dc->caps.color.dpp.input_lut_shared = 0;
dc->caps.color.dpp.icsc = 1; // Intput Color Space Conversion (CSC) matrix.
dc->caps.color.dpp.dgam_ram = 0; // The old degamma block for degamma curve (hardcoded and LUT). Gamma correction is the new one.
dc->caps.color.dpp.dgam_rom_caps.srgb = 1; // sRGB hardcoded curve support
dc->caps.color.dpp.dgam_rom_caps.bt2020 = 1; // BT2020 hardcoded curve support (seems not actually in use)
dc->caps.color.dpp.dgam_rom_caps.gamma2_2 = 1; // Gamma 2.2 hardcoded curve support
dc->caps.color.dpp.dgam_rom_caps.pq = 1; // PQ hardcoded curve support
dc->caps.color.dpp.dgam_rom_caps.hlg = 1; // HLG hardcoded curve support
dc->caps.color.dpp.post_csc = 1; // CSC matrix
dc->caps.color.dpp.gamma_corr = 1; // New Gamma Correction block for degamma user LUT;
dc->caps.color.dpp.dgam_rom_for_yuv = 0;
dc->caps.color.dpp.hw_3d_lut = 1; // 3D LUT support. If so, it's always preceded by a shaper curve.
dc->caps.color.dpp.ogam_ram = 1; // Blend Gamma block for custom curve just after blending
// no OGAM ROM on DCN301
dc->caps.color.dpp.ogam_rom_caps.srgb = 0;
dc->caps.color.dpp.ogam_rom_caps.bt2020 = 0;
dc->caps.color.dpp.ogam_rom_caps.gamma2_2 = 0;
dc->caps.color.dpp.ogam_rom_caps.pq = 0;
dc->caps.color.dpp.ogam_rom_caps.hlg = 0;
dc->caps.color.dpp.ocsc = 0;
dc->caps.color.mpc.gamut_remap = 1; // Post-blending CTM (pre-blending CTM is always supported)
dc->caps.color.mpc.num_3dluts = pool->base.res_cap->num_mpc_3dlut; // Post-blending 3D LUT (preceded by shaper curve)
dc->caps.color.mpc.ogam_ram = 1; // Post-blending regamma.
// No pre-defined TF supported for regamma.
dc->caps.color.mpc.ogam_rom_caps.srgb = 0;
dc->caps.color.mpc.ogam_rom_caps.bt2020 = 0;
dc->caps.color.mpc.ogam_rom_caps.gamma2_2 = 0;
dc->caps.color.mpc.ogam_rom_caps.pq = 0;
dc->caps.color.mpc.ogam_rom_caps.hlg = 0;
dc->caps.color.mpc.ocsc = 1; // Output CSC matrix.
struct dpp_color_caps,
struct mpc_color_caps
and struct rom_curve_caps.
Now, using this guideline, we go through color capabilities of DPP and MPC blocks and talk more
about mapping driver-specific properties to corresponding color blocks.
dc->caps.color.dpp.dcn_arch
dc->caps.color.dpp.dgam_ram, dc->caps.color.dpp.dgam_rom_caps,dc->caps.color.dpp.gamma_corr
AMD Plane Degamma data is mapped to the initial stage of the DPP pipeline. It
is utilized to transition from scanout/encoded values to linear values for
arithmetic operations. Plane Degamma supports both pre-defined transfer
functions and 1D LUTs, depending on the hardware generation. DCN2 and older
families handle both types of curve in the Degamma RAM block
(dc->caps.color.dpp.dgam_ram); DCN3+ separate hardcoded curves and 1D LUT
into two block: Degamma ROM (dc->caps.color.dpp.dgam_rom_caps) and Gamma
correction block (dc->caps.color.dpp.gamma_corr), respectively.
Pre-defined transfer functions:
struct drm_color_lut elements. Setting TF = Identity/Default and LUT as
NULL means bypass.
References:
struct drm_color_ctm_3x4. Setting NULL means bypass.
References:
dc->caps.color.dpp.hw_3d_lut
The Shaper block fine-tunes color adjustments before applying the 3D LUT,
optimizing the use of the limited entries in each dimension of the 3D LUT. On
AMD hardware, a 3D LUT always means a preceding shaper 1D LUT used for
delinearizing and/or normalizing the color space before applying a 3D LUT, so
this entry on DPP color caps dc->caps.color.dpp.hw_3d_lut means support for
both shaper 1D LUT and 3D LUT.
Pre-defined transfer function enables delinearizing content with or without
shaper LUT, where AMD color module calculates the resulted shaper curve. Shaper
curves go from linear values to encoded values. If we are already in a
non-linear space and/or don t need to normalize values, we can set a Identity TF
for shaper that works similar to bypass and is also the default TF value.
Pre-defined transfer functions:
calculate_curve() function in the file
amd/display/modules/color/color_gamma.c.struct drm_color_lut elements. When setting Plane Shaper TF (!= Identity)
and LUT at the same time, the color module will combine the pre-defined TF and
the custom LUT values into the LUT that s actually programmed. Setting TF =
Identity/Default and LUT as NULL works as bypass.
References:
dc->caps.color.dpp.hw_3d_lut
The 3D LUT in the DPP block facilitates complex color transformations and
adjustments. 3D LUT is a three-dimensional array where each element is an RGB
triplet. As mentioned before, the dc->caps.color.dpp.hw_3d_lut describe if
DPP 3D LUT is supported.
The AMD driver-specific property advertise the size of a single dimension via
LUT3D_SIZE property. Plane 3D LUT is a blog property where the data is interpreted
as an array of struct drm_color_lut elements and the number of entries is
LUT3D_SIZE cubic. The array contains samples from the approximated function.
Values between samples are estimated by tetrahedral interpolation
The array is accessed with three indices, one for each input dimension (color
channel), blue being the outermost dimension, red the innermost. This
distribution is better visualized when examining the code in
[RFC PATCH 5/5] drm/amd/display: Fill 3D LUT from userspace by Alex Hung:
+ for (nib = 0; nib < 17; nib++)
+ for (nig = 0; nig < 17; nig++)
+ for (nir = 0; nir < 17; nir++)
+ ind_lut = 3 * (nib + 17*nig + 289*nir);
+
+ rgb_area[ind].red = rgb_lib[ind_lut + 0];
+ rgb_area[ind].green = rgb_lib[ind_lut + 1];
+ rgb_area[ind].blue = rgb_lib[ind_lut + 2];
+ ind++;
+
+
+
+ /* Stride and bit depth are not programmable by API yet.
+ * Therefore, only supports 17x17x17 3D LUT (12-bit).
+ */
+ lut->lut_3d.use_tetrahedral_9 = false;
+ lut->lut_3d.use_12bits = true;
+ lut->state.bits.initialized = 1;
+ __drm_3dlut_to_dc_3dlut(drm_lut, drm_lut3d_size, &lut->lut_3d,
+ lut->lut_3d.use_tetrahedral_9,
+ MAX_COLOR_3DLUT_BITDEPTH);
dc->caps.color.dpp.ogam_ram
The Blend/Out Gamma block applies the final touch-up before blending, allowing
users to linearize content after 3D LUT and just before the blending. It supports both 1D LUT
and pre-defined TF. We can see Shaper and Blend LUTs as 1D LUTs that are
sandwich the 3D LUT. So, if we don t need 3D LUT transformations, we may want
to only use Degamma block to linearize and skip Shaper, 3D LUT and Blend.
Pre-defined transfer function:
struct drm_color_lut elements. If plane_blend_tf_property != Identity TF,
AMD color module will combine the user LUT values with pre-defined TF into the
LUT parameters to be programmed. Setting TF = Identity/Default and LUT to NULL
means bypass.
References:
struct drm_color_lut elements. Setting NULL means bypass.
Not really supported. The driver is currently reusing the DPP degamma LUT block
(dc->caps.color.dpp.dgam_ram and dc->caps.color.dpp.gamma_corr) for
supporting DRM CRTC Degamma LUT, as explaning by [PATCH v3 20/32]
drm/amd/display: reject atomic commit if setting both plane and CRTC
degamma.
dc->caps.color.mpc.gamut_remap
It sets the current transformation matrix (CTM) apply to pixel data after the
lookup through the degamma LUT and before the lookup through the gamma LUT. The
data is interpreted as a struct drm_color_ctm. Setting NULL means bypass.
dc->caps.color.mpc.ogam_ram
After all that, you might still want to convert the content to wire encoding.
No worries, in addition to DRM CRTC 1D LUT, we ve got a AMD CRTC gamma transfer
function (TF) to make it happen. Possible TF values are defined by enum
amdgpu_transfer_function.
Pre-defined transfer functions:
struct drm_color_lut elements. When setting CRTC Gamma TF (!= Identity)
and LUT at the same time, the color module will combine the pre-defined TF and
the custom LUT values into the LUT that s actually programmed. Setting TF =
Identity/Default and LUT to NULL means bypass.
References:
color_range and color_encoding properties. It is used for color space
conversion of the input content. On the other hand, we have de DC Output CSC
(OCSC) sets pre-defined coefficients from DRM connector colorspace
properties. It is uses for color space conversion of the composed image to the
one supported by the sink.
References:
pssh() passh -p <(pass show network/ssh/password head -1) ssh "$@" compdef pssh=ssh
ssh
command to look for a password prompt. Moreover, if no password is required, the
password manager is still invoked. Since OpenSSH 8.4, we can use
SSH_ASKPASS and SSH_ASKPASS_REQUIRE instead:
ssh() set -o localoptions -o localtraps local passname=network/ssh/password local helper=$(mktemp) trap "command rm -f $helper" EXIT INT > $helper <<EOF #!$SHELL pass show $passname head -1 EOF chmod u+x $helper SSH_ASKPASS=$helper SSH_ASKPASS_REQUIRE=force command ssh "$@"
ssh() set -o localoptions -o localtraps local passname=network/ssh/password local helper=$(mktemp) trap "command rm -f $helper" EXIT INT > $helper <<EOF #!$SHELL if [ -k $helper ]; then oldtty=\$(stty -g) trap 'stty \$oldtty < /dev/tty 2> /dev/null' EXIT INT TERM HUP stty -echo print "\rpassword: " read password printf "\n" > /dev/tty < /dev/tty printf "%s" "\$password" else pass show $passname head -1 chmod +t $helper fi EOF chmod u+x $helper SSH_ASKPASS=$helper SSH_ASKPASS_REQUIRE=force command ssh "$@"
ssh() # Grab login information local -A details details=($ =$ (M)$ :-"$ (@f)$(command ssh -G "$@" 2>/dev/null) " :#(host hostname user) * ) local remote=$ details[host]:-details[hostname] local login=$ details[user] @$ remote # Get password name local passname case "$login" in admin@*.example.net) passname=company1/ssh/admin ;; bernat@*.example.net) passname=company1/ssh/bernat ;; backup@*.example.net) passname=company1/ssh/backup ;; esac # No password name? Just use regular SSH [[ -z $passname ]] && command ssh "$@" return $? # Invoke SSH with the helper for SSH_ASKPASS # [ ]
scp invoke our custom ssh function:
scp() set -o localoptions -o localtraps local helper=$(mktemp) trap "command rm -f $helper" EXIT INT > $helper <<EOF #!$SHELL source $ (%):-%x ssh "\$@" EOF command scp -S $helper "$@"
ssh() function body into its own script file and replace command ssh
with /usr/bin/ssh to avoid an unwanted recursive call. In this case, the
scp() function is not needed anymore.
print -l and the
zshexpn(1) manual page. details is an associative array defined
from an array alternating keys and values.
A new release 0.3.3.9.4 of RcppEigen
arrived on CRAN yesterday, and
went to Debian today. Eigen is a C++ template library
for linear algebra: matrices, vectors, numerical solvers, and related
algorithms.
This update contains a small amount of the usual maintenance (see
below), along with a very nice pull request by Mikael Jagan which simplifies to
interface with the Matrix package and
inparticular the CHOLMOD library that is part of SuiteSparse.
This release is coordinated with lme4 and OpenMx which are
also being updated.
The complete NEWS file entry follows.
Courtesy of CRANberries, there is also a diffstat report for the most recent release. If you like this or other open-source work I do, you can sponsor me at GitHub.Changes in RcppEigen version 0.3.3.9.4 (2023-11-01)
- The CITATION file has been updated for the new
bibentrystyle.- The package skeleton generator has been updated and no longer sets an Imports:.
- Some README.md URLs and badged have been updated.
- The use of
-fopenmphas been documented inMakevars, and a simple thread-count reporting function has been added.- The old manual
src/init.chas been replaced by an autogenerated version, theRcppExportsfile have regenerated- The interface to package Matrix has been updated and simplified thanks to an excllent patch by Mikael Jagan.
- The new upload is coordinated with packages lme4 and OpenMx.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.



rsyslog is no longer needed on most of my systems:
apt purge rsyslog
Once that was done, I was able to comment out the following lines in
/etc/logcheck/logcheck.logfiles.d/syslog.logfiles:
#/var/log/syslog
#/var/log/auth.log
I did have to adjust some of my custom logcheck rules, particularly the ones that
deal with kernel messages:
--- a/logcheck/ignore.d.server/local-kernel
+++ b/logcheck/ignore.d.server/local-kernel
@@ -1,1 +1,1 @@
-^\w 3 [ :[:digit:]] 11 [._[:alnum:]-]+ kernel: \[[0-9. ]+]\ IN=eno1 OUT= MAC=[0-9a-f:]+ SRC=[0-9a-f.:]+
+^\w 3 [ :[:digit:]] 11 [._[:alnum:]-]+ kernel: (\[[0-9. ]+]\ )?IN=eno1 OUT= MAC=[0-9a-f:]+ SRC=[0-9a-f.:]+
Then I moved local entries from /etc/logcheck/logcheck.logfiles to /etc/logcheck/logcheck.logfiles.d/local.logfiles
(/var/log/syslog and /var/log/auth.log are enabled by default when
needed) and removed some files that are no longer used:
rm /var/log/mail.err*
rm /var/log/mail.warn*
rm /var/log/mail.info*
Finally, I had to fix any unescaped characters in my local rules. For example
error == NULL \*error == NULL must now be written as error == NULL \ \ \*error == NULL.
isc-dhcp-client is now
deprecated and so I removed if from my system:
apt purge isc-dhcp-client
This however meant that I need to ensure that my network configuration
software does not depend on the now-deprecated DHCP client.
On my laptop, I was already using
NetworkManager for my main
network interfaces and that has built-in DHCP support.
ifupdown to
systemd-networkd by
removing ifupdown:
apt purge ifupdown
rm /etc/network/interfaces
putting the following in /etc/systemd/network/20-wired.network:
[Match]
Name=eno1
[Network]
DHCP=yes
MulticastDNS=yes
and then enabling/starting systemd-networkd:
systemctl enable systemd-networkd
systemctl start systemd-networkd
I also needed to install polkit:
apt install --no-install-recommends policykit-1
in order to allow systemd-networkd to set the hostname.
In order to start my firewall automatically as interfaces are brought up, I
wrote a dispatcher script to apply my existing iptables
rules.
/etc/systemd/network/20-wired.network since it has a static
IPv6 allocation:
[Match]
Name=enp0s4
[Network]
DHCP=yes
Address=2600:3c01::xxxx:xxxx:xxxx:939f/64
Gateway=fe80::1
and switched to predictable network interface names by deleting these two
files:
/etc/systemd/network/50-virtio-kernel-names.link/etc/systemd/network/99-default.linketh0 to enp0s4 in:
/etc/network/iptables.up.rules/etc/network/ip6tables.up.rules/etc/rc.local (for OpenVPN)/etc/logcheck/ignored.d.*/*update-initramfs -u -k all
and rebooted the virtual machine.
Giving systemd-resolved control of /etc/resolv.conf
After reading this history of DNS resolution on
Linux, I decided to
modernize my resolv.conf setup and let systemd-resolved handle
/etc/resolv.conf.
I installed the package:
apt install systemd-resolved
and then removed no-longer-needed packages:
apt purge resolvconf avahi-daemon
I also disabled support for Link-Local Multicast Name Resolution (LLMNR) after reading this person's reasoning by putting the following in /etc/systemd/resolved.conf.d/llmnr.conf:
[Resolve]
LLMNR=no
I verified that mDNS is enabled and LLMNR is disabled:
$ resolvectl mdns
Global: yes
Link 2 (enp0s25): yes
Link 3 (wlp3s0): yes
$ resolvectl llmnr
Global: no
Link 2 (enp0s25): no
Link 3 (wlp3s0): no
Note that if you want auto-discovery of local printers using CUPS, you need
to keep avahi-daemon since cups-browsed doesn't support
systemd-resolved. You can
verify that it works using:
sudo lpinfo --include-schemes dnssd -v
/etc/chkrootkit.conf to
/etc/chkrootkit/chkrootkit.conf after seeing this message in my logs:
WARNING: /etc/chkrootkit.conf is deprecated. Please put your settings in /etc/chkrootkit/chkrootkit.conf instead: /etc/chkrootkit.conf will be ignored in a future release and should be deleted.
sshd[6283]: pam_env(sshd:session): deprecated reading of user environment enabled
I changed the following in /etc/pam.d/sshd:
--- a/pam.d/sshd
+++ b/pam.d/sshd
@@ -44,7 +44,7 @@ session required pam_limits.so
session required pam_env.so # [1]
# In Debian 4.0 (etch), locale-related environment variables were moved to
# /etc/default/locale, so read that as well.
-session required pam_env.so user_readenv=1 envfile=/etc/default/locale
+session required pam_env.so envfile=/etc/default/locale
# SELinux needs to intervene at login time to ensure that the process starts
# in the proper default security context. Only sessions which are intended
I also made the following changes to /etc/ssh/sshd_config.d/local.conf
based on the advice of ssh-audit 2.9.0:
-KexAlgorithms curve25519-sha256@libssh.org,curve25519-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
+KexAlgorithms curve25519-sha256@libssh.org,curve25519-sha256,sntrup761x25519-sha512@openssh.com,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512
"Why does ACPI exist" - - the greatest thread in the history of forums, locked by a moderator after 12,239 pages of heated debate, wait no let me start again.
Armadillo is a powerful
and expressive C++ template library for linear algebra and scientific
computing. It aims towards a good balance between speed and ease of use,
has a syntax deliberately close to Matlab, and is useful for algorithm
development directly in C++, or quick conversion of research code into
production environments. RcppArmadillo
integrates this library with the R environment and language and is
widely used by (currently) 1110 other packages on CRAN, downloaded 31.2 million
times (per the partial logs from the cloud mirrors of CRAN), and the CSDA paper (preprint
/ vignette) by Conrad and myself has been cited 563 times according
to Google Scholar.
This release brings upstream bugfix releases 12.6.5 (sparse matrix
corner case) and 12.6.6 with an ARPACK correction. Conrad released it
this this morning, I had been running reverse dependency checks anyway
and knew we were in good shape so for once I did not await a full run
against the now over 1100 (!!) packages using RcppArmadillo.
This release also contains a change I prepared on Sunday and which
helps with much-criticized (and rightly I may add) insistence by CRAN concerning throttling . The
motivation is understandable: CRAN tests many packages at once
on beefy servers and can ill afford tests going off and requesting
numerous cores. But rather than providing a global setting at
their end, CRAN insists that
each package (!!) deals with this. The recent traffic on the
helpful-as-ever r-pkg-devel mailing clearly shows that this confuses
quite a few package developers. Some have admitted to simply turning
examples and tests off: a net loss for all of us. Now, Armadillo defaults to using up
to eight cores (which is enough to upset CRAN) when running with OpenMP
(which is generally only on Linux for reasons I rather not get into ).
With this release I expose a helper functions (from OpenMP) to limit
this. I also set up an example package and repo RcppArmadilloOpenMPEx
detailing this, and added a demonstration of how to use the new
throttlers to the
fastLm example. I hope this proves useful to users of the
package.
The set of changes since the last CRAN release follows.
Courtesy of my CRANberries, there is a diffstat report relative to previous release. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page. If you like this or other open-source work I do, you can sponsor me at GitHub.Changes in RcppArmadillo version 0.12.6.6.0 (2023-10-31)
- Upgraded to Armadillo release 12.6.6 (Cortisol Retox)
- Fix
eigs_sym(),eigs_gen()andsvds()to generate deterministic results in ARPACK mode- Add helper functions to set and get the number of OpenMP threads
- Store initial thread count at package load and use in thread-throttling helper (and resetter) suitable for CRAN constraints
Changes in RcppArmadillo version 0.12.6.5.0 (2023-10-14)
- Upgraded to Armadillo release 12.6.5 (Cortisol Retox)
- Fix for corner-case bug in handling sparse matrices with no non-zero elements
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Due to the current state of affairs in Israel, who were to host DebConf24,
the DebConf committee has decided to renew calls for bids to host DebConf24
at another venue and location.
The DebConf committee would like to express our sincere appreciation for the
DebConf Israeli team, and the work they've done over several years. However,
given the uncertainty about the situation, we regret that it will most likely
not be possible to hold DebConf in Israel.
As we ask for submissions for new host locations we ask that you please review
and understand the details and requirements for a bid submission to host the
Debian Developer Conference.
Please review the template for a DebConf bid
for guidelines on how to sumbit a proper bid.
To submit a bid, please create the appropriate page(s) under
DebConf Wiki Bids, and add it to the "Bids"
section in the main DebConf 24 page.
There isn't very much time to make a decision. We need bids by the end of November
in order to make a decision by the end of the year.
After your submission is completed please
send us a notification at debconf-team@lists.debian.org to let us know
that your bid submission is ready for review.
We also suggest hanging out in our IRC chat room #debconf-team.
Given this short deadline, we understand that bids won't be as complete
as they would usually be. Do the best you can in the time available.
Bids will be evaluated according to The Priority List.
You can get in contact with the DebConf team by email to
debconf-team@lists.debian.org, or via the #debconf-team IRC channel on
OFTC or via our Matrix Channel.
Thank you,
The Debian Debconf Committee
import requests from datetime import datetime import appdaemon.plugins.hass.hassapi as hass app_token = "<FIREFLY_PERSONAL_ACCESS_TOKEN>" firefly_url = "<FIREFLY_URL>" class HelloWorld(hass.Hass): def initialize(self): self.run_every(self.set_asset, "now", 60 * 60) def set_asset(self, kwargs): ent = self.get_entity("sensor.firefly3_asset_sparkasse_main") if not ent.exists(): ent.add( state=0.0, attributes= "native_value": 0.0, "native_unit_of_measurement": "EUR", "state_class": "measurement", "device_class": "monetary", "current_balance_date": datetime.now(), ) r = requests.get( firefly_url + "/api/v1/accounts?type=asset", headers= "Authorization": "Bearer " + app_token, "Accept": "application/vnd.api+json", "Content-Type": "application/json", ) data = r.json() for account in data["data"]: if not "attributes" in account or "name" not in account["attributes"]: continue if account["attributes"]["name"] != "Sparkasse giro": continue self.log("Account :" + str(account["attributes"])) ent.set_state( state=account["attributes"]["current_balance"], attributes= "native_value": account["attributes"]["current_balance"], "current_balance_date": datetime.fromisoformat(account["attributes"]["current_balance_date"]), ) self.log("Entity updated")It uses a URL and personal access token to access Firefly III API, gets the asset accounts information, then extracts info about current balance and balance date of my main account and then creates and/or updates a "sensor" value into Home Assistant. This sensor is with metadata marked as a monetary value and as a measurement. This makes Home Assistant track this value in the database as a graphable changing value. I modified the file using the File Editor addon to edit the
/config/appdaemon/apps/hello.py file. Each
time the file is saved it is reloaded and logs can be seen in the AppDaemon Logs section - main_log for
logging messages or error_log if there is a crash. Useful to know that
requests library is included, but it hard to see in the
docks what else is included or if there is an easy way to install extra Python packages.
This is already a very nice basis for custom value insertion into Home Assistant - whatever you can with
a Python script extract or calculate, you can also inject into Home Assistant.
With even this simple approach you can monitor balances, budgets, piggy-banks, bill payment status and
even sum of transactions in particular catories in a particular time window. Especially interesting data
can be found in the insight section of the Firefly III API.
The script above uses a trigger
like self.run_every(self.set_asset, "now", 60 * 60) to simply run once per hour. The data in Firefly will not
be updated too often anyway, at least not until we figure out how to make bank connection run automatically
without user interaction and not screw up already existing transactions along the way. In theory a
webhook API of the Firefly III
could be used to trigger the data update instantly when any transaction is created or updated. Possibly
even using Home Assistant
webhook integration. Hmmm. Maybe.
Who am I kiddind? I am going to make that work, for sure! :D But first - how about figuring out the future?
So what I want to do? In short, I want to predict what will be the balance on my main account just
before the next months salary comes in. To do this I would:
Next.