<img src="https://cdn.micro.blog/books/9781101972120/cover.jpg" align="left" class="microblogbook" s

January 25, 2023

Currently reading: Stories of Your Life and Others by Ted Chiang 📚


<img src="https://cdn.micro.blog/books/9781503946194/cover.jpg" align="left" class="microblogbook" s

January 25, 2023

Finished reading: Abandon by Blake Crouch 📚

Well written but too hopelessly dark for my taste.


ChatGPT and its ilk may well result in a better experience for searching than Google — for a while.

January 25, 2023

ChatGPT and its ilk may well result in a better experience for searching than Google — for a while. But if you don’t think the shitty incentives that led to Google’s quality dropping off aren’t going to affect these LLMs in the exact same ways, I’ve got a bridge to sell you.


Docker is just terrible. The default options always seem wrong. The error output is often inscrutibl

January 24, 2023

Docker is just terrible. The default options always seem wrong. The error output is often inscrutible. Debugging is a nightmare. This is just poorly designed software.


> This is enshittification: Surpluses are first directed to users; then, once they're locked in, sur

January 23, 2023

This is enshittification: Surpluses are first directed to users; then, once they’re locked in, surpluses go to suppliers; then once they’re locked in, the surplus is handed to shareholders and the platform becomes a useless pile of shit. From mobile app stores to Steam, from Facebook to Twitter, this is the enshittification lifecycle.

www.wired.com/story/tik…

This is it. The last 25 years in a nutshell.


There is no way that the people who work on docker actually ever use docker.

January 23, 2023

There is no way that the people who work on docker actually ever use docker.


<img src="https://cdn.micro.blog/books/9781503946194/cover.jpg" align="left" class="microblogbook" s

January 14, 2023

Currently reading: Abandon by Blake Crouch 📚


Finished Andor. What a show.

January 11, 2023

Finished Andor. What a show.


For months I haven't been able to login to "My UPS" (which is now the only way to get detailed track

January 09, 2023

For months I haven’t been able to login to “My UPS” (which is now the only way to get detailed tracking info). Attempting to login would give me error LASSO_1010. Attempting to reset my password would return an “Application error” and never send a reset email.

The solution (via this Reddit thread) was to install the UPS mobile app, and initiate a password reset from the app. In that case I did receive the reset email, and was able to update my password, and I can now login.


Replaced a thumb stick in a VR controller tonight. Required a full tear down, but cost $15 instead o

January 03, 2023

Replaced a thumb stick in a VR controller tonight. Required a full tear down, but cost $15 instead of $75 for a new controller, and I’m not sending a good controller to the landfill because one part was bad.

Was fiddly and took a while, but very gratifying.


> … the impulse to repair arises from and is sustained by love — and that the particular form of lov

January 03, 2023

… the impulse to repair arises from and is sustained by love — and that the particular form of love at work here is friendship. By repairing the things of this world we exhibit friendship towards them — and they become friends to us in return.

Alan Jacobs, the friendliness of objects

If you buy something off the shelf, like an iPhone, which you can’t change, you’re less likely to care for it, and it’s going to end up in a drawer. Back then you could go to Radio Shack and get parts for your computer, it was possible to customize it (for example, the Altair), and then you could know it in its entirety. Devices that were customized, or built from near-scratch, are still loved, but as for your old iPhone6, you don’t know where it is, and even if you did it’s probably unusable. Devices like the iPhone6 can’t be repaired, they are designed to fail in ways that are inscrutable.

Hundred Rabbits , Weathering Software Winter

These sound like different notes in the same chord to me. I want computers, and computing, to be personal again.


I’ve working on adding some physical controls to my kitchen status display. The setup is very simple

January 03, 2023

I’ve working on adding some physical controls to my kitchen status display. The setup is very simple, and for a first-run all I wanted to be able to do was detect a button press, and run a script somewhere on the system.

I couldn’t find any existing code that does this (please point some out if you know of any), though there’s plenty of code out there for button handling in general.

Also, most of the code out there for doing GPIO work is either in C or Python, and I was hoping for a Ruby solution, or at least a solution that would be easy to wrap in Ruby.

In the end I learned about how to interface with the GPIO system on RPi via the filesystem.

From there, I found this code from Aaron Patterson using epoll to monitor for changes in the level on the monitored pin. That seemed like it would work, but the epoll gem seems to be unmaintained at this point. Instead, I went with the Sleepy Penguin gem, which provides an interface to the same underlying Linux filesystem events.

Lastly, I wanted my pin pulled high by default, and there’s no way to do that via Sysfs, so I ended up using the gpio utility to set the pin state and pull up resistor.

From there, I was able to run this little script, which will output the current state of the pin when it changes.

# install gpio command line tool
# gpio -g mode 16 up
require 'sleepy_penguin'

def watch pin, on:
  
  puts "Setup Export"
  File.binwrite "/sys/class/gpio/export", pin.to_s

  
  puts "Setup Edge"
  
  retries = 0
  begin
    
    File.binwrite "/sys/class/gpio/gpio#{pin}/edge", on
  rescue
    raise if retries > 3
    sleep 0.1
    retries += 1
    retry
  end

  puts "Read Value"
  
  fd = File.open "/sys/class/gpio/gpio#{pin}/value", 'r'
  yield fd.read.chomp

  puts "Setup epoll"

  epoll = SleepyPenguin::Epoll.new
  epoll.add fd, SleepyPenguin::Epoll::PRI

  puts "Start loop wait"
  loop do
    fd.seek 0, IO::SEEK_SET
    epoll.wait do
      # yield fd.read.chomp
      value = fd.read.chomp
      p value
    end
  end
ensure
  
  File.binwrite "/sys/class/gpio/unexport", pin.to_s
end

pin = 16

watch pin, on: 'both' do |value|
  p value
end

Still to come: debouncing, better handling of a change event, and hopefully wrapping it all up into something much easier to work with.