From 1c42acca2491769a261de87be4904ba12ae5637e Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Wed, 27 Aug 2025 09:39:20 -0400 Subject: . --- projects/autograd.html | 104 +++++++++++++++++++++++++++++ projects/bubbl.html | 94 +++++++++++++++++++++++++++ projects/chip8emu.html | 94 +++++++++++++++++++++++++++ projects/index.html | 117 +++++++++++++++++++++++++++++++++ projects/msg.html | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 582 insertions(+) create mode 100644 projects/autograd.html create mode 100644 projects/bubbl.html create mode 100644 projects/chip8emu.html create mode 100644 projects/index.html create mode 100644 projects/msg.html (limited to 'projects') diff --git a/projects/autograd.html b/projects/autograd.html new file mode 100644 index 0000000..4fe4ae0 --- /dev/null +++ b/projects/autograd.html @@ -0,0 +1,104 @@ + + + + + + + + + + Autograd | COMPROMYSE + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+

Autograd

+
+

An implementation of autograd / backpropagation.

+
Python
+
+ + SOURCE +
+ +
+

All you need to run a simple neural network using autograd is the following code:

+ +

The code defines a data set X, expected output (or ground truth) y. It then trains the neural network by performing backward propagation (.backward()), then applies the calculated gradients through .optimise() along with a learning rate of 0.01.

+ +

from src.nn import MLP
+from src.loss import mse
+
+X = [
+    [ 0.0, 1.0, 2.0 ],
+    [ 2.0, 1.0, 0.0 ],
+    [ 2.0, 2.0, 2.0 ],
+    [ 3.0, 3.0, 3.0 ]
+]
+
+y = [ 1.0, -1.0, 1.0, -1.0 ]
+n = MLP(3, [ 4, 4, 1 ])
+
+for i in range(400):
+    pred = [ n(x) for x in X ]
+    loss = mse(y, pred)
+    loss.zero_grad()
+    loss.backward()
+    n.optimise(0.01)
+
+print(pred)
+
+

+ +
+ +
+
+
+

The Quieter You Become, The More You Are Able To Hear.

+
+
+ + +
+ + + + diff --git a/projects/bubbl.html b/projects/bubbl.html new file mode 100644 index 0000000..0ead19a --- /dev/null +++ b/projects/bubbl.html @@ -0,0 +1,94 @@ + + + + + + + + + + BUBBL | COMPROMYSE + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+

BUBBL

+
+

An Operating System for The x86 Architecture.

+
C / C++ / ASM
+
+ + SOURCE +
+ +
+

Building

+ +

Dependencies: Nix with flakes enabled and (optionally) direnv

+ +

After entering the devshell (with direnv or nix develop),

+ +

mkdir build && cd build
+cmake -G Ninja ..
+ninja
+
+

+ +

Running

+ +

ninja run # or run-headless or run-gdb
+
+

+ +
+ +
+
+
+

The Quieter You Become, The More You Are Able To Hear.

+
+
+ + +
+ + + + diff --git a/projects/chip8emu.html b/projects/chip8emu.html new file mode 100644 index 0000000..7e0aab0 --- /dev/null +++ b/projects/chip8emu.html @@ -0,0 +1,94 @@ + + + + + + + + + + CHIP8Emu | COMPROMYSE + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+

CHIP8Emu

+
+

An Emulator/Interpreter for CHIP-8.

+
C++
+
+ + SOURCE +
+ +
+

+ +

About The Project

+ +

CHIP8Emu is an emulator for the 1977 interpreter CHIP-8 written in C++. It aims to make games designed for the same playable on modern hardware.

+ +

Compilation & Usage

+ +

For compilation, you need Clang, CMake, GNUMake, and SDL2. With them installed, run the following. +

mkdir build; cd build
+cmake ..
+make
+
+Replace [scale] with your preferred display scaling, [delay] with the your preferred delay, and [ROM] with the path to the game you intend to play. +
./chip8emu [scale] [delay] [ROM]
+
+

+ +
+ +
+
+
+

The Quieter You Become, The More You Are Able To Hear.

+
+
+ + +
+ + + + diff --git a/projects/index.html b/projects/index.html new file mode 100644 index 0000000..4696f4b --- /dev/null +++ b/projects/index.html @@ -0,0 +1,117 @@ + + + + + + + + + + PROJECTS | COMPROMYSE + + + + + + + + + + + + + + +
+ + + + + + +
+
+

The Quieter You Become, The More You Are Able To Hear.

+
+
+ + +
+ + + + diff --git a/projects/msg.html b/projects/msg.html new file mode 100644 index 0000000..3b30c62 --- /dev/null +++ b/projects/msg.html @@ -0,0 +1,173 @@ + + + + + + + + + + MSG | COMPROMYSE + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+

MSG

+
+

An incredibly opinionated, hackable, minimal Static Site Generator.

+
C
+
+ + SOURCE +
+ +
+

See github.com/compromyse/compromyse.xyz for an example site.

+ +

Compilation & Usage

+ +

# REQUIREMENTS: CMake, Git, GCC/Clang, GNUMake/Ninja
+$ git clone https://github.com/compromyse/msg
+$ mkdir build && cd build
+$ cmake ..
+$ make # or ninja
+$ ./msg -h
+msg: The Minimal Static Site Generator
+
+Usage: ./msg [-h] [-w] [-v] [-o <output>] <directory>
+        -h         : Help
+        -w         : Watch working directory for changes
+        -v         : Verbose
+        -o <output>: Output directory
+        <directory>: Working directory
+
+

+ +

Site Structure

+ +

.
+├── assets
+│   └── me.webp
+├── config.cfg
+├── index.html
+├── partials
+│   ├── footer.html
+│   ├── navbar.html
+├── projects.html
+└── templates
+    └── base.html
+
+

+ +

Features

+ +

Includes - include files from /partials

+ +

<!-- index.html -->
+<html>
+  <body>
+    {{ include "navbar.html" }}
+    ...
+  </body>
+</html>
+
+

+ +

Contentfor - define content for templates

+ +

<!-- templates/base.html -->
+<html>
+  <head>
+    {{ content "head" }}
+  </head>
+  <body>
+    {{ body }}
+  </body>
+</html>
+
+<!-- index.html -->
+{{ contentfor "head" }}
+<title>HOME</title>
+{{ endcontent }}
+
+<p>...</p>
+
+

+ +

Eachdo - iterate over resources

+ +

<!-- projects/xyz.html -->
+title = XYZ
+---
+
+<h1>XYZ!</h1>
+
+<!-- index.html -->
+{{ eachdo resources.projects }}
+<p>{{ put title }}</p>
+{{ endeachdo }}
+
+

+ +

Template - specify template for page

+ +

<!-- projects/xyz.html -->
+template = base_tailwind.html
+---
+
+<h1 class="p-2">XYZ!</h1>
+
+

+ +
+ +
+ + + +
+ + + + -- cgit v1.2.3