Skip to content
Merged
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
421 changes: 421 additions & 0 deletions AGENT_INSTRUCTIONS.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/projects/8-bit-cpu/ram_overview.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/projects/rsmc/chat.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/projects/rsmc/grass_closeup.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/projects/rsmc/perlin_layers.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/projects/rsmc/trees.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/projects/ts-mc.webp
Binary file not shown.
3 changes: 2 additions & 1 deletion src/components/Footer.astro
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const currentYear = new Date().getFullYear();
href="https://creativecommons.org/licenses/by/4.0/"
target="_blank"
rel="noopener noreferrer">CC BY 4.0</a
>.</small>
>.
</small>
</p>

<a
Expand Down
93 changes: 93 additions & 0 deletions src/content/projects/8bit-cpu.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
name: "8bit-cpu"
description: "A minimal abstraction 8Bit CPU and 64 Byte RAM built entirely from single bit logic gates to understand computer architecture from first principles."
tags:
[
"cpu",
"ram",
"logic-gates",
"computer-architecture",
"education",
"hardware",
]
---

# Minimal Abstraction 8Bit CPU

This project was sparked by the university courses INCO Information Theory and Encodings and GED Basics of Electrical and Digital Technology. They triggered a strong interest in low level systems and computer architecture.

A friend recommended the game [Turing Complete](https://store.steampowered.com/app/1444480/Turing_Complete/), which acts as an educational CPU design environment. Instead of providing explicit instructions, it forces you to derive solutions from truth tables and first principles. Concepts like opcodes, instruction decoding and control logic are introduced gradually and implicitly.

The game encourages the use of custom components. For example, once a half adder is built, it can be abstracted and reused instead of manually placing the same logic gates again. While this is practical, I deliberately avoided most abstraction.

My goal was to design a CPU where all inner workings are visible at once. The emulator does not support inlining components, so every single bit level component was placed and wired manually. This took several dozen hours.

The result is a fully functional 8Bit CPU architecture called OVERTURE within TC. It is a predecessor to the more advanced LEG which mainly differs in the size of the instructions.

Emulation performance is predictably poor, as the game cannot apply meaningful shortcuts, but the design fulfills the original goal of maximum transparency.

Because everything is built from single bit components, the design could theoretically be translated into real hardware or even implemented in Minecraft redstone.

## Architecture Highlights

- 8Bit registers built from individual latches
- Custom opcode decoding and control logic
- Boolean and arithmetic ALU operations
- Dedicated program counter and instruction flow control
- Fully manual wiring without higher level abstraction

## Architecture Images

### Register Close Up

![8Bit register built from individual latches](../../assets/projects/8-bit-cpu/cpu_register_closeup.webp)

### Architecture Overview

![Complete OVERTURE CPU architecture showing all components](../../assets/projects/8-bit-cpu/cpu_architecture_overview.webp)

### Adder and Inverter Circuit

![Custom adder and inverter logic circuits](../../assets/projects/8-bit-cpu/cpu_adder_invertor_circuit.webp)

### Opcode and Logic Unit

![Opcode decoding and control logic unit](../../assets/projects/8-bit-cpu/cpu_opcode_logic_unit.webp)

### ALU Boolean Operations

![Arithmetic Logic Unit performing boolean operations](../../assets/projects/8-bit-cpu/cpu_alu_boolean.webp)

### Program Counter

![Program counter and instruction flow control](../../assets/projects/8-bit-cpu/cpu_program_counter.webp)

## 64 Byte RAM Module

I like having many tabs open. Was wondering how RAM works internally. I like to learn by doing so I built a naive (emulated) hardware implementation of a 64 byte RAM module.

This RAM project was built in the same spirit as the CPU - understanding computer fundamentals by building them from first principles using single bit logic gates.

The result is a functional 64 byte RAM module constructed entirely from basic logic components, demonstrating the core concepts of memory addressing, data storage, and retrieval at the hardware level.

More info on [Reddit](https://www.reddit.com/r/TuringComplete/comments/1mvqjvt/64bytes_of_ram_made_of_1bit_logic_gates/).

### RAM Architecture Highlights

- Memory addressing and decoding
- Data storage using latches
- Read and write operations
- Built entirely from single bit logic gates
- Row and column selection logic for efficient addressing

### RAM Overview

![Complete 64 byte RAM module showing all components](../../assets/projects/8-bit-cpu/ram_overview.webp)

### Memory Cells Close Up

![Individual memory cells built from latches](../../assets/projects/8-bit-cpu/ram_close_up_memory_cells.webp)

### Row and Column Switching Logic

![Address decoding and row/column selection logic](../../assets/projects/8-bit-cpu/ram_row_col_switching_logic.webp)
65 changes: 65 additions & 0 deletions src/content/projects/dotfiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
name: "dotfiles"
description: "I use Neovim btw. My personal configuration files for arch/nvim/git/tmux/zj/ghostty and more."
tags: ["neovim", "dotfiles", "linux", "terminal", "productivity", "arch"]
---

# Dotfiles

I use Neovim btw. I love writing code and I love tools. I want to dictate how stuff behaves so I have my own config for arch/nvim/git/tmux/zj/ghostty etc.

These dotfiles represent my development environment carefully crafted over time to maximize productivity and match my workflow preferences. Every tool is configured to work seamlessly together.

Repository: [https://github.com/cb341/dotfiles](https://github.com/cb341/dotfiles)

## Current State

The repository has two branches:

- **stable**: The default branch that I don't update that often. This is set as "main" so my small changes I sync don't affect my contributions count on GitHub.
- **main**: The real branch you are looking for. A bit messy at the moment, might clean up once I have time to dig into dotfiles again.

## Philosophy

As I wrote in [my editor journey](/blog/editor-journey):

> "Neovim is not just a text editor. It is **FAST**, the fastest editing experience I have had. It is incredibly feature rich, yet keyboard oriented for efficient, sophisticated workflows."

After bouncing between Atom, VSCode, JetBrains, NVChad, and even trying Cursor for AI features, I finally landed on **LazyVim**, the sweet spot between a pre-configured distro and the flexibility to customize without maintaining everything myself.

I genuinely enjoy Neovim as a hobby. The community is fantastic, it is intuitive to use once you get the hang of it, and there is no big tech corp jargon or anyone pushing AI down my throat. Building software is about writing text, and Neovim integrates incredibly well with my terminal setup: zellij, autojump, ripgrep, lazygit. Everything works together seamlessly.

This is the way.

## Neovim Configuration

I used to maintain my own nvim config from scratch, a bare-knuckle setup that prioritized raw performance above all else. No animations, no bloat, just pure speed. But maintaining it became a chore, especially managing language servers.

LazyVim takes care of the boilerplate while letting me keep what matters: reduced animations, classic vim plugins (oil for file exploration, surround), no markdown rendering, and performance improvements. I also kept some unorthodox things like multicursor because they make me faster.

The goal is still the same as my old config: if it doesn't make editing faster and more efficient, it doesn't make the cut. Short keybindings, minimal overhead, maximum speed.

## Operating System

I switched from **NixOS** to **Arch Linux** because Arch is easier to use and better documented. The Arch Wiki is genuinely one of the best resources for Linux configuration.

When I do use Arch, I run **Hyprland** as my window manager. It's pretty dope, although I don't really get to use it that often.

That said, my main machine is a **MacBook** I received working for Renuo, and I am pretty happy with it despite not having a fancy window manager. It has zsh and that's all I need. Neovim go brr.

## What's Included

- **LazyVim**: My Neovim distribution with custom configurations, LSP, treesitter, and carefully selected plugins
- **Zellij**: Modern terminal workspace manager for efficient session management
- **Ripgrep**: Fast search tool integrated into my workflow
- **Lazygit**: Terminal UI for git commands
- **Autojump**: Smart directory navigation
- **Arch Linux**: System configuration and setup scripts (also works on macOS)
- **Zsh**: Shell configuration with oh-my-zsh and custom aliases
- **Git**: Custom aliases and workflow optimizations
- **Ghostty**: Terminal emulator configuration
- And many more tools configured to work in harmony

## Learn More

For the full story of how I ended up here, including my thoughts on AI coding assistants and why I chose LazyVim, check out my [editor journey blog post](/blog/editor-journey).
80 changes: 80 additions & 0 deletions src/content/projects/rsmc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
name: "rsmc"
description: "A multi threaded multiplayer voxel engine written in Rust. Evolution of my TypeScript Minecraft clones into a performant, multiplayer-focused implementation."
tags:
[
"rust",
"voxel",
"multiplayer",
"client-server",
"graphics",
"networking",
"typescript",
"wasm",
"threejs",
"glsl",
]
---

# RSMC

RSMC is a multi threaded, blazingly fast, multiplayer voxel engine with a strict Client Server architecture. It is primarily a learning project to properly understand the Rust Programming language, its ecosystem and its constraints.

## Project Evolution

This is probably the project I spent most of my free time on. There have been many iterations:

- **[Minecraft Clone](https://github.com/cb341/minecraft-clone)**: Simple infinite terrain, hacky, chaotic code written in JavaScript
- **[TS-MC](https://github.com/cb341/ts-mc)**: A rewrite of Minecraft Clone in TypeScript, better code structure, functional hotbar, water, sand physics, hacky collisions
- **[TSMC2](https://github.com/cb341/tsmc2)**: A more sophisticated codebase in TypeScript, multithreading with Webworkers, custom shaders with GLSL, better defined workflow with Pull Requests, attempt at integrating rust with WASM to improve terrain generation performance
- **[RSMC](https://github.com/cb341/rsmc)**: A Minecraft clone written entirely in Rust, with focus on Multiplayer and performance

I once heard that beginner projects in Rust include writing a calculator, a browser, or an operating system. So as a first project I decided to build a multi threaded voxel engine.

The code should be taken with a grain of salt. Apart from Advent of Code, this is my first Rust project. An LLM would almost certainly write cleaner code, but generating solutions is not how I learn. I like my _old fashioned_ paperback copy of [the Rust programming language](https://nostarch.com/rust-programming-language-3rd-edition).

The project is heavily developed through pull requests. Most features are documented there with sequence diagrams, screencasts and design notes. If you are interested in the technical details, feel free to dig through the PR history.

Make sure to check out [the blog post](/blog/exploring-rust) for more details about the rust project.

Repository: [https://github.com/cb341/rsmc](https://github.com/cb341/rsmc)

## Features

### Terrain Generation

Perlin based 3D noise terrain generation using a density function with layered noise for mountains, caves, and varied landscapes.

![Perlin noise layers used for 3D terrain generation showing density function visualization](../../assets/projects/rsmc/perlin_layers.webp)

### World Features

- Simple cave generation
- Terrain modification placing and removing blocks
- Tree generation with procedural placement
- Basic collision handling

![Procedurally generated trees scattered across the terrain](../../assets/projects/rsmc/trees.webp)

### Rendering & Graphics

- Custom occlusion based geometry builder
- Efficient chunk meshing with face culling
- Multithreaded terrain generation and meshing pipeline inspired by learnings from Zurich School of Engineering

![Close-up of voxel geometry showing custom occlusion and rendering](../../assets/projects/rsmc/grass_closeup.webp)

### Networking & Multiplayer

- Hybrid UDP / TCP client server communication
- Custom serialization and chunk compression
- In game chat with graphical user interface
- Extensive debug and visualization feature flags

![In-game chat interface showing multiplayer communication](../../assets/projects/rsmc/chat.webp)

## Development

The project is built with a focus on learning Rust's ownership system, concurrency patterns, and performance optimization. Early development included building the network layer with Renet for client-server communication.

![Early stage of development in RSMC. Renet visualiser for simultaneous client/server connections.](../../assets/blog/rsmc-early-development.webp)
18 changes: 0 additions & 18 deletions src/content/projects/tsmc2.md

This file was deleted.

6 changes: 3 additions & 3 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ const structuredData = {

<header role="banner">
<h1>
<center
><NavLink href="/" aria-label="CB341.DEV - Home">CB341.DEV</NavLink
></center>
<center>
<NavLink href="/" aria-label="CB341.DEV - Home">CB341.DEV</NavLink>
</center>
</h1>
<nav role="navigation" aria-label="Main navigation">
<center>
Expand Down