Thoughts

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

844 posts latest post 2026-04-16
Publishing rhythm
Apr 2026 | 18 posts

Carlos has a pretty sick setup here, I can relate to mostly, cept the macos part. My main critique is that I don’t think he gave window managers much chance on linux, and they just don’t work on MacOS/Windows.

Most of the time I have a single, maximized window.

I can relate to this. I should really make a full post about my experience with tiling window managers. TLDR, I came for tiling and I stayed for the workspaces.

Multiple Displays An exception here could be streaming: having multiple displays can help preventing doxing yourself if you only share the screen of one of them. I only did stream like 3 times and that’s what I did, but I’m sure experienced streamers have better workflows (with or without multiple displays).

...

An absolute fantastic episode about blogging, thinking about a web1.0 kind of world today, and what it means moving forward.

Web 1.0 is robust, you own your own destiny, you own your data, you can do what you want. There is no platform to tell you what you can and cannot do. But the future web is stealing your data to build AI models, spam sites are duplicating your content and stealing your SEO. You may or may not care, but at the end whether you get traffic or now you own your web 1.0 sites.

![[None]]

I figured out the killer combination for python lsp servers, ruff and jedi! ruff does all of the diagnostics and formatting, then jedi handles all the code objects like go to definition and go to reference.

Underrated python library to on board ruff, or just use it on a project where its not the norm. ruff claims that its 99.9% compatible with black and when you read through the known differences they are clearly edge case bugs in black.

See this page for more about the comparison to black https://docs.astral.sh/ruff/faq/#how-does-ruffs-formatter-compare-to-black

oh and I just noticed that it is maintianed by Charlie, and comes straight out of astral.

![[None]]

First I need to fetch my thoughts from the api, and put it in a local sqlite database using sqlite-utils.

fthoughts () { # fetch thoughts curl 'https://thoughts.waylonwalker.com/posts/waylonwalker/?page_size=9999999999' | sqlite-utils insert ~/.config/thoughts/database2.db post --pk=id --alter --ignore - }

Now that I have my posts in a local sqlite database I can use sqlite-utils to enable full text search and populate the full text search on the post table using the title message and tags columns as search.

sthoughts () { # search thoughts # sqlite-utils enable-fts ~/.config/thoughts/database2.db post title message tags # sqlite-utils populate-fts ~/.config/thoughts/database2.db post title message tags sqlite-utils search ~/.config/thoughts/database2.db post "$*" | ~/git/thoughts/format_thought.py | bat --style=plain --color=always --language=markdown } alias st=sthoughts

Now I am ready to search my thoughts, which is a tiny blog format that I created mostly for leaving my own personal comment on web pages, so most of them have a link to some other online content, and their title is based...

This is the best tree I have ever built in minecraft. It took at least 4 stacks of logs and leaves despite what it looks like.

It is placed where Welscraft’s island in the hermitcraft season 10 seed, but on our own server we call lonecraft.

We started this server a few weeks after hermitcraft season 10 started, and play on it a few times per week. It has a pretty successful day one iron farm that took us way more than one day to complete, and the farm behind this is our first ever villager driven farm. Somehow potatoes got cross contaminated and now its pumping out potatoes and some bread, but no carrots or beat roots.

World Seed: 5103687417315433447

I’ve been using this for a few weeks now and it’s fantastic. It’s reminds me of lazygit, it gives a nice quick interface into the things I need and it just works. Yes I can git status to see what changed, then diff the files, then commit hunks, but lazygit can do that in just a few keystrokes. lazydocker does this for docker. It gives me a nice view into whats running, what’s eating up disk space, and the networks I have. And if I see I have a bunch of exited containers, there is a bulk command righ there to clean them up.

tldr docker ps on steroids

Go is feeling more and more like something I could throw in my tool belt as a python dev. I really like that it’s garbage collected and has great error management. I am just not sure how to work it in without it being the main thing. The thing that is so cool is the ability to ship tiny pre-compiled binaries that just work, and the raw speed. these binaries just get up and working without any warm up. writing any cli in python I’m going to be using something like typer, and it takes half a second just to warm up, so even hello world cannot be faster than half a second.

Great example from Anthony showing how easy it is to practice building database orm models and playing with them in a repl. This is good practice even if you are in a big code base to be able to test and learn in a simplified code base that does not have a mountain of other code around atuh, permissions, security, and other complex things that come into real production code bases that might make it hard to focus on what you are trying to do.

Today I came across some sqlalchemy models that created some relationships, some used backref some used back_populates. I was stumped why, I had never came accross backref before and I felt skill issues sinking in.

https://docs.sqlalchemy.org/en/14/orm/backref.html

As stated in the sqlalchemy docs, backref is a legacy feature. Its shorthand to creating relationships between parent and child, but only adding it to the parent. While this is simpler it introduces some invisible magic.

How do you pronounce URL, is it U.R.L or Earle? I’m about 50/50, mostly when I am in a hurry I use Earle as it is one syllable and easy to say. I picked this up from MPJ of fun fun function, who took over Dev Tips. In this episide Jim uses Earle and they make fun of him. If it’s good enough for Jim, I am done with my 50/50 and I’m going all in on Earle.

Episode also included a fastinating corrdinated attack that used Ars Technica profile photos communicate directions for the next attack via query parameters in the image url.

This really makes me want to try Dolphin Mixtral with ollama now. It looks very impressive from this video. The ability to keep adding features before becoming confused is though with a lot of these llms.

Being chat based, this is not a co pilot replacement. I was really hoping for an in line co pilot like tool that I can run locally. I have not used co pilot yet, but I have had great luck with codeium.

Great take on low code. I have definitely felt the pressure of being presented low code options, “look it does almost everything you need, and you can do it without code.” Granted there are tons of great low code environments that serve their markets well (things like zapier).

As pointed out here when they fall short rather than being hard, it goes to nearly impossible. As Theo points out here many applications follow an 80/20 rule. 80% of the app is really easy to put together, and takes about 20% of the time, probably less. What no code does is it takes that 80% that is already easy, makes it even easier ( pitches it as faster whether or not that is true ), and makes the last 20% of the project impossibly hard to create and maintain, so you just should have picked a tool that had the capability of doing the whole thing from the start anyways.

I’ve heard prime say just give it the one eyed fighting kirby so many times, and execute it few times, and there is no way to find it online, so this will be the link that I will come to, when I need to remember what @theprimeagen means when he says Give it the one eyed fighting kirby.

:s/\(.*\);/console.log(\1)

So what is this? #

This is a vim substitute comand to replace text in the buffer. the one eyed fighting kirby is a regex capture group to capture everything between matches, and assign it a value to place back in after the match.

substitute in a nutshell, :s/<what you want to replace>/<what you want to replace with>

Here is a contrived example of text.

...

This is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas.

❯ mods -f 'I am trying to have fun on my minecraft server and am creating a minecraft datapack send me some load.mcfuncions that will make it fun'

You can continue the conversation with a -C

❯ mods -C -f 'I like where you are going with number 4, can you make it so that it runs when a player opens a door'

You can pass it some data

This is a pretty sweet interface into llms. I used it a bit with my son tonight while he was asking me for datapack ideas.

❯ mods -f 'I am trying to have fun on my minecraft server and am creating a minecraft datapack send me some load.mcfuncions that will make it fun'

You can continue the conversation with a -C

Today I was running some sqlmodel queries through the sqlalchemy orm. Admittedly I’ve not done enough orm queries before, and I’ve done quite a bit of raw sql. I was trying to get objects from two separate models that had relationships setup.

session.query(User, Images).where(User.id == 3).all()

It is incredibly slow, and gives me the following warning.

SELECT statement has a cartesian product between FROM element(s)

What I learned from the SQLModel docs is that you should give it a join to correct this and go much faster.

html code generated by my jinja templates generally look half garbage because of indents and whitespace all over the place. I just learned about these pesky Whitespace Control characters that can get rid of the whitespace added from templating.

You can also strip whitespace in templates by hand. If you add a minus sign (-) to the start or end of a block (e.g. a For tag), a comment, or a variable expression, the whitespaces before or after that block will be removed:

Most bloggers on my twitter blog right into a file that goes on git. I kinda expected to have more database folk. I have my blog in markdown on git and the editing experience is top notch. I can just find files edit them in MY EDITOR, push them and I got a post. I am running thoughts in a sqlite database with a fastapi backend, and holy crap the instant nature of posting feels so much better. Both sides have good points.

DataDog ddqa is building out a textual app and deploying it with pyapp. They have CI setup to fully build and cross compile their textual tui into github releases that you can just download from their releases page. This is something I am looking at for markata. This would be pretty sweet to be able to make it just work on places like windows. It would also be interesting to try to build a full desktop app with pyapp.

Excluding routes from fastapi docs, can be done from the route configuration using `include_in_schema`. This is handy for routes that are not really api based or duplicates.

From the Docs #

from fastapi import FastAPI app = FastAPI() @app.get("/items/", include_in_schema=False) async def read_items(): return [{"item_id": "Foo"}] 

trailing slash #

I’ve had better luck just routing both naked and trailing slash routes in fastapi. I’ve had api’s deployed as a subroute to a site rather than a subdomain, and the automatic redirect betweens them tended to always get messed up. This is pretty easy fix for the pain is causes just give vim a yyp, and if you don’t want deuplicates in your docs, ignore one.

...

This is a handy guide to cancelling stripe subscriptions.

# Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys import stripe stripe.api_key = "sk_test_51ODvHtB26msLKqCAPBAo1qkBBuIfT5tQBX6YFWCLMsPixIExxITCRVa9tNCIqkdQS8olhR79NYXsFWBPKsM3LbGO00zEcNQfNI" stripe.Subscription.modify( "sub_49ty4767H20z6a", cancel_at_period_end=True, )

You can even inverse it by flipping True to False and re activate the subscription.

You can find your customers next billing date through the stripe api by using Invoice. and passing in customer, customer_details, subscription, or schedule.

import stripe stripe.api_key = "sk_test_51ODvHtB26msLKqCAPBAo1qkBBuIfT5tQBX6YFWCLMsPixIExxITCRVa9tNCIqkdQS8olhR79NYXsFWBPKsM3LbGO00zEcNQfNI" invoice = stripe.Invoice.upcoming(customer="cus_NeZwdNtLEOXuvB")

Within the invoice, you can find the next_payment_attempt as a epoch.

Stripe has it’s own query language for querying data. I’m just getting into using it and it seems pretty good so far. I needed to lookup the price for products. I was able to find prices for my product using the python api as shown below.

Prefix Description Notes ac_ Platform Client ID Identifier for an auth code/client id. acct_ Account ID Identifier for an Account object. aliacc_ Alipay Account ID Identifier for an Alipay account. ba_ Bank Account ID Identifier for a Bank Account object. btok_ Bank Token ID Identifier for a Bank Token object. card_ Card ID Identifier for a Card object. cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object. ch_ Charge ID Identifier for a Charge object. cn_ Credit Note ID Identifier for a Credit Note object. cs_live_ Live Checkout Session ID Identifier for a checkout Session object in live mode. cs_test_ Test Checkout Session ID Identifier for a checkout Session object in test mode. cus_ Customer ID Identifier for a Customer object. dp_ Dispute ID Identifier for a Dispute object. evt_ Event ID Identifier for an Event object. fee_ Application Fee ID Identifier for an Application Fee object. file_ File ID Identifier for a File object. fr_ Application Fee Refund ID Identifier for an Application Fee Refund object. iauth_ Issuing Authorization ID Identifier for an Issuing Authorization object. ic_ Issuing Card ID Identifier for an Issuing Card object. ich_ Issuing Card Holder ID Identifier for an Issuing Card Holder object. idp_ Issuing Dispute ID Identifier for an Issuing Dispute object. ii_ Invoice Item ID Identifier for an Invoice Item object. il_ Invoice Line Item ID Identifier for a Invoice Line Item object. in_ Invoice ID Identifier for an Invoice object. ipi_ Issuing Transaction ID Identifier for an Issuing Transaction object. link_ File Link ID Identifier for a File Link object. or_ Order ID Identifier for an Order object. orret_ Order Return ID Identifier for an Order Return object. person_ Person ID Identifier for a Person object. pi_ Payment Intent ID Identifier for a Payment Intent object. pk_live_ Live public key Public key in a live environment. pk_test_ Test public key Public key in a test environment. pm_ Payment Method ID Identifier for a Payment Method object. po_ Payout ID Identifier for a Payout object. price_ Price ID Identifier for a Price object. prod_ Product ID Identifier for a Product object. prv_ Review ID Identifier for a Review object. pst_live_ Live Connection token Connection token in a live environment. pst_test_ Test Connection token Connection token in a test environment. py_ Payment ID Identifier for a Payment object. pyr_ Payment Refund ID Identifier for a psuedo Refund object of a payment. qt_ Quote ID Identifier for a Quote object. rcpt_ Receipt ID Identifier for a receipt. re_ Refund ID Identifier for a Refund object. req_ Request ID Identifier for a HTTP Request rk_live_ Live restricted key Restricted key for live environment eg. stripe-cli rk_test_ Test restricted key Restricted key for test environment eg. stripe-cli seti_ Setup Intent ID Identifier for a Setup Intent object. si_ Subscription Item ID Identifier for a Subscription Item object. sk_live_ Live secret key Secret key in a live environment. sk_test_ Test secret key Pecret key in a test environment. sku_ SKU ID Identifier for a SKU object. sli_ Subscription Line Item ID Identifier for a Subscription Line Item object. sqr_ Scheduled Query Run ID Identifier for a Scheduled Query Run object. src_ Source ID Identifier for a Source object. src_ Source ID Identifier for a Source object. sub_ Subscription ID Identifier for a Subscription object. tml_ Terminal Location ID Identifier for a Terminal Location object. tmr_ Terminal Reader ID Identifier for a Terminal Reader object. tok_ Token ID Identifier for a Token object. trr_ Transfer ID Identifier a Transfer object. tu_ Topup ID Identifier for a Topup object. txi_ Tax ID Identifier for a customer Tax object. txn_ Transaction ID Identifier for a Transaction object. txr_ Tax Rate ID Identifier for a Tax Rate object. we_ Webhook Endpoint ID Identifier for a webhook endpoint. whsec_ Webhook Secret Secret key for signing a web hook.

Stripe has so many keys and ids this is a very helpful list to decode what exactly an id is for.

Dang this is such a good message. I can’t exactly relate to being forced into the overworking situation that PirateSofware is talking about. I can relate to being conditioned to feeling a certain way and changing that is very difficult. I can also relate to not feeling like I am getting enough done in the day. Sometimes a bit of separation is good.