Published

All published posts

2604 posts latest post 2026-08-19 simple view
Publishing rhythm
Aug 2026 | 30 posts
Check out coolify by coollabsio. It’s a well-crafted project with great potential. An open-source & self-hostable Heroku / Netlify / Vercel alternative.

The next version of markata will be around a full second faster at building it’s docs, that’s a 30% bump in performance at the current state. This performance will come when virtual environments are stored in the same directory as the source code.

“One lone jedi stands in Glowing chains of interconnected network of technological cubes, in the middle of a futuristic cyberpunk dubai city, in the art style of dan mumford and marc simonetti, atmospheric lighting, intricate, volumetric lighting, beautiful, sharp focus, ultra detailed” -s50 -W800 -H350 -C7.5 -Ak_lms -S1657735302

What happened?? #

I was looking through my profiler for some unexpected performance hits, and noticed that the docs plugin was taking nearly a full second (sometimes more), just to run glob.

    |  |- 1.068 glob  markata/plugins/docs.py:40
    |  |  |- 0.838 <listcomp>  markata/plugins/docs.py:82
    |  |  |  `- 0.817 PathSpec.match_file  pathspec/pathspec.py:165
    |  |  |        [14 frames hidden]  pathspec, <built-in>, <string>

Python scandir ignores hidden directories #

I started looking for different solutions and what I found was that I was hitting pathspec with way more files than I needed to.

len(list(Path().glob("**/*.py")))
# 6444
len([Path(f) for f in glob.glob("**/*.py", recursive=True)])
# 110

After digging into the docs I found that glob.glob uses os.scandir which ignores ‘.’ and ‘..’ directories while Path.glob does not.

https://docs.python.org/3/library/os.html#os.scandir

results? #

Now glob.py from the docs plugin does not even show up in the profiler.

I opened up ipython and saw the following results. For some reason as I hit docs.glob it was only hitting 488 ms from ipython, but it was still a massive improvement over the original.

%timeit docs.glob(m)
# 488 ms ± 3.05 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

%timeit docs.glob(m)
# 9.37 ms ± 90.9 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)
I’m impressed by minijinja from mitsuhiko. MiniJinja is a powerful but minimal dependency template engine for Rust compatible with Jinja/Jinja2
I’m really excited about gpt-engineer, an amazing project by AntonOsika. It’s worth exploring! Platform to experiment with the AI Software Engineer. Terminal based. NOTE: Very different from https://gptengineer.app
tidwall has done a fantastic job with jj. Highly recommend taking a look. JSON Stream Editor (command line utility)
I recently discovered elia by darrenburns, and it’s truly impressive. A snappy, keyboard-centric terminal user interface for interacting with large language models. Chat with ChatGPT, Claude, Llama 3, Phi 3, Mistral, Gemma and more.

AUR.">paru is an aur helper that allows you to use a package manager to install packages from the aur.

What’s the Aur #

The Aur is a set of community managed packages that can be installed on arch based distros.

Why a helper? #

paru just makes it easy, no clone and run makepkg. You can do everything paru can do using the built in pacman installer.

Manual Install from the Aur #

You will need to manually instal pacman from the aur in order to get started.

sudo pacman -S --needed base-devel
git clone https://aur.archlinux.org/paru.git
cd paru
makepkg -si

Installing packages with paru #

Once setup you are ready to install packages from the AUR just like the core repos.

# you can update your system using paru
paru -Syu

# you can install packages from the AUR
paru -S tailscale
paru -S prismlauncher

# even core repo packages can be installed
paru -S docker

Paru in Docker #

Here is a snippet from my devtainer dockerfile. Where I use paru to install packages from the AUR inside of a dockerfile.

FROM archlinux

RUN echo '[multilib]' >> /etc/pacman.conf && \
    echo 'Include = /etc/pacman.d/mirrorlist' >> /etc/pacman.conf && \
    pacman --noconfirm -Syyu && \
    pacman --noconfirm -S base-devel git && \
    groupadd --gid 1000 devtainer && \
    useradd --uid 1000 --gid 1000 -m -r -s /bin/bash devtainer && \
    passwd -d devtainer && \
    echo 'devtainer ALL=(ALL) ALL' > /etc/sudoers.d/devtainer && \
    mkdir -p /home/devtainer/.gnupg && \
    echo 'standard-resolver' > /home/devtainer/.gnupg/dirmngr.conf && \
    chown -R devtainer:devtainer /home/devtainer && \
    mkdir /build && \
    chown -R devtainer:devtainer /build && \
    cd /build && \
    sudo -u devtainer git clone --depth 1 https://aur.archlinux.org/paru.git && \
    cd paru && \
    sudo -u devtainer makepkg --noconfirm -si && \
    sed -i 's/#RemoveMake/RemoveMake/g' /etc/paru.conf && \
    pacman -Qtdq | xargs -r pacman --noconfirm -Rcns && \
    rm -rf /home/devtainer/.cache && \
    rm -rf /build

USER devtainer
RUN sudo -u devtainer paru --noconfirm --skipreview --useask -S \
    bat \
    cargo \
    direnv \
    dua-cli \
    dust \
    fd

Final Thoughts #

There are other options out there, paru seemed to be the most supported at the time I started using arch and there has been no other reason for me to change it. It’s treated me well for nearly a year now.

I took a break

Life comes in waves, and sometimes you need to set down some of your projects to focus on others. For the first part of 2023 I’ve really had a lot of family stuff to focus on, we also are pretty new homeowners and are still trying to get our new to us house cleaned up and modernized. Side Projects # You can see in my growing list of repos that I have poked around on quite a few side projects over the past few months. This has been quite relaxng to me, mostly things that I use to learn from, but also a lot that are tools and things I use that bring me joy. Pydantic # I haven’t wrote about it at all yet, but I have really been starting to lean into pydantic on all of these side projects. I have really been enjoying the type system. A good friend @pypeaday got me hooked and we have been throwing around this phrase that he learned from a math professor “Make it So”. The idea boils down to leveraging pydantic to make all the values you want to exist up front, or fail validation, then have n…
I’m impressed by swenv.nvim from AckslD. Tiny plugin to quickly switch python virtual environments from within neovim without restarting.
I’m really excited about pylyzer, an amazing project by mtshiba. It’s worth exploring! A fast, feature-rich static code analyzer & language server for Python

Pydantic and singledispatch

I was reading about pydantic-singledispatch from Giddeon’s blog and found it very intersting. I’m getting ready to implement pydantic on my static site generator markata, and I think there are so uses for this idea, so I want to try it out. The Idea # Let’s set up some pydantic settings. We will need separate Models for each environment that we want to support for this to work. The whole idea is to use and type hints to provide unique execution for each environment. We might want something like a path_prefix in prod for environments like GithubPages that deploy to while keeping the root at in dev. Settings Model # Here is our model for our settings. We will create a CommonSettings model that will be used by all environments. We will also create a model that will be used in dev and that will be used in prod. We will use as the discriminator so pydantic knows which model to use. Singledispatch # Now let’s create our function. We will use to provide a unique execution for each environment…
2 min read
I’m impressed by pandas-ai from sinaptik-ai. Chat with your database or your datalake (SQL, CSV, parquet). PandasAI makes data analysis conversational using LLMs and RAG.
If you’re into interesting projects, don’t miss out on frogmouth, created by Textualize. A Markdown browser for your terminal