<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>logmole on krtffl.dev</title>
    <link>https://krtffl.dev/series/logmole/</link>
    <description>Recent content in logmole on krtffl.dev</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <copyright>© [krtffl](https://krtffl.dev)</copyright>
    <lastBuildDate>Mon, 25 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://krtffl.dev/series/logmole/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>a query language in ~1000 lines: lexer, parser, evaluator</title>
      <link>https://krtffl.dev/posts/query-dsl-lexer-parser-rust/</link>
      <pubDate>Mon, 25 May 2026 00:00:00 +0000</pubDate>
      
      <guid>https://krtffl.dev/posts/query-dsl-lexer-parser-rust/</guid>
      <description>&lt;p&gt;here&amp;rsquo;s a question that sounds trivial and isn&amp;rsquo;t: &lt;em&gt;show me every 5xx response that also mentions a timeout.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;in &lt;code&gt;grep&lt;/code&gt; that&amp;rsquo;s a fragile little dance — &lt;code&gt;grep -E &#39;status[=:] ?5[0-9]{2}&#39;&lt;/code&gt; piped into another &lt;code&gt;grep timeout&lt;/code&gt;, and now you&amp;rsquo;re matching &lt;code&gt;500&lt;/code&gt; inside a request id, &lt;code&gt;timeout&lt;/code&gt; inside a url, and you&amp;rsquo;ve quietly stopped trusting the output. what you &lt;em&gt;wanted&lt;/em&gt; was this:&lt;/p&gt;
&lt;div class=&#34;codeblock&#34;&gt;
    &lt;div class=&#34;codeblock__bar&#34;&gt;
        &lt;span class=&#34;codeblock__lang&#34;&gt;text&lt;/span&gt;
        &lt;button class=&#34;codeblock__copy&#34; type=&#34;button&#34; data-copy aria-label=&#34;copy code&#34;&gt;copy ⧉&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;status &amp;gt;= 500 AND message contains &amp;#34;timeout&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and have the machine read &lt;code&gt;&amp;gt;=&lt;/code&gt; as &lt;em&gt;numeric&lt;/em&gt; greater-or-equal, &lt;code&gt;AND&lt;/code&gt; as boolean conjunction, and &lt;code&gt;&amp;quot;timeout&amp;quot;&lt;/code&gt; as a substring on one named field. that&amp;rsquo;s not grep. that&amp;rsquo;s a little language, and little languages need a lexer, a parser, and something to run them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>welford&#39;s algorithm and why i never store the samples</title>
      <link>https://krtffl.dev/posts/welford-online-variance-rust/</link>
      <pubDate>Mon, 13 Apr 2026 00:00:00 +0000</pubDate>
      
      <guid>https://krtffl.dev/posts/welford-online-variance-rust/</guid>
      <description>&lt;p&gt;you want to know if the error rate just spiked. that&amp;rsquo;s a z-score: how many standard deviations is &lt;em&gt;right now&lt;/em&gt; away from what &lt;em&gt;normal&lt;/em&gt; looked like. simple formula, &lt;code&gt;(x - mean) / stddev&lt;/code&gt;, you learned it before you could legally drink.&lt;/p&gt;
&lt;p&gt;except a standard deviation needs a mean, and a mean needs all the numbers, and the numbers are a log file the size of a small moon. so where, exactly, are you keeping them?&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>implementing the drain algorithm in rust</title>
      <link>https://krtffl.dev/posts/drain-algorithm-in-rust/</link>
      <pubDate>Mon, 23 Mar 2026 00:00:00 +0000</pubDate>
      
      <guid>https://krtffl.dev/posts/drain-algorithm-in-rust/</guid>
      <description>&lt;p&gt;picture the scene: something is on fire in production, you ssh into the box, &lt;code&gt;tail&lt;/code&gt; a log file, and you&amp;rsquo;re greeted by forty thousand lines that all look &lt;em&gt;almost&lt;/em&gt; the same but not quite. your eyes glaze over. you &lt;code&gt;grep error&lt;/code&gt;, then &lt;code&gt;grep -v&lt;/code&gt; the noise, then pipe the whole thing into &lt;code&gt;sort | uniq -c&lt;/code&gt; and pray.&lt;/p&gt;
&lt;p&gt;there&amp;rsquo;s a better way, and it&amp;rsquo;s older than you&amp;rsquo;d think.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
