Tyrel's Blog

Code, Flying, Tech, Automation

May 26, 2023

Neovim, Nix, Telescope, Tree-sitter, Mason

I made a mistake with not reading CHANGELOGs for all my packages in Neovim this week. This sent me down a small rabbit hole trying to fix all the things.

What happened is I ran :PackerUpdate which, pulls the latest version of Packer packages, good, updates! But... Telescope has a new requirement on main branch that requires Neovim 0.9.0. The problem is that the latest NixPkgs for Neovim right now is 0.8.1. I ran to google, tried to set an overlay to use neovim-nightly, but that didn't work. If you recall in Dotfiles - My 2022 Way I'm not actually using NixOS so (please correct me if I'm wrong) overlays don't work. I tried specifing a version in my programs.nix, I tried a bunch of other things at 1AM that I don't remember anymore.

Almost ripped it all out just to use Nvim 0.9.0 on this machine until NixPkgs has updated the repo. I decided that was the wrong idea, and went to sleep.

Tonight, I was able to figure out that in Packer, you can pin a commit!

It's clear in the docs, but I was trying to fix it at the Nix level, so I didn't immediately think of this, even though at my last job, Tidelift, I was doing package pinning analysis! Derp.

So, I added commit="c1a2af0" to my use statment in plugins.lua and Telescope started working again without a warning, or issue. Commit.

That wasn't the only problem though. In my infinite wisdom, I followed some reddit posts that I won't link to, that suggested deleting ~/.local/share/nvim and rerunning PackerInstall, the problem there -- my tree-sitter configs are in my nix files.

This is an issue I need to look at later, but in my programs.nix file, I some reason have two entries of plugins =. I had to uncomment the first one where I inject tree-sitter, and comment out the second setting. Then rebuild my nix flakes.

After that,I had to comment the first, uncomment the second, and rebuild with withAllGrammars config.

This worked, I had my rust tree-sitter configs working, but was missing rust-analyzer.

That's in Mason! So I ran :Mason, found rust-analyzer slapped that i button, and I finally had my system back after 2 days of issues.

This was mostly a blogpost so I can reference back to it in the future, but hopefully at least _someone_ learns to pin your dang nvim Packages!

 · · ·  nix  nvim  rust

Dec 16, 2022

Advent of Code 2022 + End of Year Updates

Advent of Code this year is kicking my butt so I haven't been doing any tech blogging really lately. If you want to follow my progress, I think I might be done as of day 15 - This one seems to be a traveling salesman/knapsack problem related. Here's my repo: https://gitea.tyrel.dev/tyrel/advent-of-code/src/branch/main/2022/python.

I'm not on the computer that runs it, but I've been spending a lot of time playing with Apple's System7 in the BasiliskII emulator. Might have some fun projects with that coming up, but wanted to do some more learning before I start anything. So I have been going through a course on 6052 Assembly programming for the NES, and I'm about 73% done with that, it's really great!

It's By Gustavo Pezzi at Pikuma, if "oldschool" programming floats your boat then I definitely recommend it. It's all programming through making roms with CC65/CA65 assembler, and using FCEUX to see your results, super neat.

I've been picking up some more Go work at work. My current team is sort of disbanding so I'm going to be moving away from doing just Python. It's been a year since I've done Go stuff, since I left Tidelift, so I'm really rusty.

Speaking of Rust, I was trying to do Advent of code in Rust also, and made it TWO whole days in Rust. It's still on my bucket of stuff to learn, but my free time seems to be running out lately, and I have a lot of things on my plate to get done.

 · · ·  python  adventofcode  6502  assembly  rust  go