I’ve got to a place with my Yarg-Lang project that I want to start talking about it with others.
- r/Programming Languages: (Post on: ‘May 2025 what are you working on thread‘
- Threads: What I’ve been up to recently
I’ve got to a place with my Yarg-Lang project that I want to start talking about it with others.
After some initial experiments, I’m putting a lot of time into a project that I hope to develop into a practical language. Yarg-Lang is an attempt to create a dynamic language that explicitly targets microcontrollers.
I find microcontroller software development both satisfying and frustrating by equal measure. Satisfying in that there is often a direct connection to a problem someone needs solving, and frustrating because the technology can sometimes feel surprisingly archaic or limited. Much of my software is written in C, which I feel show’s it’s age when I have to think about starting a project in it. I often find there is a lot of boilerplate that more recent languages allow me to skip. More recently, I also have used Micropython (or CircuitPython). It is very rewarding to iterate in a dynamic language, and one that takes care of some tasks for me, like memory management.
On the other hand, MicroPython can feel like a bit of a tease – when I want to re-use some python library, it may depend on features not present in Micropython, or use algorithms that assume they will run on a general purpose computer with many orders of magnitude more memory and CPU power. Sometimes the practical next step (deploying conveniently, or adding some particular hardware) needs work in C, and knowledge of the low level details of the python implementation.
It was an ‘aha’ moment to realise that a recent microcontroller has more than enough RAM and CPU cycles to spend a few on tasks like interpreting code and running a garbage collector. Something like the RP2040 has a ~100Mhz 32bit ARM, and over 250K of RAM, and can be sold on a $4 development board. It seems reasonable to expend some of those resources supporting the software applying itself to the problem at hand.
Yarg-lang is an attempt to explore a set of questions: What if there was a dynamic language that was specialised for Microprocessors? Could it support hardware directly in the language, without needing C extensions, or knowledge of the language implementation? Could it develop an ecosystem of libraries that sit well on smaller systems? Could it support language features like coroutines and memory management on a microprocessor device?
This feels like the start of an interesting journey!
For the last competition in the 24/25 GPC season, the theme was ‘Street’. Here’s an entry I made:
Taken on the south bank using a phone, this was lightly processed in Lightroom to square up the verticals and horizontals.