Published
in the Shares section,
on 28 December 2023
People who have visited any of the larger C++ conferences surely know
Rainer Grimm, know his talks, workshops and books.
Rainer Grimm
Unfortunately, he has been diagnosed with ALS, a serious progressive
nerve condition.
Since ALS research doesn’t get much attention or funding, Rainer
started a fund raising campaign for funding ALS research with
ALS-Ambulanz of the Charité and I Am ALS organization.
Some time ago, I wrote a post
about integrating Qt’s associative containers with the fancy new C++
features, range-based for loops with structured bindings.
That post inspired KDAB’s own Giuseppe D’Angelo to add the
asKeyValueRange member function to both QHash
and QMap. Now it’s possible to iterate over them with a
simple range-based for loop, like so:
for (auto [key, value] : map.asKeyValueRange()) {
// ...
}
The second part of my previous post demonstrates how we can iterate
over Qt SQL results using a range-based for loop as if it were an
ordinary collection.
This post covers what is needed to be able to traverse the SQL
results in a much nicer and safer way like so:
Published
in the Prog C++ section,
on 2 April 2022
Nvim + Telescope showing C++ docs
I’ve been revamping my Neovim configuration (more on that some other
time).
I used to have a fuzzy searcher of Qt and C++ docs in Vim which would
open the thing I searched for in a web browser or Qt Assistant (or
cppman, but that is cppref only).
That was tedious for a several reasons I’m not going to go into now,
so I decided to use this Neovim configuration revamp to make shell-based
documentation nicer.
Enter zeal-cli
Zeal is a really nice offline
documentation browser that comes with more than 200 documentation sets.
And you can also create your own sets. (for Qt users, imagine Qt
Assistant, but with docs about everything)
Now, Zeal doesn’t have a nice CLI API, but the docset format is
simple enough for it to be used even without the Zeal application (after
you use it to download docsets you want).
It is a small python script that shows Zeal docs in the Lynx console
web browser. It can also clean-up the html pages from noise like
navigation menus, table of contents and other things that just take
valuable space before showing them in Lynx.
Usage is quite simple – you specify the docset you want to use and
which page to show:
zeal-cli cpp std::string
Fuzzy searching
zeal-cli can also list all the pages available in a
docset which can be used along with an application like FZF for fuzzy searching the
documentation. You can just pipe the output of zeal-cli to
fzf to get a similar view to the screenshot above:
I’ve also made a small Fennel-based plugin for Neovim and
Telescope.nvim to be able to search and show the docs inside of Neovim.
This
plugin in action is what the screenshot above shows.
There’s room for improvement for both zeal-cli and
nvim-telescope-zeal-cli and patches are welcome.
I promised gocryptfs support in Vault a long time ago, but I kept
failing to deliver on that promise because of other obligations, life
and work happenings.
Now, the beauty of Free Software is that the users do not need to
rely only on my free time for new Vault features.
Martino Pilia sat down and wrote a gocryptfs backend for Plasma Vault
which has been merged and will be available in Plasma 5.19. Many thanks
for that!
gocryptfs in Plasma Vault
As with all new things, you are advised to be cautious as there might
be some bugs remaining we haven’t detected.