sminez
banner
sminez.bsky.social
sminez
@sminez.bsky.social
Innes Anderson-Morrison

https://hachyderm.io/@sminez on mastodon
https://sminez.dev

I'm a software engineer who spends probably more time than he should writing my own tools. You can see what I'm up to at https://github.com/sminez

(he/him)
Its certainly an odd situation 😅I have a related data coming from multiple sources and I need to flat map over a couple of different dimensions. I had an initial solution that initialised with a default like you're suggesting but then I wanted to see if there was a succinct solution I was missing.
October 23, 2025 at 2:11 PM
Has anyone else needed to do this sort of thing before? Is there a better way to do this?

```
let mut it = my_vec.clone().into_iter();
let it = std::iter::once(
it.next().unwrap_or_default()
)
.chain(it);
```

#rust #rustlang
October 23, 2025 at 12:39 PM
I've not got any docs in place for anything yet, and there are almost certainly going to be multiple things changing before I can call this ready to release into the wild but for anyone curious this is what writing your WM ends up looking like: github.com/sminez/penro...
github.com
October 5, 2025 at 10:56 AM
Nice!

I got built in hotkey management working for penrosx at the weekend and significantly tidied up the internal APIs from what I had earlier in the year. Hoping to sort out the event handler logic where it's messed up this week then I should have something working 🤞
September 29, 2025 at 3:01 PM
I was hoping to try out something like what is shown here (not sure if this still works though): github.com/cmacrae/lime...
GitHub - cmacrae/limelight: Simple C99 sample showing how to create a border that will follow the focused window on macOS.
Simple C99 sample showing how to create a border that will follow the focused window on macOS. - cmacrae/limelight
github.com
September 29, 2025 at 2:52 PM
So, thanks to @lgug2z.com for getting me thinking about it all again! (and some changes in what I'm doing at work day-to-day that are reminding me why I _really_ don't like the default OSX windowing setup 😱)
September 17, 2025 at 7:51 AM
I did the majority of the work for this earlier in the year right when I first joined Apollo but then I got the ball rolling on an interesting internal project and got distracted by working on my text editor rather than penrose 😅
September 17, 2025 at 7:51 AM
Looking at the treesitter repo GitHub I can find a bunch of issues and discussions where people are confused about this API but no real examples of how to use it correctly. Are you really supposed to fully retokenize everything each time there's an edit?...
September 7, 2025 at 7:02 PM
The API claims that it can tell you changed ranges but the data I get back seems obviously incorrect: deleting a character from a function name should offset everything after it by 1...right? But the treesitter doesn't report any changes outside of the line the edit was made on for some reason 😕
September 7, 2025 at 6:56 PM
Things are pretty snappy now (under 1ms to tokenize and highlight on-screen buffer content) but I still can't for the life of me work out how to get treesitter to tell me which parts of the existing token tree are reusable following an edit 😱
September 7, 2025 at 6:56 PM
I have an idea of where the problem is but this part of the code base always makes me a little wary, as I'm a little worried its that "Mr Burns has so many illnesses they cancel one another out" situation.
August 31, 2025 at 9:50 PM