@darrenburns@fosstodon.org avatar

darrenburns

@darrenburns@fosstodon.org

Python engineer 🐍

This profile is from a federated server and may be incomplete. Browse more on the original instance.

darrenburns, to random
@darrenburns@fosstodon.org avatar

Had some fun integrating VS Code style theme previews and switching into the Textual command palette for my app 👨‍🎨

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

Here's an early clip of my new (work in progress) app: Posting.

It's an HTTP client (like Postman, Insomnia, etc) but it runs entirely in the terminal. Keyboard-centric, snappy, and works over SSH. It's written in Python using the Textual framework.

https://github.com/darrenburns/posting

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

In Elia 1.7 you can rename chats by pressing ctrl+r or clicking the chat title. Just released!

https://github.com/darrenburns/elia

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

Elia 1.6 adds the -i option to run under your prompt (not fullscreen).

In the example below, we use the u keybind to quickly grab the first code block in the response, and y to copy it to the clipboard.

https://github.com/darrenburns/elia/releases/tag/1.6.0

video/mp4

darrenburns,
@darrenburns@fosstodon.org avatar

The default model has also changed to GPT-4o, but you can of course set your own default via config file or command line.

I also added the (overdue) ability to archive chats.

video/mp4

darrenburns,
@darrenburns@fosstodon.org avatar

You can also change the theme used for syntax highlighting inside message using a new option in the config file. Any pygments theme is supported 🎨

darrenburns, to python
@darrenburns@fosstodon.org avatar

I just added support for Gemini 1.5 Pro and the new Gemini 1.5 Flash in Elia 1.5 💫

https://github.com/darrenburns/elia/releases/tag/1.5.0

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

My plan today is to sit in the sun and write textual-autocomplete v2.0.

I suspect my laptop battery will last about 2 hours though (Intel MacBook problems).

darrenburns, to random
@darrenburns@fosstodon.org avatar

pyinstrument is the greatest thing ever created.

I used it while writing Textual's TextArea widget and within 30 mins cut 97% off of key handling time.

I just used it again for 10 mins and cut the startup time of my app from 2.7s to 1.3s.

davep, to random
@davep@fosstodon.org avatar

Today @darrenburns has rage quit VSCode so hard he’s looped around to rage using it.

darrenburns,
@darrenburns@fosstodon.org avatar

@davep why do i have to type "self" though?

darrenburns,
@darrenburns@fosstodon.org avatar

@davep it's making me type open parentheses :(

darrenburns, to random
@darrenburns@fosstodon.org avatar

There's something wrong with my Discord client :(

darrenburns, to random
@darrenburns@fosstodon.org avatar

A while back I hacked together (don't look at the code please) a tool called dunk which you can pipe your git diff output into and it'll show you the diff in an easier to read form:
https://github.com/darrenburns/dunk

I have a fish shell abbreviation set up as gdd which does git diff | dunk | less -R, so you can page through the output and see exactly what you've changed since your last commit.

I wish there were better options for interacting with Git via Python :blobcatsad:

darrenburns, to random
@darrenburns@fosstodon.org avatar

.text-area--selection {
text-style: reverse bold italic;
}

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

Goodbye pyenv I will use rye instead.

Uninstalled pipx and will use rye install instead.

Black is gone too. rye fmt instead.

rye lint will now lint my code.

It's the ryevolution.

darrenburns, to random
@darrenburns@fosstodon.org avatar

Writing some Python today and dependency management stressed me out so much that I switched my project from Poetry to Rye. So far so good!

darrenburns, to random
@darrenburns@fosstodon.org avatar

I'm completely hooked on watching speedrunning documentaries on YouTube. This is so cool! This seems more exciting than playing the games normally 🤩

Techniques go undiscovered for years, and the methods for discovering skips can be highly technical. Games are reverse engineered in order to understand them at a low level, just to save seconds from a run.

I've particularly enjoyed learning about speedruns of Portal 1/2, Pokemon Red/Blue, Halo 2, and Celeste.

darrenburns, to random
@darrenburns@fosstodon.org avatar

A large part of my role now involves threatening my colleagues with "a visit from the walrus police" relating to the use of Python's walrus operator in many scenarios.

I can't think of any examples where I find the walrus operator actually useful outside of the loop condition in a while loop. Most of the time it just reduces readability for me by hiding an assignment somewhere I wouldn't expect it.

Can anyone sell me on other use-cases so the walrus police may rest?

darrenburns, to random
@darrenburns@fosstodon.org avatar

A not so interesting clip of my current project - adding undo/redo to Textual's TextArea widget...

video/mp4

darrenburns, to random
@darrenburns@fosstodon.org avatar

Does anyone know of heuristics that are used to decide exactly what gets undone when you "undo" in a text editor?

I'm currently batching edits by considering time since last edit, occurrence of any newline characters in replaced or inserted text, and a limit of the number of characters in a batch.

I wonder if there are any other reasonable heuristics that might improve UX that could be easy additions 🤔

darrenburns, to python
@darrenburns@fosstodon.org avatar

We're getting ready to release soft wrapping support for the TextArea widget in Textual! This was one of the toughest projects I've ever worked on 😅

Excited to see people building new apps with it ✨

An example of soft wrapping in the Textual text area widget.

darrenburns, to random
@darrenburns@fosstodon.org avatar

One of the most overlooked features of Textual is hot-reloading on styling changes. It allows you to quickly iterate on layout and design while keeping your app interactive 🏎️

video/mp4

darrenburns, to python
@darrenburns@fosstodon.org avatar

Added some extra styling for Markdown inside the TextArea widget 🎨

video/mp4

darrenburns, to python
@darrenburns@fosstodon.org avatar

Dracula 🧛‍♂️ and some bracket matching!

video/mp4

darrenburns, to python
@darrenburns@fosstodon.org avatar

Working on the TextArea widget for Textual has been a lot of fun, and I'm excited to see what apps people build with it soon!

Here's a little demo of it in action...

video/mp4

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines