February, 13, 2024 archives
Now with a different style
It has been almost six years since I did much to the design of this place, and I figured it was time to pay a little attention to it. Nothing major, just some tweaks to the colors, finally applying a little more style to the forms, and generally just cleaning things up. I will keep tweaking things. I have an SVG version of the “Barrel of Monkeys” monkey that I want to incorporate into the logo but I want to try and simplify it and get it down to a size where I am okay with putting it inline into the HTML.
I am using CSS nesting for the form styles which should be okay with recent browsers. Everything should degrade pretty sensibly, or maybe abruptly. It is great that the state of the art for CSS is advancing fairly quickly again and it is possible to do fun stuff without having to adopt big frameworks or tools that require a build step.
I used Adobe’s (free) Color Contrast Analyzer to pick the colors and (try to) make sure they were accessible.
Not sure what’s next, but dark mode is on the list somewhere.
Poking around with Rust
A long time ago, I implemented a quick-and-dirty daemon in C that used the vendor’s support library to display messages on an LCD pole display at the store. The state of California requires that electronic point-of-sale systems have a customer-facing display, and this fulfilled that.
It was very simple, it just listened for TCP connections and displayed the text it was sent. Every 15 seconds it would reset the display to a hardcoded default message. When an item was added to an invoice in Scat POS, it would push the name and price to the daemon. It also pushed the total when payment was initiated.
Like I said, it was quick and dirty, and we used it for a decade and I never really got around to doing any of the basic improvements that I wanted to do, like being smarter about when to go back to the default display.
The LCD display was one of the things we didn’t manage to sell off when we closed down the store, so I took it home and now it’s on my desk, hooked up to the Raspberry Pi 4 that used to be our print server. I decided to use it as an excuse to start learning Rust.
I pulled out one of the examples from the code for a crate that wraps libusb
to provide access to USB devices, hit it with a hammer until I got it to push text to the display, and now I have the basis to re-implement what I had before and then give it the polish that I never did. Maybe implement a more user-friendly way of sending the various control codes from the user manual for doing things like clearing the screen.
That’s the theory, at least. The reality is that first I had to migrate all of my photos from Flickr to my own service, implement a way to add new photos to the collection, and then upload the photo I took of the display showing a simple message so I could blog about it.
And I am not sure if doing more with this is actually the next thing I’ll tackle, but writing about what I had done so far is at least something to check off the to-do list that I don’t have.
The code lives in the lcdpoled repository on GitHub. (The old C code is now off on a different branch.)