611 private links
If your Quarto manuscript has notebooks, and in your manuscript you include or embed those notebooks in part or in whole, this triggers an renv
"dependency discovery" step that may consume >100 seconds during quarto rendering, but seemingly only under certain conditions.
Over the last few days, I have tried to understand how to best avoid this slow "dependency discovery" step during rendering in my manuscript. Obviously it only affects your project if renv
is activated. The whole issue can be side-stepped by commenting out the line source("renv/activate.R")
in your ./.Rprofile
file, but then no more renv
and that did not work for me.
For testing purposes, I started from the RStudio manuscript template and always executed quarto render
from the CLI (not using the Render button in RStudio, which usually executes with special flags depending on stuff).
Now, I might be missing the forest for all the trees, but I believe the "dependency discovery" step is triggered if we include the entire notebook into the manuscript (using either knitr child
or quarto include
made no difference), but not if we use quarto embed
. That's the short of it.
Here are some more observations on what worked and did not work for those three cases.
knitr child
approach
Not using any quatro includes or embeds except for the preamble-latex-html.qmd
.
When rendered in RStudio the Notebook link points to <notebooks/200-code-preview.html>.
Math OK, figures in manuscript rendered OK, captions OK, cross-refs OK.
200-code
notebook is rendered fullwidth as intended, title and authors OK. Fig caption text is OK.
quarto render
in bash compiled in 5m10.665s (mainly due to "renv dep" step).- the manuscript includes any regular text from the notebook!
- figures in notebook are missing fig caption numbers (maybe because I used Quarto chunk settings?)
Fig caption number and text is OK in the manuscript in any case (note that captions
need to be set in the chunk in the manuscript - it is not carried over from the notebook).
quarto embed
approach
Not using knitr child
anywhere (replaced all of them by quarto include or embed).
quarto render in bash compiled in 1m18.055s - much better.
(Of course the fundamental limitation with embed
is that no objects from the notebook's
namespace can be referenced in the manuscript).
Manuscript: math OK, figures and captions OK, cross-refs OK. Figure captions are carried over from the notebook. Notebook link points to <notebooks/200-code.embed-preview.html> (which is bad!) unless you set notebook-links: true
(which is the default).
One problem remains in the notebook, fig captions missing numbers and thus cross-refs are broken. Not sure why.
quarto include
approach
Behaves just like knitr child, c.f., above.
- slow render ("dependency discovery took 77 seconds during snapshot")
- manuscript includes regular text along with any chunks with
echo=true
etc., despite
output=false, echo=false, include=false
in the include command - link to notebook in sidebar points to the
embed
version (which does not exist!)
comments
Clearly the notebook concept in Quarto manuscripts has some hard-coded behaviour and the documentation does not yet reflect all of this behaviour. I tried very hard to locate in the quarto source where this renv
snapshot is triggered, but I was stumped. All I found was references to their test suite 1, 2, 3, 4.
It would have been nice if one could instruct quarto to entirely skip this renv
dependency checking using a CLI flag or an ENV variable or some such. As it is now, running into this behaviour means potentially wasting so much time that there is really no point testing anything - all I want to do is just avoid the behaviour.
This is the message emitted during quarto render (duration may vary):
NOTE: Dependency discovery took 111 seconds during snapshot.
Consider using .renvignore to ignore files, or switching to explicit snapshots.
See `?renv::dependencies` for more information.
Creating an .renvignore
file had no effect on this behaviour.
The renv::dependencies
help page suggests switching from the default implicit dependency discovery to explicitly specifying your dependencies in a DESCRIPTION
file (just like for an R package), but that would defeat the point of using renv
for a manuscript like this in my opinion, so I did not go down that route.
Based on suggestions in a tangentially related renv issue I set RENV_WATCHDOG_ENABLED = FALSE
in .Renviron
, but that had no effect. Not sure why.
Updating from Quarto 1.5.57 (bundled with RStudio Server v2024.12.0+467) to Quarto v1.6.39 (DEB package) made no difference (as expected, nothing in the changelogs indicated this behaviour was considered).
I also changed a number of other properties, such as custom extension or not, global YAML settings, MathJax or not, but in the end none of that had any effect on whether the renv
dependency discovery was triggered.
As far as I can tell, this dependency discovery is triggered by having quarto include
or knitr child
in the manuscript, but the length of the discovery also clearly depends on the number of R packages loaded by your document. Like I mentioned earlier - a possibility to disable this discovery entirely would be great.
For now, I will use quarto embed
as it lead to fewest other problems.
sessionInfo
Behaviour as observed in latest stable quarto v1.6.39 and before that also v1.5.57.
System Ubuntu 22.04.5 GNU/Linux 5.15.0-124-generic x86_64.
$ quarto check
Quarto 1.6.39
[✓] Checking environment information...
Quarto cache location: ~/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.39
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/local/texlive/2023/bin/x86_64-linux
Version: 2023
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: (None)
Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter
[✓] Checking R installation...........OK
Version: 4.3.3
Path: /opt/R/4.3.3/lib/R
LibPaths:
- ~/R/x86_64-pc-linux-gnu-library/4.3.3
- /opt/R/4.3.3/lib/R/library
knitr: 1.49
rmarkdown: 2.29
[✓] Checking Knitr engine render......OK
Links
- https://bookdown.org/yihui/rmarkdown-cookbook/child-document.html
- https://bookdown.org/yihui/rmarkdown-cookbook/reuse-chunks.html
- https://zsmith27.github.io/rmarkdown_crash-course/lesson-6-child-documents.html
- https://yihui.org/knitr/options
- http://zevross.com/blog/2014/07/09/making-use-of-external-r-code-in-knitr-and-r-markdown
- https://github.com/quarto-dev/quarto-cli/discussions/11629
This solves a major shortcoming when authoring documents in Quarto or R Markdown that generate both PDF and HTML output. MathJax lets the author use LaTeX commands in the source that translate into proper output in the HTML, but before this work there was no support for siunitx
v3. This work can be said to take over where burnpanck/MathJax-siunitx left off.
To use it, I copied siunitx.js from its repo to my Quarto project and then made Quarto add it to the published site by setting the following in the project/document YAML:
project:
resources:
- "path/to/siunitx.js"
format:
html:
html-math-method:
method: mathjax
url: "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"
include-in-header:
text: |
<script>
window.MathJax = {
loader: {
load: ['[custom]/siunitx.js', '[tex]/html'],
paths: { custom: './path/to/' }
},
tex: {
packages: { '[+]': ['siunitx', 'html'] },
siunitx: {
'per-mode': 'power'
}
}
};
</script>
And that should give you siunitx
v3 commands in your Quarto manuscript :-)
Note that if you also want your notebooks to benefit from siunitx-pcc, you will need to symlink (or copy) the siunitx.js
file into their top-level directory (which is ./notebooks
) or otherwise siunitx macros will not render as paths: { custom: './path/to/' }
is relative to their top-level directory and not (as you might think) the Quarto project root.
I have found that re-creating the directory structure mkdir -p notebooks/path/to; cd notebooks/path/to
and then symlinking ln -s ../../../path/to/siunitx.js .
works (don't forget to add another resources line: - "notebooks/path/to/siunitx.js"
).
In short, siunitx-pcc lets you use almost all siunitx
macros.
- https://github.com/limefrogyank/siunitx-pcc
- https://github.com/quarto-dev/quarto-cli/discussions/6168#discussioncomment-11545200
- https://github.com/mathjax/MathJax-third-party-extensions/issues/47
- https://github.com/burnpanck/MathJax-siunitx/issues/14
- https://github.com/burnpanck/MathJax-siunitx/issues/13
- https://old.reddit.com/r/LaTeX/comments/1bj8p7c/whats_your_experience_transitioning_to_quarto/m1p0m4p
git commit -a
(or git commit --all
) automatically stages files that have been modified.
Some of my repos now include git hooks that would be completely negated if my git commit command message auto-stages everything.
Authored by Damien Irving, Kate Hertweck, Luke Johnston, Joel Ostblom, Charlotte Wickham, and Greg Wilson.
I learned a lot, and you should come back to it for more, especially the chapter on building CLI tools with Python.
All their advice is sound, except I do not agree that the MIT license should be recommended (which the authors argue based on the observation that "The last thirty years have shown that this restriction [of the GPL] isn’t necessary" which I cannot understand).
The book is a thorough walk-through that is sure to get most anyone up and running creating research software with Python and is beneficial to any researcher or research student curious about the Python programming language and the shell.
- Green Solvent Selection Tool by the OPEG group at the Department of Physics at Umeå University. Written in Python. With publication and source code.
[I will add more dashboards here as I (re)-discover them].
Our world is built up of roads and cars to get us to our destination! But what about cycling and even walking? Have we been brainwashed to think that the car is always king?
Via Krister Isaksson's blog, also see masto thread (both in Swedish).
Another good video on the subject by Shifter.
Is there some tool(s) that can identify which Unicode character I am looking at? (Because it is not always possible to copy-paste...)
- https://shapecatcher.com (which reminds me of Detexify)
Bassam is a free Arab social network that allows you to join the Fediverse and escape from the dictatorial and oppressive social platform.
It runs on Rebased which is a a Fediverse backend written in Elixir, compatible with the Mastodon API.
I installed the Beeper Android app on my phone and gave it a try. You have to provide an email, fill in the confirmation code sent to it, and then you can choose a username (which will form your Matrix identity @username:beeper.com
, although the app never tells you this).
Already at this point I'm starting to get disappointed - I can sort of understand hiding the complexity of Matrix instances from beginners, but no where in the app's preferences/settings could I find the full name of the Matrix account it created for me. Also, you never to get to set a password for the account you just created, meaning you can't use it from other Matrix clients.
The major problem for me is that the app does not let you connect any other Matrix accounts. I already have another Matrix account - the whole point of Beeper is to centralize your chats, so why can't I add it?
Maybe the self-hosted Beeper will let you add more than one Matrix account?
Links and notes
- https://www.beeper.com
- https://old.reddit.com/r/beeper/comments/16kwrrp/how_do_i_use_beeper_in_other_matrix_clients a post in this thread suggests you can request your password from support or something (sounds sketchy to me).
- https://blog.rayberger.org/migrating-matrix-accounts
Nick Buraglio and Brian E. Carpenter have released their comprehensive, continuously revised and edited resource on IPv6: A free and open source IPv6 textbook.
https://blog.apnic.net/2024/10/24/a-free-and-open-source-ipv6-textbook
The book's source is available on Github.
Other IPv6 tools
This is what the web is for.
Skip a few news cycles and read yourself.
Bra läsning för att påminna sig om solens, månens och planeternas rörelse på himlavalvet så som de upplevs från jorden.
Detta utbildningsprogram presenterar himlafenomenen som de ter sig för oss vanliga seende människor. Med ett i huvudsak geocentriskt perspektiv knyter det hela tiden an till vad läsarna direkt kan erfara.
With Python, you can just open a shell and quickly try out some code in a so-called REPL console. Guess what, you can do the same with Ansible. Browse your inventory, and even remote file systems in an interactive shell with
ansible-console
.
If you have installed Ansible via pip you already have this nifty tool installed.
I have invested some effort into Keycloak, but still not learnt enough about it to manage more than a single-user scenario.
The Authentik licenses look a bit complicated, though?
Via https://old.reddit.com/r/selfhosted/comments/1eohsds/best_self_hosted_authentication_solution
Excellent page listing their feeds, and not only their published articles but also separate feeds for submissions and announcements.
Code shared on https://git.scipost.org, although many repos are sparse or have not been updated in years.
They also have their own Mastodon instance, with an account for each field.
All in all, very impressive work by what appears to be primarily Dutch academics.
First heard about it from 4 gravitons.
Thanks to git log -1
it is trivial to view the latest commit in a repo, and combined with find ... -exec ...
we can easily do that for multiple repos at once (for example see my commits
bash function).
Turns out doing the same for the earliest commit in each repo is not at all trivial. Here is my approach (it should be said up-front that it's not pretty). But I wanted to get a handle on when I started working on some repos, and this pulled out the data I needed without having to do it manually for each individual repo.
taha@asks2:/media/bay/taha/projects/ansible/pub/roles
$ find . -maxdepth 2 -name ".git" -exec sh -c "git -C {} --no-pager log --all --pretty=format:\"%cs %h%d %s [%cn]\" | tail -n1" \; -exec printf " %s\n" {} \; | sort -n
2021-03-14 02506d4 Initial commit [taha] ./texlive/.git
2021-03-14 14ddd9a Initial commit [taha] ./desktop-tools/.git
2021-03-14 2bfe5bc Initial commit [taha] ./R/.git
2021-03-15 0c2deda Initial commit [taha] ./calibre-web/.git
2021-04-02 7a2bdb2 Initial commit [taha] ./iriun-webcam/.git
2021-04-13 167ef2d First commit [taha@asks2] ./shaarli/.git
2021-05-28 ca70e06 Initial commit [taha] ./wallabag/.git
2021-06-09 3d4891e Initial commit [taha] ./lxd-server/.git
The directory roles
contains a bunch of git repos (and possibly also a few folders that are not repos, which we exclude from find with -name ".git"
. Then for each repo, we list all commits (across all branches) using a custom format but then, importantly, only showing the last one which is the earliest commit.
To be able to tail this git command (and not the entire find command) we need to put it inside sh -c ...
.
Then we use a second exec statement to append the current directory name (so we can orient ourselves in the output) and then sort the entirety on the output (which thanks to our custom git format lists the commit date in the first column). Note that piping strips the colour from the git output, so no need to set colours in our pretty-format
.
- https://stackoverflow.com/questions/51376361/getting-commit-history-from-multiple-repositories-for-some-period
- https://stackoverflow.com/questions/5188914/how-to-show-the-first-commit-by-git-log (this approach with
git rev-list --max-parents
did not work in my case, not sure why) - https://andrewrea.co.uk/posts/git-log-over-multiple-repos
- https://stackoverflow.com/questions/50882822/view-logs-of-multiple-git-repositories
- https://stackoverflow.com/questions/6712423/how-do-i-count-the-number-of-commits-made-in-to-all-repos-hosted-by-gitosis-on-m
- https://stackoverflow.com/questions/49388069/what-does-git-log-1-do
- https://stackoverflow.com/questions/307015/how-do-i-include-a-pipe-in-my-linux-find-exec-command
- https://stackoverflow.com/questions/1371261/get-current-directory-or-folder-name-without-the-full-path
The collection spans from digitized copies of eighteenth century journals through the latest Open Access conference proceedings and preprints crawled from the World Wide Web.
Month-by-month moonsighting reports from around the world.
- Signal app and protocol (end-to-end encrypted by default, but centralized server, no federation) - use it daily
- Matrix protocol (end-to-end encrypted, decentralized, federated, user gets to choose app to use) - finds it use, but can be slightly annoying when using multiple devices
- Delta Chat - please see notes below
- Briar - does not rely at all on a central server, so can work even when Internet is down (via wifi, BT or memory cards). Syncs via Tor if Internet is up, which does make the mobile app a battery hog. I have not tested this personally, thanks to Slim for insights.
- Simplex Chat - I haven't tested this
Matrix servers infinitely accumulate user data in the transport layer, namely encrypted messages and attachments as well as cleartext metadata about users and groups. A permanent metadata and room membership record may be ok, or even useful accountability-wise, for government officials but is not suitable for many people threatened by rising authoritarianism where “guilt by association” suffices for prosecution or worse. Operators of servers who can access all the social metadata about its users, and maybe even public messages, are becoming themselves a potential target for hacking or authoritarian repression.
Signal’s key architectural innovations were ephemeral message routing, usable E2EE with metadata-minimization where the transport server only stores messages temporarily and aims to know nothing about anything (except your phone number). Metadata-minimization is why Signal’s founder felt fine to entrust all “Signal Server” activities to Google, Amazon, Cloudflare, Microsoft, our very fine riders of the big tech apocalypse. A big step for cryptography in 2014 but a daring gamble, looking from 2025.
chatmail relays follow the Signal transport model and use SMTP and IMAP only for ephemeral message transport where the server keeps literally nothing except a (random) password and last login time. Turns out, if you hold those ancient protocols right, you can have a metadata-minimizing e-mail transport server with 0,001 EUR of costs per year per address.
https://lobste.rs/s/muk05v/reflections_on_matrix_criticism_over#c_1sijfo
Delta Chat
From the FAQ:
- Images, videos, files, voice messages etc. are handled as usual.
- For performance, images are optimized and sent at a smaller size by default, but you can send it as a “file” to preserve the original.
⚡️ Sign up to secure fast chatmail servers or use classic e-mail servers
- Chatmail relays Github repo - Chatmail relays are designed to be very cheap to run, and are automatically deployed and updated. Official list of relays.
- Besides the recommended usage of chatmail relays, you can use many classic email accounts in chatmail apps. List off email providers known to work with Chatmail.
- Chatmail core Github repo
List of clients is quite impressive, includes Android, iOS, a special "family-geared" Android client, a TUI client, and more.
Push notifications
Instant push notifications available for iOS and Android devices.
They seem to have put careful thought into how to handle notifications, especially on Android. By default, depends on Google FCM Push service or microG.
But you can change this to instead use a "background connection" or a "forced background connection".
Note that classic e-mail servers do not support Push Notifications for Delta Chat users.
Audio or video calls
Not really, at least not yet.
You can invite others to an audio/video chat, but it's essentially a Jitsi meeting (or whatever provider you choose). No ring tone on the other end, so you must have otherwise arranged the "call".
- https://delta.chat/en/help#how-can-i-use-audiovideo-calls-with-delta-chat
- https://support.delta.chat/t/i-made-a-video-call-app-with-15-second-ping
- https://github.com/WofWca/video-call-over-email
- https://github.com/WofWca/webxdc-video-call
webxdc apps
Watch out for insecure copy-cats
As far as I can tell these services, also named ChatMail, have nothing whatsoever to do with Delta Chat.
Delta Chat setup flow
I would like to test using the same profile on multiple devices.
So on device 1 (phone) I downloaded and installed the Delta Chat app from the F-Droid appstore. Opened the app and followed the instructions to create my profile. That was painless.
On my second device (tablet) I downloaded and installed the ArcaneChat app from F-Droid. Opened the app, clicked on "Add second device" on the welcome screen which starts the camera viewfinder. On my already registered device (phone), I opened the app, opened Settings, and clicked "Add Second Device". (Note! Don't make the mistake of clicking the QR code icon next to "Settings", because that will not work for adding secondary device, only for inviting others to a conversation).
ArcaneChat TUI client
I chose to create ~/.local/git/arcanechat
, set it up for python using direnv echo "layout python3 > .envrc"
, then installed the client using pip:
$ pip install -U arcanechat-tui[full]
This installs the arcanechat-tui
binary, an alias arcanechat
, as well as the deltachat-rpc-server
in .direnv/python-3.10/bin/
.
Next, how to configure the existing account?
- https://github.com/ArcaneChat/arcanechat-tui/issues/91 - Setup as second device
- https://github.com/ArcaneChat/arcanechat-tui/issues/96 - How to add account as second device?
Create a backup in ArcaneChat Android and transfer it to the computer.
$ arcanechat import <path-to-backup-tar>
Worked flawlessly with a single profile in the first device.