Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
148 changes: 148 additions & 0 deletions content/blog/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
---
title: "Topology, Code, and Everything Between"
description: "A test post exploring the rendering capabilities of our blog — LaTeX, code blocks, tables, and more."
date: "2025-03-22"
tags: ["mathematics", "engineering", "topology"]
---

Every good system begins with a clear abstraction. In mathematics, we build towers of definitions — each layer precise, composable, and minimal. Software should aspire to the same discipline.

This post is a tour of our blog's rendering capabilities. If you're reading this, everything below should look right.

## Inline math and display equations

The fundamental group $\pi_1(X, x_0)$ captures the algebraic structure of loops in a topological space. For a simply connected space, $\pi_1(X) = 0$.

A key result in algebraic topology is the **Euler characteristic**:

$$
\chi(M) = \sum_{k=0}^{n} (-1)^k \, b_k
$$

where $b_k = \text{rank}(H_k(M; \mathbb{Z}))$ are the Betti numbers. For a closed, orientable surface of genus $g$:

$$
\chi(\Sigma_g) = 2 - 2g
$$

The de Rham cohomology connects differential forms to topology via Stokes' theorem:

$$
\int_{\partial \Omega} \omega = \int_{\Omega} d\omega
$$

## Code blocks

Here's a Rust implementation of a simplicial complex:

```rust
use std::collections::BTreeSet;

/// A simplex is an ordered set of vertex indices.
type Simplex = BTreeSet<usize>;

/// A simplicial complex is a collection of simplices
/// closed under taking faces.
struct SimplicialComplex {
simplices: Vec<Simplex>,
}

impl SimplicialComplex {
fn new() -> Self {
Self { simplices: Vec::new() }
}

/// Insert a simplex and all of its faces.
fn insert(&mut self, simplex: Simplex) {
// Add all faces (subsets) of the simplex
let vertices: Vec<usize> = simplex.iter().copied().collect();
for mask in 1..=((1 << vertices.len()) - 1) {
let face: Simplex = vertices
.iter()
.enumerate()
.filter(|(i, _)| mask & (1 << i) != 0)
.map(|(_, &v)| v)
.collect();
if !self.simplices.contains(&face) {
self.simplices.push(face);
}
}
}

/// Compute the Euler characteristic.
fn euler_characteristic(&self) -> i64 {
let max_dim = self.simplices.iter().map(|s| s.len()).max().unwrap_or(0);
(0..max_dim)
.map(|k| {
let count = self.simplices.iter().filter(|s| s.len() == k + 1).count() as i64;
if k % 2 == 0 { count } else { -count }
})
.sum()
}
}
```

And a TypeScript example computing persistent homology intervals:

```typescript
interface Interval {
birth: number;
death: number | null; // null means the feature persists
dimension: number;
}

function computePersistenceDiagram(filtration: Map<number, Set<string>>): Interval[] {
const intervals: Interval[] = [];

for (const [threshold, simplices] of filtration) {
for (const simplex of simplices) {
const dim = simplex.split(",").length - 1;
intervals.push({
birth: threshold,
death: null,
dimension: dim,
});
}
}

return intervals;
}
```

## Blockquotes

> The introduction of the cipher 0 or the group concept was general nonsense too, and mathematics was more or less stagnating for thousands of years because nobody was around to take such steps.
>
> — Alexander Grothendieck

## Lists

Key properties of a **topological space** $(X, \tau)$:

1. The empty set $\emptyset$ and the whole space $X$ are in $\tau$
2. Arbitrary unions of elements of $\tau$ are in $\tau$
3. Finite intersections of elements of $\tau$ are in $\tau$

Tools we use daily:

- **Rust** — systems programming with algebraic type systems
- **TypeScript** — web interfaces and tooling
- **Python** — numerical experiments and prototyping
- **C++** — high-performance simulation (FEM, rad-hydro)

## Tables

| Manifold | $\chi$ | $\pi_1$ | Orientable |
| --------------- | ------ | ------------------------------- | ---------- |
| $S^2$ | $2$ | $0$ | Yes |
| $T^2$ | $0$ | $\mathbb{Z}^2$ | Yes |
| $\mathbb{R}P^2$ | $1$ | $\mathbb{Z}/2\mathbb{Z}$ | No |
| Klein bottle | $0$ | $\mathbb{Z} \rtimes \mathbb{Z}$ | No |

## Horizontal rules and emphasis

---

We believe that _mathematical rigor_ and **engineering pragmatism** are not at odds — they are complementary. The best abstractions emerge when you understand the structure of your problem deeply enough to see what's essential and what's accidental.

Build on solid foundations. The rest follows.
Loading
Loading