Hello there!

My name is Balder and this is my personal website. Here i write down what i learn to maybe help others some day. For now i will just act like people are reading my articles, and make them for fun.

This website has three main sections:

I write these articles for fun, and even though i try to make sure that they are correct, i am not a perfect human and there are sure to be mistakes. Below is a list of most recent articles in all categories.

Recent Posts

Install Mathematica on Nixos
Install Mathematica on Nixos The mathematica derivation is already in nixpkgs but is not self contained, and requires the user to manually add the installer to the nix-store. Therefore, i would recommend an imperative install. This does however mean that Mathematica will not persist, if you move your config to another machine. Imperative Install Let’s try to imperatively install Mathematica like any other program: nix-env -iA nixos.mathematica This will probably result in an error like this:
From Bash to Rust
From Bash to Rust I have for about a year had two simple scripts, one that could create bookmarks in my file system, and another that could open a terminal in a bookmarked location selected with dmenu. The management script looked like this: bfile=$HOME/.config/bookmarks/local-bookmarks.txt afile=$HOME/.config/bookmarks/baliases.sh case $1 in "list") echo "NAME - PATH" ; echo "-----------------------------" ; cat $bfile ; exit 0 ;; "edit") $EDITOR $bfile bmark update_aliases exit 0 ;; "rm") line=$(grep "^$2- " $bfile) || eval 'echo "no bookmark named \"$2\"" ; exit 1' echo "$line" echo $(cat $bfile | sed "/$line/d" ) bmark update_aliases exit 0 ;; "update_aliases") echo "# Autogenerated aliases for bookmarked places" > $afile cat $bfile | awk -F ' - ' '{print "alias _\"" $1 "\"=\"cd " $2"\""}' >> $afile echo "updated bookmark aliases.
3D Modeled Threads in Inventor
Making True 3D Threads in Inventor Inventor threads are by default only cosmetic. If we want to create actual modeled threads, we can use an add-in like threadModeler by CoolOrange. This plugin makes it possible to convert your default Inventor threads to actual threads. Install threadModeler for Inventor 2020 or older If you are using Inventor 2020 or lower, you should simply be able to install it from the Autodesk App Store.
FTP Upload Directory
Upload directory over FTP FTP does not include a command to transfer a directory only files. This is a problem if you want to create a script, that automatically uploads a directory to an FTP server. The Solution The tool ncftp includes the ncftpput command, that makes it possible to transfer a directory in one command: ncftpput -R -v -u USER HOST HOST-PATH LOCAL-PATH For uploading the public folder of my hugo site i created this script:
Clangd for Neovim Clangd is a language server for C, and C++. Clangd Lsp Configuration Clangd is configured with a configuration file at the root of your project. There are two options either a compile_commands.json or compile_flags.txt. compile_flags.txt This is the most straight forward option. Simply list the flags you pass to the compiler, one flag per link. To use c++ version 20, you would simply add this line to your compile_flags.
Goals for the Project Why? I started this project as a way for me to get familiar with the c++ syntax, while developing something that i and other could potentially benefit from in the future. Features Note links Backlinks A system for tags
How It Started
How it Started I have been writing latex documents for a few years now. I stated with Overleaf, as it was incredibly easy to get started with. It also has a really nice interface for tracking errors, and you don’t have to worry about installing tex-packages. This would be perfect if it wasn’t for the fact that Overleaf runs in the browser, and is completely cloud based. I absolutely loathe this.
Creating Sqlite Databases Fast in Python After implementing queries i realized, that i now only need to write raw SQL when creating a new table. To fix this, and completely pythonify sqlite interaction, i now needed to implement a way to create a table in python. This was quite simple: I made a class called Column that contained all the settings an Sqlite3 collumn could have. With this new class i could create a database method called create_table that takes a list of columns.
Things Evolved Since that first post things have evolved a bit. After looking through the other pypi packages similar to this one i found two that peaked my interest: quick-sqlite SQLAlchemy The first of the two had a bunch of convenience functions that i was missing, so i added those. The other one was more interesting however. SQLAlchemy is a large package, that can map sql-databases to classes. I have no intention on this package becoming anywhere near as comprehensive as that.
Connect to Wifi in Linux with nmcli
Connect to Wifi in Linux with nmcli nmcli is a command line tool for interacting with NetworkManager which handles wifi. It is useful as it is installed in many distros by default, and therefore provides a standardized way of connecting to wifi and managing connections. Connect to Wifi nmcli d wifi list --rescan yes note: d is short for device and --rescan yes makes sure that nmcli scans for wifis before listing them.