Zalgorithm

Notes

Move floating Hyprland window with key command

Using Hyprland dispatchers to move floating windows.

Prevent snacks.nvim from highlighting the current word in insert mode

Lazyvim is great, but the way the word that’s being typed was being highlighted with a background color was driving me nuts. It took a while to track down what was going on.

Mini.Surround Neovim plugin

Surround words that have already been typed with brackets.

Sending OSC messages from the command line

Interacting with Processing via OSC.

Creating Mandelbrot fractals with Processing

Learning about the Mandelbrot set and creating some fractal art.

Creating a unit circle graph with Processing

The challenge was to translate the Processing window coordinates into Cartesian coordinates, then create a graph of the unit circle.

Ambiguous pronouns

Pronouns function as placeholders for nouns.

What is the GDK_SCALE environmental variable used for?

The Omarchy default configuration sets GDK_SCALE to 2. What is the GDK_SCALE environmental variable?

Pushing to GitHub without a password

To push to GitHub with SSH, the remote URL needs to be the remote’s SSH URL.

Knowing where to stop

Choosing the appropriate level of abstraction.

More 2D parametric equations with Processing

Processing implementions of some examples from the Wikipedia Parametric equations page.

Drawing a point from the parametric representation of a line

Given two points on a Cartesian plane, draw a new point that’s exactly one-third of the distance between the original points.

Drawing a point from the slope of two points in the Cartesian plane

Given two points on the Cartesian plane, draw another point that’s in line with them.

Drawing dotted lines between points with Processing

Figuring out how to draw dotted lines between points on a Cartesian plane.

Using the Cartesian coordinate system in a Processing sketch

A test to see if it’s possible to use the Cartesian coordinate system in a Processing sketch.

The Processing coordinate system

The coordinate system for pixels on a computer puts the point (0, 0) at the top left. The x-axis points to the right (same as on the Cartesian plan), but the y-axis points down.

The polar coordinate system

The polar coordinate system uses distance and angle to describe a point on a plane.

What is the complex conjugate

The complex conjugate of a complex number is the number with an equal real part but with an imaginary part that has an equal magnitude, but the opposite sign.

Why am I writing about math?

I don’t know.

Debugging wrong HTML fragment being served

Figuring out why some internal links are pulling in the wrong fragment.

Introduction to Imaginary Numbers

The imaginary unit i, and imaginary numbers in the form bi.

Python programming math

Useful python book

Complex number class for Processing

Creating a complex number class in a Processing sketch.

Setting up Processing on Hyprland Arch Linux

A record of what I did.

What is phase space?

Tentatively, phase space is a representation of all possible points of a system. It the maps time-dependent behavior of a system onto a geometric space.

Lorenz equations

The Lorenze equations (for reference).

The relationship between the Malkus waterwheel and the Lorenz system

There is a correlation between the structure and movement of the Malkus waterwheel and the Lorenz differential equations.

Chaos theory (definition)

A branch of mathematics focusing on the behavior of dynamical systems that are highly sensative to initial conditions.

Lorenz attractor

A set of differential equations…

Yet

yet: (adverb) up until the present time

How this site is deployed

Using a script to automate the deploy process.

Malkus waterwheel (real)

A waterwheel with leaky buckets undergoes chaotic motion.

Malkus waterwheel (simulation)

A computer simulation of two Malkus waterwheels with different initial conditions.

Calculating per-document embeddings from chunk embeddings

Can the embeddings that have been generated for chunks of text be averaged into embeddings that represent entire documents?

Matplotlib PyPlot examples (for reference)

Basic example code for creating visualizations with PyPlot.

What are vectors?

“Most generally, a vector is a list of things.”

Todo

A list of things to do.

Angel From Montgomery (John Prine)

“Make me an angel that flies from Montgomery\Make me a poster of an old rodeo\Just give me one thing that I can hold on to\To believe in this living is just a hard way to go”

Typing math symbols with LaTeX

A cheatsheet for typing math symbols with LaTex.

Embeddings visualization with UMAP

“Uniform Manifold Approximation and Projection (UMAP) is a dimension reduction technique that can be used for visualization similarly to t-SNE, but also for general non-linear dimension reduction.”

Trial and error

Learing the hard way.

Hello htmx (part two)

Further explorations of htmx.

A basic static website for local development

How to setup a static website with a Python HTTP server for local development.

Hello htmx

“htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypertext.”

Hugo PageInner links render hook field

Details about the Hugo links render hook PageInner field.

Link render hooks

Hugo link render hooks override the rendering of markdown links to HTML.

Infolinks

A record of posts that are involved in the link experiments.

FastAPI with Chroma

Using FastAPI with Chromadb.

Chroma HTTP client doesn't have a close method

Memory issue to look out for related to the Chroma HTTP client and FastAPI.

The Python yield keyword

The yield keyword is used to create a generator function.

FastAPI With SQLite

Making database queries from a FastAPI application.

Local-first web development

A loosely held, local first web manifesto.

What is vector space?

Tentatively: A set where the elements can be added together and multiplied (“scaled”) by numbers (“scalars”).

What are vector embeddings?

Vector embeddings are numeric representations of text that make it possible to relate semantic similarity between chunks of text to the proximity of the embeddings in vector space.

Save HTML fragments associated with embeddings to an SQLite database

The embeddings_generator app associated with this blog is currently saving HTML fragments that are associated with each embedding to a Chroma database. I want to save the HTML fragments to an SQLite database instead.

Retrieval practice scratchpad

Practicing retrieval practice.

Retrieval practice

Studying materials over and over (for instance, looking over your notes repeatedly) is not the most effective way to learn.

Copy a directory and its contents from the command line

To copy a directory and its contents on a Linux system, use the cp command with one of several options.

Omarchy

Omarchy is a distribution of the Arch Linux operating system.

Customize builtin Omarchy theme

Dealing with customizations of default Omarchy themes after Omarchy version 3.3.0 update.

Checking internal Hugo links with render link template

Throw a warning in Hugo development mode if internal links are broken.

Check for broken links before deploying Hugo

Attempting to not deploy broken links to production.

Diacritics (accents)

“Diacritics, often loosely called ‘accents’, are the various little dots and squiggles which, in many languages are written above, below or on top of certain letters of the alphabet to indicate something about their pronunciation.”

Figure out how to use SQLite with Python

“SQLite is a C library that provides a lightweight disk-based database that doesn’t require a separate server process and allows accessing the database using a nonstandard variant of the SQL query language…. the [Python] sqlite module was written by Gerhard Häring. It provides an SQL interface compliant with the DB-API 2.0 specification described by PEP 249, and requires the third-party SQLite library.”

Forcing a linebreak to appear in HTML thats rendered from Hugo markdown

How to force a linebreak in HTML that’s rendered from a Hugo markdown file.

Literary Machines Book Chapter 2: Proposal for a universal electronic publishing system and archive

Proposal for a universal electronic publishing system and archive.

Scatter technique

“We progress by means of NASHR, an Arabic word that means scatter technique.”

Typing HTML entities in markdown documents

How to enter HTML entities like the trademark symbol in markdown files.

Neovim command line commands

Command line command for Neovim (and possibly Vim).

Lo and Behold: Reveries of the Connected World (movie)

Examines the impact of the internet, artificial intelligence, robotics, etc, on human life.

Literary Machines (book)

“To us, you appear to be the only one around who is clinically sane!” (Werner Herzog, from his interview with Ted Nelson in ‘Lo and Behold’.)

Transclusion — rendering multiple HTML fragments in a document

Transclusion: the inclusion of a part of all of an electronic document into another document by reference. Couned by Ted Nelson.

What is Noice?

Noice (Nice, Noise, Notice). “Highly experimental (Neovim) plugin that completely replaces the UI for messages, cmdline and the popupmenu.

Python threads

“Python threading allows you to have different parts of your program running concurrently.” What’s the difference between concurrent and parallel code execution?

Neovim (LazyVim) key commands

Vim motions for my configuration that I’ve had to look up or discover by trial and error.

Cell bubble sort

A basic re-implementation of the Cell class from the Zhangtaining/cell_research GitHub repo. (All mistakes are mine.)

Basal cognition

Memory and sensory systems-based cognition in organisms (biological systems) lacking animal/human-type brains.

Simple algorithms

Looking for basal intelligence in sorting algorithms.

Add Tags to Semantic Search Embedding Text

TODO: tags should be added to the text that’s used to generate semantic search embeddings

Learn about Go data structures

Go data structures

Remove categories route from site

This site doesn’t use categories, but it’s got a /categories route. Fix that.

Displaying post counts on the Hugo tags page

Updating the Hugo taxonomy template to display tag post counts.

Printing debug information from Hugo templates to the terminal

How to use warnf or errorf to print debug information to the terminal.

Go template basics

Getting up-to-speed with Go templates as they are used by Hugo.

How does Hugo render tags?

How does Hugo handle tags (and other taxonomy terms)?

How the Hugo build process processes footnotes

Markdown footnotes are automatically inserted into the HTML during the Hugo build process. How does that work?

Zalgorithm styleguide

A rough styleguide for the Zalgorithm blog.

Writing useful notes

Guidlines for writing useful notes.

Difference between em and rem

em units for the font-size property are relative to the font-size of the parent element. rem unit sizes are always relative to the root (html) element.

Deploying a Docker applications to a VPS

Deploying a Docker application to a VPS running Ubuntu 24.04.

Hugo semantic search application

Notes related to setting up a semantic search application for my Hugo blog.

Approaches to saving search state

Different ways of persisting the results returned on the search page.

Generating embeddings for blog semantic search

Breaking the blog’s text into chunks for semantic search.

Hello HTML elements

A simple HTML document for testing HTML element navigation.

Characteristics of XML and HTML elements

Exploring XML and HTML elements through trial and error and reading the docs.

A simple document for testing

This is a test, this is only a test.

Parsing HTML files with lxml

First steps parsing Hugo HTML files with lxml.

Permission to Proceed

After some amount of preliminary effort, go for it.

Learning about parsing XML and HTML with lxml

Following along with the lxml tutorial.

What is a factory?

What is the factory design pattern (briefly)?

Levin Lab software

Tools and software used by the Levin Lab.

Following the lxml Etree tutorial

Notes related to the lxml Etree Tutorial.

Using Tailwindcss in a Hugo theme

Configuring a Hugo theme to use Tailwindcss in development

Loading main.js with defer

What is the

Hugo template system

Getting familiar with Hugo’s template system; fixing problems related to having followed deprecated Hugo docs.

Menu key as additional Windows key with Kb options

Using XkbOptions to tweak keyboard configuration on Hyprland (and Linux in general).

Ghostty keybinds

Keybindings that I use in the Ghostty terminal.

Image shortcode test

Testing a custom image markdown renderer. (It started as a shortcode.)

Create a custom Hugo image render hook

How to override Hugo’s default markdown rendering with a render hook.

Sine cosine tangent

What are sine, cosine, and tangent?

Chromium video rendering issue after Omarchy (Hyprland) update

Debugging glitchy rendering of webpages that contain video elements after updating Omarchy on a machine that has a hybrid GPU.

The use of the term 'dimension' to descibe arrays and vectors

Clarifying a point of confusion about the use of the term “dimension”.

Real and complex numbers in space

Considering how real and complex numbers can be represented in space. Trying to get a better understanding of complex numbers by starting from a definition of real numbers.

Video embed example

Halley’s fractal video.

Removing files and folders from git version control

How to stop tracking files and folders after adding them to the gitignore file.

Convert Hugo theme to a submodule

Steps taken to convert this blog’s theme to a submodule

Trace Halley's iterations code

Code for tracing complex plane points as they’re iterated towards a root with Halley’s method.

Generating fractals by finding roots with Halley's method

Why are fractal patterns generated by finding polynomial roots for a complex plane with Halley’s Method?

Halley's which-root code

The source code for the halleys_roots_fractal function.

Hugo ref shortcode quirks

A note about the Hugo ‘ref’ shortcode

Halley's root finding code analysis

Working through Halley’s Method fractal code

Removing notes from the homepage

How I removed the notes path from the Hugo homepage.

Generating fractals with Halley's method

Images and code.

Solve cosine of pi over four

How to use the square root function to solve for the value of the cosine of Pi/4.

Polynomial functions

Random notes about polynomial functions.

Introduction to complex numbers

I’ve been putting this off for a while.

Halley's method

Halley’s method is a foot-finding angorithm that’s used for functions with one real variable with a continuous second derivative.

Finding roots with Newton's method

Newton’s Method for finding roots of functions.

Logistic map

The logistic map is a discrete dynamical system defined by the quadratic difference equation.

What Does It Mean to Understand Language Paper

Language understanding entails not just extracting the surface-level meaning of the linguistic input, but constructing rich mental models of the situation it describes….

Understanding Euler's number

Notes on Euler’s number.

Notes on cognitive and morphological patterns

Notes on Dr. Michael Levin’s Platonic space article.

Zalgorithm citation style

The Zalgorithm citation style guide.

Hello FastAPI

Notes on the FastAPI tutorials and documentation.

Setting up a multi-container Docker application for local development

Learning about Docker through a real project: configuring a local multi-container Docker application that uses the Chroma DB docker image and FastAPI.

Hello Docker

My attempt to get up-to-speed with Docker in a systematic way, starting at the beginning. It’s a boring way to learn.

The Meaning of Meaning (book)

A study of the influence of language upon thought and of the science of symbolism.

SimCSE: Simple Constrative Learning of Sentence Embeddings (paper)

This paper presents SimCSE, a simple constrative larning framework that greatly advances state-of-the-art sentence embeddings.

Differences between GPT and embedding models

GPT-style models predict the next token, embedding models output a single fixed-size vector.

Book: Learning Deep Representations of Data Distributions

This book reveals and studies a common and fundamental problem behind almost all modern practices of (artificial) intelligence. That is, how to effectively and efficiently learn a low-dimensional distribution of data in a high-dimensional space and then transform the distribution to a compact and structured representation?

Chromadb basics

Following the Chroma “Getting Started” guide.

Frederick II of Hohenstaufen: a Life

A biography of Fredrick II.

Michael Scot and Frederick II

In any judgement respecting the scientific activity of the court of Frederick II, much depends upon the opiniion formed of Michael Scot, the emperor’s astrologer, whose writings form a large part of the scientific and philosophical product of the Magna Curia.

Natural Philosophy

The study of nature and the physical universe, ignoring any supernatural influence.

Alchemy Restored

Alchemy now holds an important place in the history of science.

Roger Bacon as Magician

The practice of magic was much in vogue in the Renaissance and even the word had gained a limited respectability.

Scientia Experimentalis

Without experience, nothing can be properly known.

Who was Ibn al-Haytham?

A mathematician, astronomer, and physicist of the Islamic Golden Age.

Roger Bacon resources

Sources of information about Roger Bacon.

Roger Bacon's family life

What’s known about Roger Bacon’s family life?

University of Oxford

The University of Oxford is the oldest university in the English-speaking world.

What does it mean to understand language (paper)

Language understanding entails not just extracting the surface-level meaning of the linguistic input, but constructing rich mental models of the situation it describes.

Ilchester

Ilchester, England

Roger Bacon and the Brazen Head

What is a Brazen Head?

Roger Bacon overview

Some notes about Roger Bacon.