I really like Server-Sent Events : the protocol is quite simple and effective, and using it from a browser is easy. Listen for a message event on an EventSource , and it just works. gostatic hot reload functionality is built using SSE , and it works very well and takes just a pinch of code. Let’s get to my current usecase though. I’m making an AI-powered editor right now - and…
I've started using ngrok a lot lately (I know, I know, late to the party). But then last week, Homebrew has updated it to a version where it wants some $25 to supply custom domain names. I mean, I could pay that, but I'm paying Hetzner like $8 or $9 for a server, and then I'm paying for my domain and… it's still cheaper? I understand that hosting is more commoditized than tunnels — I guess the…
I've got into a situation with PG I've never been into before. There is a financial reports table, containing some description of a transaction, with columns like date , amount and comment . And this comment field is often used to search for something case-insensitively. This is done best using where lower(comment) like '%some words%' using trigram index: create index report_comment_lower_trgm on…
TwinSpark is a library we use to write Kasta frontend now. You can see examples of basic behavior by opening a link, but a cornerstone of TwinSpark is HTML-replacement functionality, which is what concerns us now. You see, controlling app behavior can be done in various ways, but the major one is updating what user sees with a new markup from the server. And that potentially can change URL: like…
A few months ago I got a feeling that I’d enjoy live streaming some coding. Not sure exactly, but it seemed to be somewhere along the lines of “sitting at home,” “not enough people around to complain to” and things like that. Plus it felt like it could spark some interesting discussions. Maybe. Also, this creates some time-based pressure to do smaller projects —…