Introduction

by Avindra VG.

Math

Tex

Tex (via Mathjax) can be used to markup math statements.

mdbook supports Mathjax, which is a tex-like flavor for writing math.

This page is a mathjax syntax dump, showing some common use cases.

Matrices

Standard matrix (column vector), 3x1

\begin{bmatrix}1\\\\0\\\\8\end{bmatrix}

\( \begin{bmatrix}1\\0\\8\end{bmatrix} \)

Row vector, 1x3

\begin{bmatrix}1 & 3 & 7\end{bmatrix}

\( \begin{bmatrix}1 & 3 & 7\end{bmatrix} \)

Standard matrix, 3x3

Code:

\begin{bmatrix}4 & 0 & 0\\\\0 & 3 & 0\\\\0 & 0 & 2\end{bmatrix}

\( \begin{bmatrix}4 & 0 & 0\\0 & 3 & 0\\0 & 0 & 2\end{bmatrix} \)

Augmented matrix, 4x4

Code:

[ A | I ] = 
\\\\\\\\\\\\\\\\\
 \left[\begin{array}{cccc|cccc}
   0 & 0 & 0 & 2 & 1 & 0 & 0 & 0 \\\\
   0 & 0 & 3 & 0 & 0 & 1 & 0 & 0 \\\\
   0 & 4 & 0 & 0 & 0 & 0 & 1 & 0 \\\\
   5 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\\\
 \end{array}\right].

\( [ A | I ] = \\\\\\\\
\left[\begin{array}{cccc|cccc} 0 & 0 & 0 & 2 & 1 & 0 & 0 & 0 \\ 0 & 0 & 3 & 0 & 0 & 1 & 0 & 0 \\ 0 & 4 & 0 & 0 & 0 & 0 & 1 & 0 \\ 5 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \end{array}\right]. \)

Sets

  • \( \lbrace \) \lbrace
  • \( \rbrace \) \rbrace
  • \( \cup \) \cup
  • \( \cap \) \cap
  • \( \setminus \) \setminus
  • \( \subset \) \subset
  • \( \subseteq \) \subseteq
  • \( \subsetneq \) \subsetneq
  • \( \supset \) \supset
  • \( \in \) \in
  • \( \notin \) \notin
  • \( \emptyset \) \emptyset
  • \( \varnothing \) \varnothing

Sums

  • \( \sum_{i=0}^\infty i^2 \) \sum
    • \sum_{i=0}^\infty i^2
  • \( \bigcap \) \bigcap
  • \( \bigcup \) \bigcup
  • \( \prod \) \prod
  • \( \int \) \int

Logic

  • \( \land \) \land
  • \( \lor \) \lor
  • \( \lnot \) \lnot
  • \( \forall \) \forall
  • \( \exists \) \exists
  • \( \top \) \top
  • \( \bot \) \bot
  • \( \vdash \) \vdash
  • \( \vDash \) \vDash

Comparison

  • \( \neq \) \neq

  • \( \lt \) \lt

  • \( \le \) \le

  • \( \leq \) \leq

  • \( \leqq \) \leqq

  • \( \leqslant \) \leqslant

  • \( \gt \) \gt

  • \( \ge \) \ge

  • \( \geq \) \geq

  • \( \geqq \) \geqq

  • \( \geqslant \) \geqslant

Approximate

  • \( \approx \) \approx
  • \( \sim \) \sim
  • \( \thicksim \) \thicksim
  • \( \backsim \) \backsim

Fonts

  • \( \mathcal{RQSZ} \) \mathcal
  • \( \mathfrak{RQSZ} \) \mathfrak
  • \( \mathbb{RQSZ} \) \mathbb
  • \( \mathscr{RQSZ} \) \mathscr

Arrows

  • \( \to \) \to
  • \( \rightarrow \) \rightarrow
  • \( \leftarrow \) \leftarrow
  • \( \Rightarrow \) \Rightarrow
  • \( \Leftarrow \) \Leftarrow
  • \( \mapsto \) \mapsto

Bi-directional

  • \( \leftrightarrow \) \leftrightarrow
  • \( \Leftrightarrow \) \Leftrightarrow
  • \( \longleftrightarrow \) \longleftrightarrow
  • \( \Longleftrightarrow \) \Longleftrightarrow

Diagonal

  • \( \nearrow \) \nearrow
  • \( \searrow \) \searrow
  • \( \nwarrow \) \nwarrow
  • \( \swarrow \) \swarrow

Misc

  • \( \backslash \) \backslash

References

Computers

History

  • 2021-12-17: add PL section
  • 2021-06-10: Initial import

Computer Applications

This is a stub for applications of interest.

Language

trans (impl. AWK) is a fast REPL interface to cloud-based translation services

Browser

These are web browsers I recommend.

Firefox

Using Firefox is increasingly becoming important for the Web, as more and more giants continue to fall to the knees of Chromium. But as a user concerned about your security and privacy, you should disable Pocket and similar "cloud" features. As a Firefox user, prefer to use the upstream project (i.e., avoid Waterfox and the like). The main Firefox build is where you will find the latest features like GPU acceleration for the latest codecs.

Use Shift+Ctrl+X to flip bidi mode (RTL vs. LTR).

Userscripts

Userscripts are user-written code that augment user experience of websites.

  • useascript is my personal repository of userscripts and is installable as a single script thanks to modern JavaScript
  • TamperMonkey is an excellent userscript manager for Firefox. It also runs on Chrome (incidentally; it was created as a port of Greasemonkey to the Chrome Web Store).

Power Search

Firefox, possibly others have a feature where you can bind specific keys to search engine providers. This lets you for example, map = to Wolfram Alpha, yt to YouTube and so on.

Terminal emulators


rxvt-unicode (urxvt): a robust, lightweight terminal


The terminal I used for a few years was rxvt-unicode. It has a daemon mode which is included in .xinitrc. Client windows attach to the daemon, which results in much less memory usage overall. One of key weaknesses of urxvt is around fonts:

  • emojis do not render in their usual artistic flavorings, but there is some basic support for rendering the shapes.
  • a number of fonts are not usable, but you can eventually find one that works
  • getting 24-bit color requires a patch which is not generally applied in released builds

Still, rxvt-unicode is a fine emulator, and my favorite terminal to use especially in environments that have limited RAM.


Alacritty: low latency terminal emulator


I currently use alacritty, a terminal emulator started in 2016 that targets the GPU. The color theme is integrated via a pywal template.

Templating externally is possible (e.g. ACE replacement hack). A workaround is applied so that CTRL+K resets the scrollback and data buffer correctly.

If you have the Rust toolchain installed, run cargo install alacritty to get the terminal.

Note: Alacritty is an experimental application with a number of long-existent problems (as of 0.8.0):


Other interesting terminal emulator applications


  • kitty: GPU terminal written in Python+C. About as heavy as Alacritty.
  • LXterminal: good feature set, very configurable (with graphical menus).
  • cool-retro-term: cool effects for archival purposes. is not the practical choice
  • hyper: JavaScript terminals. Disclosure: I last used version 2 or 1, when vercel was still called zeit
  • xterm: been around forever, works great
  • xfce4-terminal: Graphical driven config with good support for theming
  • iTerm2 (for MacOS): still a good replacement for vanilla MacOS Terminal

See the Windows page for Windows programs.

Hardware

Graphics

NVIDIA

Issues

NVIDIA, graphics card manufacturer popular among Windows gamers has a number of problems on Linux:

  • NVIDIA does not support Wayland
    • NVIDIA Driver v470 rumored to have Wayland support
  • Good luck getting HDR to work
  • Good luck getting Adaptive FPS (i.e., FreeSync/GSYNC) to work
  • Kernel updates occasionally break driver
  • vfio requires resorting to vendor spoofing hacks

Sometimes, a simple reinstall of the driver is enough. In openSUSE:

sudo zypper in --force $(rpm -qa "nvidia-gfx*kmp*")

AMD

AMD open source graphics driver is known to work reliably and improve over time.

  • An alternative: prevent kernel updates temporarily by locking the kernel with zypper al kernel-default.
    • You can update the rest of your programs normally while the driver makes its way over to the stable release channel.
    • Remember to remove the lock if you use this approach.

Disk management

Resiliency

If you're an openSUSE or RedHat user, you are likely using Btrfs for your root filesystem. Good job, you picked a safe, resilient and performant filesystem for your core OS.

ZFS offers most things you find in Btfrs and much more, and for a while it was only easily ported to systems like illumos. See also: Wiki:illumos. Support for ZFS on Linux is here today with OpenZFS, which I have yet to test myself.

If you don't need such robust features, XFS is a better filesystem for you and will give you greater performance. The exts tend to work and have great compatibility with repartitioning strategies found in gparted. However, after seeing XFS and how it holds up in production, I feel comfortable using XFS over any ext filesystem. Just plan it out well, especially if you are using one drive, I would recommend formatting the bulk of it as XFS.

My root filesystem can fit comfortably in 40GB since at least 2016. This only requires good tuning of the # of kept snapshots in snapper.

So if I have only a 1TB drive, I would allocate 960GB as XFS.

Cleanup

Any modern consumer of media from the Internet knows how easy it is to fill up devices. Be smart, don't buy a new device simply because of this problem. Software can help us. But don't fall into the trap of specialized disk cleanup programs, which have trouble keeping up with configs and locations of the myriad of software we use today.

Use qdirstat, which will help you easily identify and remove unwanted files, which ensures you can use the same drives for an extended period of time (years). If you happen to be a Windows user, the equivalent program is called windirstat. Windows users may want to try the bite-sized diskitude.

MacOS users can look at GrandPerspective1.

openSUSE Cleanup

openSUSE has a page on cleanup strategies for specific tools such as snapper, systemd logs, etc.

If you installed openSUSE Tumbleweed before Aug 6, 2020, you should migrate your tmpfs setup. The distro now uses shared memory for the tmpfs.2.

References

Display

Display manager

I use LightDM, which is less resource intensive than GDM. As of Oct 2020, it uses about 17MB on boot, which is drastically less than GDM would use (note that GDM also creates additional processes for its functioning).

I recommend using lightdm-gtk-greeter, which is the default greeter, unless specified otherwise. ([1]). openSUSE, Linux Mint and others may be using the slick greeter by default, so you should change it.

On openSUSE, the display manager can be set interactively using sudo update-alternatives --config default-displaymanager. (Docs).

Display server

I use X11 as it has been around for a few decades and works with most things.

The general way into tiling wms for Wayland is Sway, but Sway does not work correctly on NVIDIA. As I only have an NVIDIA card at the moment, I will not be able to try sway and Wayland.

Fonts

Fonts live at ~/.fonts

To reload the font cache, run fc-cache -fv.

Active fonts

Retired fonts

Operating Systems

All about the operating system.

I use Linux, specifically openSUSE.

Unix

See unix info for information about the origins and extent of UNIX.

References

These are additional handy references on the topic of UNIX.

Tablespace.net

Linux

I am an openSUSE Linux user.

Arch Linux wiki

Arch Linux is a popular rolling release distribution.

The Arch Linux wiki covers Linux broadly, and has a particularly robust knowledge base for specific applications and Linux topics.

Examples include:

Sound

Linux has seen all kinds of audio software throughout the ages, and its reliability is the subject of oft-repeated jokes. From ALSA to Pulseaudio, and now Pipewire.

For pipewire, see:

Linux archaeology

Misc

  • /usr merge recent efforts in Linux distros to remove extraneous top level directories (notably /bin)

openSUSE

openSUSE Tumbleweed is one of the mainstream rolling release linux distributions.

The system is built by doers using a shared, global open build service instance.

openSUSE geekos come from all over the world to help build software validly and from scratch.


Developments

My own developments which I use for local builds and rote package management duties.

Resources

Using openSUSE:

Concerning the maintenance of packages:

About Open Build Service

In addition to supporting Factory builds of the flagship Tumbleweed project, OBS supports builds for multiple Linux distributions. Namely:

  • Fedora/RedHat
  • Debian/Ubuntu
  • Arch Linux

As well as several CPU architectures:

  • x86_64
  • ARM32
  • ARM64
  • i386
  • riscv64

It is written primarily in a codebase using Rails, Javascript, Ruby and Perl and has been in active development since 2006.

Package maintainers primarily use the command line tool osc, written in Python, to interact with the build service.

Known issues

See also: NVIDIA driver issues

Dependencies

MacOS still lacks a native package manager. It has a number of inconsistencies from a typical free software distribution. Therefore:

  1. Install Homebrew
  2. brew install iterm2 fish git bash bash-completion fzf coreutils

You may want to chsh -s to the later bash from Homebrew for newer Bash features and avoiding the ZSH default.

(optional) Coding tools:

  1. brew install planck neovim deno ripgrep

(optional) Apps:

  1. brew install firefox google-chrome visual-studio-code

† MacOS has some of these preinstalled, but often on outdated patchsets (for example, Big Sur still ships with Bash 3 due to a license related legal concern. Bash 5 has been released). It is likely that this, combined with the overwhelming adoption of OhMyZSH and similar frameworks have led Apple to choose ZSH as the default shell.

By adopting ZSH, they circumvent their legal problem as ZSH has similar modern features comparable to up-to-date Bash releases. As a programmer though, you should wonder why not try something new like elvish or other shells under development? It seems clear from using Fish that there is room for improvement in the shell. Just beware that On MacOS, changing to so-called "exotic" shells requires janky workarounds.

Install window manager (Yabai)

Yabai is the best (and one of the only) tiling WM for MacOS. The config and layout behavior is closely designed after bspwm and sxhkd. Note that Yabai pairs with skhd. The separate hotkey daemon has a design where keybindings are not strictly bound to one particular window manager.

Yabai requires removing Apple security gates in order for all features to work properly, and a complicated setup. That is, it's very similar to the ChunkWM setup (see notes below).

Once the painful setup is done, it's well worth it. You end up with a Tiling window management experience, but without greatly disturbing the native MacOS user interface.

History of Yabai

ChunkWM is dead, long live Yabai

Tiling window managers appeared for MacOS around 2017. At the time, ChunkWM was the de facto WM experience for MacOS. koekishiya is the author of chunkwm, and he has a habit (so far) of renaming the WM every few major MacOS releases. Migrating from ChunkWM to Yabai for example, is not too bad because many configuration strings are invariant between the two.

"Exotic" shells on MacOS

Problem defined

If you try to change your default shell from ZSH to Bash (even Bash 5 over it's native Bash 3), the Apple system responds with some nags, but overall is happy with you. If you try to feed it something like Fish, it will yell at you for even thinking of changing to a "non-standard" shell.

We can assume Apple and others are doing this to preserve the integrity of their internal subsystems, which are likely still glued together by many shell scripts. If the default interpreter changes to something that isn't POSIX compliant, there is a decent chance something may break in all of those little glue points.

Besides Apple, it's a good idea to stick to this philosophy, at least for a few years. The dust has already settled over the SysV init, which has been completely superseded by SystemD. But the traditional POSIX shell is still seen as an integral part of the Unix system.

A solution

iTerm2 and any terminal emulator worth it's salt will allow you to change the default login shell. This lets the user use the Fish shell for example, without needing to chsh anything or any other hack.

That's it. Keep reading if you want to see a more general solution, which may be useful if you are using multiple terminal emulators.

.bash_profile hack

A hack can used (a [ -t 1 ] gate), to ensure the Fish shell starts up whenever the user wants to allocate a new TTY. This includes normal use such as when the login shell is set to either ZSH or Bash, shells which are not "exotic." Luckily, there is a workaround for those of us who use multiple terminal emulators and don't want to configure each and every one.

The full hack looks like: if [ -t 1 ]; then exec fish; fi. This can be roughly transliterated as, "If I'm a tty, then replace me with Fish."This will drop the user into the fish shell and exec ensures the parent shell is removed.

This ensures compatibility with existing shell scripts in the Apple system, while allowing the user to use a better shell.

Thoughts on ZSH

ZSH might be an ok shell, but it's semantics hardly depart from Bash. Thus I did not use the ZSH interface. OhMyZSH or OhMyAnything seems like a little too much cruft that you wouldn't want in an environment fit for daily use.

Windows

Packages and applications

  • winget, available for preview since Windows 10 v1709 (build 16299)
    • This is Microsoft's answer to the community-built chocolatey.

A list of applications of note follows. Note: I stopped using Windows for any reason ~2015. By 2020, I no longer use any Windows systems on a daily basis.

  • SuperPutty with a little bit of puTTy setting tweaking, it is the ultimate for the ssh connected terminal users. Users who only connect to linux machines remotely may prefer using SuperPutty exclusively instead of using WSL or Cygwin.
  • AutoHotkey (specifically, AutoHotkey_L) for keyboard/mouse scripting. Nothing like it - exclusively for Windows. Can solve a lot of GUI problems and hack certain games.

Setup

There are 3 distinct ways to setup a base development environment. Pick one. Best solutions appear first.

1. Git-for-Windows provided base environment

This route is a good option for developers who are using git. It contains a well-composed userland-only bootstrap of a unix environment. There is 0 virtualization required for this solution.

  • git for windows source of coreutils and the core POSIX environment
  • cmder (and its base ConEmu) are essential for a good console experience on Windows.

Note: If you installed Git already, then get the mini version of cmder to avoid having a duplicate shell toolchain.

2. WSL 2.0: accepting a managed environment

If your CPU supports virtualization, you can use the currently-supported implementation of WSL at Microsoft. I haven't tried WSL 2.0 myself, but I have seen reports that projecting to VcXsrv are still working (they have worked since 1.0 days).

3. WSL 1.0: a landmark achievement

Finally, one may opt for the final release of WSL 1.0 (and perhaps an outdated patchset of Windows 10). The first WSL implementation operated entirely on the level of syscalls. This was a much more subtle approach that Microsoft has now abandoned, as WSL 2 now simply requires enabling Hyper-V and running a managed vm.

This has one upside that you can use docker through the managed WSL vm, but an obvious downside of abandoning an effort to truly merge the interfaces. At one point, there was a plan for example, for ps to be able to see Windows processes, and conversely, for Windows processes to be able to see the linux ones. I assume it all fell apart when some person(s) started screaming about potential misuses of the subsystems. The problem is compounded if the Windows engineers are not supported or motivated to work such projects.

Games

  • PCGamingWiki
    • relevant for all PC gamers, including Windows users
    • A trove of config locations, FOV overrides and other tweaks for specific games
  • MyAbandonware
    • Has many old PC games, spanning broadly from 1978 to 2010

Linux gamers will be interested in the following things:

Gaming platforms with linux-native clients:

Windows/Legacy API layers:

Legacy PC emulators:

Internet

Wikipedia

Wikipedia is one of the largest repositories of freely available knowledge.

The tendency in Wikipedia is to prefer secondary sources to avoid bias from subjects closely affiliated with source(s). Thus, Wikipedia is generally not optimized for using primary sources.

Furthermore, conflict of interest (a legal jargon), prevents many world experts from contributing directly to Wikipedia. Consequently, information is sourced mainly from secondary sources and the purely ascetic labor of Wikipedians uploading data.

References

Twitter

Lists

comp\pl

PHP

Music