Announcing racket-kafka

For the past month or so, I've been working on implementing a pure-Racket client for Apache Kafka. Yesterday, it reached a point where it can do the bare minimum you would expect from it: produce data and join consumer groups to consume data. Kafka has a fairly large feature-set … | Continue reading


@defn.io | 2 years ago

Parallelizing the Racket Web Server

Racket provides support for concurrency via lightweight threads, whichthe web server leverages to handle requests, spawning one such threadper incoming request. At the runtime level, these threads runconcurrently but not in parallel (i.e., only one thread is active atany one tim … | Continue reading


@defn.io | 2 years ago

Parallelizing the Racket Web Server

Racket provides support for concurrency via lightweight threads, which the web server leverages to handle requests, spawning one such thread per incoming request. At the runtime level, these threads run concurrently but not in parallel (i.e., only one thread is active at any one … | Continue reading


@defn.io | 2 years ago

LISP GUI Examples

I recently ran across Matthew D. Miller’s “Survey of the State of GUI Programming in Lisp” series on implementing a small GUI application across various LISP implementations. The first article in that series uses racket/gui, so I figured I’d take a stab at porting that implementa … | Continue reading


@defn.io | 2 years ago

(eleventh RacketCon) talk: Declarative GUIs

Yesterday, I gave a talk about gui-easy at the eleventh RacketCon! You can find a recording of the talk on YouTube and a transcript below. Day two of the conference is starting in a little under a couple of hours so join us if you like! | Continue reading


@defn.io | 2 years ago

Declarative GUIs in Racket (GUI-easy-lib)

These past couple of months, I’ve been working on a library for building declarative GUIs in Racket. It’s called gui-easy and it works by wrapping racket/gui. See the examples directory to get an idea about how it’s meant to be used, or watch the demo below: The library is still … | Continue reading


@defn.io | 2 years ago

Announcing dbg

I recently started working on a remote debugging/monitoring tool for Racket programs. It comes with a TCP server for exposing debugging information, a client implementation, and a GUI that builds upon those two things. You run the server as part of your application and then conne … | Continue reading


@defn.io | 2 years ago

Improvements in koyo 0.9

Recently, Daniel Holtby improved the implementation of racket/rerequire, which, in turn, inspired me to improve koyo’s own code-reloading implementation. Version 0.9 (released today) no longer restarts the application process on every change and, instead, uses dynamic-rerequire t … | Continue reading


@defn.io | 2 years ago

Screencast: Writing a Resource Pool Library for Racket

After hacking on redis-lib for a bit on Sunday, I decided to write a general-purpose resource pooling library that I can re-use between it and http-easy and I recorded the process. You can check it out on YouTube:You can find the library on GitHub. One particularly interesting bi … | Continue reading


@defn.io | 3 years ago

Screencast: Building a Redis Session Store for Koyo

I decided to write a library for storing koyo sessions in Redis today and I recorded the process. If that sounds appealing, you can check it out on YouTube: | Continue reading


@defn.io | 3 years ago

Running Racket CS on iOS

A couple of weeks ago, I started working on getting Racket CS tocompile and run on iOS and, with a lot of guidance from Matthew Flatt,I managed to get it working (with some caveats). Thosechanges have now been merged, so I figured I’d write another oneof these guides while the i … | Continue reading


@defn.io | 3 years ago

neko.app

I was watching Systems with JT the other day and he demoed a hobby operating system called skiftOS. During the demo he ran one of the built-in apps called “neko” which looks like a clone of an old Windows “pet” program I remember from my childhood, also called “neko” (or “neko32” … | Continue reading


@defn.io | 3 years ago

Racketeering Gophers

Close enough.I’ve been working on a Wasm implementation in Racketfor the past couple of weeks and have recently reached a neatmilestone. | Continue reading


@defn.io | 3 years ago

Racket Web Development with Koyo

Inspired by Brian Adkins’ RacketCon talk from yesterday, I decided to record a screencast on what it’s like to write a little web application using my not-quite-a-web-framework, koyo. You can watch it over on YouTube and you can find the resulting code on GitHub. It’s unscripted … | Continue reading


@defn.io | 3 years ago

Deploying Racket Web Apps

Someone recently asked about how to deploy Racket web apps on the Racket Slack. The most common answers were install Racket on the target machine, then ship your code there or use Docker (basically a “portable” variant of option 1). I wanted to take a few minutes today and write … | Continue reading


@defn.io | 3 years ago

Announcing http-easy

Yesterday I released http-easy, a high-level HTTP client for Racket. I started working on it after getting annoyed at some of the code in my racket-sentry package. The same day I wrote that code, someone started a mailing list thread asking for a “practical” HTTP client so that s … | Continue reading


@defn.io | 3 years ago

Continuations in Racket's Web Server

In The Missing Guide to Racket’s Web Server, I said that dispatch/servlet is equivalent to:1 2 3 (lambda (start) (lambda (conn req) (output-response conn (start req)))) That was an oversimplification. It does apply its start argument to incoming requests and it does take care of … | Continue reading


@defn.io | 4 years ago

Using GitHub Actions to Test Racket Code (Revised)

A little over a year ago, I wrote about how you could use the GitHub’s new-at-the-time Actions feature to test Racket code. A lot has changed since then, including the release of a completely revamped version of GitHub Actions and so I thought it was time for an update.A Basic Pa … | Continue reading


@defn.io | 4 years ago

Announcing racksnaps

Racket’s package manager doesn’t currently have the notion of locking package sets to specific versions1 per project so, as someone who operates a couple production Racket applications, I’ve been concerned about the possibility that new deployments could introduce bugs in product … | Continue reading


@defn.io | 4 years ago

Converting byte arrays to UUIDs in Postgres

For a project that I’m working on, I have a custom flake id spec that allows me to generate unique, sortable identifiers across computers without any sort of synchronization. The ids themselves can be encoded down to 16 bytes and I wanted to store them in Postgres. A good way to … | Continue reading


@defn.io | 4 years ago

Testing a Web API using rackcheck

Yesterday, I announced rackcheck, my new property-based testing library for Racket and I wanted to do a quick dive into one of the examples in the rackcheck repo where a simple web API is integration tested using PBT.You can find the full example here.The app being tested is a si … | Continue reading


@defn.io | 4 years ago

Announcing rackcheck

I’ve been playing around with property-based testing in Racket this past week. I started by forking the existing quickcheck library to try and add support for shrinking, but I quickly realized that I’d have to make a number of breaking changes to get it to work the way I wanted s … | Continue reading


@defn.io | 4 years ago

The Missing Guide to Racket's Web Server

Racket's built-in web-server package is great, but parts of it are low-level enough that it can be confusing to people who are new to the language. In this post, I'm going to try to clear up some of that confusion by providing some definitions and examples for things beginners mi … | Continue reading


@defn.io | 4 years ago

Announcing Try Racket

I’d been meaning to play with Racket’s built-in sandboxing capabilities for a while so yesterday I sat down and made Try Racket. It’s a web app that lets you type in Racket code and run it. The code you run is tied to your session and each session is allocated up to 60 seconds of … | Continue reading


@defn.io | 4 years ago

Running Racket BC on iOS

As of 2021-01-18, it is possible to run Racket CS on iOS./u/myfreeweb pointed out to me in a lobste.rs thread yesterday that Racket compiles just fine on aarch64 and that led me down a rabbit hole trying to get Racket running inside an iOS application. I finally succeeded so I fi … | Continue reading


@defn.io | 4 years ago

Native Applications with Racket

A couple of days ago, I released a native macOS application called Remember. It is a small, keyboard-driven application for stashing away notes/reminders for later. One of the cool things about it from a programming nerd perspective is that, while it is a completely native Cocoa … | Continue reading


@defn.io | 4 years ago

Announcing Remember for macOS

I’ve been using org-mode capture templates for years and I’ve always wished I had something like that for the whole system. I took advantage of the holiday break to build Remember, a little reminders application with Spotlight-like UX. It’s available on Gumroad and you can pay wh … | Continue reading


@defn.io | 4 years ago

Announcing setup-racket

GitHub Actions are going to become generally-available next week so I created an action for installing Racket. You can find it on the marketplace. Here’s what a minimal CI configuration for a Racket package might look like: | Continue reading


@defn.io | 4 years ago

Announcing nemea

I just open sourced one of the very first Racket code bases I’ve worked on. The project is called nemea and it’s a tiny, privacy-preserving, website analytics tracker. It doesn’t do anything fancy, but it does enough for my needs and, possibly, yours too so check it out! | Continue reading


@defn.io | 4 years ago

Announcing redis-rkt

Another Racket thing! redis-rkt is a new Redis client for Racket that I’ve been working on these past few weeks. Compared to the existing redis and rackdis packages, it: is fully documented, is safer due to strict use of contracts, is faster, supports more commands and its API tr … | Continue reading


@defn.io | 4 years ago

Announcing chief

I made a new Racket thing today! chief is a port of a subset of foreman’s functionality to Racket. It lets you run sets of processes together based on a Procfile. If that sounds useful to you, do check it out! | Continue reading


@defn.io | 4 years ago

Generators from Scratch

Generators in Python One of the nice things about Python is that it comes with in-built support for “generators”, functions that can suspend themselves and be resumed in the middle of processing. Here’s a generator that produces the fibonacci series:def fib(): x … | Continue reading


@defn.io | 4 years ago

Racket for E-Commerce

I had originally shared a version of this post with a small, private mailing list, but then I figured there’d be no harm in sharing it with a larger audience so here it is.My girlfriend and I recently launched matchacha.ro, a small e-commerce site selling Japanese green tea … | Continue reading


@defn.io | 4 years ago

Announcing deta

I just released the first version of deta, a Racket library for mapping between database tables and structs. A bit like Elixir’s Ecto. You can install it from the package server with: raco pkg install deta Check it out! | Continue reading


@defn.io | 4 years ago

Announcing racket-sentry

I just released the first version of sentry, a Racket library that lets you capture exceptions using the Sentry API. | Continue reading


@defn.io | 4 years ago

Racket/GUI Saves the Day

Yesterday, I bought an icon pack containing over 3,000 (!) SVG files and macOS utterly failed me when I tried to search the unarchived folder.So I did what any self-respecting Racketeer would do. I used this as an excuse to play around with Racket’s built-in GUI library! | Continue reading


@defn.io | 4 years ago

Announcing marionette

I just released the first version of marionette (named after the protocol it implements), a Racket library that lets you remotely control the Firefox web browser. Think “puppeteer”, but for Firefox. | Continue reading


@defn.io | 4 years ago

Using GitHub Actions to Test Racket Code

This article is outdated as of 2020/05/05 because it refers to theprevious implementation of GitHub Actions. I’ve put together a revisedversion at Using GitHub Actions to Test Racket Code (Revsied) so youshould read that instead.Like Alex Harsányi, I’ve been looking for a good,f … | Continue reading


@defn.io | 5 years ago

The Problem with SSH Agent Forwarding

After hacking the matrix.org website today, the hacker opened a series of GitHub issues mentioning the flaws he discovered. In one of those issues, he mentions that “complete compromise could have been avoided if developers were prohibited from using [SSH agent forwarding]“.Here’ … | Continue reading


@defn.io | 5 years ago

Continuations for Web Development

One of the distinguishing features of Racket’s built-in web-server is that it supports the use of continuations in a web context. This is a feature I’ve only ever seen in Smalltalk’s Seaside before, though Racket’s version is more powerful.I’ve been leveraging continuations in an … | Continue reading


@defn.io | 5 years ago

Google Groups Without Google Accounts

It turns out that when you delete your Google accounts, Google unsubscribes you from any (public and private) Google Groups you’re a member of. I found out about this only because my inbox traffic these past couple of days felt unusually light so I went and looked at racket-users … | Continue reading


@defn.io | 5 years ago

Bye, Bye, Google

I spent this past weekend de-Google-ifying my life and, despite my expectations, it wasn’t too hard to do. I started by moving all of my websites off of Google App Engine and onto a dedicated box that I had already owned. That was straightforward enough. Next, I removed any Googl … | Continue reading


@defn.io | 5 years ago

Announcing north

A couple of days ago, I released north, a database schema migration tool written in Racket. It currently supports PostgreSQL and SQLite, but new adapters are extremely easy to add and my main reason for building it was because I wanted not only a CLI utility but also programmatic … | Continue reading


@defn.io | 5 years ago

Announcing forms

Today marks the first public release of forms, a Racket library for web form validation. Racket’s formlets module from the standard library already does something similar, but, unfortunately, it lacks any facilities for easily showing validation errors to end users which is a big … | Continue reading


@defn.io | 5 years ago

Try Firefox

Since Microsoft officially announced that they will switch Edge’s rendering engine to Chromium, many people have written about how this poses a danger to the future of the web. I’m not going to repeat those same arguments, as I feel others have done a good job of it. What I want … | Continue reading


@defn.io | 5 years ago

Advent of Racket 2018

I decided to do this year’s Advent of Code in Racket and stream the whole thing. We’ll see how far I make it (getting up this early is rough!), but so far I finished day one. The code is here and the playlist for the recordings is here. If you want to get notified as soon as I ju … | Continue reading


@defn.io | 5 years ago

Announcing geoip

I released geoip today. It’s a Racket library for working with MaxMind’s geolocation databases. It’s got a tiny API surface (3 functions!), but it should be useful to anyone needing to do geolocation in Racket. As always, check it out and let me know what you think! BTW, I stream … | Continue reading


@defn.io | 5 years ago

Playing with Racket

I’ve been playing around with Racket every chance I got since early September of this year. This post is going to serve as a sort of experience report of my foray into Racket so far.Things I Like Editor Support Greg Hendershott’s racket-mode for emacs has been wonderful to work w … | Continue reading


@defn.io | 5 years ago