Posts

Refactoring Rust Code with ChatGPT o1

I wanted to use gpt-4o to refactor the code of the trie-hard crate that was featured on hacker news recently. I thought if I removed the enums from the library, I can better understand the simplified code and might be able to play with different trie implementations in rust. Then I woke up today and read the announcement for ChatGPT-o1, had the idea to compare ChatGPT-o1 with ChatGPT-4o on the task of doing this refactoring.

New project: GPUQuicklist.com

Here I am belatedly announcing a new project called GPUQuicklist.com. It is a site that lets the user quickly see the live prices for graphics cards they select. I created it about 6 months ago, but I thought I’d get around to writing up the motivation for creating it. Along with everyone else it seems, the release of OpenAIs chatgpt really got me interested in LLMs. Then came LLama from Meta (Facebook).

Archive.is Bookmarklet

Archive.is is a nifty service for reading pages that might be limited in the number of pages you can read per month. I often use it to read articles on Bloomberg or the NY Times for example. Here’s a handy bookmarklet that can allow you to read paywalled pages using archive.is (also known as archive.today). Note that I have code that removes all url parameters after the “?”. This is handy to remove all analytics parameters and other things that prevent the url from being found in the archive.

Extracting HN Book Recommendations with the ChatGPT API, Vol. II

This is a follow-on from the original blog post Extracting HN Book Recommendations with the ChatGPT API. Method used In the original post I didn’t describe the process used to arrive at the results. I originally had a much longer post with much discussion about the process, but it was too long and the structure was poor, so I rewrote it in a more concise form. In the process I excluded the explanatory stuff.

Extracting Hacker News Book Recommendations with the ChatGPT API

2023-10-12: I have written a followup with some details about the process used to generate this list: Extracting HN Book Recommendations with the ChatGPT API, Vol. II I love books and I enjoy reading through the Hacker News (HN) book recommendation threads. On HN, there’s almost 200 stories so far this year that have the separate word “book” in the title, and aren’t linked to another page. I wondered what the most commonly recommended or mention books are.

SIMD Within a Register (SWAR) on Strings in Go 1.20

To introduce SWAR (SIMD within-a-register) techniques in go, we’ll implement the simplest thing I can think of: checking if a string is ASCII. SWAR is the technique of operating over multiple datapoints within one register of the cpu. In our case one 64-bit variable will contain 8 bytes of our string so we can process 8 bytes at a time. We’ll do this in go without any C functions or assembly.

Which Consumer Computers Support AVX-512?

Update 2025-02-16: I’ll belatedly note that AMD’s Zen 4 and Zen 5 processors support AVX-512 instructions. So if your software makes use of it, then you’ll get a speed boost when processing large files on your PC. For the best throughput, AMDs desktop 9000 series (Zen 5) processors have a full-width 512-bit datapath for AVX-512 instructions, meaning they can process up to twice the instructions per clock for this type of instructions compared to Zen 4.

The Future of Autocompletion for Go, using Sublime Text 3

In which I describe a new editor tool for go programmers that implements the Language Server Protocol. I’m excited to have a tool that works with my editor of choice, Sublime Text 3, and is easy to install. Recently I tried installing some go tooling for Sublime Text 3, so I could get some auto-completion happening and get information about available functions. I tried installing goSublime, but found that there was no documentation on how to install it.

Installing the Hugo Blog software in WSL

I’m running Ubuntu 18.04 on WSL (Windows Sybsystem for Linux), and I want to run the hugo blogging software. I could have installed it in windows, but I thought the compatibility might be better in a linux environment. The version of Hugo that comes with Ubuntu, via sudo apt install hugo, is too old and doesn’t work with any of the themes I’ve tried. The easiest way to install hugo on ubuntu and get a recent version is to go to the hugo releases page at https://github.