Ron Evans is a Go developer who's best known for his work on Gobot, a popular library for controlling robotics/IoT devices from Go, and GoCV, a way to use OpenCV from Go.
He has recently become involved with the TinyGo project, an effort to build a Go compiler that can suitably target small scale devices, such as microcontrollers and popular microcontroller boards, and WebAssembly. We caught up with him to ask a few questions about this work.
You're well known for your work on Gobot. What got you into working with hardware with Go?
I've been using open source software/hardware like Arduino for quite a while, but I got serious in around 2009 with a series of Ruby powered blimps. When I discovered Go, the minimalism of the language and the way concurrency is treated as a first-class construct were appealing, and with Go being a compiled language it seemed a better fit for embedded Linux where resources are more limited.
What inspired your work on TinyGo?
I discovered the project last year (probably from your newsletter!) and it excited me because executing Go directly on microcontrollers seemed the last place that Go code couldn't run. I contacted the project founder Ayke Van Laatham and started to contribute. TinyGo has evolved quickly from an interesting experiment into a real "thing" and we're treating it that way with good development and governance practices. Contributors welcome (particularly on areas around our pain points with Go)!
Why do you feel Go is particularly well suited for low level working with hardware?
We're seeing high-level interpreted languages running on microcontrollers like Python and JavaScript, so it certainly seemed possible as Go is a true compiler, and the language itself is very minimal. The big leap that Ayke made was combining the Go compiler libraries with the LLVM compiler backend. The result of this is such highly optimized and fast code, that one of our demos is running a Go program on an 8-bit processor with 8K of RAM.