<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Taras&#39; Blog on AI, Perf, Hacks</title>
    <link>/</link>
    <description>Recent content on Taras&#39; Blog on AI, Perf, Hacks</description>
    <image>
      <title>Taras&#39; Blog on AI, Perf, Hacks</title>
      <url>/images/papermod-cover.png</url>
      <link>/images/papermod-cover.png</link>
    </image>
    <generator>Hugo -- 0.147.0</generator>
    <language>en</language>
    <copyright>Taras Glek</copyright>
    <lastBuildDate>Mon, 07 Jul 2025 09:46:32 +0300</lastBuildDate>
    <atom:link href="/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The Case for Secrets as Code: Stop Click-Managing Secrets</title>
      <link>/posts/secrets-as-code/</link>
      <pubDate>Mon, 07 Jul 2025 09:46:32 +0300</pubDate>
      <guid>/posts/secrets-as-code/</guid>
      <description>&lt;p&gt;We live in the age of software as a service, secret keys are everywhere. Yet somehow it is still normal to click-manage secrets. Smart people share them via signal,smarter people, share them via a password manager like Bitwarden. Super-advanced people punch them into GitHub UI and only let github actions have access to secrets. Infra-devops people spin up Vault or AWS secret manager or similar to inject secrets. In all situations secrets have a lifecycle that is completely disconnected from code, causing the two to get out of sync or worse.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Stupid WASM Hack to Get Native Binaries</title>
      <link>/posts/stupid-wasm-hack-to-get-native-binaries/</link>
      <pubDate>Thu, 26 Jun 2025 22:12:27 +0300</pubDate>
      <guid>/posts/stupid-wasm-hack-to-get-native-binaries/</guid>
      <description>&lt;p&gt;I relax by programming. It&amp;rsquo;s especially satisfying to play with something that changes how I think about a topic. I once discovered &lt;a href=&#34;/posts/eget-that-binary-from-github/&#34;&gt;eget&lt;/a&gt; and realized that most modern software ships as a single binary attached to a GitHub release.&lt;/p&gt;
&lt;p&gt;Recently my friend, David, had a further realization that what would make eget better is if it itself was easier to get (ha!). I thought it would be delightful to have a WASI eget cli to fetch native binaries. These days almost everything cross-compiles trivially to WASI command modules. Those are basically little unix cli apps that have a small footprint and can run anywhere (something Java never achieved).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Focus and Context and LLMs</title>
      <link>/posts/focus-and-context-and-llms/</link>
      <pubDate>Sun, 08 Jun 2025 10:45:01 +0300</pubDate>
      <guid>/posts/focus-and-context-and-llms/</guid>
      <description>&lt;p&gt;I decided to write down some thoughts on &lt;a href=&#34;https://simonwillison.net/2025/Jun/5/wrecking-its-environment-in-a-loop/#atom-everything&#34;&gt;agentic coding&lt;/a&gt; and why it&amp;rsquo;s a very hyped wrong turn.&lt;/p&gt;
&lt;p&gt;Let me start with some background on my LLM experience. I adopted LLMs into my work in Aug 2020. I was sold when I saw that GPT-3 could generate usable SQL statements. Something that used to take 4-8 hours of RTFMing, now took 15min. I have since worked on &lt;a href=&#34;https://chatcraft.org&#34;&gt;chatcraft.org&lt;/a&gt;, various RAG frameworks, etc. I use &lt;a href=&#34;https://github.com/Aider-AI/aider/&#34;&gt;aider&lt;/a&gt; heavily for work, frequently switch models, have been &lt;a href=&#34;https://taras.glek.net/posts/gpt-aria-experiment/&#34;&gt;struggling&lt;/a&gt; with tool calling during dark ages before MCP.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My E Ink Laptop: ThinkBook Plus Gen 4</title>
      <link>/posts/my-e-ink-laptop/</link>
      <pubDate>Sat, 10 May 2025 11:59:24 +0300</pubDate>
      <guid>/posts/my-e-ink-laptop/</guid>
      <description>&lt;p&gt;I read a lot, blogs, papers, news, etc. My eyes are sensitive to artificial light so I prefer to read on e-ink. I also like to work outside, so things that try to fight the sun by feebly (relative to sun) shining even more light into my eyes are frustrating. I also find that e-ink screen limitations like slower updates and lack of color to be wonderful for not getting distracted by shiny pictures, videos.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create Missing RSS Feeds With LLMs</title>
      <link>/posts/create-missing-rss-feeds-with-llms/</link>
      <pubDate>Sun, 27 Apr 2025 19:23:16 +0300</pubDate>
      <guid>/posts/create-missing-rss-feeds-with-llms/</guid>
      <description>&lt;p&gt;It used to be that blogs all had RSS feeds. Somehow there are more blogs than ever before, but some people do not bother with setting up an RSS feed.&lt;/p&gt;
&lt;p&gt;The following blogs have nice content, but are annoying to follow without RSS.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://aider.chat/blog/&#34;&gt;https://aider.chat/blog/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://jkatz05.com/&#34;&gt;https://jkatz05.com/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://getreuer.info/&#34;&gt;https://getreuer.info/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Every time I stumble on one of these, it takes me a while to remember a fun workaround. I decided to write this down as a blog post so I have an easier time looking up the details.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My blog is no longer hostage to some CSS tooling</title>
      <link>/posts/switching-to-papermod/</link>
      <pubDate>Sat, 12 Oct 2024 13:04:48 +0300</pubDate>
      <guid>/posts/switching-to-papermod/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m switching my blog over to a new hugo theme. It looks slightly nicer now, but migrations are hard and there will be some broken posts.&lt;/p&gt;
&lt;h3 id=&#34;background&#34;&gt;Background&lt;/h3&gt;
&lt;p&gt;When I was at Mozilla back in pre-2014 years I blogged on their corp wordpress setup. It was awful. I hated the WP editor, I hated the WP themes, I hated the WP plugins.&lt;/p&gt;
&lt;p&gt;I had cool blog posts on there, but they were all deleted when I left. I managed to get a backup, but never found the energy to restore it. The posts are on tech which is long obsolete, so the motivation is decreasing with time. I did spent the time to rewrite the coolest blog post I had on there on &lt;a href=&#34;/posts/ebpf-mmap-page-fault-tracing/&#34;&gt;tracing how page faults work&lt;/a&gt; while taking the time to switch from SystemTap to Ebpf.&lt;/p&gt;</description>
    </item>
    <item>
      <title>PSA: eget That Executable From GitHub</title>
      <link>/posts/eget-that-binary-from-github/</link>
      <pubDate>Sat, 07 Sep 2024 15:41:39 +0300</pubDate>
      <guid>/posts/eget-that-binary-from-github/</guid>
      <description>&lt;p&gt;tldr: GitHub is where most CLI tools live. eget is a tool that makes it easy to
download and install their binaries.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Black and White Reading Setup</title>
      <link>/posts/my-black-and-white-reading-setup/</link>
      <pubDate>Thu, 05 Sep 2024 12:40:08 +0300</pubDate>
      <guid>/posts/my-black-and-white-reading-setup/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;re happy reading on your laptop or Apple device, you can skip this post.&lt;/p&gt;</description>
    </item>
    <item>
      <title>llama.cpp: use local models with chatcraft</title>
      <link>/posts/llama.cpp-local-mode-chatcraft.org/</link>
      <pubDate>Mon, 08 Jul 2024 10:26:27 +0200</pubDate>
      <guid>/posts/llama.cpp-local-mode-chatcraft.org/</guid>
      <description>&lt;p&gt;I needed a way to do some programming while offline. These days I feel very unproductive without &lt;a href=&#34;https://chatcraft.org&#34;&gt;https://chatcraft.org&lt;/a&gt; (the best chat UI for programming) and a good LLM to chat with about coding.&lt;/p&gt;
&lt;p&gt;Chatcraft needed a few small fixes to enable llama.cpp support. Here&amp;rsquo;s how to run models with llama.cpp with chatcraft.org without internet:&lt;/p&gt;
&lt;h2 id=&#34;instructions&#34;&gt;Instructions&lt;/h2&gt;
&lt;p&gt;Install and run llama.cpp. Follow &lt;a href=&#34;https://github.com/ggerganov/llama.cpp&#34;&gt;https://github.com/ggerganov/llama.cpp&lt;/a&gt; instructions for your platform.&lt;/p&gt;
&lt;p&gt;For mac:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;# install llama.cpp
brew install llama.cpp
# start llama.cpp server &amp;amp; auto-download a good small (~6GB) model
llama-server    --hf-repo &amp;quot;bartowski/Llama-3-Instruct-8B-SPPO-Iter3-GGUF&amp;quot;       --hf-file Llama-3-Instruct-8B-SPPO-Iter3-Q6_K.gguf
# For more advanced usage I recommend gemma 27b: the smallest smarter-than-gpt-3.5 model (~21GB)
# llama-server    --hf-repo bartowski/gemma-2-27b-it-GGUF       --hf-file gemma-2-27b-it-Q6_K_L.gguf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Setup local chatcraft dev env by following the instructions in the &lt;a href=&#34;https://github.com/tarasglek/chatcraft.org/blob/main/CONTRIBUTING.md#getting-started&#34;&gt;chatcraft repo&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone https://github.com/tarasglek/chatcraft.org/
cd chatcraft.org
pnpm install
pnpm dev
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;^ will output a development url like &lt;code&gt;http://localhost:5173/&lt;/code&gt;, open it.
Go to chatcraft settings and add &lt;code&gt;http://localhost:8080/v1&lt;/code&gt; to api providers. Enter a dummy api key.&lt;/p&gt;
&lt;h2 id=&#34;enjoy&#34;&gt;Enjoy!&lt;/h2&gt;
&lt;img width=&#34;924&#34; alt=&#34;image&#34; src=&#34;chatcraft.png&#34;&gt;</description>
    </item>
    <item>
      <title>Fast groq-hosted LLMs vs browser jank</title>
      <link>/posts/groq-vs-html-reflows/</link>
      <pubDate>Sun, 19 May 2024 10:23:07 +0300</pubDate>
      <guid>/posts/groq-vs-html-reflows/</guid>
      <description>&lt;p&gt;TLDR: &lt;a href=&#34;https://chatcraft.org&#34;&gt;chatcraft.org&lt;/a&gt; is now smooth as butter and maximally performant thanks to throttling LLM chat-completion rendering via requestAnimationFrame().&lt;/p&gt;</description>
    </item>
    <item>
      <title>Developing markdown.download: Exporing val.town, deno, jsr.io</title>
      <link>/posts/markdown.download/</link>
      <pubDate>Sun, 24 Mar 2024 20:01:23 +0200</pubDate>
      <guid>/posts/markdown.download/</guid>
      <description>&lt;p&gt;I read a lot. I enjoy reading on black and white e-readers. Unfortunately many websites make it hard to read them on simple devices. &lt;a href=&#34;https://markdown.download&#34;&gt;https://markdown.download&lt;/a&gt; is my really simple solution to that. Prepend it to any website and curl:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;curl https://markdown.download/https://dev.to/amnish04/introducing-the-idea-of-web-handlers-in-chatcraft-1b4i
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That turns a user-hostile website into a thing that almost anything can render:&lt;/p&gt;
&lt;img width=&#34;1024px&#34;  alt=&#34;Sample screenshot&#34; src=&#34;screenshot.png&#34;&gt;
&lt;p&gt;It&amp;rsquo;s amazing how much cleaner the web is when stripped down to essence.&lt;/p&gt;
&lt;p&gt;Turns out markdown (or html restricted to what markdown can do) renders fantastic on readers of all types.&lt;/p&gt;
&lt;p&gt;Since markdown.download is so utterly simple, I decided to try using it to learn a new-to-me dev tool: val.town. Rest of this post covers what I learned.&lt;/p&gt;
&lt;p&gt;I initially was going to publish this project as an npm lib and deploy on cloudflare, but was putting it off because I loathe the amount of bureaucracy that involves. I love the type system in Typescript. I love Node.JS because it&amp;rsquo;s the least-bad way to write/deploy apps, but much room for improvement remains. My spare time is too valuable to spend it suffering.&lt;/p&gt;
&lt;h3 id=&#34;valtown-brutally-efficient-microservice-dev-ux&#34;&gt;val.town: brutally efficient microservice dev-ux&lt;/h3&gt;</description>
    </item>
    <item>
      <title>ssh-via-cloudflare-tunnel: Alternative way to expose machines behind NAT</title>
      <link>/posts/cloudflare-ssh/</link>
      <pubDate>Sun, 10 Mar 2024 14:29:26 +0200</pubDate>
      <guid>/posts/cloudflare-ssh/</guid>
      <description>&lt;p&gt;I have an intermittent issue where one of my machines on a specifc network seems to be operational locally on network but not accessible over &lt;a href=&#34;https://netbird.io/&#34;&gt;netbird&lt;/a&gt; some of the time. I could not tell if the problem was due to the network the problematic machine was on or due to netbird.&lt;/p&gt;
&lt;p&gt;So to debug this I:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Setup a grafana node agent to report journald logs to &lt;a href=&#34;grafana.com&#34;&gt;https://grafana.com/&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Setup to docker to log to journald&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Wrote &lt;a href=&#34;https://github.com/tarasglek/ssh-via-cloudflare-tunnel&#34;&gt;ssh-via-cloudflare-tunnel&lt;/a&gt; docker-compose stack to tunnel ssh over websocat to internet over &lt;a href=&#34;https://github.com/cloudflare/cloudflared&#34;&gt;cloudflared&lt;/a&gt;. Set docker compose to restart-on-failure.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Today netbird had some downtime (tailscale had theirs just a few days before that). I was able to log into grafana, look up the temporary hostname cloudflare assigned to me and ssh in using&lt;/p&gt;
&lt;p&gt;&lt;code&gt;ssh -o ProxyCommand=&amp;quot;websocat -E --binary - -v %h&amp;quot; -o ServerAliveInterval=10 wss://library-won-nt-gauge.trycloudflare.com&lt;/code&gt;&lt;/p&gt;
&lt;h1 id=&#34;architecture&#34;&gt;Architecture&lt;/h1&gt;
&lt;pre&gt;&lt;code class=&#34;language-mermaid&#34;&gt;graph TD;
    A[ssh client] &amp;lt;--&amp;gt;|Invoke websocat over ProxyCommand| B[websocat client-mode]
    B &amp;lt;--&amp;gt;|WebSocket to Stdio| D(Cloudflare)
    D &amp;lt;--&amp;gt;|HTTPS to WebSocket| E[cloudflared Server]
    E &amp;lt;--&amp;gt;|Reverse proxy over HTTPS| F[websocat server-mode]
    F &amp;lt;--&amp;gt;|Stdio to SSH| G[sshd server]

    style A fill:#f9f,stroke:#333,stroke-width:2px
    style B fill:#dfd,stroke:#333,stroke-width:2px
    style D fill:#bbf,stroke:#333,stroke-width:2px,
    style E fill:#ddf,stroke:#333,stroke-width:2px,
    style F fill:#dfd,stroke:#333,stroke-width:2px
    style G fill:#f9f,stroke:#333,stroke-width:2px
&lt;/code&gt;&lt;/pre&gt;
&lt;h1 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;This turned out trivial to do. However it took me over 5 years of pondering, discovering ssh ProxyCommand, cloudflared, websocat and deciding to combine them to conveniently expose ssh over web.&lt;/p&gt;
&lt;p&gt;I think it&amp;rsquo;s pretty cool how Cloudflare allows one expose geographically distributed tunnels without requiring any signups. I wish their UX simpler so it was equally easy to expose tunnels with fixed dns. Cloudflare actually has something similar as an &lt;a href=&#34;https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/use-cases/ssh/#connect-to-ssh-server-with-cloudflared-access&#34;&gt;official ssh feature&lt;/a&gt;, but it requires more hoop jumping.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/vi/websocat&#34;&gt;websocat&lt;/a&gt; is amazing. I use websockets a lot more now that I have a robust way to utilize them without writing any code.&lt;/p&gt;
&lt;h1 id=&#34;why-would-i-want-to-do-this&#34;&gt;Why Would I Want To Do This?&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;As a fallback to tailscale/netbird that uses a completely different network topology as in this case&lt;/li&gt;
&lt;li&gt;To temporarily grant ssh to some machine without requiring end-users to install a vpn&lt;/li&gt;
&lt;li&gt;To bypass restrictive gsm/wifi networks that block access to ssh&lt;/li&gt;
&lt;li&gt;As an alternative to port-knocking to obscure ssh (eg hide ssh behind http basic-auth)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;how-would-you-improve-this&#34;&gt;How would you improve this?&lt;/h1&gt;
&lt;p&gt;Checkout &lt;a href=&#34;https://github.com/tarasglek/ssh-via-cloudflare-tunnel&#34;&gt;ssh-via-cloudflare-tunnel&lt;/a&gt; on github.&lt;/p&gt;</description>
    </item>
    <item>
      <title>github-to-sops: Easy way to manage passwords/keys with Github and SOPS</title>
      <link>/posts/github-to-sops-lighter-weight-secret-management/</link>
      <pubDate>Wed, 10 Jan 2024 14:58:46 -0800</pubDate>
      <guid>/posts/github-to-sops-lighter-weight-secret-management/</guid>
      <description>&lt;p&gt;2025 Disclaimer: I used AI to write some of this blog post. I regret this choice.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s face it, managing secrets in software projects can be as thrilling as being stabbed in the eye. Yet, it&amp;rsquo;s a necessary evil that we all have to deal with.&lt;/p&gt;
&lt;p&gt;Problem: we have a set of a developers and set of infrastructure that all needs to share secrets. Would like to minimize infrastructure and keep cognitive load to a minimum so we can focus on writing code. Sure you&amp;rsquo;ve got AWS Secrets Manager and Hashicorp Vault for the heavy lifting, but that&amp;rsquo;s like using a tractor to crack a nut. And then there&amp;rsquo;s the keep-all-your-secrets-in-github-action-ENVs which leads to &amp;ldquo;push-and-pray&amp;rdquo; mentality (&lt;a href=&#34;https://dagger.io/&#34;&gt;https://dagger.io/&lt;/a&gt; talks on CI/CD are awesome). Not exactly the pinnacle of security or convenience, right?&lt;/p&gt;
&lt;p&gt;Enter &lt;a href=&#34;https://github.com/getsops/sops&#34;&gt;SOPS&lt;/a&gt;, the cool kid on the block that encrypts your files without the bullshit (You know it&amp;rsquo;s cool cos it&amp;rsquo;s the latest in a long line of tech abandoned by Mozilla). But setting it up? Still sucks. This post is about how &lt;a href=&#34;https://github.com/tarasglek/github-to-sops&#34;&gt;github-to-sops&lt;/a&gt; helps.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Lightweight Virtualization Metallize Libkrun Vsock</title>
      <link>/posts/lightweight-virtualization-metallize-libkrun-vsock/</link>
      <pubDate>Wed, 30 Aug 2023 12:37:38 +0300</pubDate>
      <guid>/posts/lightweight-virtualization-metallize-libkrun-vsock/</guid>
      <description>&lt;h2 id=&#34;libkrun--krunvm&#34;&gt;libkrun + krunvm&lt;/h2&gt;
&lt;p&gt;Github randomly recommended me &lt;a href=&#34;https://github.com/containers/libkrun&#34;&gt;libkrun&lt;/a&gt; which is a library backing &lt;a href=&#34;https://github.com/slp/krunvm&#34;&gt;krunvm&lt;/a&gt;. It&amp;rsquo;s something similar to firecracker, but even simpler.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trying pixi: Modern package management for Python</title>
      <link>/posts/trying-pixi-modern-python-packaging/</link>
      <pubDate>Fri, 25 Aug 2023 17:04:48 +0300</pubDate>
      <guid>/posts/trying-pixi-modern-python-packaging/</guid>
      <description>&lt;p&gt;I have been working with Python a lot more recently, and it feels like I spend more time fighting packaging than writing code.&lt;/p&gt;
&lt;p&gt;Python&amp;rsquo;s primary package manager, pip, is roughly equivalent to the best 1990s had to offer(Perl CPAN), it makes it depressingly easy to end up with a broken environment.&lt;/p&gt;
&lt;h2 id=&#34;pixi-a-modern-packaging-system-for-python&#34;&gt;Pixi: A modern packaging system for Python&lt;/h2&gt;
&lt;p&gt;pixi is a modern package manager along the lines of deno/pnpm, but for Python. It&amp;rsquo;s a single binary that you can download and run. It will install Python + native packages within a single subdirectory. It will use &lt;code&gt;pixi.toml&lt;/code&gt; file to track dependencies + &lt;code&gt;pixi.lock&lt;/code&gt; to track exact versions of transitive dependencies.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Overlooked on HN: Databases That Process Data Faster Than Memory Bandwidth</title>
      <link>/posts/overlooked-hn-databases-that-process-data-faster-than-memory-bandwidth/</link>
      <pubDate>Mon, 07 Aug 2023 12:44:29 +0300</pubDate>
      <guid>/posts/overlooked-hn-databases-that-process-data-faster-than-memory-bandwidth/</guid>
      <description>&lt;h2 id=&#34;13-gibs-per-core&#34;&gt;13 GiB/s per core!&lt;/h2&gt;
&lt;p&gt;Sneller posted a &lt;a href=&#34;https://news.ycombinator.com/item?id=36137535&#34;&gt;blog on HN&lt;/a&gt; on how they use AVX-512 to decompress data at &lt;strong&gt;13 gigabytes&lt;/strong&gt; per second per core.&lt;/p&gt;
&lt;p&gt;This a fantastic ad for their &amp;ldquo;lets turn logs on S3 into cheap database&amp;rdquo; product. This is a solution I wanted multiple times, will definitely consider them next time the need comes up.&lt;/p&gt;
&lt;h2 id=&#34;faster-than-ram&#34;&gt;Faster than RAM&lt;/h2&gt;
&lt;p&gt;Now this post did not get overlooked, but what did get overlooked is that the post engaged the clickhouse CTO. He posted a link to a presentation on how Clickhouse uses compression to process in-memory data faster than &lt;a href=&#34;https://presentations.clickhouse.com/meetup53/optimizations/&#34;&gt;RAM bandwidth&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As a result of discussion in these comments, clickhouse might get even faster.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Overlooked on HN: Discovering High-quality Technical Content</title>
      <link>/posts/overlooked-on-hn-discovering-technical-content/</link>
      <pubDate>Mon, 07 Aug 2023 10:45:27 +0300</pubDate>
      <guid>/posts/overlooked-on-hn-discovering-technical-content/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m gonna start a column on cool blog posts I found, that got 0 or minimal traction. I suspect I will also have no traction doing that 🤦‍♂️.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;I really enjoy thoughtful writing on deep technical problems. It&amp;rsquo;s even better when one sees thoughtful comments, that further contribute new directions to throughts presented. &lt;a href=&#34;https://news.ycombinator.com/&#34;&gt;HackerNews&lt;/a&gt; is where most of that writing tends to land. Unfortunately it tends to not do well vs trendy, click-baity, etc content. Twitter is even worse.&lt;/p&gt;
&lt;p&gt;First, a blog post on my tooling for reading HN.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Ukrainian Internet Fun &#43; OpenAI</title>
      <link>/posts/ukrainian-internet-fun-openai-helps/</link>
      <pubDate>Sun, 23 Jul 2023 11:43:25 +0300</pubDate>
      <guid>/posts/ukrainian-internet-fun-openai-helps/</guid>
      <description>&lt;h2 id=&#34;the-problem&#34;&gt;The Problem&lt;/h2&gt;
&lt;p&gt;Ukraine had a lot of power outages due to Putin&amp;rsquo;s bombing of our power infrastructure, I needed to switch to fiber + battery-backup to continue able to able to work.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m at a rental apartment and I&amp;rsquo;m not allowed to drill walls. The idiot that layed the internet into the apartment used a 4-wire cat5 cable to save a few pennies, then cemented it in.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Analyzing Github Stats via Clickhouse via Chat</title>
      <link>/posts/querying-github-via-clickhouse-via-chat/</link>
      <pubDate>Sun, 09 Jul 2023 20:43:03 +0300</pubDate>
      <guid>/posts/querying-github-via-clickhouse-via-chat/</guid>
      <description>&lt;p&gt;TLDR: I prompt-engineered the system prompt in chatcraft to turn it into a github analytics tool: &lt;a href=&#34;https://chatcraft.org/c/tarasglek/Wdni7NRmX80ieyNFy6cZy&#34;&gt;github analyst chat&lt;/a&gt;.&lt;/p&gt;
&lt;img width=&#34;703&#34; alt=&#34;Here are the top 10 GitHub projects that have received more stars in the last 2 days than in the previous 2 weeks&#34; src=&#34;https://github.com/tarasglek/chatcraft.org/assets/857083/45a17e0f-6f91-4e7f-8a15-99e1ae1d46d1&#34;&gt;
&lt;h2 id=&#34;longer-story&#34;&gt;Longer Story&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I &lt;a href=&#34;https://github.com/tarasglek/chatcraft.org/issues/132&#34;&gt;suggested&lt;/a&gt; to David that we have a newsfeed of new features on &lt;a href=&#34;https://chatcraft.org&#34;&gt;chatcraft.org&lt;/a&gt;. He replied that we should try to use chatcraft.org to generate those.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Found simonw&amp;rsquo;s &lt;a href=&#34;https://til.simonwillison.net/clickhouse/github-explorer&#34;&gt;blog post&lt;/a&gt; on using a public clickhouse instance.&lt;/p&gt;</description>
    </item>
    <item>
      <title>From Chaos to Control: Overcoming OpenAI Uncertainties with Local Models</title>
      <link>/posts/from-chaos-to-control-overcoming-openai-uncertainties-with-local-models/</link>
      <pubDate>Wed, 14 Jun 2023 11:44:09 +0200</pubDate>
      <guid>/posts/from-chaos-to-control-overcoming-openai-uncertainties-with-local-models/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://chatcraft.org/&#34;&gt;chatcraft.org&lt;/a&gt; is my open source project for working with GPT. It completely changed how I work. Cool thing about chatcraft is that it&amp;rsquo;s completely client-side, almost completely stateless(except for sharing) on serverside.&lt;/p&gt;
&lt;p&gt;I am also working on a project that uses LLMs to help navigate a knowledge base. Making a wrong tech choice there could kill my project. Few thoughts from that perspective:&lt;/p&gt;
&lt;h2 id=&#34;the-3-yolos-of-llm-development&#34;&gt;The 3 YOLOs of LLM development&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;You only live once&amp;rdquo; (YOLO) is a modern adaptation of the Latin phrase &amp;ldquo;Carpe diem,&amp;rdquo; which means &amp;ldquo;Seize the day.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Always Bet on Geohot: Tinygrad Will Win</title>
      <link>/posts/always-bet-on-geohot/</link>
      <pubDate>Thu, 25 May 2023 11:23:14 +0300</pubDate>
      <guid>/posts/always-bet-on-geohot/</guid>
      <description>&lt;p&gt;George Holtz (geohot) just raised &lt;a href=&#34;https://geohot.github.io//blog/jekyll/update/2023/05/24/the-tiny-corp-raised-5M.html&#34;&gt;$5M&lt;/a&gt; for tinygrad and plans to sell a $15,000 Machine Learning AMD Epyc box with &lt;a href=&#34;https://www.amd.com/en/products/graphics/amd-radeon-rx-7900xt&#34;&gt;AMD 7900 XT&lt;/a&gt; video cards. At first glance, this seems like a really risky investment into a low-margin commodity hardware company. AMD can&amp;rsquo;t compete with NVidia, so how can we expect geohot to compete with NVidia on AMD hardware?&lt;/p&gt;
&lt;p&gt;Well, I&amp;rsquo;ve been following geohot for a long while. He delivers what he promises, but does it years later and on different hardware than initially promised :) Here&amp;rsquo;s the timeline of my evolution alongside George that informs my conviction:&lt;/p&gt;</description>
    </item>
    <item>
      <title>A Tale of PGVector and Friends: The Joy Of Software Naming</title>
      <link>/posts/a-tale-of-pgvector-and-friends/</link>
      <pubDate>Tue, 23 May 2023 18:20:05 +0300</pubDate>
      <guid>/posts/a-tale-of-pgvector-and-friends/</guid>
      <description>&lt;p&gt;Ah, the world of software! A place where creativity and collaboration come together to create amazing projects. But sometimes, this world can be a bit&amp;hellip; confusing. Let me tell you a story about the frustration of open source naming, featuring our protagonist: PGVector.&lt;/p&gt;
&lt;p&gt;Once upon a time, I though that pgvector was a &lt;a href=&#34;https://postgresql.org/&#34;&gt;postgresql&lt;/a&gt; extension. And that langchain did not support SQL storage out of the box. After reading the source, turned out there were three things named PGVector:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Chatcraft.org: Developer-focused Open Source ChatGPT</title>
      <link>/posts/chatcraft.org-opensourcechatgpt-for-devs/</link>
      <pubDate>Mon, 08 May 2023 08:40:49 +0300</pubDate>
      <guid>/posts/chatcraft.org-opensourcechatgpt-for-devs/</guid>
      <description>&lt;p&gt;I would like to introduce &lt;a href=&#34;https://chatcraft.org&#34;&gt;ChatCraft.org&lt;/a&gt;: a developer-focused, open source chatgpt frontend. While it&amp;rsquo;s my fav GPT UI (as it was created to make my life more convenient), it&amp;rsquo;s not so much about the features that are complete now as about the fun, collaborative journey ahead. I think we need to explore the design space of GPT-assisted collaboration to write code. The best way to do that is via open source exploration of the concept!&lt;/p&gt;</description>
    </item>
    <item>
      <title>GPT-ARIA: Integrating GPT-3 with Browser Using Accessibility API</title>
      <link>/posts/gpt-aria-experiment/</link>
      <pubDate>Thu, 30 Mar 2023 15:09:04 +0200</pubDate>
      <guid>/posts/gpt-aria-experiment/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/thegpvc/gpt-aria&#34;&gt;https://github.com/thegpvc/gpt-aria&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This was the most interesting prototype I’ve explored in my career so far, and I want to thank &lt;a href=&#34;https://www.thegp.com/&#34;&gt;TheGP&lt;/a&gt; for sponsoring this project. Also thanks to &lt;a href=&#34;https://github.com/chugai&#34;&gt;Oleksandr Chugai&lt;/a&gt; who I partnered with on implementation and &lt;a href=&#34;https://twitter.com/bencmejla&#34;&gt;Ben Cmejla&lt;/a&gt; who helped with prompting.&lt;/p&gt;
&lt;h2 id=&#34;inspiration&#34;&gt;Inspiration&lt;/h2&gt;
&lt;p&gt;I’ve been thinking about browser automation since the early days of my career when I worked at Firefox, where I got to work on performance problems and built things like Firefox Telemetry (Hi, HN haters!). With the rise of large language models (LLMs)—and OpenAI’s recent launch of ChatGPT plugins — things are getting exciting around user agents again. My favorite demo so far is &lt;a href=&#34;https://github.com/nat/natbot&#34;&gt;natbot&lt;/a&gt;, Nat Friedman’s GPT-3-powered browser agent that he launched last October.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trying Cloudflare Pages: Best Server Tech Since cgi-bin</title>
      <link>/posts/cloudflare-pages-kind-of-amazing/</link>
      <pubDate>Sun, 23 Oct 2022 14:28:15 +0300</pubDate>
      <guid>/posts/cloudflare-pages-kind-of-amazing/</guid>
      <description>&lt;h2 id=&#34;cloudflare-pages-&#34;&gt;Cloudflare Pages 😍&lt;/h2&gt;
&lt;p&gt;I got into &lt;a href=&#34;https://developers.cloudflare.com/pages/&#34;&gt;Cloudflare pages&lt;/a&gt; because it lets you host static websites with all the latest optimizations conveniently and for free. Setting up a static website with a custom domain is easy, and you get the benefits of automatic SSL, CDN, and latest version of HTTP3.&lt;/p&gt;
&lt;p&gt;This is how this blog is hosted and I have a few other projects like this. I love the fact that I can get a super-fast static website up and running in a few minutes and I don&amp;rsquo;t have to worry about infrastructure details.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Curious Case of Maintaining Sufficient Free Space with ZFS</title>
      <link>/posts/curious-case-of-maintaining-sufficient-free-space-with-zfs/</link>
      <pubDate>Sun, 10 Jul 2022 12:25:59 +0300</pubDate>
      <guid>/posts/curious-case-of-maintaining-sufficient-free-space-with-zfs/</guid>
      <description>&lt;p&gt;TLDR: ZFS free-space reporting is a lagging indicator.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;hard drive in space&#34; loading=&#34;lazy&#34; src=&#34;/images/hard-disk-in-space.png&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;I use &lt;a href=&#34;https://www.proxmox.com/en/&#34;&gt;Proxmox&lt;/a&gt; VM server backed by a &lt;a href=&#34;https://en.wikipedia.org/wiki/ZFS&#34;&gt;ZFS&lt;/a&gt; array of hard drives for various personal infrastructure. I also have security cameras that upload motion-triggered videos to my server (via FTP!).&lt;/p&gt;
&lt;h2 id=&#34;problem-description&#34;&gt;Problem Description&lt;/h2&gt;
&lt;p&gt;I would like to use 90% of my available space for most-recent security videos.&lt;/p&gt;
&lt;p&gt;Recipe:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a dedicated ZFS volume&lt;/li&gt;
&lt;li&gt;Setup &lt;a href=&#34;https://linuxhint.com/setup-zfs-quotas-reservations/&#34;&gt;ZFS quota&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Run a cronjob to free space faster than it gets consumed by video uploads.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I set out to find a decent disk-freeing solution. I eventually settled on a python &lt;a href=&#34;https://github.com/fphammerle/free-disk&#34;&gt;free-disk&lt;/a&gt;. (Most of these utils were written in bash, didn&amp;rsquo;t want to disk having to grasp &amp;amp; modify write-only code).&lt;/p&gt;</description>
    </item>
    <item>
      <title>mmap Page Fault Tracing with bpftrace and ext4</title>
      <link>/posts/mmap-page-fault-tracing-via-ext4/</link>
      <pubDate>Tue, 15 Mar 2022 13:26:36 +0100</pubDate>
      <guid>/posts/mmap-page-fault-tracing-via-ext4/</guid>
      <description>&lt;p&gt;Previous blog post on how to &lt;a href=&#34;../ebpf-mmap-page-fault-tracing/&#34;&gt;trace Firefox IO using bpftrace&lt;/a&gt; via official page_fault_user tracepoint left me a bit unsatisfied with how complicated it turned out. Complexity has potential to be error-prone and the syscall-tracing dependency makes it impossible to trace IO within the main executable.&lt;/p&gt;
&lt;p&gt;I decided to try reimplement the trace using my old approach of tracing ext4 functions that handle page-faults. This turned out to be much more robust. This is now documented on my &lt;a href=&#34;https://github.com/tarasglek/bpftrace_pagefaults/tree/main/ext4&#34;&gt;github&lt;/a&gt;. It&amp;rsquo;s ugly in that it&amp;rsquo;s dependent on internal kernel structures, but it catches 100% of the IO and requires no post-trace syscall-correlation/fudging.&lt;/p&gt;</description>
    </item>
    <item>
      <title>EBPF for Tracing How Firefox Uses Page Faults to Load Libraries</title>
      <link>/posts/ebpf-mmap-page-fault-tracing/</link>
      <pubDate>Tue, 22 Feb 2022 12:29:10 +0200</pubDate>
      <guid>/posts/ebpf-mmap-page-fault-tracing/</guid>
      <description>&lt;p&gt;Modern browsers are some of the most complicated programs ever written. For example, the main Firefox library on my system is over 130Mbytes. Doing 130MB of IO poorly can be quite a performance hit, even with SSDs! :).&lt;/p&gt;
&lt;p&gt;Few people seem to understand how memory-mapped IO works. There are no pre-canned tools to observe it on Linux, thus even even fewer know how to observe it. Years ago, when I was working on Firefox startup performance, I discovered that libraries were loaded backwards (&lt;a href=&#34;https://htmlpreview.github.io/?https://github.com/tarasglek/taras.glek.net.old/blob/jekyll/blog/2010/03/24/linux-why-loading-binaries-from-disk-sucks/index.html&#34;&gt;blog1&lt;/a&gt;, &lt;a href=&#34;https://htmlpreview.github.io/?https://github.com/tarasglek/taras.glek.net.old/blob/jekyll/blog/2010/05/27/startup-backward-constructors/index.html&#34;&gt;blog2&lt;/a&gt;, &lt;a href=&#34;https://arxiv.org/pdf/1010.2196.pdf&#34;&gt;paper&lt;/a&gt;, GCC &lt;a href=&#34;https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770&#34;&gt;bug&lt;/a&gt;) on Linux. Figuring this out was super-painful, involved learning SystemTap and a setting up a just-right kernel with headers and symbols.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reading NFS at &gt;=25GB/s using FIO &#43; libnfs</title>
      <link>/posts/nfs-for-fio/</link>
      <pubDate>Wed, 24 Nov 2021 03:42:10 -0800</pubDate>
      <guid>/posts/nfs-for-fio/</guid>
      <description>&lt;p&gt;My current employer does a lot of really cool systems work that&amp;rsquo;s covered by NDAs. I recently did some work to integrate a cool open source tool into our workflow. Felt it deserved a blog post.&lt;/p&gt;
&lt;h2 id=&#34;nfs-testing-requires-parallelism&#34;&gt;NFS Testing Requires Parallelism.&lt;/h2&gt;
&lt;p&gt;I work for &lt;a href=&#34;https://www.purestorage.com/&#34;&gt;Pure Storage&lt;/a&gt;. One of the products we make is a scale-out NFS&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; (and S3-compatible) server called &lt;a href=&#34;https://www.purestorage.com/products/file-and-object/flashblade.html&#34;&gt;FlashBlade&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I was asked to test FlashBlade&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt; performance scaling. I needed to generate NFS read workloads of 15-300 &lt;em&gt;Gigabytes&lt;/em&gt;/second. Given that NICs in our lab max out at 100Gbit, (~10GB/s), this required a lab with fast servers and multiple NICs per server. I wanted to make maximum use of hardware to minimize lab space + cost. To make use of multiple NICs I needed multiple NFS connections per NIC. Linux does not make this easy&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Firefox&#39;s Optimized Zip Format: Reading Zip Files Really Quickly</title>
      <link>/posts/optimized-zip-format/</link>
      <pubDate>Mon, 22 Nov 2021 06:32:53 -0800</pubDate>
      <guid>/posts/optimized-zip-format/</guid>
      <description>&lt;p&gt;This post is about minimizing amount of disk IO and CPU overhead when reading Zip files.&lt;/p&gt;
&lt;p&gt;I recently saw an article about a &lt;a href=&#34;https://news.ycombinator.com/item?id=29178710&#34;&gt;new format&lt;/a&gt; that was faster than zip.&lt;/p&gt;
&lt;p&gt;This is quite surprising as to my mind, zip is one of the most flexible and low-overhead formats I&amp;rsquo;ve encountered.&lt;/p&gt;
&lt;p&gt;Some googling showed me that over past 11 years people have &lt;a href=&#34;https://www.raymond.cc/blog/edit-files-inside-firefox-4-omni-jar-to-auto-save-password/&#34;&gt;noticed&lt;/a&gt; that Firefox uses &lt;em&gt;optimized&lt;/em&gt; zip files. This inspired me to document thinking behind the optimized zip format I implemented in Firefox in the pre-pandemic 2010. I had a lot of fun writing this code, was surprised that I failed to blog about it.&lt;/p&gt;</description>
    </item>
    <item>
      <title>About</title>
      <link>/about/</link>
      <pubDate>Fri, 02 Aug 2019 11:04:49 +0800</pubDate>
      <guid>/about/</guid>
      <description>About</description>
    </item>
    <item>
      <title>Why Google Pixel lags 10x more than Moto Z</title>
      <link>/posts/moto-z-has-10x-less-lag-than-pixel/</link>
      <pubDate>Sun, 11 Dec 2016 12:17:23 -0800</pubDate>
      <guid>/posts/moto-z-has-10x-less-lag-than-pixel/</guid>
      <description>&lt;p&gt;&lt;img alt=&#34;Alt text&#34; loading=&#34;lazy&#34; src=&#34;/images/moto-z-vs-pixel/moto-z-pixel-latency.png&#34; title=&#34;Optional title&#34;&gt;&lt;/p&gt;
&lt;p&gt;In my previous post I made an argument that a modern phone is only as fast as the slowest component: ability of NAND to handle &lt;a href=&#34;/post/Laggy-phones-and-misleading-benchmarks/&#34;&gt;4k writes&lt;/a&gt;.
I decided to compare two Android flagships on the opposite ends of
random-write-4k benchmark spectrum: &lt;a href=&#34;http://amzn.to/2hkMchI&#34;&gt;Moto Z&lt;/a&gt; vs &lt;a href=&#34;http://amzn.to/2grbBJB&#34;&gt;Google Pixel&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;I wrote a little fio &lt;a href=&#34;https://github.com/tarasglek/fio/blob/master/termux/fill.py&#34;&gt;benchmark driver&lt;/a&gt; to fill all available device storage with random 4k writes, print perf stats along the way. Idea is to run the benchmark on &lt;code&gt;/data/&lt;/code&gt;
partition, then fill all available space by writing to &lt;code&gt;/storage/emulated/0&lt;/code&gt;, then do another round of testing on &lt;code&gt;/data&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Laggy phones and misleading benchmarks</title>
      <link>/posts/laggy-phones-and-misleading-benchmarks/</link>
      <pubDate>Sat, 12 Nov 2016 12:16:32 -0800</pubDate>
      <guid>/posts/laggy-phones-and-misleading-benchmarks/</guid>
      <description>&lt;p&gt;TLDR: You can predict degree of unresponsiveness of a phone via random-write-4k benchmarks. I wish review websites would fill phones to 80-90% prior to running the benchmark, especially on smaller-capacity phones where users are more likely to run out of space.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SQLite vs Phone NAND&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I’ve long held a theory that Android lag is almost directly determined by slowness induced by SQLite transactions. This weekend, while researching phones for a family member, I found some supporting evidence.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Economics to Help Ukraine Win</title>
      <link>/draft/economics-of-war/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      <guid>/draft/economics-of-war/</guid>
      <description>&lt;p&gt;I spent most of my life in North America, but I have been living this war in Ukraine. My hope is that I can use my past experience and connections to help Ukraine win this war.&lt;/p&gt;
&lt;p&gt;Recently a friend of mine asked what would be the best way to donate $1000. This got me thinking.&lt;/p&gt;
&lt;p&gt;Wars are won by convincing the opponent that things are only gonna keep getting worse for them and better for you. Economics is the best way to do that. Germany, Japan could not sustain their aggression in WW2 because they were losing the war economically. USA played a large role in WW2 with amazing logics and manufacturing.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
