I just did a fresh clone of my site for the first time in (probably) years. I’ve been using nix on my new system, so I was writing a flake to setup a development environment for the site with Hugo and Python. When I ran hugo serve, I saw all my content show up | EN -------------------+------ Pages | 528 Paginator pages | 20 Non-page files | 0 Static files | 173 Processed images | 0 Aliases | 53 Sitemaps | 1 Cleaned | 0 but when I went to load the local site at localhost:1313, I saw “Page Not Found”.
OpenAI popularized a pattern of streaming results from a backend API in realtime with ChatGPT. This approach is useful because the time a language model takes to run inference is often longer than what you want for an API call to feel snappy and fast. By streaming the results as they’re produced, the user can start reading them and the product experience doesn’t feel slow as a result. OpenAI has a nice example of how to use their client to stream results.
I tried out Deno for the first time. Deno bills itself as the most productive, secure, and performant JavaScript runtime for the modern programmer Given my experience with it so far, I think it may have a case. One thing I immediately appreciated about Deno was how quickly I could go from zero to running code. It’s one of the things I like about Python that has kept me coming back despite a number of other shortcomings.
Disclaimer: I am not a security expert or a security professional. I’ve tried out many new AI/LLM libraries in the past year. Many of these are written in Python. While trying out new and exciting software is a lot of fun, it’s also important to be mindful about what code you allow to run on your system. Even if code is open source, it’s still possible that the cool open source library you installed includes code like
Vercel has a library called ai, that is useful for building language model chat applications. I used it to help build Write Partner The library has two main components: A backend API that is called by a frontend app that streams language model responses A hook (in React) that provides access to the chat, its messages and an API to fetch completions When designing Write Partner, I started the chat session with the following messages
I started playing the NYTimes word game “Connections” recently, by the recommendation of a few friends. It has the type of freshness that Wordle lost for me a long time ago. After playing Connections for a few days, I wondered if an OpenAI language model could solve the game (the objective is to group the 16 words into 4 categories of 4 words). I tried with gpt-4-32k and gpt-4-1106-preview, tweaking prompts for a few hours and wasn’t able to make much progress.
Goku has a concept called a simlayer. A simlayer allows you to press any single key on the keyboard, then any second key while holding the first and trigger an arbitrary action as a result. I’m going to write a karabiner.edn config that opens Firefox when you press .+f. {:simlayers {:launch-mode {:key :period}}, :templates {:open-app "open -a \"%s\""}, :main [{:des "launch mode", :rules [:launch-mode [:f [:open-app "Firefox"]]]}]} ❯ goku Done! To start, we define a simlayer for the period key.
Karabiner is a keyboard customizer for macOS. I’ve used it for a while to map my caps lock key to cmd + ctrl + option + shift. This key combination is sometimes called a hyper key. With this keyboard override, I use other programs like Hammerspoon and Alfred to do things like toggle apps and open links. Karabiner provides an out-of-the-box, predefined rule to perform this complex modification. I’ve used this approach for a while but recently learned about Goku which adds a lot of additional functionality to Karabiner using Clojure’s extensible data notation (edn) to declaratively configure Karabiner.
I’ve starting playing around with Fireworks.ai to run inference using open source language models with an API. Fireworks’ product is the best I’ve come across for this use case. While Fireworks has their own client, I wanted to try and use the OpenAI Python SDK compatibility approach, since I have a lot of code that uses the OpenAI SDK. It looks like Fireworks’ documented approach no longer works since OpenAI published version 1.
At the beginning of 2023, I set some goals for myself. Here are those goals and how the year turned out. Learn a new word each week (50%) Clear and effective communication is important to me. My thought process was that I could improve as a communicator if I further developed my vocabulary. I also find it particularly satisfying to conjure the perfect word to describe a situation, experience, etc. Each Monday, I would find a new word and record it, it’s part of speech and definition in Obsidian.