I've updated play.tinygo.org to more accurately simulate hardware, and now also brought this feature to VS Code. But how does it work?
CGo is faster in TinyGo, here's how that works.
The int type is present in many programming languages, but their meaning varies. Unlike what many people think, it only indirectly related to pointer size or architecture word size.
The AVR architecture does not natively support arbitrary bit shifts. Therefore, compilers will have to be creative to make shifts short and fast. This post explores how a compiler could emit such constant shifts inline.
An explanation of how garbage collectors work including some pseudocode how a real GC could be implemented.
How ESP32/ESP8266 support got added to TinyGo, how we got there, and the current status of support.
Quick note to get started with debugging AVR programs in a simulator
What RGB really means, what sRGB and gamma are and how to correctly blend colors.
How to configure DMA on the SAMD21, for example to use it with SPI.
The TinyGo playground simulates real hardware, including an e-paper display. How can it do such things? This post explains a bit about how the playground works to make this possible.
A high-level overview of LLVM IR, showing how two simple Go functions can be translated to IR.
TinyGo uses LLVM coroutines to implement goroutines. This post explains what coroutines are and how they're used to implement goroutines.
How TinyGo implements Go interfaces in a radically different way, avoiding most memory allocations and reducing code size.
defer keyword in Go does much more than you might think, leading to performance issues in some cases. Why is this?
How to optimize code size for microcontrollers, including compiler options and lots of coding habits that produce smaller and often more efficient code.
Nordic BLE chips contain a proprietary SoftDevice implementing the BLE stack. In this post, I will explain how the MBR region works and how to write your own.
Using pvgrub2 on Debian is very easy, and there is a little bit of documentation on the 'net, but not enough to cover all needs. I had to do some workarounds to enable pvgrub2 with btrfs.
While STARTTLS has traditionally been very sensitive to downgrade attacks, there are now two protocols to fix this: DANE and MTA-STS. I will take a look at how they work and how they can be implemented on your own domain.
Explains how modern email authentication systems work together to protect the "from" header in email. This makes phishing detectable and spamming more difficult.
My experience with making a Python package and uploading it to PyPI. Sometimes, such systems aren't as sophisticated as one might expect.
A few tips on how to track how much you're addicted to your phone and how you can manage it. I give a short overview of how habits work. Then I describe how you can track how much you use your phone and give a few tips on breaking a few of those habits.
As I gave up on Rust (for now), I tried setting up the Arduino environment to work with the "blue pill" board. It turns out to be quite easy, although there were a few small issues with the setup. You'll still need a (cheap) SWD programmer, though.
How to write a simple Rust program for the STM32 "blue pill" board that's sold on AliExpress and Ebay for about $2. It turns out to be not too difficult.
How to use memory checking tools inside an Android recovery to detect things like buffer overflows. A recovery system like TWRP is quite different from a normal Android image, so the official guides apply only partially and it needs some manual work to make these tools work. Here's how I did it.
Use CCLoader to flash the official HM-10 firmware on a cheap Chinese JDY-08 device. Unfortunately, the process doesn't result in a working device, but at least I got somewhere.
A look at the JDY-08, a cheap BLE module found on the online Chinese markets. It works, but it turns out that it isn't really useful with the original firmware.
Concise version vectors is the algorithm behind DTSync. It is a distributed algorithm with low memory complexity, with barely any overhead of adding another replica.
A new bidirectional synchronization tool like Unison that can synchronize many distributed replicas
How to move an installed SD card from a Pi 1 to a Pi 3, or make it possible to use them both. There are a few tricks to get the network running on both devices.
How to install Debian on a Btrfs subvolume to easily make system snapshots.
Turn a plain HTTP web site served with nginx into one with HTTPS and SPDY support. Includes StartSSL, Postfix and OCSP stapling.
I have written a Go package for stateless authentication using HMAC. I believe this system is in practice just as secure as session IDs without having to store state on the server, making authentication a whole lot easier.
I discovered that the CSS pseudo-classes
:visited are mutually exclusive. This in contrast to what may seem more logical, that is, that
:link applies to all links.
I discovered a technique to prevent page jumping when navigating between short and long pages without showing the scroll bar all the time.