David Brochart
2.3K posts

David Brochart
@davidbrochart
Better not to start, once begun better to finish.
Paris, France Katılım Nisan 2009
727 Takip Edilen1.6K Takipçiler

I'm filing issues for new features in tdiff in case an AI out there decides to go and implement them :)
github.com/davidbrochart/…
English


I just released tdiff, a Textual diff viewer based on @willmcgugan's awesome textual-diff-view.
github.com/davidbrochart/…
English

I created Python bindings for Facebook's Yoga flexbox layout engine (entirely using AI):
github.com/davidbrochart/…
It's part of a bigger project to provide Python bindings to opencode's opentui.
English

@fvoron Oh, it won't be in the core library. I'm going to publish it separately.
English

@pydantic @marcelotryle Nice, how about a real Jupyter integration inside Logfire? 😎
English

We just revamped the Logfire Explore view. Enjoy a notebook-like interface to query your trace data with SQL helped by a new AI assistant.
Watch @marcelotryle walkthrough the feature. youtube.com/watch?v=IrgpXq…

YouTube
English

@prefix_dev Might not be a good example, because NumPy will be installed through SciPy?
English

@maartenbreddels Yeah, JavaScript and Python are not too different.
English

I'm vibe coding a port of Yjs to Python in:
github.com/davidbrochart/…
Quite impressed by @mistralvibe so far.
English

I was doing TUIs before they were cool #justsaying
Will McGugan@willmcgugan
Great googly moogly. We've released a new version of Textual! The TUI library for #Python 🎉 This version has all the stuff I've been banging on about for months. CSS, devtools, live editing, data-tables, and more... Here's the announcement: textualize.io/blog/posts/tex…
English

@willmcgugan AnyIO has async versions of Path operations, that are run in a thread. It also supports subinterpreters:
anyio.readthedocs.io/en/stable/subi…
English

Further refinements to the fuzzy path searching.
I was using sub interpreters to do the matching across cores. Worked great, but it took ~300ms to start all those Python instances. It happens one time, but the delay was noticeable
The fix was to ensure the code in the interpreter didn't pull in more imports that necessary. With that in place it is under 50ms.
I've also fixed an issue with the directory scanning, where it was going multiple parallel scans. 🤦♂️ Now the initial directory scan is faster.
Fixed a bunch of Path operations. Things like Path.resolve() touch the filesystem and will block asyncio for a brief period, potentially cause a tiny stutter. Always do those in asyncio.to_thread.
Finally, I added truncation of the paths with a midline horizontal ellipsis (⋯) at the left if there is truncation. This makes much more sense for paths, where the final component should have priority.
I *could* wrap the paths, but I figured that might look odd. WDYT?
New Toad release coming tomorrow.
English

Just published textual-editor to PyPI.
It's a textual widget that is similar to TextArea but that actually runs a real editor and connects it to an embedded terminal emulator, so that you get all the power of neovim (or whatever your preferred editor is).
github.com/davidbrochart/…

English


@samuelcolvin @mitsuhiko Very interesting, I can see a use-case with Jupyter.
English

Fuck it, a bit early but here goes:
Monty: a new python implementation, from scratch, in rust, for LLMs to run code without host access.
Startup time measured in single digit microseconds, not seconds.
@mitsuhiko here's another sandbox/not-sandbox to be snarky about 😜
Thanks @threepointone @dsp_ (inadvertently) for the idea.
github.com/pydantic/monty
English








