det.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon Server des Unterhaltungsfernsehen Ehrenfeld zum dezentralen Diskurs.

Administered by:

Server stats:

1.9K
active users

#python

147 posts129 participants11 posts today

Is there enough reuse opportunities for a `catdog_typing` library?

A catdog being a union of types where the developer needs more control over the duck type interface, e.g. `str | list[str]` - by duck typing, iteration does what you probably don't want. So ideally these pairs get wrapped and the duck type interface is replaced with something sensible.

`str | Path | 'filelike'` seem like another common catdog.

"Are generators mutable?" - a student

I can't stop thinking about how interesting this question is.

When you loop over a generator (or any iterator) you change its state.

That seems like it would make them "mutable". If an object maintains internal state that can change, surely that object must be mutable, right?

Well, if a tuple "contains" a list and the list changes, is the tuple mutable?

Many #Python users would say "no, because the tuple's state is just a reference to a list". 🧵

The day before treason day (jk) is a terrible time to announce anything, so consider this a teaser.

I've spend the last two afternoons hacking on an experimental terminal UI for a AI coding agent called Toad 🐸

Will be posting more soon. Follow me if you aren't already!

Here's a video of it in action:

Note that this is a real app, but the AI interaction are mocked. WDYT? Should I make this real?

youtube.com/watch?v=cuVRs7e1Bq

Created a Neovim :neovim: configuration for writing Ansible playbooks/roles/collections. With linting, auto-completion, highlighting of blocks, indentation, git integration and nice UI.

If someone is interested, I put it on my Codeberg here: codeberg.org/Larvitz/nvim-ansi together with a README.md, that explains keybindings, installation instructions etc.

It's also good for Python software development and contains the LSP definitions for that as well. But the primary goal, was to create an Ansible development environment with all bells and whistles :-)

#nvim#neovim#vim