Thoughts

Link based "commentary" style posts, commenting on a web link

905 posts latest post 2026-09-24 simple view
Publishing rhythm
Sep 2026 | 10 posts
GitHub - florimondmanca/arel: Lightweight browser hot reload for Python ASGI web apps Lightweight browser hot reload for Python ASGI web apps - florimondmanca/arel GitHub · github.com arel is a “Lightweight browser hot reload for Python ASGI web apps” I just implemented this on my thoughts website using fastapi, and it’s incredibly fast and lightweight. There just two lines of js that make a web socket connection back to the backend that watches for changes. When in development mode, this snippet gets injected directly on the page and does a refresh when arel detects a change.
Bob Belderbos (@bbelderbos) on X Forget Python for a sec, here's how Vim helped me out today … 💪 📈 Ever felt like you needed a quick string replacement without diving into a script? Here's a Vim trick I just used … I w… X (formerly Twitter) · twitter.com I need to learn regex capture groups better. This is so dang powerful. I really like the \v that bob uses here, it really does cut down on the terseness of all the special characters. I wanted to replace all occurrences of: name,[email protected],0,171,,2023-09-21 With: name,[email protected] Easy to do with Python, but what about a bit of > regex in Vim?:%s/\v([,]+,[,]+),.*/\1/
Open source, not open contribution with Ben Johnson (Changelog Interviews #433) This week we're talking with Ben Johnson. Ben is known for his work on BoltDB, his work in open source, and as a freelance Go developer. Late January when Ben open sourced his newest project Litest... Changelog · changelog.com Ben Johnson was on the Changelog a few years back covering his work on litestream, and talks about why he chose to go open source, but not open contribution. You should have a good reason to move off of sqlite.
Why I Built Litestream - Litestream Despite an exponential increase in computing power, our applications require more machines than ever because of architectural decisions made 25 years ago. You can eliminate much of your complexity... litestream.io As applications scale to the edge, to put compute as close to the user as possible, database queries back to the master node get slower and slower. Enter sqlite replication, put the database wtih the application code and replicate from master.
I'm All-In on Server-Side SQLite Ben Johnson has joined Fly.io Fly · fly.io SQLite is the next big database trend. with more horizontal scaling, close to user read heavy applications, having your database in the same application stack makes a lot of sense. Tools like litestream are going to enable global distribution in an impressive way.
GitHub - jpillora/installer: One-liner for installing binaries from Github releases One-liner for installing binaries from Github releases - jpillora/installer GitHub · github.com This is a sick looking bash script generator for installing binaries off of github releases. it reccomends curl into bash, but you could curl into install.sh and toss that in your dotfiles repo or wherever. Install installer with installer
Pagefind Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure. Pagefind · pagefind.app Pagefind is absolutely insane. I’ve tried a number of static site searches, and found them all hard to get get going, clunky and not the best experience as a user or developer. I setup pagefind in about 2 minutes on my site where it found and indexed 833 pages in 2 minutes. The only downside I see so far is that it is a lot of bandwidth to the user. On simulated slow 3G you can definitly feel it, but not terrible. Anything slower and its going to start feeling frustrating. edit: I have actually fully deployed it on waylonwalker.com, and its fast! create the index Then I put this on a page, it looks really nice on a white background, but would need some work to drop into a dark theme.
Simon Willison (@simonw) on X Anyone got a lead on a good embedding model that can embed both images and text into the same space, so you can search for "dog" and get back images most likely to contain a dog? It looks like Vis… X (formerly Twitter) · twitter.com Kinda mindblown that this is even possible. This is so far outside of my current thinking that i didn’t even think of an elegant way to implement semantic search accross images and text at the same time. I know it happens at Google, but I envision that as still text search accross tags and meta data about the image. Based on the number of responses CLIP is the thing that does this.
GitHub - aca/emmet-ls: Emmet support based on LSP. Emmet support based on LSP. Contribute to aca/emmet-ls development by creating an account on GitHub. GitHub · github.com This is the greatest nvim emmet plugin I have tried. In the past I had tried the vim plugin a few times and just could not get a good flow with the keybindings and found it confusing for my occasional use. just uses lsp-completion, so its the same flow as other completions. You can try it out by installing with config #
LLM now provides tools for working with embeddings LLM is my Python library and command-line tool for working with language models. I just released LLM 0.9 with a new set of features that extend LLM to provide tools … Simon Willison’s Weblog · simonwillison.net Simon’s llm cli is getting quite interesting. I really want to run some clustering on my website content.
Formatter How to use the Biome formatter. Biome · biomejs.dev Tried out biome today and it worked better than prettier on jinja templates, I might adopt this over prettier.
</> htmx ~ The disable-element Extension htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypert... v1.htmx.org An extension to disable elements during flight of an htmx request, Looks super useful for things like a create or delete button where the server would end up with an error if you double delete or double create. This eliminates an error path that the user might see under normal use of the ui.
</> htmx ~ hx-indicator Attribute The hx-indicator attribute in htmx allows you to specify the element that will have the `htmx-request` class added to it for the duration of the request. This can be used to show spinners or progre... htmx.org The class is added to elements. You can target this css selector to create loading state throbbers. By default the target element will the, but you can use the typical htmx css selector to select which element will recieve the class while the request is running. The only way to override the name of the class is through config.
Prime concisely made sense of why htmx is so awesome compared to what has become modern reactive web dev in 2 minutes. I had never thought of it this way and it’s incredible. One thing I have comepletely missed out on with my use of htmx is setting the disabled state while the server is working, what a genius move!
</> htmx ~ Examples ~ Updating Other Content htmx gives you access to AJAX, CSS Transitions, WebSockets and Server Sent Events directly in HTML, using attributes, so you can build modern user interfaces with the simplicity and power of hypert... htmx.org Three ways to support updating other content. Fantastic article walking through the different ways to update other parts of the screen using htmx. In htmx there is no 2 way data binding, the dom is your state, and if you have elements derived from the same data on the screen in different places you need to think about how to keep them in sync.
cURL Command Without Using Cache | Baeldung on Linux A quick and practical guide to using curl without cache. Baeldung on Linux · baeldung.com Busting cache with curl. I’m not sure how much gets cached by curl, but I have ran into several cases where I am looking for new content and I want to ensure the content is new and no chance of being cached. This article suggests 3 different techniques.
GitHub - sharkdp/bat: A cat(1) clone with wings. A cat(1) clone with wings. Contribute to sharkdp/bat development by creating an account on GitHub. GitHub · github.com Bat is my favorite pager, its the one for me that seems to just work more than the rest. colors, syntax highlighting, line numbers search, it just feels the most natural.
GitHub - simonw/shot-scraper: A CLI utility for taking screenshots of websites, recording video demos and scraping sites using JavaScript A CLI utility for taking screenshots of websites, recording video demos and scraping sites using JavaScript - simonw/shot-scraper GitHub · github.com Daaaang, this is such an elegantly simple way to get web screenshots with a cli. I was literally up and running with two commands on my arch linux machine (which it warned was unsupported by playwright). Note is a full length screenshot of the entire page. Oh and its pretty dang fast, let alone the setup time, this crushes on startup time in my attempts to use a headless browser in the past.
shot-scraper: automated screenshots for documentation, built on Playwright shot-scraper is a new tool that I’ve built to help automate the process of keeping screenshots up-to-date in my documentation. It also doubles as a scraping tool—hence the name—which I … Simon Willison’s Weblog · simonwillison.net An interesting way to build automatically annotaatd docs with arrows pointing to elements on a webpage.
I’d never given this much thought, but there are so many guides that are complete guides for beginner workflows, but once you get beyond beginner there is likely no manual for what you are trying to do in programming. There is no guide that will tell you the best way to get your companies salesforce data, alongside of the ERP data and present it to the users who need to know in a way that compels them to make the right decisions. You are going to have to build this out for yourself by piecing together knowledge about each subject.
HTML Over The Wire | Hotwire Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. hotwired.dev An alternative approach to building modern web withhout heavy js and json, but instead html over the wire, keeping the logic in the backend of rails.
How do I post form data using Curl? To post form data to the server using Curl, you can use one of two command line options: -F (--form) or -d (--data). ReqBin · reqbin.com How to pass form data with curl, give it the d.
How to Use HTML to Open a Link in a New Tab Tabs are great, aren't they? They allow the multitasker in all of us to juggle a bunch of online tasks at the same time. Tabs are so common now that, when you click on a link, it's likely it'll ope... freeCodeCamp.org · freecodecamp.org Most of the time when creating links in html you want to maintain the default behavior, as this is what users are going to expect, but sometimes your site behaves such that it does not fit, and it does something unexpected anyways. in this case you might want to make the default behavior to open the link in a new tab rather than relying on users to control click. Use this with restraint as this can make your site feel janky and do things that do not feel natural to the web.
External Link stackoverflow.com I went down the route of leveraging the extention in htmx, but later realized that this completely breaks browsers/users who do not wish to use javascript. While most of the web would feel quite broken with javascript disabled, I don’t want to contribute to that without good reason. Taking a second look into this issue, rather than using, and using as_form to get form data into a model keeps the nice DX fo everything being a pydantic model, but the site still works without js. with js htmx kicks in, you get a spa like experience by loading partials onto the page, and without, you just get a full page reload. the implementation # copied from https://stackoverflow.com/questions/60127234/how-to-use-a-pydantic-model-with-form-data-in-fastapi And the usage looks like
`ValueError: Constraint must have a name` in alembic 1.10.0 · Issue #1195 · sqlalchemy/alembic Describe the bug ValueError: Constraint must have a name in alembic 1.10.0. Expected behavior Migration succeeds. To Reproduce Please try to provide a Minimal, Complete, and Verifiable example, wit... GitHub · github.com After a nasty time with alembic upgrades, thoughts is about to get a new users table. This may have came from incorrectly setting up alembic for sqlite from the start, but I was able to fix the issue with this GitHub issue. The change I needed to make to get my migration to run.