Show more

I made tomato soup from whole tomatoes tonight. It was quite good and very satisfying. This is all.

Version 1 was written in Swift and ran on a Raspberry Pi. It worked but was kind of a waste of a whole Raspberry Pi.

Version 2 was written in MicroPython on a Wemos D1 Mini. It was flakey and required connecting to USB to update.

Version 3 still runs on a D1 but moves all automation logic to the server so updates are super easy.

After running my errands today I rewarded myself by rewriting my IoT rotary phone as an Arduino sketch.

This is the third rewrite, and so far the best version. It uses MQTT to send messages to my home automation server.

The previous ones called the server API directly which meant actions were annoying to change.

gist.github.com/emorydunn/51ca

I'm kind of thinking I should move my Mastodon instance to my main domain, but obviously don't want to break the existing federation.
Is that possible by setting up some 301s and using the alternate domains ENV variable?

I fully realize it sounds like I’m on drugs, but this is honestly just the way my brain works.

How can you say we have agency without without granting that privilege to the past and future? How can you say the past is crystallized without acknowledging our present is the future’s past?

Just spent three hours talking with my roommates about the nature of time. I ended up as the outlier with my peculiar view of how determinism and free will can be harmonious.

I need to be more positive about diving back into this project.

Some of the choices I made have made adding new features fairly easy.

It's also really nice to see how much I've learned in the past couple years in a tangible way.

I'm getting really annoyed at me from two years ago who made all of these bone-headed decisions because he didn't know how Cocoa worked.

This explains why I felt like I was constantly fighting the system to make things work.

childhood movies, animal cruelty Show more

A resounding "OMG it fucking works!?" from the refactor.

At the time I was also perplexed as to why I had to play hot potato with errors, catching them and then throwing them again.

Turns Out: you don't. I just didn't know better 😅

This was filed over two years ago by some thoroughly unhelpful person called @emorydunn.

And the award for Least Helpful Issue Filed in the Bug Tracker goes to Issue #11!

Post-it Notes: Not a form of archival storage.

The solution is going to be moving logic (and Apple Events) back into the main app, still running the socket server XPC service, but forwarding messages to the server which remote clients can receive. Luckily most of the code will still work, I just need to change how it all fits together.

I decided to run the server as an XCP service, because it’s a nice easy way to make little sub-processes in macOS. All of that actually worked quite nicely, except for one fundamental part of the application: Apple Events, which have to be called on the main thread. Unfortunately in an XPC service the main thread is blocked by the service listener, meaning the Apple Events can’t run.

I decided to put all of the logic for the application into the server and have the client communicate over TCP, even if the client was the process that actually _started_ the server. The reason being there would be no difference between a local client and a remote one, just the IP address it would connect to.

After spending the whole weekend building a fancy (read: hacked together) TCP socket server in my application I think I need to change the fundamental way I integrated it into my application.

Show more
Mastodon

emory.coffee is one server in the network