My Winter NLP Journey

The Gradient That Changed Everything It’s almost coincidental. On the Christmas Eve this year, I came across a math problem asking me to compute the partial derivatives of Word2Vec’s naive softmax loss — standard fare for any NLP course. But something compelled me to keep going, to really understand what these update rules were doing. The result was deceptively simple: $$ \frac{\partial J}{\partial v_c} = -u_o + \sum_{w\in V} \Pr[w|c] \, u_w = U(\hat{y} - y) $$What struck me wasn’t the math itself albeit it’s elegant but straightforward. What caught my attention was the structure of the learning process. What this math formulation suggests is that updating the center word vector $v_c$ requires knowing the current state of all context vectors $U$. But updating $U$ requires knowing $v_c$ (illustrated by partial derivative regarding $U$–the other piece of the puzzle). This chicken-and-egg dependency — where each parameter set treats the other as temporarily fixed — reminds us of Expectation-Maximization algorithms. It isn’t EM in the formal sense, but the alternating dependence—treating one parameter block as fixed while updating the other—shares the same structural intuition. ...

December 27, 2025 · 20 min · Sae-Hwan Park

Post-mortem on Cloudflare Outage on Nov 2025: When a Single Assumption Went Global

An FP Practitioner’s Perspective on the Cloudflare Feature-File Outage Disclaimer: I am not affiliated with Cloudflare. This analysis is based entirely on publicly available incident reports and technical discussions. The architectural reconstructions and code examples represent my educated interpretation of what likely occurred, informed by functional programming principles and my own experience with similar failure modes. Where I speculate beyond published details, I have tried to make those inferences explicit. ...

December 19, 2025 · 20 min · Sae-Hwan Park

AoC 2025 Final Reflection: Serious FP Journey

The Final Commit For the first time since Advent of Code began, the event ends on 12 Dec 2025 instead of on Christmas Day. Twelve days instead of twenty-five. My final solution—Day 12’s NP-hard tiling problem—took over 15 seconds to run, a humbling reminder that not every problem yields to elegance. But it works, and that’s what matters. The shortened 12-day format changed the rhythm entirely: less time to “warm up,” less room for recovery, and far more emphasis on momentum and clarity of thought. In that sustained sprint, F# didn’t just “work”—it got out of the way. Looking back at my commit history, I wrote less code this year than in 2024, but I enjoyed it more. ...

December 14, 2025 · 9 min · Sae-Hwan Park

AoC 2025 Midpoint Review: How F# Clicks For Me

We are at the halfway mark of this year’s shortened 12-day Advent of Code. As I wrote three weeks ago, I decided to run an experiment: I abandoned my usual comfortable tool (Python) and my previous “challenge” tool (Rust) to solve everything personal in F#. In 2023 and 2024, I solved AoC in Rust. I treated it as a software engineering exercise: structured projects, cargo run --example dayXX, and strict memory discipline. ...

December 6, 2025 · 5 min · Sae-Hwan Park

Working Toward Robustness (F# c-MLE Project Part 2)

How a lucky random number sequence hid a huge error until I tested on different platform — and what it taught me about production numerical code Days ago I wrote about implementing c-MLE in F# as my first substantial project in the language. The code worked. Tests passed. The optimizer converged to reasonable parameter estimates with violations driven to machine precision. Then I whimsically tested it on my M1 Max. Same code. Same seed. Same data. The estimated parameter was off by 38%. ...

November 23, 2025 · 13 min · Sae-Hwan Park

My First F# Project: Implementing Constrained Optimization from Scratch

One week ago, I wrote about why I’m learning F# — a language I may never use professionally, but one I believe will change how I think in the languages I do use. The thesis was simple: F# might be the sweet spot for researchers who need readable, concise, and safe code without paying Rust’s memory-management tax or Haskell’s conceptual overhead. That was nearly weakly-educated speculation. This is what happened when I tried to prove it. ...

November 21, 2025 · 18 min · Sae-Hwan Park

Why I'm Learning F# (And Why It May Matter For You Data Scientists)

There’s something strange about learning a programming language you may never use professionally. When I tell people I’m learning F#, the responses are almost predictable: Are you switching careers? Is your team moving to .NET? No. I still work in population and behavioral health research as a data scientist and numerical programmer, where Python dominates and Rust handles the performance-critical parts of our pipeline. F# is unlikely to appear in production systems at my job. ...

November 14, 2025 · 9 min · Sae-Hwan Park

Functional Programming in Python

I confess gave up on Haskell about ten years ago. It wasn’t for lack of trying. I had spent months wrestling with type classes, drowning in monad transformers, and debugging cryptic compiler errors that felt more like philosophical riddles than helpful feedback. The promise of pure functional programming (FP) was intoxicating – bulletproof correctness, elegant abstractions, programs that composed like mathematical proofs. But the reality was different. The learning curve was steep, the tooling was sparse, and most importantly, I couldn’t use it professionally. Try convincing a team to rewrite a production system in Haskell. Try hiring engineers who know it. Try getting management approval for a language most people have never heard of. ...

November 8, 2025 · 17 min · Sae-Hwan Park

Why BRR Works: Deep Dive Into Hadamard Matrix

Source: https://mathworld.wolfram.com/HadamardMatrix.html Going Deeper: The Mathematical Engine Behind BRR In our previous posts on Balanced Repeated Replication (BRR) and Fay’s method, we explored how these techniques solve the variance estimation problem in complex surveys. We saw the elegant result: create a set of replicate weights, recompute your statistics using each replicate, and combine the results to get variance estimates that properly account for the survey design. But we left something crucial as a black box: how exactly are these replicates constructed? We said “use a Hadamard matrix” and moved on, focusing instead on the weighting schemes and the variance formulas. For many practitioners, that’s sufficient – major survey data providers like the Medicare Current Beneficiary Survey (MCBS), NHANES, and many state-level behavioral health surveys provide pre-computed replicate weights in their public use files. You load the data, use the supplied weights, trust the mathematics, get your standard errors. ...

October 31, 2025 · 30 min · Sae-Hwan Park

How I Learned Monads: Not Through Haskell But Through Rust

I approached learning monads in Haskell wrong and failed. Then I discovered I’d been using them in Rust all along without knowing. Introduction About a decade ago, I tried to learn Haskell. I was mesmerized by its elegance – the way types guided you toward correct programs, how pure functions composed so naturally, the terseness that still remained readable. I worked through A Gentle Introduction to Haskell, and everything made sense until I hit the chapter of monads. ...

October 25, 2025 · 17 min · Sae-Hwan Park