sminez's Avatar

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)

63 Followers  |  163 Following  |  106 Posts  |  Joined: 20.11.2024  |  2.2705

Latest posts by sminez.bsky.social on Bluesky

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.

23.10.2025 14:11 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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

23.10.2025 12:39 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Yesterday I found myself needing an "iter_at_least_once" method on Rust iterators and I was a little surprised to not find it in the sea of methods from itertools. I've not needed this behaviour before (that I can recall) and its not particularly complicated to implement but it got me thinking...

23.10.2025 12:39 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Steve is leaving us at Oxide 😭😭😭😭😭😭😭😭

But also going to go work at ERSC to help #jj-vcs take over the world, and I couldn't possibly be more excited about that

22.10.2025 19:00 β€” πŸ‘ 140    πŸ” 5    πŸ’¬ 2    πŸ“Œ 0

reasons that The Diamond Age is science fiction’s most accurate prediction of the future:

12.10.2025 17:44 β€” πŸ‘ 29    πŸ” 3    πŸ’¬ 2    πŸ“Œ 0

Erik Meijer
@headinthebox
"... Guido van Rossum: I honestly think the importance of the GIL removal project has been overstated. It serves the needs of the largest users (e.g. Meta) while complicating things for potential contributors to the CPython code base (proving that new code does not introduce concurrency bugs is hard) ...". [0]

It does not even sever the needs of Meta; the actual reason was simply to do something impressive sounding ("until now every previous attempt failed miserably") allowed a few engineers at Meta to claim "industry wide impact" during their performance review.

Erik Meijer @headinthebox "... Guido van Rossum: I honestly think the importance of the GIL removal project has been overstated. It serves the needs of the largest users (e.g. Meta) while complicating things for potential contributors to the CPython code base (proving that new code does not introduce concurrency bugs is hard) ...". [0] It does not even sever the needs of Meta; the actual reason was simply to do something impressive sounding ("until now every previous attempt failed miserably") allowed a few engineers at Meta to claim "industry wide impact" during their performance review.

reminder: the primary goal of most enterprises is to produce goods and services for its customers. the primary goal of meta is to evaluate its employees

11.10.2025 00:33 β€” πŸ‘ 31    πŸ” 3    πŸ’¬ 2    πŸ“Œ 1

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...

05.10.2025 10:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Video thumbnail

Quick update on where I'm at with github.com/sminez/penrosx

The ffi layer has been torn apart and rewritten compared to what I had back in April and I've got scratchpads working now after wiring in the ability to query properties from windows.

Still got several bugs to sort but it's looking good!

05.10.2025 10:55 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

Always good when the options available to you are:
1. String parsing from an ffi debug repr
2. Using an API that's been marked as deprecated for over a decade
3. Casting undocumented void pointers

How's _your_ morning going?

02.10.2025 07:38 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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 🀞

29.09.2025 15:01 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
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

I was hoping to try out something like what is shown here (not sure if this still works though): github.com/cmacrae/lime...

29.09.2025 14:52 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

to the older crowd: "oh yeah so btw he has a new linux distro and of course it uses the transphobic window manager"

to the newer crowd: "oh yeah so btw he built a web framework and also has been moving further and further right for years"

25.09.2025 17:40 β€” πŸ‘ 356    πŸ” 38    πŸ’¬ 26    πŸ“Œ 5
Preview
crates.io: Malicious crates faster_log and async_println | Rust Blog Empowering everyone to build reliable and efficient software.

The crates.​io team was notified of two malicious crates (with similar names as legitimate crates) which were actively searching file contents for Etherum private keys, Solana private keys, and arbitrary byte arrays for exfiltration.

See the blog post for details: blog.rust-lang.org/2025/09/24/c...

24.09.2025 20:52 β€” πŸ‘ 119    πŸ” 37    πŸ’¬ 3    πŸ“Œ 5

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 😱)

17.09.2025 07:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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 πŸ˜…

17.09.2025 07:51 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
Preview
Add an OSX backend Β· Issue #334 Β· sminez/penrose Earlier in the year I started playing around with writing an OSX back end and managed to get things working, albeit in a pretty rough and tumble kind of way. After rebasing #321 on develop and sort...

If you use a Mac and are interested in helping me out with doing some testing of the OSX port of Penrose, keep an eye on this pinned issue in GitHub where I'll be sharing updates of how things are progressing:

github.com/sminez/penro...

#rust

17.09.2025 07:50 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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?...

07.09.2025 19:02 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

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 πŸ˜•

07.09.2025 18:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

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 😱

07.09.2025 18:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

I managed to get an 18% speedup for syntax highlighting in my text editor over the weekend, mostly thanks to making some improvements to the underlying gap buffer implementation, but also a fair amount of "wait...why on earth am I doing _that_?" thrown in there.

07.09.2025 18:56 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0
"this game plans to unlock in approximately 6 hours"

"this game plans to unlock in approximately 6 hours"

So close...

04.09.2025 07:35 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
2 Minute Deep Acid in Strudel (from scratch)
YouTube video by Switch Angel 2 Minute Deep Acid in Strudel (from scratch)

declarative musicβ€½

youtu.be/HkgV_-nJOuE?...

31.08.2025 21:47 β€” πŸ‘ 44    πŸ” 3    πŸ’¬ 25    πŸ“Œ 1

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.

31.08.2025 21:50 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Managed to make multiple performance improvements to my text editor this weekend after finally getting round to adding support for LSP based completions and formatting πŸŽ‰

I've also had a user report a nasty crash coming from busted utf8 handling in the handwritten gap buffer implementation I have 😬

31.08.2025 21:49 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 1    πŸ“Œ 0

How to make the rust analyzer devs angry in a single outer function

23.08.2025 16:42 β€” πŸ‘ 32    πŸ” 3    πŸ’¬ 2    πŸ“Œ 0

Have you ever considered that your PM is β€œvibe coding” you

18.08.2025 22:50 β€” πŸ‘ 479    πŸ” 71    πŸ’¬ 31    πŸ“Œ 8

After a full day of shouting "first try!" each time I tried to get something working (and failing) yesterday, I've sat down this morning with a fresh cup of coffee and indeed managed to get it working first try πŸ˜‚

19.08.2025 08:15 β€” πŸ‘ 1    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Oh boy...exhibit $n+1 of the ADHD issue of heading out to the shop to get something because you need it to cook dinner, only to return home and find out that you have 3 of the damn thing already in a cupboard you forgot to check πŸ€¦β€β™‚οΈ

17.08.2025 17:54 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0
Preview
ad an adaptable text editor

A little bit of a bumpy experience (I assume because they've got a LOT of new users atm) but I've just migrated ad to Codeberg πŸŽ‰

codeberg.org/sminez/ad

(now for the rest of my repos and then updating meta-data for cargo...)

13.08.2025 07:25 β€” πŸ‘ 2    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

Yeah I've had several people recommend codeberg to me now. To be honest, I like the more minimal UI compared to GitHub. And CI wise for my personal projects I never have anything that complicated in place so hopefully I should be fine on that front πŸ™‚

12.08.2025 08:25 β€” πŸ‘ 0    πŸ” 0    πŸ’¬ 0    πŸ“Œ 0

@sminez is following 20 prominent accounts