Sean

Weekly Brain Dump #21

- 930 words

At a Glance

Tmux Project Switching

After my discovery of how powerful tmux display-popup is I had more of a poke to try and solve a problem I have at work. That problem is that we use tmux -L blah to create specific servers for each project we work on, this is because each project requires different environment variable values and you can’t easily do that otherwise.

For instance, each project will define a DATABASE_URL and a PORT to make sure you can run them simultaneously. But if you just do a tmux it’ll connect to the default server and the first projects environment will always be the one loaded, even if you detach and do tmux somewhere else.

Initially I wrote a bit of a complicated ruby script that looks for the sockets and uses that to in combination with another really cool tmux feature tmux display-menu. It works well but only for currently running servers and sessions.

A terminal showing a popup titled 'Switch to:' with three options,
default blog, default startup, and secret-project 0.

If you’re interested in this, you can download my ruby script, put it in your path and chmod +x it, then just add bind s run-shell tmux-server-switch to your .tmux.conf. Then when you do ^B s you should see a little popup to switch sessions across all servers.

Squasher Progress

I sat down last night and decided to do something a little silly to get myself unstuck on this project. I kept worrying about “how to do it perfectly” and overthinking every step. So I sat down with my laptop, put a chill video on in the background, and just gave myself permission to write bad code to achieve the simplest possible result.

This is something I can get a little hung up on when developing something open source. I get in my head that every commit has to be a perfect example of great code instead of reality. There’s every chance I’ll re-write the git history before opening it up but history has often shown I’m too lazy for that, so you’ll be able to dig and see what I did.

I am happy to report that I did get a basic prototype working with the Jumpy Alien example project for Taylor!

The interesting thing to note is that it includes every .rb file that’s in your load_path according to the taylor-config.json file. So you’ll see in the playground that it also includes the files from under test/ even though they aren’t used.

Obviously this is just a prototype and weird things like this are to be expected for now. I’m not entirely sure how I want to handle things like that. I’m not convinced I’d be able to implement a tree shaking algorithm or anything fancy like that. But maybe just a simple export-ignore option? Lemme know what you think in the comments.

Opal

The Opal project has caught my eye and got me wanting to try it out. This surprises me as I’m usually not a big fan of high level language to high level language transpilers. I feel it leads to obfuscated errors and harder debugging.

But something about Opal, which transpiles Ruby to JavaScript, has got me wanting to give it a try. I haven’t actually had a play with it yet and I’m not sure I’ll make the time. But I still wanted to highlight it as I think writing a reactive frontend in Ruby sounds a lot nicer than writing one in JavaScript.

Specifically seeing the Glimmer DSL Web project has gotten me interested in trying Opal. I feel like the README doesn’t do it justice and that an example project would help me understand it a lot better.

Welcome to Hanakai: Exciting news for Hanami, Dry, and Rom getting a new brand.

Boy I was wrong about the Fediverse: Someone discovering why they like the Fediverse so much compared to big corporate social media.

A Tale of Three WebAssembly Runtimes: I only skimmed his as my brain has been a bit mush this week, but it’s a very interesting breakdown of interpreting WebAssembly.

Agentic Coding is a Trap: Another post about how not programming actively makes your programming skills deteriorate.

Dirty Optimization Secrets (C for Playdate): Some nice technical optimisations for [Playdate] development in C. [Playdate]: https://play.date/

The Complexity of Simplicity: A refreshing look at the different types of complexity in software.

The text mode lie: why modern TUIs are a nightmare for accessibility: As a person who doesn’t currently need accessibility aides I find it hard to remember there are people that do need them. So when I come across an article like this I try to pay close attention.


Comments