Racketfest 2023 Talk: Native Apps with Racket

Racketfest 2023 was held yesterday and I gave a short talk about building native apps with Racket. Nothing new if you’ve read my recent posts, but below is a transcript. A recording might also be posted later, in which case I’ll update this post to link to it.

Announcing racket-protocol-buffers

A couple of releases back, I added support for schema registries to Franz. Some of its users use Protocol Buffers to serialize their data, so I needed to be able to support that use case. So, I wrote a parser for the proto2 and proto3 specs and a minimal serializer/deserializer implementation that doesn’t require code generation on top of that. You can find the package and docs on the Package server and the source on GitHub.

Safe Foreign Callouts from Racket to Swift

In anticipation of working on the Windows & Linux versions of Franz, I’ve wanted to move its auto-update implementation from Swift into Franz’ Racket core. The reason I implemented the auto-update code in Swift in the first place is because of the way the Swift part normally communicates with the Racket part: the core Racket code runs in its own thread and the Swift part communicates with it asynchronously via pipes. So, until a couple of days ago, I didn’t have an easy way for Racket code to trigger the execution of Swift code on its own.

All of the code that handles embedding Racket inside Swift, code generation and the general communication mechanism is open source and lives in Noise, so that’s where you can find the full implementation of the approach I describe in this post (specifically, commits 0a585be and 2f6c37e).

Announcing Franz

I’ve been using Apache Kafka for about a year now and I’ve wanted a desktop client from the beginning. I couldn’t find one I liked – the best I’ve found is Confluent’s Cloud UI, but that’s neither a desktop app, nor is it a great experience1 – so, a couple months ago I started building a native macOS GUI for Kafka in my spare time and, today, I’m proud to announce the first beta release of Franz.

#lang lua

I’m currently working on a macOS app that’s built with Racket and allows the user to write small scripts to process and filter some data. While Racket is definitely my preferred language and I could easily use it for these scripts, my target audience for this app would probably appreciate a more familiar language. I decided to use Lua. So, last weekend I was faced with a choice1 between writing FFI bindings for Lua or implementing a #lang in Racket.

Screencast: SwiftUI + Racket

I’ve been playing with embedding Racket CS in desktop apps off and on for a while and today I recorded a little screencast demoing some of the stuff I’ve been working on. Here it is on YouTube:

Announcing racket-crontab

Earlier this week, Jesse Alama brought up the topic of scheduling cron jobs with koyo and we both agreed that it would be nice if koyo had built-in support for that sort of thing. So, I wrote crontab, a little library for parsing cron-style schedules and executing code based on them. On top of that functionality, I’ve added a new koyo/crontab module to koyo that integrates with the component system.

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 so there’s a ton left to do, but I figure this is a good time to announce the library and get feedback.