I recently setup Quartz to publish a subset of my “howto” notes to the TiL section of my website. Today I had some time to dive (delve…. haha) into why the page loads did not feel as fast as I am used to from my other static sites. PageSpeed Insights PageSpeed Insights reported that mobile page speed performance was 34 and desktop better but not great at 81: Let’s take a look inside the bundle First thing I checked was the browser’s dev tools. Here we can see that the HTML page itse...| vxlabs
Zotero is a fantastic open-source reference manager that I’ve been using and blogging about since 2011. Until the recent and sudden shutdown of the Omnivore read-it-later app, I was using it mostly for academic publications, but now I have started using its recently revamped (Zotero 7 is great!) web page archiving and highlighting (annotation) capabilities also for web references. In this post, I am sharing my import template for the Zotero Integration plugin for Obsidian with which you can...| vxlabs
Web Key Directory (WKD) “is a standard for discovery of OpenPGP keys by email address, via the domain of its email provider”. In short, through some DNS and files-on-your-webserver conventions, some email clients (e.g. Thunderbird or ProtonMail) and tools like GnuPG are able to retrieve your PGP keys automatically. This is of course super convenient and desirable for your correspondents, because PGP encryption is hard enough as it is. OpenPGP makes this even better by offering “WKD as a...| vxlabs
Background During my work at Stone Three upgrading some of our data pipelines with Azure DataBricks, I was quite disappointed to learn that Spark 3.5.3’s only timezone-capable timestamp type always stores timestamps converted to UTC, and always displays these timestamps converted to the session-global timezone. Admittedly, the situation is equally bad with PostgreSQL’s TIMESTAMPTZ type, leading to designs where the actual timezone offset must be stored as a separate timezone offset column...| vxlabs
Problem You’ve setup a local Spark 3.5.3 cluster for development user the bitnami docker images and compose file, you’ve hooked up your PySpark SparkSession and then when you try to df.limit(10).toPandas().head() for the first time, you are greeted with the following disheartening traceback:| vxlabs
The new Python package and project manager uv is in fact amazing. I say that, because it’s really fast, but more importantly because this single tool does a whole lot, really fast: Installing Python binaries, installing and running packages in self-contained environments like pipx, managing virtual environments. However, I’ve been avoiding it so far due to one flaw: uv defaults to installing its virtual environment and all dependencies into the .venv sub-directory of your project, almost ...| vxlabs
It took me longer than I would have liked to setup the latest Thunderbird 128 (Supernova!) to use my existing GnuPG-based encryption setup, for a large part because TB defaults to its own more straight-forward built-in defaults for key management, and so I’m going to publish the recipe here to save you some time, hopefully. All the details, at various levels of obviousness, can be found on this Mozilla wiki page, but here I’m going to make the whole sequence more obvious.| vxlabs
lf, or “list files”, is a single binary file manager, inspired by the ranger file manager, but written in Go. Using this tool, you can navigate really quickly, build up a mental model of the filesystem layout and make modifications with ease. Out of the box, this is super useful on remote machines or even docker containers where you don’t have access to your normal full configuration, in my case Emacs with dired.| vxlabs
Last week Microsoft had to deal with some criticism, because they announced “Recall”, a new feature, available only on their new Copilot+ AI-enabled laptops, that makes regular screenshots as the computer is used and uses on-device models to generate descriptions of these images that can be stored in a database (sqlite of course) and later searched, so that a user can effectively go back in time to find almost anything. They have stated that everything happens and is stored on-device, and...| vxlabs
LTTB, or Largest-Triangle-Three-Buckets, is a fantastic little algorithm that you can use for the visual downsampling of timeseries data. Let’s say your user is viewing a line chart of some timeseries data. The time-period they have selected contains 50000 points, but their display is only 4K so they have a maximum of 3840 pixels available horizontally. With LTTB, we can automatically select the 3840 or fewer points from those 50000 points that will produce a line graph which is visually ve...| vxlabs
Introduction Just the other weekend, I had to exchange contact details using quite primitive means with a fantastic new friend after a deeply enjoyable hike up Table Mountain via the India Venster route. We could not get the flashy new iPhone-bump method to work. Although the animation triggered with each bump, no contact details were exchanged, a failure which caused the Android user at the table much mirth. That incident drove me to retrieve some old Python code I had written to try out Seg...| vxlabs
Background I was curious whether it would in theory be possible to use the docx format as a storage format for markdown documents with their associated image files, and in addition, to support the light editing of the docx file directly. In other words, the primary authoring modality would be via markdown and attachments, because this works really well for software documentation, but storage and sharing would happen via docx files, additinonally supporting the occasional direct editing of tha...| vxlabs
The blurb Below is the emacs-lisp code I’ve evolved over the years to setup reasonable font sizes on all the machines where I use Emacs. The main goal is to get the physical / apparent size of the font, in millimetres, to be more similar across all displays and display systems (Different screens across macOS, Windows with and without display scaling, WSL). This sounds like it should be easy, but setting font point size to the same number is in fact interpreted differently on various display...| vxlabs
This morning while working on my AoC submission, I wondered what the simplest procedure was for sharing a minimal setup for editing Python in Visual Studio Code using ruff for formatting, linting and import sorting, and doing all of that automatically on save. It turns out that you can just store the following extensions.json and settings.json in the .vscode sub-directory of your source directory, and all of the above will be done. As a bonus, you can use the ruff.toml example below to custom...| vxlabs
Install and configure hunspell Imagine this: For intricate reasons, you have decided to get your Emacs setup working on Windows as well, although you have a perfectly fine and working WSL2 configuration. You’re surprised by how well this goes (winget install GNU.Emacs FTW!), until you decide to setup the hunspell spell checker… It starts pretty well, when you are able to install hunspell with a simple winget install FSFhu.Hunspell, after which you download a set of English dictionaries fr...| vxlabs
This is a small variation of the 2019 post on linking to emails from Org mode using Thunderbird, where instead we show how to open the message:// links with mu4e if active, or the fastmail web-app if it is not. You might remember that message://msg-id-here links represent one of the better ways to link to emails from your PKM systems. Code Below is the code. Let me know in the comments if you have any questions.| vxlabs
Introduction Python’s ThreadPoolExecutor’s context manager is a really neat way to run a bunch of (I/O) work in a thread pool, and then clean everything up when the context is exited. Something like this: 1 2 3 withThreadPoolExecutor()asexecutor:foriinrange(N):executor.submit(my_function,arg1,arg2) Where did my tasks go, attempt 1 Recently at work however, I had to debug a case where it appeared that it would discard tasks that had been submitted later.| vxlabs
Background For years and years now, I keep all of my work, including my checked-out source code, in some form of file synchronization system. The advantages of having all of your files always up to date on all of the comptuters you work on are considerable. More practically, I often get up from my work computer, and then continue on my laptop, or on my home computer, without having to think about it, and especially without having to abuse git commits purely to be able to transfer to another m...| vxlabs
You’ll see in Python bug 37962 that datetime.isoformat() and datetime.fromisoformat() use a restricted subset of the ISO 8601 timestamp formatting standards. This is similar to the subset followed by W3C. Recently, we ran into the specific issue that fromisoformat() rejects inputs where the timezone is specified as +hhmm instead of +hh:mm. Both are allowed by ISO 8601, but only the latter is part of the restricted subset. Following the Robustness principle (also known as Postel’s law) in ...| vxlabs
In this post, I show how to setup Emacs for TypeScript and React (tsx) development, with tree-sitter for syntax highlighting and indentation, and LSP with the TypeScript compiler (including a plugin for faster eslint), via eglot, for code intelligence. Update on 2022-12-27: emacs 29 has tree-sitter built-in! Tree-sitter was merged into Emacs core on November 23 of 2022. The post below is for the situation BEFORE the merge. If you’re running Emacs 29 or later (as I am at the end of 2022), yo...| vxlabs
This post shows how you can connect a Shelly 1 unit to an ET Systems gate motor so that you can open your driveway gate via internet. In my case I opted to flash the Shelly 1 with the brilliant shelly-homekit firmware so that my whole family can control the gate via Apple’s HomeKit, but you could just as easily make use of the Google Assistant or the Home Assistant integrations. The more important part of this post is how to wire up everything correctly.| vxlabs
In this post I show how you can setup a Kubernetes pod for reproducible development purposes on a single-node Kubernetes cluster using Rancher Desktop on Linux or Docker Desktop for Windows. What are devcontainers? At my quasi-hypothetical workplace, we are fans of Visual Studio Code’s development containers idea, or devcontainers for short. In short, you add a specially crafted devcontainer.json file (and some docker yamls) to your repo, and the next time a new dev opens the project, they ...| vxlabs
The wonderful Emacs Org mode is the basis for the largest part of my personal knowledge management system. However, as I’ve mentioned before, mobile accessibility is its weakest point. In this post, I’m going to explain my possibly unconventional new solution to the important requirement I mentioned in that note-taking post: Ideally, I would have easy access to my complete org database and any related files. As you can easily deduce from the title of this post, the solution involves conve...| vxlabs
This post is reproduced here with permission from The OrgMode ExoCortex. org-roam v2, which was recently released, removed the update database on idle functionality (which I coincidentally contributed) as part of its simplification. I agree with this removal, as I think it makes the most sense to keep the org-roam core as simple as possible. That being said, being able to have the org-roam database update only when Emacs is idle can be helpful for some folks, like me, who C-x C-s quite often ...| vxlabs
Recently the great support folks at FastMail helped me to debug a rather irritating issue where emails that had languished in my inbox for too long, and were then processed by me to end up in the Archive folder, would get the date of archival assigned as the main email date, instead of the date of arrival. For example, an email with a date in November of 2020 would get a new date of say February 21, 2021, if that’s the date that I finally got around to it and moved it to the Archive folder.| vxlabs
On the various and different platforms where I use Emacs and GnuPG encryption, I’ve traditionally always had a bit of a struggle setting up a suitable mechanism for private key passphrase entry, or pinentry. Recently, I landed upon this extremely easy-to-setup and reliable solution where Emacs and GnuPG can be configured so that Emacs requests the passphrase via its standard minibuffer password entry mechanism, and then passes this through to GnuPG.| vxlabs
Recently, as I replaced more of my Emacs-helm configuration with counsel and ivy, I noticed that ivy-switch-buffer, when augmented by ivy-rich, was not showing the directories of the buffers it was listing. After some Lisp spelunking, I discovered that it was because ivy-rich relies on the presence of either the projectile package, something I do not wish to have in my Emacs configuration, or on project.el, which I also do not use. In this post, I show how you can get full buffer filenames an...| vxlabs
Welcome to the first entry in a new series that’s probably going to stop with this first entry, or maybe not. The series is called Charl’s Unwritten Rules of Software Development, or cursd. I am also planning another series called Charl’s Unwritten Rules of Applied Machine Learning that is on its part probably going to remain in the planning stage, or maybe not. In this first CURSD post, I would like to document my hitherto unwritten rule for ordering your TypeScript (or JavaScript) imp...| vxlabs
You might have noticed the side-note in yesterday’s blog post where I mentioned that exporting Orgmode notes with org-download attachment-style screenshots to blog posts using ox-hugo required one to convert [[attachment:...]]-style links to [[file:...][file:...]]-style links. Because the barrier from private note to possibly useful blog post should be as low as possible, I made the below function that will do the required conversion for the link under your cursor. 1 2 3 4 5 6 7 8 9 10 11 1...| vxlabs
Pylance is Microsoft’s new and improved Python language server. I have been using this in my Visual Studio Code remote editing sessions (editing Python codes on the machine learning Linux machine next to me, from my laptop), and I’m enjoying its new type-checking capabilities. Today I discovered a little configuration change that improved my Pylance experience, so I thought I’d share in case it helps anyone else. Aside: ox-hugo exports with org-download screenshots It was also an excuse...| vxlabs
On Windows, running Emacs on WSL (the Windows Subsystem for Linux, or rather Linux in Windows), is faster and in my experience an altogether a better experience than running native Windows Emacs. However, you will need to do some tweaking to use it to its maximum potential, some of which I have written about before. In this post, I show a small but useful trick to use the brilliant and lightning fast Everything search tool to find directories and files anywhere on your Windows system whilst u...| vxlabs
This post originally appeared at Org Mode Exocortex, my Org mode-focused blog, on April 30, 2020. :ID: b3c6cee0-567e-4324-9685-f6fd9959d402 Introduction Inspired by Stéfan’s post explaining how to voice capture TODOs using Google Assistant on Android, I decided to find out how one would go about hooking up Siri dictation on iOS to Org mode. It turns out that Siri Shortcuts is a pretty amazing tool that can be used for all kinds of automation on your iPhone or iPad.| vxlabs
Previously I wrote how to get the WlzIIPSrv large image server running on webfaction, using lighttpd. Fast-forward 2.5 years, and I was busy porting the whole site (again), this time from webfaction (acquired by godaddy, who are planning to kill the great webfaction product), along with all of my other websites (including this one that you’re reading), to a fast, self-managed Hetzner VPS in Nuremberg. I needed to get that exact same WlzIIPSrv large image slice server fastcgi running, but th...| vxlabs
TL;DR. In this post, I propose bending the format=flowed RFC by allowing lines up to the SMTP limit of 998 characters, in order to improve the plaintext reading experience for users of non-compliant email clients and services, such as GMail, FastMail, Outlook and others. Background. The format=flowed plaintext email convention described in RFC3676 is an elegant method whereby plaintext emails can be prepared in such a way so that they are wrapped correctly on older email clients, but they can...| vxlabs
As I mentioned in a previous blog post, I switched from a 2017 15" MacBook Pro to a Thinkpad X1 Extreme in April of this year. Although I’m still using Windows on this machine in order to see what all the fuss is about (BTW, WSL is amazing), the Linux itch could not be ignored anymore. What makes this laptop slightly more challenging than some of my previous Linux laptop and Optimus (dynamically switching graphics) adventures, is that in this case the the NVIDIA dGPU is hard-wired to the ex...| vxlabs
As I recently changed my imap downloading tool choice from offlineimap to mbsync, and because the word on the street (where with “street” I mean “random discussion forums on the internet”) is that mbsync is generally faster than offlineimap, I wanted to run a small test to measure the difference. Methods For this test, I re-synchronized the exact same subset of my IMAP folders, totalling about 11000 emails, which together occupy about 2GB on disc.| vxlabs
These days I’m running mu4e, the mail programme that runs on the Emacs operating system (the one with the terrible editor), on the Windows Subsystem for Linux (WSL). (Previously, see my other mu4e posts, I was using it on Linux or macOS.) I have also switched from offlineimap to isync’s mbsync for no other reason than it was time to try something new. In addition, and this is the topic of this post, I’ve switched from nullmailer to Emacs’s built-in smtp and smtp queue functionality fo...| vxlabs
On Wednesday, May 8, 2019, South Africans had the opportunity to elect their leaders for the coming five years by taking part in the 2019 general election. Of the 26727921 registered voters, 17671616 made their way to the ballots. Of these, 17436144 citizens managed to submit a valid vote. These 17M+ votes were then tallied up to determine how the 400 parliamentary seats would be allocated to each of the qualifying parties.| vxlabs
On macOS, links of the form message://message-id are by default supported by the system. Using a tool such as org-mac-link, it is straight-forward to link directly to relevant emails from Orgmode tasks and notes. It does not matter if you have moved the mail around. When you open the link from Orgmode, the relevant email is instantly shown in Mac mail. Fortunately, similar functionality can be configured on Windows and Linux using the Thunderbird mail client, an add-on called ThunderLink, and...| vxlabs
One of the great new F# tools in .NET Core 3 Preview 3 is F# interactive as pure .NET Core application. To use dotnet fsi in your Visual Studio Code with the Ionide F# IDE plugin instead of the fsharpi binary, add the following to your user settings.json: 1 2 3 "FSharp.fsacRuntime":"netcore","FSharp.fsiFilePath":"/usr/local/share/dotnet/dotnet","FSharp.fsiExtraParameters":["fsi"] Remember to replace fsiFilePath with wherever your .NET Core 3 dotnet binary is installed. (On mac and Linux, do w...| vxlabs
On Wednesday April 3, 2019, I finished migrating this site from Wordpress to Hugo. An important part of this project was finding a new system for handling blog post comments. On my personal blog, I am able to use the free and ad-free tier of Disqus, but because vxlabs.com is strictly-speaking a company site (even although 100% of the posts are non-commercial), that won’t work here. Furthermore, the $9 / month price tag of the lowest Disqus tier is not really justifiable with the relatively ...| vxlabs
There are at least two ways to be kept up to date of any new content on this blog: Daily email update If you would like to receive an email update at 11:00 AM South African time only when a new post has been published, enter your email address in the box below, click the subscribe button, and then follow the instructions: Feed If you use a feed reader such as InoReader, you can subscribe to this blog’s atom feed.| vxlabs
TL;DR: For best results with mixed precision training, use NVIDIA’s Automatic Mixed Precision together with fastai, and remember to set any epsilons, for example in the optimizer, correctly. Background Newer NVIDIA GPUs such as the consumer RTX range, the Tesla V100 and others have hardware support for half-precision / fp16 tensors. This is interesting, because many deep neural networks still function perfectly if you store most of their parameters using the far more compact 16-bit floating...| vxlabs
I have prepared a simple Ansible script which will enable you to convert a clean Ubuntu 18.04 image (as supplied by Google Compute Engine or PaperSpace) into a CUDA 10, PyTorch 1.0 preview, fastai 1.0.x, miniconda3 powerhouse, ready to live the (mixed-precision!) deep learning dream. I built this script specifically in order to be able to do mixed-precision neural network training on NVIDIA’s TensorCores. It currently makes use of the vxlabs.com build of PyTorch 1.0, because we need full CU...| vxlabs
In a previous post I showed how to get Palantir’s Python Language Server working together with Emacs and lsp-mode. In this post, we look at the brand new elephant in the room, Microsoft’s arguably far more powerful own Python Language Server, and how to integrate it with Emacs. Motivation Since that previous post on Palantir’s language server, I’ve been using Emacs far more intensively for Python coding in tmux on remote machines with GPUs for deep learning.| vxlabs
Over the years, I’ve built up quite a collection of notes as Org mode text files. So far, it has proven to be the most expressive and the most robust note-taking modality out of a long list of candidates that I’ve tried. Note-taking using Org mode has one big drawback however: Mobile accessibility. In other words, consulting one’s org mode notes database from a mobile device is painful. This should not be the case; notes should be always and instantly available, even on mobile.| vxlabs
Phil Hagelberg recently won the Lisp Game Jam 2018 with his entry EXO_encounter 667. What I found most interesting however, was his interactive programming setup. He programmed his game in (and contributed new features to) a Lisp to Lua compiler called Fennel, and used the game programming library Löve. With Emacs and some Lua thread magic, he was able to perform runtime changes and introspection to his live running game project. (See below for a demo!)| vxlabs
tmtxt-dired-async by Trần Xuân Trường is an unfortunately lesser known Emacs package which extends dired, the Emacs file manager, to be able to run rsync and other commands (zip, unzip, downloading) asynchronously. This means you can copy gigabytes of directories around whilst still happily continuing with all of your other tasks in the Emacs operating system. It has a feature where you can add any number of files from different locations into a wait list with C-c C-a, and then asynchr...| vxlabs
The official Arduino Desktop IDE is fantastic at what it was made for. After downloading, opening your first sketch (say, blink.ino) and flashing this to your connected Arduino hardware takes all of 3 seconds. However, once your sketches become a little more complex, a more sophisticated IDE with code navigation, documentation and context-sensitive completion can be a great help. Currently, one of the better solutions is the Arduino extension for Visual Studio Code. You can be up and running ...| vxlabs
I had to use the ITEAD Studio XBee shield v1.1 with an Arduino m0 (SAMD21) board, which is a 3.3V board, whereas the most common Arduinos are 5V. At the time of this writing, the shield’s website was not very clear on how exactly to set the jumpers (zone 5: “When operated in 3.3V, install the jumper” — which one?!), and the rest of the internet also did not seem to know.| vxlabs
As I was listening to the December 21 episode of the CPPCast, together with TWiML&AI my two most favourite podcasts, I couldn’t help but be a little bewildered by the number of times the guest used the word “like” during their interview. Most of these were examples of speech disfluency, or filler words, but I have to admit that they detracted somewhat from an otherwise interesting discourse. During another CPPCast episode which I recently listened to, the hosts coincidentally discussed ...| vxlabs
In order to add a GiST index on a Postgres database that could be used to accelerate trigram matches using the pg_trgm module and the special gist_trgm_ops operator, I had to code up a special Django Index Django will hopefully soon support custom index operators, but if you need the functionality right now, this example will do the trick. The special GiST index class looks like this: from django.contrib.postgres.indexes import GistIndex classGistIndexTrgrmOps(GistIndex): defcreate_sql(self, ...| vxlabs
I have recently become fascinated with (Variational) Autoencoders and with PyTorch. Kevin Frans has a beautiful blog post online explaining variational autoencoders, with examples in TensorFlow and, importantly, with cat pictures. Jaan Altosaar’s blog post takes an even deeper look at VAEs from both the deep learning perspective and the perspective of graphical models. Both of these posts, as well as Diederik Kingma’s original 2014 paperAuto-Encoding Variational Bayes, are more than worth...| vxlabs
TL;DR When debugging DLL load errors on Windows, use lucasg’s open source and more modern rewrite of the old Dependency Walker software. Very importantly, keep on drilling down through indirect dependencies until you find the missing DLLs. The Problem Recently I had to package up a wxPython and VTK-based app for standalone deployment on Windows. Because of great experience with PyInstaller, I opted to use this tool. With the first try with the freshly built package on the deployment machine...| vxlabs
As is briefly documented on the ob-ipython github, one can run code on remote ipython kernels. In this post, I give a little more detail, and show that this also works wonderfully for remote generation but local embedding of graphics in Emacs Org mode. As I hinted previously, the jupyter notebook is a great interface for computational coding, but Emacs and Org mode offer far more flexible editing and are more robust as a documentation format.| vxlabs
TL;DR: Parallels Desktop 13 only supports OpenGL 3.2 on an extremely limited subset of mostly games. VMWare Fusion 10 has full OpenGL 3.3 support. In my case, this made the difference between being able to work on a VTK-based client project (VMWare Fusion 👍👍) or NOT being able to work the project (Parallels 👎👎). I bought a Parallels Desktop Pro 13 subscription to be able to do Linux and Windows development on my MacBook Pro.| vxlabs
RobotDyn offers a well-manufactured Joystick and XBee shield for the Arduino Uno which I am currently using for some IEEE 802.15.4-related experiments. However, as it is not mentioned in any official documentation, I want to document here that the XBee TX / RX lines are connected to the Arduino D1 and D0 lines respectively and can only be disconnected via the “USB sketch update / Wireless” hardware switch at the top left:| vxlabs
In a post from 2014, I showed how to drive the sub-standard HDMI input of the Dell U2713HM 27″ UltraSharp at a resolution of 2560×1440 from the HDMI 1.3 output of a Linux-running laptop. Fast forward 3 years, and I found myself having to drive the exact same monitor at its native resolution via its (sub-standard) HDMI input from a 2017 MacBook Pro through the brilliant HyperDrive USB-C dock. (Apple, USB-C is nice, but you really pushed it too far this time.)| vxlabs
Updates Because this matter is still ongoing (Jaxx does not seem to want to fix this vulnerability), I have moved the updates here to the front. The original post is below. 2022-08-14 In order to help a reader who was having trouble with nodejs, I added a section below with a replit setup that you can run with the click of a button. 2018-07-19 Reader Alex points out in the comments that newer versions of Jaxx use a different storage method, and links to this LinkedIn article.| vxlabs
The WordPress Twenty Seventeen theme was exactly what I needed to update the look and feel of the Visible Orbit project website, except for one thing: No sidebar on pages, only posts. For the Visible Orbit website, having the site information and navigation visible on the page-heavy site is quite important: Getting the sidebar to show on pages seems to be a popular question online. Besides just hacking the source, the only nicely packaged solution is this plugin by Joachim Jensen. However...| vxlabs
In this post, I’ll show you how you can use Emacs and orgmode to query live data from any RESTful webservice, and then use that data in orgmode tables, a really great way to get live table-based calculation and display functionality in your rich orgmode-based documentation. As an example, we will query live ticker data from the Kraken cryptocurrency exchange, and then use the current trading values of two different cryptocurrencies to calculate a fictitious investor’s position.| vxlabs
(This post is an extract from another post written a year ago on my other, more personal blog.) I finally got around to studying the math behind bitcoin. If you more or less know what a hash is (the hash is as a short string, e.g. 32 characters, than can be calculated from a file of arbitrary size; if even one byte in the file changes, the hash will be completely different; read more on wikipedia, or ask me in the comments) and you more or less know how the public and private keys in asymme...| vxlabs
The crux package for Emacs contains, amongst a list of useful functions (crux does stand for A Collection of Ridiculously Useful eXtensions for Emacs after all), the function crux-open-with. This interactive function opens the file you currently have open, or the file under your cursor in dired, using the system application for that file. On Ubuntu 16.04, this function unfortunately does not work. It looks like the application tries to start (icon visible in the dash) and then dies.| vxlabs
If you’re not using projectile, but you would like to be able to perform interactive, search-as-you-type, recursive searches through the current project, this is pretty easy to do if you have counsel and find-file-in-project installed. Add the following Emacs Lisp to your init: (defuncpb/counsel-ag-in-project()"Use `ffip' and `counsel-ag' for quick project-wide text searching."(interactive)(let((project-root (ffip-project-root)));; if ffip could not find project-root, it will already have;;...| vxlabs
In this post I talk about three great new features in the latest release of mu4e, an email programme that runs in Emacs. I also show my mu4e configuration as an example to others who would like a similar setup. mu4e 0.9.18 screenshot showing selected context (bottom right of main) and visual-line-mode (long lines) which is activated by the format=flowed support. After recently discovering that plaintext format=flowed in Thunderbird works only partially, it was time to check back in on mu4e af...| vxlabs
A core part of my note-taking strategy is a growing collection of Emacs Org mode files containing my monthly lab journals, project summaries and various technical documents. Usually I rely on Projectile’sHelm integration to perform recursive searches with The Silver Searcher (ag) using helm-projectile-ag (trigged by the completely muscle-memorised C-c p s s) through all of the org files in my notes hierarchy. Recursive regular expression search results are shown interactively as you type. W...| vxlabs
If you want C++ completion and navigation (jump to definition, jump to declaration, and so forth), there are several good options for Emacs. For a QtQuick / C++ project I’m working on, I needed the best Emacs has to offer. This turned out to be the Clang-based rtags system. Rtags is not the easiest of the options to get going, hence this short tutorial. I initially configured irony-mode, which is also Clang-based and was significantly easier to get going, but it soon started hanging on the ...| vxlabs
Stats for Huawei LTE Routers is a simple Android app to check the signal stats on the Huawei E5186 LTE router. It currently retrieves and displays four different measurements (RSRQ, RSRP, SINR, RSSI) as follows: In each case, it also reports on the quality of the signal, based on the available ranges for the different measurements. You can download the free Stats for Huawei LTE Routers form the Google Play Store.| vxlabs
When developing a mobile app using Cordova or PhoneGap, the browser target platform can really speed up your development. You could serve the HTML files directly using cordova serve, but the browser platform, while being almost as fast, is much closer to the Android / IOS environments your app will eventually find itself in. It also has access to the Cordova APIs. My general workflow is that I keep cordova run browser running in a terminal window (this will initially start a new instance of c...| vxlabs
ECL is of course Embeddable Common Lisp, a small but quite complete Common Lisp implementation that can be easily embedded in your C applications to act as dynamic extension language, but it is also a fine stand-alone implementation. It includes an interpreter and a compiler, and can even produce compact binaries. Read this blog post by Chris Kohlhepp for a brief and practical overview. SLIME is the Superior Lisp Interaction Mode for Emacs, a great Emacs environment within which one can write...| vxlabs
Usually when I’m working on a Django project, I use the built-in runserver command. For deployment, we mostly use nginx and uwsgi in front of Django. However, for a new side project I needed a local Django setup with a faster debug server. To keep things simple, I was looking for a pure Python solution that could serve static files, and did automatic reloading on source change, just like runserver.| vxlabs
Just in case you were wondering how one could go about having any child widget of a Kivy Scatter widget that would stick in a single window-relative position whilst the scatter itself was being translated and rotated, I thought I’d post this solution. With a scatter, one can very easily implement a canvas-like object that can be rotated, translated and zoomed, whilst all of the widgets it contains are transformed along with it. This is usually great, unless you’d like, for some or other r...| vxlabs
Ever since I dropped Dropbox in September of 2013 due to mounting privacy concerns, I’ve been searching for and testing various filesystem syncing solutions to take its place. This post is a summary of the notes I made during this time. It’s quite hard finding reviews online that go deeper than the very surface. Most sync software reviews can be summarised as: Hey, look, here’s a new service that’s a dropbox killer / dropbox alternatives / disruptive in the sync space. Wow, you get N ...| vxlabs
(This post has been updated since initial publication, see last section for details.) Introduction My blog post on usable hardware-based SSD encryption has seen a great deal of activity. Although that post dealt primarily with the ATA security based type of hardware-based full drive encryption, readers from all over joined the discussion in the comments to talk about an increasing number of new self-encrypting drives supporting the TCG Opal standard.| vxlabs
Org mode is great for authoring rich documents with syntax highlighted source code, LaTeX math and images. It even supports evaluating live snippets of code embedded in the text. It does all of this whilst remaining a plain text format. Imagine how useful it would be to author programming-related or technical emails using this functionality? Imagine no more! org-mime, part of the org mode contrib, does this for a number of emacs-based mail clients. However, our preference is for mu4e, which i...| vxlabs
With Emacs, org mode and org-babel, it’s possible to evaluate source code samples embedded in your org files and have the output of said evaluation appear inline. This makes for a beautiful literate programming environment. It also enables one to include graphs in one’s documents (org mode, PDF, HTML presentations or blog posts) by using for example GraphViz. This blog post (obviously authored using Emacs and Org mode) contains short instructions for doing so.| vxlabs
The Django REST Framework is awesome, for a whole bunch of reasons, one of them being the browsable HTML version of your API that it automatically generates for you. As a part of this, it extracts any docstrings that you might have defined for the relevant class (ViewSet or CBV) and adds an HTML version of this documentation to the browsable API, like this: However, as described in the relevant documentation, it expects Markdown syntax by default. I like Markdown, but the rest of my Python do...| vxlabs
Last night I had to backup 2760 photos and videos, about 6.3G worth, from my Nexus 4 Android phone to my Linux laptop. The Nexus 4, like many other Android phones, only supports the Media Transfer Protocol, or MTP, for transferring files via USB connection. With Ubuntu 14.04, this is a fortunately a plug and play situation: Connect the phone via USB cable, and start dragging and dropping files to and fro using the built-in file manager on the Linux side.| vxlabs
I’m helping someone process a collection of research data that has been entered by a third party using Excel. We’re using LibreOffice Calc, because research should be reproducible by anyone, not just those in possession of prioprietary software licenses (this also means that we use R, JGR and DeduceR instead of SPSS and Statistica; perhaps more on that later). After having to fix hundreds of badly entered dates with basic functions (we highly recommend that ISO 8601 format dates, i.e. YYY...| vxlabs
I’ve just activated CloudFlare (the free tier) for vxlabs.com, hoping to do even faster page loads. Most of my WordPress installations already use WP Super Cache to serve mostly static pages when you come here, but CloudFlare should speed this up even further via their content and network traffic optimization, and their servers dotted all over the globe. Configuration was quite painless (you have to configure your domain’s DNS to point to CloudFlare’s servers, then a few settings using ...| vxlabs
(TL;DR See the last paragraph for how to get the Dell U2713HM working on the HDMI output of the Acer V3-571G at 2560×1440 @ 50Hz.) The Dell Ultrasharp U2713HM is a 27″ IPS panel with a resolution of 2560×1440. I recently acquired this monitor and wanted to connect it to my Linux-only Acer V3-571G i7 laptop, which only a VGA (D-SUB; max resolution 2048×1536) and an HDMI 1.4 output. The monitor has been optimised to show the Dell logo. (image from the Engadget review I linked to above.)| vxlabs
Today, Qt 5.3.1 was released along with Qt Creator 3.1.2. Unfortunately, nsf’s EmacsKeys plugin, merged into the Qt trunk a few months ago, was not a part of this release (it should be included in Qt Creator 3.2). Because the Emacs keybindings are hardwired into my fingers, and I’m using QtCreator for a project at the moment, I spent some time figuring out how to get the plugin built for Qt Creator 3.1.2. This post explains how you too can build it, but, if you’re on Ubuntu 14.04 with Q...| vxlabs
Post summary: The level set method is a powerful alternative way to represent N-dimensional surfaces evolving through space. (This is a significantly extended blog-post version of three slides from my Medical Visualization lecture on image analysis.) Imagine that you would like to represent a contour in 2D or a surface in 3D, for example to delineate objects in a 2D image or in a 3D volumetric dataset. Now imagine that for some reason you would also like have this contour or surface move thro...| vxlabs
Background My notes database consists primarily of Emacs Org mode files, interspersed with a small number of markdown files, some of them from previous note-taking systems (for example, I went through a Gollum stage early in 2014, according to my notes then), and some of them for easier mobile consumption and production. I recently discovered nobiot’s md-roam Emacs package which makes it possible for these markdown files to show up (in sheep’s clothes, as it were) amongst all of my usual ...| vxlabs.com
From the department of how-obscure-can-you-get-really, I present you with this neat trick to open WSL2 files in their native Windows handlers via Emacs TRAMP connection from WSL1 to WSL2. Motivation My use case is this: On Windows, I use Emacs primarily from WSL1 to manage everything on Windows, on WSL1 and on the WSL2 distros I use for development. I’m often connected to WSL2 via TRAMP, for managing files with dired, manipulating the results of simulations, and using the amazing magit.| vxlabs.com
Imagine the following possibly hypothetical situation: You work in an organization or team that is heavily Python-focused, primarily due to operating in application domains where scientific computing is important. The Scientific Python ecosystem, of which machine learning is just one admittedly major theme, is brilliant for this. However, you would like to evaluate development stacks outside of the Python world for the implementation of small and higher-performance services, which don’t nee...| vxlabs.com
Welcome to open source vxlabs software development handbook. It contains a number of best practices for building software, generally web-based, using Python on the backend and TypeScript for the frontend. However, most of the guidelines are more broadly applicable. Important note: These are only guidelines. They were never meant to be applied dogmatically. They are great when you are starting fresh, and their intentions are good, but please do understand and adapt to your situation.| vxlabs
Warning on 2021-06-21: Don’t try this work-around With a pandoc 2.5 installation on Ubuntu 20.04.2 LTS I am not able to get this hack working anymore. My suggestion is to look into some of the better solutions that were later implemented in ox-hugo. Introduction I have written before explaining how you can use org-ref to insert citations into your org mode documents, and then have them export perfectly into PDF documents via LaTeX.| vxlabs
TL;DR: Install my WSL-specific xdg-open replacement by following the instructions on the xdg-open-wsl github page. Convert a Python script to a Python package with Poetry. In my previous vxlabs post, I explained how to use Emacs lisp advising to fix buggy behaviour when opening Windows files from Emacs running on WSL. In that post I mentioned my home-grown xdg-open replacement. As I was writing that bit, I wondered how long it would take for the first astute reader to wonder about the mention...| vxlabs.com
Background. On Windows, I run Emacs on WSL 1 whilst displaying to Windows via the X410 X-Server. This is currently the best compromise if one wants to interoperate with the NTFS side, at least until the WSL 2 developers manage to fix up its current cross-OS IO performance issues. As part of this setup, I have written a small xdg-open replacement in Python which does path translation. This enables me to open any links from Emacs, running on WSL 1, using the relevant Windows file handler, no ma...| vxlabs
Background I recently joined the Windows Insider Program, on the slow ring, to be able to test a development version of the soon-to-be-released Windows Subsystem for Linux, version 2, henceforth WSL 2. Microsoft is doing fantastic work integrating Linux with their Windows operating system. I find it personally quite useful being able to do native Linux development on the Windows partition of my ThinkPad, whilst still having access to all of the native Windows applications that I sometimes nee...| vxlabs.com
This post documents my measurements of the slow-down caused by the Windows 10 (1903) anti-virus real-time protection of Hugo static website builds, both with and without the Windows Subsystem for Linux (WSL). Methods I measured the re-generation of a site with about 2700 pages in total (my personal blog) using Hugo v0.55.5 on this ThinkPad X1 Extreme (i7 8750H, 32GB RAM, Samsung Evo Plus 1TB SSD) with Windows 10 1903, aka the May 2019 update.| vxlabs.com
A few days ago I switched my main development machine from a 2017 15" MacBook Pro with a 4-core 2.9GHz 7820HQ i7, 16GB of RAM and 512GB of SSD to a Lenovo Thinkpad X1 Extreme with a 6-core 8750H i7, 32GB of RAM and 1.5TB of Really Fast SSD. My reasons for the switch were: The fact that my upgrade path with the MacBook would have been much more expensive. The disappointing MacBook keyboard; the rest of the machine caused many sparks of joy over the past 1.| vxlabs.com
(The wheel has now been updated to the latest PyTorch 1.0 preview as of December 6, 2018.) You’ve just received a shiny new NVIDIA Turing (RTX 2070, 2080 or 2080 Ti), or maybe even a beautiful Tesla V100, and now you would like to try out mixed precision (well mostly fp16) training on those lovely tensor cores, using PyTorch on an Ubuntu 18.04 LTS x86_64 system. The idea is that these tensor cores chew through fp16 much faster than they do through fp32.| vxlabs.com
The language server protocol was proposed by Microsoft as a way for different editors and development environments to share language analysis backends This post describes how to configure Emacs, lsp-mode and the palantir python-language-server for improved code intelligence when working on Python projects. (I’m planning a companion post for Emacs, C++ and the cquery language server.) Goal Before starting, it is motivating to see what we are working towards. With a correctly configured setup...| vxlabs.com
ob-ipython is an Emacs package that enables org-babel to talk to a running ipython kernel. The upshot of this is that you can use org-mode instead of the jupyter notebook for interspersing executable code, results and documentation. The screenshot from the ob-ipython github shows it in action: Personally, I would like to use this for controlling ipython kernels on remote GPU- and deep learning-capable Linux machines, all via Emacs on my laptop.| vxlabs.com
For the high-resolution orbital slice viewer on the Visible Orbit website, I had to setup wlziipsrv, a fork of the iipsrv large tiled image server. This is a FastCGI app, which means that, unlike a normal CGI which is started up for each request, one runs a number of these processes in daemon mode, and the front-end webserver communicates with them using the fastcgi protocol. The end-result is this web-based high-resolution image viewer, which you can use to explore several thousands of micro...| vxlabs
Google recently announced the availability of GPUs on Google Compute Engine instances. For my deep learning experiments, I often need more beefy GPUs than the puny GTX 750Ti in my desktop workstation, so this was good news. To make the GCE offering even more attractive, their GPU instances are also available in their EU datacenters, which is in terms of latency a big plus for me here on the Southern tip of the African continent.| vxlabs.com
Screenshot of orgmode source, PDF preview on the right, interactive citation selection in the minibuffer. Click for full resolution. I have (co-)written a few LaTeX documents in my time. However, as I have been writing my life and lab notes and many of my technical blog posts in Emacs orgmode for the past few years, I wanted to see how one would go about using BiBTeX references in orgmode files (using John Kitchin’s org-ref package) such that they would render correctly in orgmode’s expor...| vxlabs
For a project that I’m currently helping with, we needed recent OpenGL features that are only available on NVIDIA drivers with version 340 and later. Unfortunately, I have one of those NVIDIA Optimus laptops. Up to now, Bumblebee worked a treat (I would recommend this system in most cases), but for this project I needed the whole of X to run on the NVIDIA, so I had to make use of nvidia-prime to switch between Intel and NVIDIA mode.| vxlabs.com