Starting a blog

I'm going to start writing here. Mostly short notes on what I'm building and reading: robotics and reinforcement learning at work, bits of neuroscience from class, and whatever I'm climbing or skiing on the weekend.

Posts will be irregular. If something here is wrong, or you've seen it done better, leave a comment. I'd rather be corrected than be quietly wrong.

How this blog works

The site is a handful of static pages on Vercel. Posts live in a small Blob store and are rendered on request, so there is no build step and nothing to redeploy when I write. I write them in Markdown from a locked page on the site, which means a post can be:

Each post has a one-line summary that shows up in the list and in link previews, a date, and a short address like /blog/starting-a-blog.

The reading list

There's also a reading list on this site. It's where I put the books, papers, articles and films I've read or watched, or mean to, with a line or two of notes. I keep it because I forget things: a paper I liked in March is gone from my head by June unless I wrote down what it was and why it mattered. The list is private, but anything on it that's worth sharing will get a post here.

Comments

Comments ask for your email once and send you a six-digit code, so that each comment comes from a real address. Your email is never shown. After that your browser is remembered for ninety days, and you can delete anything you've written from the same address.

Posts will be irregular, but I'll always answer comments on the current one.

Code

I'll paste code sometimes. Inline bits look like np.cumsum or BLOG_SECRET. Longer pieces get a block with the language and a copy button in the corner.

Something small from an RL experiment, in Python:

import numpy as np

def discounted_returns(rewards, gamma=0.99):
    out = np.zeros_like(rewards, dtype=float)
    running = 0.0
    for t in reversed(range(len(rewards))):
        running = rewards[t] + gamma * running
        out[t] = running
    return out

Some JavaScript, because the site itself is plain JavaScript and I'll probably write about building it:

// turn a title into the address a post lives at
export const slugify = s => s.toLowerCase().normalize('NFKD')
  .replace(/[̀-ͯ]/g, '')      // strip accents
  .replace(/[^a-z0-9]+/g, '-')          // runs of anything else become one dash
  .replace(/^-+|-+$/g, '')              // no dashes at the ends
  .slice(0, 80);

And the odd shell command, which is the kind of thing I most often want to copy:

openssl rand -hex 32

A block without a language is fine as well:

step 1: write the thing
step 2: be wrong in public
step 3: fix it

What's next

Probably a note on the climbing wall I'm building in the garage, and a write-up of a small RL result that took far longer than it should have.

One other thing, I added image functionality everywhere within the blog post, so they can be integrated to tell a story or lesson. For example, here is a photo of me on the summit of mount shasta:

27BDA714 BCF3 482A 8682 40611C344272 1 105 c

Thanks for reading. Say hello below.

Comments

    Loading…