RSSAmplifier

Blog

Tristan Penman's Blog

A blog about the fun parts of programming. I write about C++ and Ruby, retro game development, and occassionaly dabble in algorithms and data structures.

tristanpenman.comRSS feed ↗10 posts

Latest posts

Robotics in Go: Building a Raspberry Pi Rover

When we consider programming languages for robotics, those that come to mind often include established players such as C and C++, Python, or even those specifically designed for scientific and numerical computing, such as MATLAB. In this post, we look at Go as a viable programming language for robotics. This post builds upon content I presented at the Melbourne Go Meetup on May 14, 2026. My talk…

Machine Translation at the Edge: Part 2

In the previous post , we introduced the machine translation problem and worked through the fundamentals of the MarianNMT framework. For this installment, we’ve set ourselves a goal to port Marian to the Rockchip NPU. More precisely, we want to download a pretrained MarianMT model from Hugging Face, convert it to Rockchip’s RKNN format, then perform inference directly on the Rockchip NPU - all…

Machine Translation at the Edge: Part 1

This is my third post exploring Edge AI, with a focus on the Rockchip RK3588 NPU. This post dives into Machine Translation, a Natural Language Processing task that has traditionally been associated with Cloud AI services. With advances in Edge AI hardware, model architectures and distillation techniques, it is now feasible to perform Neural Machine Translation directly on an embedded device. The…

Tiny Language Models

This post continues on the theme of Edge AI. We previously covered the basics of Edge AI and the practicalities of running YOLO, an Object Detection algorithm, on the Rockchip NPU. In this post, we’ll look at the history and scaling challenges of Large Language Models and what it means to train and deploy a tiny language model. Although there is an example for the Khadas Edge2 at the end, the…

Edge AI using the Rockchip NPU

Ever wondered what it takes to run real-time object detection and face recognition on a tiny device, without the cloud? I’ve been exploring this recently, while testing the limits of the Khadas Edge2 . Powered by a Rockchip RK3588 processor - with a built in neural processing unit - this little Edge AI device packs quite a punch. And it’s all neatly packaged for consumers and hobbyists alike. This…

Chromecast Device Authentication

Just recently, there was a high profile Chromecast outage, affecting second generation (Chromecast 2) devices. This happened because The Chromecast 2’s device authentication certificate has expired . This gave me an excuse to revisit some older content that I never got around to publishing, about how one can spoof the Device Authentication process - the same process that failed here. My initial…

Roll Your Own Ruby Type Checking: Part 3

In parts one and two of this series, we built a basic runtime type checker for Ruby. The design of our type checker is heavily inspired by Sorbet. So much so that we run up against some of the same limitations as Sorbet. This post focuses on one of those limitations - the inability to perform type checks on parameters with default values. To better understand this, we’ll look at several examples…

Roll Your Own Ruby Type Checking: Part 2

In my last post on Ruby Type Checking, we looked at how metaprogramming could be used to implement an annotation-style syntax in Ruby. We then leveraged these techniques to build a simple runtime type checker, heaviliy inspired by Sorbet . Unfortunately, our type checker is woefully incomplete. In this post, we take another step towards making it useful. The code for this post can be found in my…

Porting Asteroids to the Nintendo 64

It was during Melbourne’s record-breaking 2020 lockdown that I rediscovered my interest in retro console development. While I had previously dabbled in homebrew for consoles from the 16-bit era, it was now the later generation consoles, such as the Nintendo 64 and SEGA Dreamcast, that caught my interest. These consoles represented the earliest days of the 3D era, each with their own quirks. This…

Roll Your Own Ruby Type Checking: Part 1

Last Updated: 10 April 2023 Earlier this year, I was talking with a colleague about Sorbet and other type checking features that are available for Ruby. Although we were with familiar with usage of gradual typing in other languages such as TypeScript and Python, neither of us really knew how this would work under the hood. This post begins with an example from the Sorbet documentation, and builds…