GeistHaus
log in · sign up

c0nrad's c0rner

Part of c0nrad.io

Recent content on c0nrad's c0rner

stories primary
RSC Flight Protocol

I’m currently building an app using Next.js ( dmarcdefender.io). I’m not sure how I feel about it (it being Next.JS, dmarcdefender is amazing). It’s both amazing and terrifying, seamlessly jumping between client-side and server-side code. I don’t really like magic, but it is nice having one single environment, one set of types, complete DRY across the client and server, and SSR/SSG for free.

Part of the magic is the Flight protocol. If you’ve ever inspected the network tab of a Next.js app, you’ve probably seen some gobbledygook:

https://blog.c0nrad.io/posts/rsc-flight-protocol/
Recursive Dns Resolver
Overview

Today’s project is to make yesterday’s stub resolver a recursive resolver. Specifically I want to start with the root.hints and go down the chain till I get the A record for c0nrad.io.

https://gist.github.com/c0nrad/8497352c18d27b93c67a530663335a55

Steps
  1. Ask D.ROOT-SERVERS.NET (NASA) for the NS record of .io
  2. Ask a0.nic.io for the NS of c0nrad.io
  3. Ask ns-1089.awsdns-08.org for the A record of c0nrad.io
Learnings / Refreshers
  • 13 DNS Root servers
    • On ubuntu, you can view the seed /usr/share/dns/root.hints
  • By default, no additional data when getting the .com gtld-servers.net servers because the message size is greater than 512 bytes.
    • I used the EDNS(0) OPT additional record to get 4092 bytes
  • In-Bailiwick vs. Out-of-Bailiwick
    • “Bail” owner, “wick” city? In-zone response
    • When querying a0.nic.io for NS of c0nrad.io, it returns ns-1089.awsdns-08.org, but no additional data with the A record of the NS. So you have to start a subquery.
    • When querying D.ROOT-SERVERS.NET for the NS, it’ll staple the A records in the additional data.
  • When working with an API that has you register callbacks (client.onmessage(callbck)), and you want a send(message) -> response API, you can wrap the api in a new Promise(resolve, reject)
https://blog.c0nrad.io/posts/recursive-dns-resolver/
DNS Stub Resolver

I realized I haven’t done much learning in a while ( https://dmarcdefender.io is my current project, but it’s just standard SaaS work). So I figured I might try to spend an hour or two each day learning something new.

Today’s project was building a super simple DNS resolver. The goal was just to resolve the A record for c0nrad.io into an IP address.

https://blog.c0nrad.io/posts/dns-client/
SWU Card Reader Neural Net P1

New project! Using AI to read SWU card aspects.

I just finished a coursera course on Deep Learning and Neural Networks so figured I’d try to do something with my newfound knowledge!

In this project I’ll be building some NN (Neural Networks) manually that will take in a Star Wars Unlimited card image and determine if “isHeroic”, “isVillainous”, and “isNeutral” by reading the aspects on the top left.

At this point I only know how to do binary classifiers… so yes or no questions. So this will be part 1, in the future I should be able to ask more interesting questions of the models like “Who is the artist”, “How many resources does this card cost”, “what are the traits”, etc.

https://blog.c0nrad.io/posts/swu-card-nn-p1/
SWU Health Counter

A new electronics project! It’s a simple circuit that just keeps track of base health for Star Wars Unlimited (SWU) trading card game. This was my first time making/ordering a PCB, and I learned a lot along the way.

Problem Statement

To keep track of your base health in SWU, people usually use little damage tokens (in increments of 1/3/5/10), or dice. But I don’t like these.

https://blog.c0nrad.io/posts/swu-health-counter/
Reasons to Not Be Hard on Yourself (CTFs)

Every once in a while I either get a Discord message or see a post about someone who is feeling down about not doing well on CTFs. To be honest, I also sometimes make the mistake of feeling down when I compare myself to others.

As we go into 2025, here are my opinions on why we both shouldn’t be too hard on ourselves.

1. CTFs are not “Real World” Security

https://blog.c0nrad.io/posts/be-kind-to-self/
Sim 6: Ising Model Pt. 1

We build out a simple Ising model simulator for future expansion.

https://blog.c0nrad.io/posts/ising-1/
Sim 4: Clebsch-Gordan Coefficients

This post covers a script I wrote for generating the clebsch-gordan coefficients by scratch.

https://blog.c0nrad.io/posts/clebsch-gordan/
Sim 3: Kepler Problems

We solve for the different types of orbits of the Kepler Problem (two body central force problems).

https://blog.c0nrad.io/posts/sim-3-kepler-problems/
Sim 2: Effective Potential

Plot the effective potential for the two body force simulation.

https://blog.c0nrad.io/posts/sim-2-effective-potential/
Sim 1: Two Body Central Force

Day one of building 99 simulations. We’ll reduce a problem that at first requires 6 parameters with coupling, to a problem with just 3 (or 2, depending on how you look at it) by exploiting the symmetry. “Nature does not care how we describe her”.

https://blog.c0nrad.io/posts/sim-1-two-body-central-force/
Slack LaTeX

I had fun building a new product with my partner called Slack LaTeX. It’s a slack app for embedding formatted equations (through LaTeX). This post covers some of the motivation and some of the fun technical architecture design decisions.

https://blog.c0nrad.io/posts/slack-latex/
Quantum Circuit Editor Pt. 1

Initial version of a quantum circuit editor.

https://blog.c0nrad.io/posts/quantum-circuit-editor/
Prime Walker

Another attempt at a factoring algorithm.

https://blog.c0nrad.io/posts/prime-walker/
Density Operators

This post covers my transition from using pure states to mixed states in my quantum simulator.

https://blog.c0nrad.io/posts/density-operators/
Mulbrute

QHack 2021 submission project, a tool for brute forcing quantum multiplication circuits.

https://blog.c0nrad.io/posts/mulbrute/
Plasma Leak

Plasma leak the game.

https://blog.c0nrad.io/posts/plasma-leak/
Thermoshat Pt. 3

Setting up a metrics endpoint for thermoshat.

https://blog.c0nrad.io/posts/thermoshat-3/
Thermoshat Pt. 2

Updates and finalizing the thermoshat project.

https://blog.c0nrad.io/posts/thermoshat-2/
Thermoshat Pt. 1

Introducing the thermoshat. A raspberry pi to adjust my manual thermostat with the added of thrill of increased fire danger.

https://blog.c0nrad.io/posts/thermoshat/
Feynman Diagram Editor Pt. 1

Starting a new project for validating Feynman diagrams.

https://blog.c0nrad.io/posts/feynman-diagrams/
Independent Study

Thinking out loud about my future.

https://blog.c0nrad.io/posts/independent-study/
Effective Nuclear Charge Calculations

A smaller project involving plotting ionization energy for different effective nuclear charge models.

https://blog.c0nrad.io/posts/enc/
EM Particle Motion

Simulating a particle under the influence. (Of electric and magnetic fields).

https://blog.c0nrad.io/posts/em-particle-motion/
Spherical Bug

Discussion of one of my longest living software bugs.

https://blog.c0nrad.io/posts/spherical-bug/
Scattering Angles

Calculating scattering angles from fully elastic spherical collision.

https://blog.c0nrad.io/posts/scattering-angles/
Hydrogen Spectral Diagram

Terminal application showing the spectral lines for electron transitions in hydrogen.

https://blog.c0nrad.io/posts/spectral/
Interference

Double Slit Interference Pattern demo.

https://blog.c0nrad.io/posts/interference/
Matrix Inversion

Some fun inverting matrixes.

https://blog.c0nrad.io/posts/mat-inv/
Vector Calculus

Progress on a vector calculus library in javascript.

https://blog.c0nrad.io/posts/vector-calculus/
Numerical Integration

Some exploration into numerical integration.

https://blog.c0nrad.io/posts/numerical-integration/
Numerical Differentiation

Some exploration into numerical differentiation.

https://blog.c0nrad.io/posts/numerical-differentiation/
Shor's Algorithm

Shor’s algorithm is probably the most well known quantum algorithm. But it turns out I didn’t understand it as well as I thought.

https://blog.c0nrad.io/posts/shors/
Quantum Teleportation Algorithm

This post is split into two parts. The first section is my motivation, and some background on the upgrades I made to my quantum simulator. The second part is implementing the Quantum Teleportation algorithm.

https://blog.c0nrad.io/posts/quantum-teleportation/
Florida

We moved to Florida! Made a little video.

https://blog.c0nrad.io/posts/florida/
Reflections on 6 months solo SaaS startup

It’s crazy to think my startup is already over 6 months old. This post is some informal reflections on that period.

https://blog.c0nrad.io/posts/reflections-6months/
GiNaC on Macos

A quick guide on getting started with GiNaC on macos.

https://blog.c0nrad.io/posts/ginac-on-macos/
Quantum Infinite Well

Calculating the stationary states of an electron in a quantum infinite well.

https://blog.c0nrad.io/posts/quantum-infinite-well/
Calculating Collisions

My attempt at calculating the resulting velocities of two spheres colliding in 3D.

https://blog.c0nrad.io/posts/calculating-collisions/