Weekly Brain Dump #10
At a Glance
- gitsigns: Switching git plugin for Neovim
- Hanami: Continuing my Hanami learning
- Jumpy Alien: Improved the game design
- Interesting Links: Cool things I found this week
gitsigns
I have been using vim-gitgutter for many years and it work great for what I wanted, displaying diff symbols on the side of my editor. After seeing a coworker bring up a git blame side pane and jump through the history of that file right in the editor I knew it was time to upgrade my git plugin for Neovim.
After hunting around for a while and ruling out more complicated plugins I came across gitsigns and almost ignored it because I thought it couldn’t do what I needed. Thankfully I actually installed it to test it out and saw that it can jump through history easily.
This is honestly a pretty terrible comparison, but this is the only feature of vim-gitgutter that I used before switching. Now that I’m using gitsigns I can do some cool spelunking into my code’s history.
A terminal opening up a Neovim session for my init.lua configuration. I then highlight the line with the gitsigns plugin and after a short delay you see the commit message for that line appear in the virtual text to the right.
I then open up the blame sidebar and reblame the file at the parent commit. I now highlight the line with my vim-gitgutter plugin and after a short delay the commit message from 2 years ago appears in the virtual text to the right.
I did hit the error
Error running git-blame: fatal: could not open object name list: .git-blame-ignore-revs
with gitsigns though, if you use the ignoreRevsFile
global configuration setting in git but that file doesn’t always exist in your
repositories, it will error when you open Neovim. I found the fix was to tell
git that the file is optional.
[blame]
ignoreRevsFile = :(optional).git-blame-ignore-revs
Hanami
I’ve finally got warden integrated into my Hanami application. It was quite the learning experience and I plan to write a full blog post on it soon so I’ll keep this brief.
I mostly enjoyed the experience but it’s definitely very different from what I’m used to with Rails. I think the part I’m having the hardest time adjusting to is the database layer as I’m actually pretty fond of ActiveRecord.
You can see the full commit over on GitHub if you’re curious how it went.
It’s an adaption of this blog post with a little help from the Hanami discourse.
Jumpy Alien
I got Jumpy Alien updated for Taylor v0.4.1. This was mostly
the change around Texture2D#draw no longer defaulting the origin to the
centre of the image and instead puts it back at Vector2[0, 0] to make it work
like nearly every other #draw function.
I did some gameplay improvements too.
- The pipes now spawn at random heights
- Player gravity tweaked
- Pipe movement speed tweaked
- Exit button now works
The main menu is shown before going into play the game. Once playing the player gets a score of three before crashing into a pipe and seeing the end screen showing their high score of 3.
Interesting Links
You are being misled about renewable energy technology.: I was initially skeptical of this video but it helped enlighten me on something I was very naive about, battery recycling.
THREE.js-PathTracing-Renderer: Every single demo here is mind blowing to me, the fact this runs in a browser so smoothly is amazing.
The Handoff Test: Something I try to live my life by, making sure I’m not the sole keeper of any knowledge at work.