JS Test
This is an experiment with Javascript. Below should be a canvas with a red rectangle drawn in it. If you can see the rectangle then that means custom JS is working in this page.
This is an experiment with Javascript. Below should be a canvas with a red rectangle drawn in it. If you can see the rectangle then that means custom JS is working in this page.
I love HTML Canvas. I even wrote a book about it once. Canvas is good drawing API and it runs everywhere. However, despite the magic that is the Canvas API, it can still be tricky to use when it interacts with CSS. I often have people ask me how to make their canvas fill the screen, or resize with the window, or to have a fixed aspect ratio but still scale to fit inside the window without overlap. All of these require understanding some internal details about how Canvas works. So let’s dive in.
This post is written in plain HTML to verify mixed content support.
A diatribe in when I am greatly disappointed in my industry.
If you live on planet earth and you are at all connected to software you've probably tried out 'vibe coding', ie: using an AI tool to write software for you. As someone who's been writing software for close to four decades I've seen code automation tools come and go. Believe it or not, people used to talk about Visual Basic in the same breathless tones of today's vibe coding tools. The outcome has always been that the new tech never lives up to the hype but can be useful in some contexts. The tricky part is always figuring out what it's good at and what it isn't. I believe these AI tools will go the same way; but hey, maybe this time it's different. I can't talk about what I haven't experienced, so I tried experiments this week. Here's what I learned.
Layout is one of the hardest problems in UI toolkit design because there are so many different ways to design a layout. Creating a system that supports them all is practically impossible. Even creating a system that merely makes them all possible to implement (even if difficult) is a challenge. And making the layout fast is even harder. However, given that we are targeting embedded systems, rather than general purpose interfaces (ex: no resizable windows), we should be able to narrow down the scope to something usable. Let’s dig in.
This year's JS13K Entries.
As part of my ongoing research with embedded Rust on ESP32 devices, (starting with the T-Deck but eventually branching out to other devices), I started creating a simple reusable UI toolkit to automate the boring code that I end up writing over and over for every example. The code is on github but I haven't made a crate for it yet.
I’m really enjoying using no_std Rust for embedded programming on the Lilygo T-deck and I want to share what I’ve learned so far. There are many excellent tutorials and docs on Embedded Rust in general and the ESP32 in particular, so I’m going to cover things that are specific to the T-deck or that I’ve found to be under documented. Today let’s start by looking at the T-deck’s signature feature, the keyboard.
I don't know why I waited until I was almost fifty to read Slaughterhouse Five. I'd always heard it was a groundbreaking work of sci-fi, but I didn't know why. Now that I've read it I can say that it's not really sci-fi, but it certainly is groundbreaking.
I've been having a lot of fun with this little device called a LilyGo T-Deck. It's built on an ESP32-S3, has a 320x240 touch screen, a funky little track ball, built in wi-fi, and a seriously nostalgia-inducing physical keyboard. I bought the T-Deck about a year ago but because I was sick (with undiagnosed Type 1 Diabetes) and haven't done much with it until the past few weeks.
I find Large Language Models fascinating. They are a very different approach to AI than most of the 60 years of AI research and show great promise. At the same time they are just technology. They aren’t magic. They aren’t even very good technology yet. LLM hype has vastly outpaced reality and I think we are due for a correction, possibly even a bubble pop. Furthermore, I think future AI progress is going to happen on the app / UX side, not on the core models, which are already starting to show their scaling limits. Let’s dig in. Better pour a cup of coffee. This could be a long one.
Working in the Mixed Reality group at Mozilla was the most fun I ever had in my 30 year career. Helping to usher a new technology into the world. One with such potential. I’d really love to go back there. Unfortunately it seems there isn’t really a there to go back to. Cue memory fade.
I’ve been quiet lately, not because I’ve had nothing to say but because I’ve not felt well enough to say it. That changes today.
One of my original IdealOS blog posts from 2017 showed up on the front page of Hackernews the other day (comments here). This got me thinking about IdealOS again. I haven’t worked on it in a couple of years, but as I read through the comments and links to articles by people with similar ideas, I came to a realization. I am still working on it. Maybe not directly, but I’m still exploring ideas that are needed to build IdealOS. So with that in mind let’s take a look at what I’ve been working on lately.
It's been a bit since I've posted on my round screen watch project. Most of my time has been taken up by work, travel, and family stuff, but I did have a few seconds to add a feature or two.
It’s a truism of the web that when something becomes free it turns to crap. This is largely due to advertising, tracking, and SEO hackers getting their crappy version of something to the top of the search index. When this has happened to a tool I want to use I can’t fix the underlying problem, but I can make my own non-tracking version and share it with the web, doing my little part to make the world a better place. Today it’s a CSS Text Style builder.
I’m continuing to work on a little smartwatch prototype using a little round LCD and I want to have nice looking text. The default font for CircuitPython is fine, but it’s very tiny. This LCD has a pretty high DPI compared to other hobbyist screens( > 200 ppi), so I need to find a new font. CP has a way of importing new fonts, but there are a few pitfalls and tricks I discovered, so that’s what I’m covering today.
For my next project with the WaveShare Round LCD I want to create an animation of Dr Strange's Eye of Agamotto. Here is my first attempt in JS (looks more like the comics than the movies). Not bad, I think.
I'm enamored of all of cheap and hackable screens and embedded CPUs coming onto the market. I'm frustrated, however, that despite embedded computing being more accessible than ever, the mass manufacturers products are all becoming more and more the same. Where are the phones with oval screens? Where are the steam punk pocket calculators? We have the technology to make devices that are ever more niche and increasingly creative and different, yet what you can actually buy is more glowing rectangles. I'd like to fix this.