This week I got going with two pieces of kit that have been on the backlog for a while: Alpine.js and PythonKit, which is for Swift. Whilst doing this I began a Today I learnt section on the site, for quicker note fragments as I go.
Alpine.js describes itself as like Tailwind for JavaScript. That’s what I’m after.
For me, the key is that it’s modern, and so has learnt the relevant lessons but, I don’t have to totally rewrite my templates, and so jump into a new way of doing it. Together with htmx, it looks to cover most of my needs. The goal being to keep out of the maelstrom, I’m happy.
I wrote briefly about Getting Started with Alpine.js.
PythonKit lets you directly import and call Python code from Swift. I wrote briefly about Getting Started with PythonKit.
This kind of inter-op strikes me as wonderful.
Swift is a great language. Don’t pile-on because I said this but, despite the obvious focus on UIs for Apple platforms, Swift lives in the Rust/Go/… Modern & Badass family. Modern & Badass: That’s a technical term, I don’t have the energy to expand on right now, but next time we meet, we can chat about languages if you like.
Python is much more easy-going. Easy-going That’s a technical term too. Roughly, Why do you write Python? That. Can’t remember: go prototype an API integration in Swift for a morning, then come back. That.
The ability to combine the two is a lovely prospect. I need to set up the workflow for wrapping Swift as Python extensions to get the other way going, but PythonKit is a nice option for the ”This is already running, I’m just going to use it” breakout.