This is a fish function:
function cargo-registry --argument-names query
set -l r \
~/.cargo/registry/src/index.crates.io-*/
set -l c (
ls -d $r*/ 2>/dev/null \
| xargs -n 1 basename
)
if test -z "$query"
printf '%s\n' $c \
| sort
else
printf '%s\n' $c \
| grep -i "$query" \
| sort
end
end
And what it does is:
❯ cargo-registry|head
ab_glyph_rasterizer-0.1.9
ab_glyph-0.2.31
accesskit_consumer-0.28.0
accesskit_macos-0.20.0
accesskit_winit-0.27.0
accesskit-0.19.0
adler2-2.0.1
adler2-2.0.1
ahash-0.8.12
ahash-0.8.12
aho-corasick-1.1.3
allocator-api2-0.2.21
allocator-api2-0.2.21
anstream-0.6.19
anstream-0.6.19
anstyle-1.0.11
anstyle-1.0.11
anstyle-parse-0.2.7
anstyle-parse-0.2.7
anstyle-query-1.1.3
# ...
And also:
❯ cargo-registry egui
egui_glow-0.32.0
egui-0.32.0
egui-wgpu-0.32.0
egui-winit-0.32.0
This is as done as lsiommu can ever be, or at least as far as I’m concerned so it’s a release time:
https://github.com/puavo-org/lsiommu/releases/tag/1.0.0
I.e. I spent last night making it do less from the almost nothing it was doing already ;-) That’s the point of these tools…
That enumerated to:
This sums up to zero mallocs from the main application (while libudev probably does bunch of them when not compiled with make DISCOVER=sysfs).
Motivation to do was this shitty python script:
#!/usr/bin/env python3
#
# Copyright (c) 2022-2023 Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
import os
import sys
IOMMU_SYSFS = '/sys/kernel/iommu_groups'
IOMMU_GROUP_MAX = 128 # an arbitrary choice
def get_iommu_devices():
groups = [None for group in range(IOMMU_GROUP_MAX)]
with os.scandir(IOMMU_SYSFS) as group_it:
for group in group_it:
devices = []
group_sysfs = IOMMU_SYSFS + '/' + group.name + '/devices'
with os.scandir(group_sysfs) as device_it:
for device in device_it:
devices.append(device.name)
index = int(group.name)
if index >= IOMMU_GROUP_MAX:
print('Overflow')
sys.exit(1)
groups[index] = devices
return groups
if __name__ == "__main__":
groups = get_iommu_devices()
for i in range(len(groups)):
group = groups[i]
if group == None:
break
print('IOMMU Group %d' % (i))
group.sort()
for device in group:
# FIXME: Replace with pure Python code:
os.system('lspci -nns ' + device)
I’m using mutt so need to ask this before updating readme.
This what I have for mutt:
macro index F10 "<pipe-message>multidepart --browse\n" "View HTML in browser"
macro pager F10 "<pipe-message>multidepart --browse\n" "View HTML in browser"
This is what I presume would be correct for aerc (in ~/.config/aerc/binds.conf
):
[messages]
F10= :pipe -p multidepart --browse<Enter>
[view]
F10= :pipe -p multidepart --browse<Enter>
Does that look about right?
🎙️PODCAST ALERT: Linaro's #virtualization expert Alex Bennée recently featured on the #OpenSource Way podcast where he talked about the emulator project #QEMU and how it helps the open source #software ecosystem. Check out the podcast here 👉 https://ow.ly/zV7h50Wtc2Z