Tag: snippetexpander

  • Happy New Year! 🎉

    Today I published “Gleaming Wails: Idiomatic Gleam & Lustre Msg naming with nice refactor | Always Developing #253” to my YouTube channel.

    In this session I switch to using more conventional names for the app’s Lustre Msg types, which turns out awesome as it helps me see where I was going wrong, could remove some messages, and simplify the update function!

  • Today I published the 256th video on my YouTube channel.

    It’s only my 251st full Always Developing video, there’s been a handful of quick catchup “.1” videos, and my very first video was nothing related to coding.

    However, I still think it’s pretty neat to have hit this milestone.

    Merry Christmas nerds! 🎄😀

  • Gleaming Wails: A new series of live coding videos

    I’ve just published the first video in a new series of live coding sessions where I’m developing with Gleam and Lustre to build the front end for a desktop app built with Go and Wails.

    The first video is a bit of test of my recording setup where I walk through a minimal test of connecting Gleam to the Go based Wails back end via its generated JavaScript functions that always return a Promise, and are therefore a little tricky to handle in Gleam. It was quite a relief to come up with a fairly simple mechanism for calling the JavaScript functions through Gleam’s excellent “Externals” Foreign Function Interface (FFI) and end up with a usable Lustre Effect.

    During the “Gleaming Wails” Always Developing series I’ll be replacing the Snippet Expander desktop app’s Svelte based UI with a Gleam based one, continuing my quest to learn Gleam, which I very much enjoy working with, but unfortunately don’t get to do full time.

    As it’s a chunky piece of work that I’m signing up for, hopefully this project will help me get more familiar with the Gleam language and Lustre framework, and help hone my functional programming skills in general. Even though I’ve been programming for well over 40 years now, and getting paid for it for nearly 30, I’ve mostly been working with Object Orientated style languages, and so functional programming doesn’t come easily.

    With luck, along the way some people will learn a thing or two from my fumblings, or get excited about having a go at programming with Gleam.

    You can follow along while I code (mostly) in Gleam on my YouTube channel.

  • Snippet Expander v1.1.1 released

    I’ve just released v1.1.1 of Snippet Expander, “Your little expandable text snippets helper, for Linux”.

    It’s just a small bug fix release to make setting the shortcut for opening the Search & Paste window a little less confusing, particularly on KDE Plasma.

    Changelog:

    * Ensure custom shortcut setting only shown in UI if using GNOME(ish) desktop
    * Add default Ctrl+` Search & Paste window shortcut to KDE Settings app

    Tag: https://git.sr.ht/~ianmjones/snippetexpander/refs/v1.1.1

    Binaries: https://git.sr.ht/~ianmjones/snippetexpander/refs/download/v1.1.1/snippetexpander-v1.1.1.tgz

  • Snippet Expander v1.1.0 released

    A few days ago I released v1.1.0 of Snippet Expander, “Your little expandable text snippets helper, for Linux”.

    Changelog:

    * Abbreviations that end with another abbreviation are now allowed
    * Abbreviations in pasted text are no longer expanded
    * Debian package no longer built for releases
    * Switched back to MIT license
    * Dependencies updated

    Allowing an abbreviation to end with another abbreviation was a fun one to fix. Previously you could not have an abbreviation like “hw;” that expands to “Hello, World”, and a “w;” abbreviation that expands to say “World”, because if you typed “hw;” it would recognise the “;” trigger key, step backwards and find “w;” and expand it. That would leave you with “hWorld”.

    To fix it, I had to keep tabs on the longest match as I kept walking back until there were no more matches, and then use the last saved match. Pretty obvious in hindsight.

    I’ve also disabled expansion when pasting text in this release. I’ve had this on my todo list for over a year as I’d sometimes hit the problem when using the Search and Paste window, with text within the body of the snippet expanding when it shouldn’t.

    With this release I’ve stopped building the Debian package. It’s difficult to maintain a Debian package outside of the Debian project and keep up to date with the changes to dependencies. You also really need to create .deb packages for both Debian and Ubuntu as their library versions often drift apart and then come back together during the lifecycle of releases. And if you have a stable application that doesn’t need any updates for a while, it’s possible the .deb you built for that version may become out of date when the distro updates the versions of some libs. At that point, you then need to start creating .deb packages for each major version of Debian and Ubuntu that you wish to support. I’ve come to the conclusion that it’s probably best that package definitions are maintained in distro repos, at least for the more brittle package formats.

    This project started out using the permissive MIT license, as that’s what I prefer, and it’s the norm for Go projects. Then at some point I decided I should probably use GPLv2, and I’m not sure why. So I’ve contacted all the code contributors to Snippet Expander (that’ll be just me), and we all (I) agreed to relicense back to MIT.

    Apart from the usual update of dependencies, that’s it, enjoy. 😄

    Tag: https://git.sr.ht/~ianmjones/snippetexpander/refs/v1.1.0

    Binaries: https://git.sr.ht/~ianmjones/snippetexpander/refs/download/v1.1.0/snippetexpander-v1.1.0.tgz