<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Programming on Miek Gieben</title>
    <link>https://miek.nl/categories/programming/</link>
    <description>Recent content in Programming on Miek Gieben</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© Copyright 2007-2024 Miek Gieben</copyright>
    <lastBuildDate>Fri, 30 Jan 2026 17:53:04 +0100</lastBuildDate>
    <atom:link href="https://miek.nl/categories/programming/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Forgejo Go Benchstat</title>
      <link>https://miek.nl/2026/january/30/forgejo-go-benchstat/</link>
      <pubDate>Fri, 30 Jan 2026 17:53:04 +0100</pubDate>
      <guid>https://miek.nl/2026/january/30/forgejo-go-benchstat/</guid>
      <description>&lt;p&gt;For the longest time I wanted to see the performance impact of my changes. This desire goes back years, back&#xA;to the early days of &lt;a href=&#34;https://miek.nl/2016/march/18/announcing-coredns/&#34;&gt;CoreDNS&lt;/a&gt;. And now I finally have it.&lt;/p&gt;&#xA;&lt;p&gt;It does require running your own forgejo-runner on your own hardware to have any meaningful data. Without&#xA;further adu:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# On https://codeberg.org/miekg/dns/actions you can see the run and copy and paste a new.txt if performance is&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# better. Put this contents in old.txt&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;on&lt;/span&gt;: [&lt;span style=&#34;color:#ae81ff&#34;&gt;push, pull_request]&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;jobs&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;test&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;runs-on&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;atoom-tiny&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;steps&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;uses&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;actions/checkout@v6&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;uses&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;actions/setup-go@v6&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f92672&#34;&gt;with&lt;/span&gt;:&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#f92672&#34;&gt;go-version&lt;/span&gt;: &lt;span style=&#34;color:#ae81ff&#34;&gt;${{ vars.GOVERSION }}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      - &lt;span style=&#34;color:#f92672&#34;&gt;run&lt;/span&gt;: |&lt;span style=&#34;color:#e6db74&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          apt-get update&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          apt-get -y install dnsperf jq&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          go install golang.org/x/perf/cmd/benchstat@latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          (cd cmd/reflect; go build)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          HOSTNAME=atoom-tiny&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          # Sleep here so we have the machine to ourselves.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          sleep 60&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          (cd cmd/reflect; make new.txt)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          REF=$(echo ${{ forgejo.ref }} | cut -d/ -f3)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          echo ${{ forgejo.api_url}}/repos/${{ forgejo.repository }}/issues/${REF}/comments&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;          echo &amp;#34;{\&amp;#34;body\&amp;#34;: $(cd cmd/reflect; make stat | jq -sR .)}&amp;#34; | \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;                          curl --json @- \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;                          -H &amp;#39;Authorization: token ${{ forgejo.token }}&amp;#39; \&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#e6db74&#34;&gt;                          ${{ forgejo.api_url}}/repos/${{ forgejo.repository }}/issues/${REF}/comments&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;See &lt;a href=&#34;https://codeberg.org/miekg/dns&#34;&gt;https://codeberg.org/miekg/dns&lt;/a&gt; for all other bits that are needed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Create a Pull Request from Git in Forgejo</title>
      <link>https://miek.nl/2026/january/28/create-a-pull-request-from-git-in-forgejo/</link>
      <pubDate>Wed, 28 Jan 2026 06:50:48 +0100</pubDate>
      <guid>https://miek.nl/2026/january/28/create-a-pull-request-from-git-in-forgejo/</guid>
      <description>&lt;p&gt;Recently I&amp;rsquo;ve started to move all my project to &lt;a href=&#34;https://codeberg.org/miekg&#34;&gt;Codeberg&lt;/a&gt;. This is working great,&#xA;but one of the things I really missed where the git-push options from GitLab where you can create a PR just by&#xA;pushing a branch upstream.&lt;/p&gt;&#xA;&lt;p&gt;Thanks to my whining about this on Mastodon I got &lt;a href=&#34;https://infosec.exchange/@x_cli/115967604917936736&#34;&gt;this&#xA;reply&lt;/a&gt; about an&#xA;&lt;a href=&#34;https://github.com/maxking/forgejo-create-pr&#34;&gt;create-pr-action&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Well, putting this all together, I right now have this script (with little, or no error checking) that does the&#xA;heavy lifting of creating a PR using Forgejo&amp;rsquo;s API. This needs an API token with read/write rights on your&#xA;repo (and only that):&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kong Go CLI manual pages</title>
      <link>https://miek.nl/2024/november/08/kong-go-cli-manual-pages/</link>
      <pubDate>Fri, 08 Nov 2024 11:38:55 +0100</pubDate>
      <guid>https://miek.nl/2024/november/08/kong-go-cli-manual-pages/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m using &lt;a href=&#34;https://github.com/alecthomas/kong&#34;&gt;Kong the CLI argument parser&lt;/a&gt; to create manual pages&#xA;from the arguments and help described in the Kong structure that tells your CLI how to parse its command&#xA;line.&lt;/p&gt;&#xA;&lt;p&gt;With a lot of use from the &lt;code&gt;reflect&lt;/code&gt; package (this was before I discovered kong actually has an API&#xA;you can use), I&amp;rsquo;m creating manual pages from the kong CLI definition, while having great fun with&#xA;parsing &lt;code&gt;enum&lt;/code&gt;, &lt;code&gt;default&lt;/code&gt; and other tags to make the manual page really readable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Kong Go CLI</title>
      <link>https://miek.nl/2024/november/01/kong-go-cli/</link>
      <pubDate>Fri, 01 Nov 2024 11:38:55 +0100</pubDate>
      <guid>https://miek.nl/2024/november/01/kong-go-cli/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m a fan of &lt;a href=&#34;https://github.com/alecthomas/kong&#34;&gt;Kong the CLI argument parser&lt;/a&gt;, I use it to&#xA;automatically create manual pages, (bash) completion and do a lot of validation inside it. (This guy&#xA;also has other really interesting packages, and he&amp;rsquo;s a huge fan of Go&amp;rsquo;s struct tags).&lt;/p&gt;&#xA;&lt;p&gt;I wanted to do validation inside Kong as well, for this Kong has&#xA;&lt;a href=&#34;https://github.com/alecthomas/kong?tab=readme-ov-file#validation&#34;&gt;validation&lt;/a&gt;, which is just a&#xA;method (&lt;code&gt;Validate() error&lt;/code&gt;) on a type. Now most types I have are just &lt;code&gt;string&lt;/code&gt; or any other builtin&#xA;type. For validation to work, all these types must be re-typed to another type on which the method&#xA;can be applied, which is annoying. I wanted a better way&amp;hellip;&lt;/p&gt;</description>
    </item>
    <item>
      <title>eBPF in Go</title>
      <link>https://miek.nl/2024/august/22/ebpf-in-go/</link>
      <pubDate>Thu, 22 Aug 2024 18:46:57 +0200</pubDate>
      <guid>https://miek.nl/2024/august/22/ebpf-in-go/</guid>
      <description>&lt;p&gt;What if I could program eBPF in &lt;em&gt;pure&lt;/em&gt; Go? I want to use eBPF and lots of current tooling exist, but&#xA;I like Go. I don&amp;rsquo;t want to use clang to create the ELF binary that then gets loaded into the Linux&#xA;kernel. I want to use Go to create that ELF file. The heavy lifting of loading and&#xA;inspecting can be done via bpftool (although I&amp;rsquo;m aware that Go programs exist that do this), but&#xA;bpftool looks like the standard way of interacting with the kernel&amp;rsquo;s eBPF subsystem.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Script to Upgrade to Latest Go version</title>
      <link>https://miek.nl/2020/july/17/script-to-upgrade-to-latest-go-version/</link>
      <pubDate>Fri, 17 Jul 2020 05:39:00 +0000</pubDate>
      <guid>https://miek.nl/2020/july/17/script-to-upgrade-to-latest-go-version/</guid>
      <description>&lt;p&gt;This is my super simple script to upgrade to a newer Go version. You might find it handy as well.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/zsh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;GODIR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;~/up&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;function&lt;/span&gt; latestGo &lt;span style=&#34;color:#f92672&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local LATEST&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;curl -s &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;https://golang.org/dl/?mode=json&amp;#39;&lt;/span&gt; | jq -r &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;.[0].version&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local INSTALLED&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;go version | awk &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;{ print $3 }&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;if&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;[[&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;INSTALLED&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;==&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;]]&lt;/span&gt;; &lt;span style=&#34;color:#66d9ef&#34;&gt;then&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        echo Go is up to date, running &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        exit &lt;span style=&#34;color:#ae81ff&#34;&gt;0&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#66d9ef&#34;&gt;fi&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    echo Upgrading Go from &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;INSTALLED&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; to &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local GOLANG&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;https://dl.google.com/go/&lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;LATEST&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;.linux-amd64.tar.gz&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    local TAR&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;$(&lt;/span&gt;basename $GOLANG&lt;span style=&#34;color:#66d9ef&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;(&lt;/span&gt; cd &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;GODIR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      echo Downloading and extracting: $GOLANG &amp;gt;&amp;amp;&lt;span style=&#34;color:#ae81ff&#34;&gt;2&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      wget -q $GOLANG &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; rm -rf go &lt;span style=&#34;color:#f92672&#34;&gt;&amp;amp;&amp;amp;&lt;/span&gt; tar xvfz &lt;span style=&#34;color:#e6db74&#34;&gt;${&lt;/span&gt;TAR&lt;span style=&#34;color:#e6db74&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;latestGo&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Learning Go</title>
      <link>https://miek.nl/2019/august/13/learning-go/</link>
      <pubDate>Tue, 13 Aug 2019 07:39:00 +0000</pubDate>
      <guid>https://miek.nl/2019/august/13/learning-go/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://miek.nl/go&#34;&gt;Learning Go&lt;/a&gt; is a book that teaches you Go. It includes exercises (and solutions)&#xA;to help put your new knowledge to the test.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go in Markdown</title>
      <link>https://miek.nl/2015/may/09/learning-go-in-markdown/</link>
      <pubDate>Sat, 09 May 2015 07:39:00 +0000</pubDate>
      <guid>https://miek.nl/2015/may/09/learning-go-in-markdown/</guid>
      <description>&lt;p&gt;The original &lt;a href=&#34;http://miek.nl/downloads/Go/Learning-Go-latest.pdf&#34;&gt;Learning Go&lt;/a&gt;&#xA;is written in &lt;a href=&#34;https://github.com/miekg/gobook&#34;&gt;LaTeX&lt;/a&gt;. With LaTeX you get&#xA;beautiful (PDF) output, but there are a few problems. Most notably I consider&#xA;LaTeX an &lt;em&gt;output&lt;/em&gt; format: it is hard to convert it into something else. Markdown&#xA;offers much more flexibility in that regard. The downside of markdown is that is&#xA;not powerful enough to typeset a book. To fix this I forked&#xA;&lt;a href=&#34;https://github.com/russross/blackfriday&#34;&gt;BlackFriday&lt;/a&gt; extended it and renamed&#xA;it &lt;a href=&#34;https://github.com/miekg/mmark&#34;&gt;Mmark&lt;/a&gt; (These are all written in Golang).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Personal Go install</title>
      <link>https://miek.nl/2013/december/02/personal-go-install/</link>
      <pubDate>Mon, 02 Dec 2013 20:28:00 +0000</pubDate>
      <guid>https://miek.nl/2013/december/02/personal-go-install/</guid>
      <description>&lt;p&gt;With &lt;a href=&#34;http://golang.org/doc/go1.2&#34;&gt;golang 1.2&lt;/a&gt;, both &lt;code&gt;godoc&lt;/code&gt; and&#xA;&lt;code&gt;go vet&lt;/code&gt; are removed from the main repository. Here is a super short&#xA;list of commands (that I personally use) to install Go and both tools.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;export GOBIN=~/bin&#xA;export GOPATH=~/g&#xA;mkdir -p ~/upstream&#xA;mkdir -p ~/g&#xA;cd ~/upstream&#xA;hg clone https://code.google.com/p/go/&#xA;hg update release&#xA;cd src&#xA;./all.bash&#xA;go get code.google.com/p/go.tools/cmd/godoc&#xA;go get code.google.com/p/go.tools/cmd/vet&#xA;go get code.google.com/p/go.tools/cmd/cover&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>PKCS11 wrapper for Go</title>
      <link>https://miek.nl/2013/august/17/pkcs11-wrapper-for-go/</link>
      <pubDate>Sat, 17 Aug 2013 03:32:00 +0000</pubDate>
      <guid>https://miek.nl/2013/august/17/pkcs11-wrapper-for-go/</guid>
      <description>&lt;p&gt;In my quest to write a DNS server in Go I found myself lacking an interface to PKCS#11, so I wrote&#xA;&lt;a href=&#34;http://github.com/miekg/pkcs11&#34;&gt;one&lt;/a&gt;. PKCS#11 is &lt;em&gt;the&lt;/em&gt; interface to HSMs (including SoftHSM), and&#xA;even though the interface sucks, I think a DNS server should store its keys in an HSM, by default.&lt;/p&gt;&#xA;&lt;p&gt;So&amp;hellip; here it is. I&amp;rsquo;m still putting in the finishing touches and some general polish, but it is&#xA;already usable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Rfc2pandoc</title>
      <link>https://miek.nl/2013/july/17/rfc2pandoc/</link>
      <pubDate>Wed, 17 Jul 2013 15:04:00 +0000</pubDate>
      <guid>https://miek.nl/2013/july/17/rfc2pandoc/</guid>
      <description>&lt;p&gt;Have an I-D laying around and sick of typing XML? You want to use Pandoc2rfc, but you don&amp;rsquo;t want to manually&#xA;convert the XML (or the generated text) into Pandoc? Well, now finally you can do this automatically. I created a little&#xA;&lt;a href=&#34;https://raw.github.com/miekg/pandoc2rfc/master/plain.xsl&#34;&gt;stylesheet&lt;/a&gt;, that can be used to transform&#xA;the XML to Pandoc. Note the transformation is not perfect, there are a few cases where you still have to&#xA;edit the Pandoc, most notably:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pandoc2rfc update(s)</title>
      <link>https://miek.nl/2013/july/03/pandoc2rfc-updates/</link>
      <pubDate>Wed, 03 Jul 2013 17:45:00 +0000</pubDate>
      <guid>https://miek.nl/2013/july/03/pandoc2rfc-updates/</guid>
      <description>&lt;p&gt;In this post you can find pointers to documentation and source code for the pandoc2rfc&#xA;package.&lt;/p&gt;&#xA;&lt;dl&gt;&#xA;&lt;dt&gt;Pandoc2rfc source code:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/miekg/pandoc2rfc&#34;&gt;github.com/miekg/pandoc2rfc&lt;/a&gt;, if you are not using&#xA;the shell script (&lt;code&gt;pandoc2rfc&lt;/code&gt;), you&#xA;should just copy &lt;code&gt;transform.xsl&lt;/code&gt; and perform the conversions manually (see documentation pointers&#xA;below)&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;Packages:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;for both &lt;code&gt;xml2rfc&lt;/code&gt; and &lt;code&gt;pandoc2rfc&lt;/code&gt; can be found at &lt;a href=&#34;https://launchpad.net/~miek/&amp;#43;archive/pandoc2rfc&#34;&gt;launchpad&lt;/a&gt;, these can probably also be installed on Debian and definitely on older Ubuntu versions.&lt;/p&gt;&#xA;&lt;/dd&gt;&#xA;&lt;dt&gt;Documentation:&lt;/dt&gt;&#xA;&lt;dd&gt;&#xA;&lt;p&gt;This &lt;a href=&#34;http://tools.ietf.org/html/draft-gieben-pandoc2rfc-02&#34;&gt;draft&lt;/a&gt; is the canonical&#xA;documentation.&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Dutch Teletext Script</title>
      <link>https://miek.nl/2013/february/05/new-dutch-teletext-script/</link>
      <pubDate>Tue, 05 Feb 2013 14:17:00 +0000</pubDate>
      <guid>https://miek.nl/2013/february/05/new-dutch-teletext-script/</guid>
      <description>&lt;p&gt;Last week, the Dutch public broadcaster (&lt;a href=&#34;http://www.nos.nl&#34;&gt;NOS&lt;/a&gt;) decided to&#xA;&amp;ldquo;fix&amp;rdquo; their online teletext offering, there breaking [an old script I had laying&#xA;around](/2008/july/15/teletext_nl_script/index.htm&#xA;l). Their new web interface (displaying gifs) can be found &lt;a href=&#34;http://nos.nl/teletekst/#100_01&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;After &lt;a href=&#34;https://twitter.com/bdekruijff&#34;&gt;@bdekruijff&lt;/a&gt;&#xA;discovered their newly, hidden text feed, I decided to&#xA;adapt the old script to this new situation. Thanks to&#xA;&lt;a href=&#34;http://utopia.knoware.nl/users/eprebel/Communication/Prestel/index.html&#34;&gt;this page&lt;/a&gt; I&#xA;was able to (partially) reconstruct the feed. Most escape sequences are working, I&amp;rsquo;m&#xA;still fiddling with finding Unicode chars for the &amp;ldquo;Contiguous Graphics Set&amp;rdquo;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pandoc2rfc and xml2rfc</title>
      <link>https://miek.nl/2013/january/22/pandoc2rfc-and-xml2rfc/</link>
      <pubDate>Tue, 22 Jan 2013 12:23:00 +0000</pubDate>
      <guid>https://miek.nl/2013/january/22/pandoc2rfc-and-xml2rfc/</guid>
      <description>&lt;p&gt;Thanks to the help of Marc Petit-Huguenin I have been able to create (and upload)&#xA;debian packages (install fine on Ubuntu) for Pandoc2rfc and xml2rfc. For Pandoc2rfc&#xA;I choose to add a little shell script that calls pandoc and xml2rfc for you. So&#xA;creating an I-D is as simple as:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;pandoc2rfc *.mkd    # or a few other extensions&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;The shell script depends on &lt;code&gt;transform.xsl&lt;/code&gt; to be installed in &lt;code&gt;/usr/lib/pandoc2rfc/&lt;/code&gt;,&#xA;allthough this can be overridden with a flag. When pandoc2rfc is installed you don&amp;rsquo;t&#xA;have carry the supports scripts inside your I-D&amp;rsquo;s source repo. My pandoc2rfc I-D&#xA;source directory now only has: &lt;code&gt;template.xml&lt;/code&gt;, &lt;code&gt;abstract.pdc&lt;/code&gt;,  &lt;code&gt;back.pdc&lt;/code&gt;, &lt;code&gt;middle.pdc&lt;/code&gt; and a&#xA;&lt;code&gt;bib/&lt;/code&gt; directory with references.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS API change WITH rewrite rules!</title>
      <link>https://miek.nl/2012/december/09/go-dns-api-change-with-rewrite-rules/</link>
      <pubDate>Sun, 09 Dec 2012 20:06:00 +0000</pubDate>
      <guid>https://miek.nl/2012/december/09/go-dns-api-change-with-rewrite-rules/</guid>
      <description>&lt;p&gt;In the standard library the DNS types have been renamed from RR_MX to MX which I&#xA;think is a good change. So I made the same change in Go DNS, but this time&#xA;I&amp;rsquo;m providing &lt;code&gt;gofmt -r&lt;/code&gt; rewrite rules. They all have the form:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;gofmt -r &#39;RR_A -&amp;gt; A&#39; -w *.go&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;And then for &lt;em&gt;all&lt;/em&gt; the types, so it&amp;rsquo;s quite a list.&lt;/p&gt;&#xA;&lt;p&gt;Download the rewrite rules &lt;a href=&#34;https://miek.nl/downloads/2012/rewrite&#34;&gt;here&lt;/a&gt; and use&#xA;it like &lt;code&gt;$SHELL rewrite&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adding new RR types to GO DNS</title>
      <link>https://miek.nl/2012/november/30/adding-new-rr-types-to-go-dns/</link>
      <pubDate>Fri, 30 Nov 2012 20:01:00 +0000</pubDate>
      <guid>https://miek.nl/2012/november/30/adding-new-rr-types-to-go-dns/</guid>
      <description>&lt;p&gt;Inspired by&#xA;&lt;a href=&#34;https://www.nlnetlabs.nl/blog/2012/09/20/howto-add-new-rrtypes-to-nsd/&#34;&gt;NLnet Labs&lt;/a&gt; and&#xA;&lt;a href=&#34;http://bert-hubert.blogspot.nl/2012/11/adding-new-dns-record-types-to-powerdns.html&#34;&gt;PowerDNS&lt;/a&gt;,&#xA;I figured I couldn&amp;rsquo;t stay behind, so here is how to add new RRs to &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;Go DNS&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;A small note before I delve into the details, I haven&amp;rsquo;t optimized Go DNS for adding new types, as this&#xA;is a relative infrequent event. There are a few items that need to be added before Go DNS&#xA;understands the new RR type.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Adding the type itself (as a structure) and the four methods needed to implement the&#xA;&lt;code&gt;RR&lt;/code&gt; interface;&lt;/li&gt;&#xA;&lt;li&gt;Adding the type number and the text string belonging it;&lt;/li&gt;&#xA;&lt;li&gt;Parsing from text, i.e. when parsing zonefiles.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Lets take the new DANE (&lt;a href=&#34;http://datatracker.ietf.org/doc/rfc6698/&#34;&gt;RFC6698&lt;/a&gt;) as an example.&#xA;The record is called TLSA, and looks like:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Source Code Pro</title>
      <link>https://miek.nl/2012/september/27/source-code-pro/</link>
      <pubDate>Thu, 27 Sep 2012 19:44:00 +0000</pubDate>
      <guid>https://miek.nl/2012/september/27/source-code-pro/</guid>
      <description>&lt;p&gt;Indeed a really nice font and fully open source. Using it now at 11pt. See:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://blogs.adobe.com/typblography/2012/09/source-code-pro.html&#34;&gt;Announcement from Adobe&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://sourceforge.net/projects/sourcecodepro.adobe/files/latest/download&#34;&gt;Download link&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>User management in fksd</title>
      <link>https://miek.nl/2012/august/07/user-management-in-fksd/</link>
      <pubDate>Tue, 07 Aug 2012 21:58:00 +0000</pubDate>
      <guid>https://miek.nl/2012/august/07/user-management-in-fksd/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;If you do DNS for too long everything looks like 53.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In this &amp;ldquo;trace&amp;rdquo; I&amp;rsquo;m showing the logging of &lt;code&gt;fksd&lt;/code&gt; when I add a&#xA;zone, try to list it as a non-existent user &lt;code&gt;miekg&lt;/code&gt; (which fails), add the user&#xA;&lt;code&gt;miekg&lt;/code&gt; and list it again. User are identified by the key in the TSIG record, their&#xA;password is the shared secret.&lt;/p&gt;&#xA;&lt;p&gt;The &amp;ldquo;config files&amp;rdquo; from &lt;code&gt;nsupdate&lt;/code&gt; can be found in the &lt;a href=&#34;https://github.com/miekg/dns/tree/dev/ex/fksd/cmds&#34;&gt;github repo&#xA;of fksd&lt;/a&gt;.&#xA;The &lt;code&gt;nsupdate&lt;/code&gt; commands are preceded with a &lt;code&gt;%&lt;/code&gt;, extra comments are preceded with &lt;code&gt;#&lt;/code&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Dynamic nameserver provisioning with dns pkts</title>
      <link>https://miek.nl/2012/august/06/dynamic-nameserver-provisioning-with-dns-pkts/</link>
      <pubDate>Mon, 06 Aug 2012 23:18:00 +0000</pubDate>
      <guid>https://miek.nl/2012/august/06/dynamic-nameserver-provisioning-with-dns-pkts/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m writing a nameserver called &lt;code&gt;fksd&lt;/code&gt; (Funkensturm daemon), which is&#xA;currently in a prototype stage (but the code is available at&#xA;&lt;a href=&#34;https://github.com/miekg/dns/tree/dev/ex/fksd&#34;&gt;github&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;p&gt;In this server I&amp;rsquo;m pursuing some interesting directions in nameserver&#xA;development, such as the dynamic configuration as provided by&#xA;&lt;a href=&#34;http://www.isc.org/bind10/&#34;&gt;BIND10&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;BIND10 uses http(s), but I think using DNS packets is more in line&#xA;with a nameserver, so I opted for that route.&lt;/p&gt;&#xA;&lt;p&gt;With &lt;code&gt;fksd&lt;/code&gt; you can use packets (which will be TSIG signed in the&#xA;&lt;s&gt;future&lt;/s&gt; tomorrow) to configure the server. The only configuration possible at the&#xA;moment is adding a zone. Such a packet needs to have a TXT record like&#xA;the following in its AUTHORITY SECTION:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Libunbound wrapper in Go</title>
      <link>https://miek.nl/2012/july/01/libunbound-wrapper-in-go/</link>
      <pubDate>Sun, 01 Jul 2012 21:37:00 +0000</pubDate>
      <guid>https://miek.nl/2012/july/01/libunbound-wrapper-in-go/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve created a small wrapper for &lt;a href=&#34;https://unbound.net&#34;&gt;libunbound&lt;/a&gt; for use in&#xA;&lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The code can be &lt;a href=&#34;http://github.com/miekg/unbound&#34;&gt;found at github&lt;/a&gt;. It depends&#xA;on my Go DNS library which can be &lt;a href=&#34;http://github.com/miekg/dns&#34;&gt;found here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://unbound.nlnetlabs.nl/pipermail/unbound-users/2012-July/002431.html&#34;&gt;Official announcement on the Unbound-users@&#xA;list&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;To give&#xA;you a little taste of how it looks, I&amp;rsquo;ve (re)created tutorials 2 to 6 in Go.&#xA;Tutorial 2 looks like this, for instance:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;package main&#xA;&#xA;// https://www.unbound.net/documentation/libunbound-tutorial-2.html&#xA;&#xA;import (&#xA;        &amp;quot;dns&amp;quot;&#xA;        &amp;quot;fmt&amp;quot;&#xA;        &amp;quot;os&amp;quot;&#xA;        &amp;quot;unbound&amp;quot;&#xA;)&#xA;&#xA;func main() {&#xA;        u := unbound.New()&#xA;        defer u.Destroy()&#xA;&#xA;        if err := u.ResolvConf(&amp;quot;/etc/resolv.conf&amp;quot;); err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;&#xA;        if err := u.Hosts(&amp;quot;/etc/hosts&amp;quot;); err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;&#xA;        r, err := u.Resolve(&amp;quot;www.nlnetlabs.nl.&amp;quot;, dns.TypeA, dns.ClassINET)&#xA;        if err != nil {&#xA;                fmt.Printf(&amp;quot;error %s\n&amp;quot;, err.Error())&#xA;                os.Exit(1)&#xA;        }&#xA;        fmt.Printf(&amp;quot;%+v\n&amp;quot;, r)&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Sync subversion to github.com</title>
      <link>https://miek.nl/2012/june/27/sync-subversion-to-github.com/</link>
      <pubDate>Wed, 27 Jun 2012 08:26:00 +0000</pubDate>
      <guid>https://miek.nl/2012/june/27/sync-subversion-to-github.com/</guid>
      <description>&lt;p&gt;This is a post that details on how to sync a subversion repository to git repository on github.com,&#xA;and how to keep it in sync.&lt;/p&gt;&#xA;&lt;p&gt;The following sites were instrumental in getting this to work:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://stackoverflow.com/questions/796991/fork-and-synchronise-google-code-subversion-repository-into-github&#34;&gt;stackoverflow.com question on getting svn into git&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;http://matharvard.ca/posts/2011/aug/11/git-push-with-specific-ssh-key/&#34;&gt;ssh foo&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There are a number of steps to take. From a bird&amp;rsquo;s eye view:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use &lt;code&gt;git svn&lt;/code&gt; to clone the &lt;code&gt;svn&lt;/code&gt; repo to a &lt;code&gt;git&lt;/code&gt; repo;&lt;/li&gt;&#xA;&lt;li&gt;Create a github &lt;code&gt;git&lt;/code&gt; repo;&lt;/li&gt;&#xA;&lt;li&gt;Add a remote origin in your local git to the remote github repo;&lt;/li&gt;&#xA;&lt;li&gt;Use some SSH foo to use a separate SSH key for pushing to github.com.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h1 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;We are working with the fictional svn repo located at &lt;code&gt;https://svn.example.net/example&lt;/code&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;git-svn&lt;/code&gt; is installed;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ssh&lt;/code&gt; is installed.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Clone the repository&lt;/p&gt;</description>
    </item>
    <item>
      <title>Printing MX records with Go DNS</title>
      <link>https://miek.nl/2012/june/21/printing-mx-records-with-go-dns/</link>
      <pubDate>Thu, 21 Jun 2012 10:30:00 +0000</pubDate>
      <guid>https://miek.nl/2012/june/21/printing-mx-records-with-go-dns/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;Now that the API seems to stabilize it is time to update these items.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;We want to create a little program that prints out the MX records of domains, like so:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% mx miek.nl&#xA;miek.nl.        86400   IN      MX      10 elektron.atoom.net.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Or&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% mx microsoft.com &#xA;microsoft.com.  3600    IN      MX      10 mail.messaging.microsoft.com.&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;We are using my &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;Go DNS package&lt;/a&gt;.&#xA;First the normal header of a Go program, with a bunch of imports. We&#xA;need the &lt;code&gt;dns&lt;/code&gt; package:&lt;/p&gt;</description>
    </item>
    <item>
      <title>draft-gieben-creating-rfcs-pandoc-00.txt</title>
      <link>https://miek.nl/2012/june/04/draft-gieben-creating-rfcs-pandoc-00.txt/</link>
      <pubDate>Mon, 04 Jun 2012 09:20:00 +0000</pubDate>
      <guid>https://miek.nl/2012/june/04/draft-gieben-creating-rfcs-pandoc-00.txt/</guid>
      <description>&lt;p&gt;Maybe I&amp;rsquo;ll try to send it in as a individual submission.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/miekg/denialid&#34;&gt;Source repository at github&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2012/draft-gieben-creating-rfcs-pandoc-00.txt&#34;&gt;As txt download&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/miekg/pandoc2rfc&#34;&gt;Pandoc2rfc code repository&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&#xA;&#xA;      Network Working Group                                          R. Gieben&#xA;      Internet-Draft                                                      SIDN&#xA;      Intended status: Informational                                April 2012&#xA;      Expires: October 3, 2012&#xA;&#xA;&#xA;                   Creating Internet Drafts and RFCs using Pandoc&#xA;                        draft-gieben-creating-rfcs-pandoc-00&#xA;&#xA;      Abstract&#xA;&#xA;         This memo presents a technique for using Pandoc syntax as a source&#xA;         format for documents in the Internet-Drafts (I-Ds) and Request for&#xA;         Comments (RFC) series.&#xA;&#xA;         Using Pandoc syntax this way minimizes the need to directly edit the&#xA;         raw XML, but it does not completely make the XML invisible.&#xA;&#xA;      Status of this Memo&#xA;&#xA;         This document is an Internet-Draft and is NOT offered in accordance&#xA;         with Section 10 of RFC 2026, and the author does not provide the IETF&#xA;         with any rights other than to publish as an Internet-Draft.&#xA;&#xA;         Internet-Drafts are working documents of the Internet Engineering&#xA;         Task Force (IETF).  Note that other groups may also distribute&#xA;         working documents as Internet-Drafts.  The list of current Internet-&#xA;         Drafts is at http://datatracker.ietf.org/drafts/current/.&#xA;&#xA;         Internet-Drafts are draft documents valid for a maximum of six months&#xA;         and may be updated, replaced, or obsoleted by other documents at any&#xA;         time.  It is inappropriate to use Internet-Drafts as reference&#xA;         material or to cite them other than as &amp;#34;work in progress.&amp;#34;&#xA;&#xA;         This Internet-Draft will expire on October 3, 2012.&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 1]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;      Table of Contents&#xA;&#xA;         1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . . . 3&#xA;         2.  Using Pandoc for RFC creation . . . . . . . . . . . . . . . . . 4&#xA;         3.  Syntax  . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5&#xA;           3.1.  References  . . . . . . . . . . . . . . . . . . . . . . . . 7&#xA;         4.  Security Considerations . . . . . . . . . . . . . . . . . . . . 8&#xA;         5.  IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 8&#xA;         6.  Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . 8&#xA;         7.  Normative References  . . . . . . . . . . . . . . . . . . . . . 8&#xA;         Author&amp;#39;s Address  . . . . . . . . . . . . . . . . . . . . . . . . . 9&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 2]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;      1.  Introduction&#xA;&#xA;         This memo presents a technique for using Pandoc [1] syntax as a&#xA;         source format for documents in the Internet-Drafts (I-Ds) and Request&#xA;         for Comments (RFC) series.&#xA;&#xA;         Pandoc is an &amp;#34;almost plain text&amp;#34; format, which is inspired by&#xA;         Markdown Syntax [2] and therefor particularly well suited for editing&#xA;         RFC-like documents.&#xA;&#xA;         The power of Pandoc also comes from the fact that it can be&#xA;         translated to numerous output formats, including, but not limited to:&#xA;         HTML, Markdown and &amp;#34;docbook&amp;#34; XML.&#xA;&#xA;         In this case the Pandoc sources are converted to &amp;#34;docbook&amp;#34; XML.  This&#xA;         XML is then converted again, using an XSLT stylesheet, to XML&#xA;         suitable as input for &amp;#34;xml2rfc&amp;#34; [RFC2629].  The conversions are&#xA;         collectively called Pandoc2rfc [pandoc2rfc].&#xA;&#xA;         Pandoc2rfc is in some way amusing, as we start off with (almost)&#xA;         plain text, use elaborate XML and end up with plain text again, as&#xA;         shown in Figure 1.&#xA;&#xA;                            Attempt to justify Pandoc2rfc.&#xA;&#xA;              +-------------------+   Pandoc   +---------+&#xA;              | ALMOST PLAIN TEXT |   ------&amp;gt;  | DOCBOOK |&#xA;              +-------------------+            +---------+&#xA;                            |                       |&#xA;              non-existent  |                       | XSLT (transform.xsl)&#xA;               quicker way  |                       |&#xA;                            v                       v&#xA;                    +------------+    xml2rfc  +---------+&#xA;                    | PLAIN TEXT |  &amp;lt;--------  | XML2RFC |&#xA;                    +------------+             +---------+&#xA;&#xA;                                       Figure 1&#xA;&#xA;         For the conversion to work the following tools and files need to be&#xA;         installed:&#xA;&#xA;         o  xml2rfc [3];&#xA;&#xA;         o  xsltproc [4] (or any other XSLT (v1) processor);&#xA;&#xA;         o  Pandoc [1];&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 3]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;         o  transform.xsl [5].&#xA;&#xA;&#xA;      2.  Using Pandoc for RFC creation&#xA;&#xA;         As said in the introduction the use of Pandoc does not eliminate the&#xA;         need to setup some files in XML.  Particularly the &amp;#34;&amp;lt;front&amp;gt;&amp;#34; matter&#xA;         of &amp;#34;xml2rfc&amp;#34; can not be codified in Pandoc, so a template like this&#xA;         is still needed:&#xA;&#xA;                                A minimal template.xml.&#xA;&#xA;           &amp;lt; ?xml version=&amp;#39;1.0&amp;#39; ?&amp;gt;&#xA;           &amp;lt;!DOCTYPE rfc SYSTEM &amp;#39;rfc2629.dtd&amp;#39;&amp;gt;&#xA;&#xA;           &amp;lt;rfc ipr=&amp;#39;trust200902&amp;#39; docName=&amp;#39;draft-gieben-pandoc-rfcs-01&amp;#39;&amp;gt;&#xA;            &amp;lt;front&amp;gt;&#xA;               &amp;lt;title&amp;gt;Creating Internet Drafts and RFCs using Pandoc&amp;lt;/title&amp;gt;&#xA;               &amp;lt;abstract&amp;gt;&#xA;                   &amp;lt; ?rfc include=&amp;#34;abstract.xml&amp;#34;?&amp;gt;&#xA;               &amp;lt;/abstract&amp;gt;&#xA;&#xA;               &amp;lt;author initials=&amp;#34;R.&amp;#34; surname=&amp;#34;Gieben&amp;#34;&#xA;                   fullname=&amp;#34;R. (Miek) Gieben&amp;#34;&amp;gt;&#xA;                   &amp;lt;organization&amp;gt;SIDN&amp;lt;/organization&amp;gt;&#xA;               &amp;lt;/author&amp;gt;&#xA;&#xA;           &amp;lt;/front&amp;gt;&#xA;&#xA;           &amp;lt;middle&amp;gt;&#xA;               &amp;lt; ?rfc include=&amp;#34;middle.xml&amp;#34;?&amp;gt;&#xA;           &amp;lt;/middle&amp;gt;&#xA;&#xA;           &amp;lt;back&amp;gt;&#xA;               &amp;lt;references title=&amp;#34;Normative References&amp;#34;&amp;gt;&#xA;                   &amp;lt; ?rfc include=&amp;#34;reference.RFC.2629.xml&amp;#34;?&amp;gt;&#xA;               &amp;lt;/references&amp;gt;&#xA;               &amp;lt; ?rfc include=&amp;#34;back.xml&amp;#34;?&amp;gt;&#xA;           &amp;lt;/back&amp;gt;&#xA;           &amp;lt;/rfc&amp;gt;&#xA;&#xA;                                       Figure 2&#xA;&#xA;         The template shown in Figure 2 includes 3 (not counting the&#xA;         reference) XML files:&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 4]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;         1.  abstract.xml;&#xA;&#xA;         2.  middle.xml;&#xA;&#xA;         3.  back.xml.&#xA;&#xA;         To create the complete document you will need to edit three Pandoc&#xA;         files and the template, (&amp;#34;.pdc&amp;#34; is the extension for Pandoc files):&#xA;&#xA;         1.  abtract.pdc;&#xA;&#xA;         2.  middle.pdc;&#xA;&#xA;         3.  back.pdc;&#xA;&#xA;         4.  template.xml (probably a fairly static file once setup).&#xA;&#xA;         To convert, for instance, the &amp;#34;middle.pdc&amp;#34; file to XML the following&#xA;         command is executed on a Unix-like system:&#xA;&#xA;         pandoc -t docbook -s middle.pdc|xsltproc transform.xsl - &amp;gt; middle.xml&#xA;&#xA;         This is also done for &amp;#34;abstract.pdc&amp;#34; and &amp;#34;back.pdc&amp;#34;.  After which&#xA;         &amp;#34;xml2rfc&amp;#34; is called:&#xA;&#xA;         xml2rfc template.xml draft.txt&#xA;&#xA;         Which creates the final output.  Of course this process can be&#xA;         automated using a tool like &amp;#34;make&amp;#34;.&#xA;&#xA;         When using Pandoc2rfc consider adding the following sentence to an&#xA;         Acknowledgements section:&#xA;&#xA;         This document was prepared using Pandoc2rfc.&#xA;&#xA;&#xA;      3.  Syntax&#xA;&#xA;         Almost all features of &amp;#34;xml2rfc&amp;#34; are supported.  A notable exception&#xA;         is the &amp;#34;crefs&amp;#34; tag, but HTML comments are allowed within Pandoc&#xA;         sources so they may be used as a substitute.&#xA;&#xA;         Sections are started by using a header [README#headers].&#xA;&#xA;         Paragraphs are separated by an empty line.  Hanging paragraphs are&#xA;         entered by using a definition list [README#deflists].&#xA;&#xA;         Footnotes are not supported.  Pandoc2rfc (ab)uses the footnote syntax&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 5]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;         to support indices.  Block quotes are not directly supported in&#xA;         &amp;#34;xml2rfc&amp;#34; so they get translated to a hanging paragraph.&#xA;&#xA;         A good number of different type of lists are supported, they are&#xA;         translated according to the following table.&#xA;&#xA;                      List conversions from Pandoc to &amp;#34;xml2rfc&amp;#34;.&#xA;&#xA;          +---------------------------------+------------------------------+&#xA;          | Pandoc                          | Converts to                  |&#xA;          +---------------------------------+------------------------------+&#xA;          | &amp;#34;* First item&amp;#34;                  | &amp;#34;&amp;lt;list style=&amp;#34;symbol&amp;#34;&amp;gt;&amp;#34;      |&#xA;          | &amp;#34;1. First item&amp;#34;                 | &amp;#34;&amp;lt;list style=&amp;#34;numbers&amp;#34;&amp;gt;&amp;#34;     |&#xA;          | &amp;#34;#. First item&amp;#34;                 | &amp;#34;&amp;lt;list style=&amp;#34;empty&amp;#34;&amp;gt;&amp;#34;       |&#xA;          | &amp;#34;a. First item&amp;#34;                 | &amp;#34;&amp;lt;list style=&amp;#34;letters&amp;#34;&amp;gt;&amp;#34;     |&#xA;          | &amp;#34;A. First item&amp;#34;                 | &amp;#34;list style=&amp;#34;format %C.&amp;#34;&amp;gt;&amp;#34;   |&#xA;          | &amp;#34;i. First item&amp;#34;                 | &amp;#34;&amp;lt;list style=&amp;#34;format %i.&amp;#34;&amp;gt;&amp;#34;  |&#xA;          | &amp;#34;I. First item&amp;#34;                 | &amp;#34;&amp;lt;list style=&amp;#34;format (%d)&amp;#34;&amp;gt;&amp;#34; |&#xA;          +---------------------------------+------------------------------+&#xA;&#xA;                                        Table 1&#xA;&#xA;         A figure or artwork is created with a paragraph that is indented with&#xA;         four spaces [README#codeblocks].  A figure caption is always&#xA;         translated to a &amp;#34;&amp;lt;preamble&amp;gt;&amp;#34;.  A figure caption is created by using&#xA;         this text as the last line in the artwork: &amp;#34;Figure: ...caption&#xA;         text...&amp;#34;&#xA;&#xA;         The different tables [README#tables] Pandoc supports are all mapped&#xA;         to &amp;#34;&amp;lt;texttable&amp;gt;&amp;#34;.  A table caption is always translated to a&#xA;         &amp;#34;&amp;lt;postamble&amp;gt;&amp;#34;.  A table caption is added by using &amp;#34;Table: ...caption&#xA;         text...&amp;#34; after a table.&#xA;&#xA;         The caption is _always_ translated to a &amp;#34;&amp;lt;preamble&amp;gt;&amp;#34;.  The&#xA;         &amp;#34;&amp;lt;postamble&amp;gt;&amp;#34; tag isn&amp;#39;t supported.  If a table has a caption, it will&#xA;         *also* get a reference.  See Section 3.1 for the details.&#xA;&#xA;         As footnotes are not supported in RFCs the syntax in Pandoc is used&#xA;         to support an index.  Footnotes in Pandoc (and thus an index in the&#xA;         RFC) are entered in two steps, you have a marker in the text, and&#xA;         later you give actual footnote text.  Like this:&#xA;&#xA;         [^1]&#xA;&#xA;         [^1]: footnote text&#xA;&#xA;         This text translates to: &amp;#34;&amp;lt;iref item=&amp;#34;footnote text&amp;#34;/&amp;gt;&amp;#34;.  It points&#xA;         to the page where to footnote marker was placed.  Sub items are also&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 6]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;         supported.  Use an exclamation mark (&amp;#34;!&amp;#34;) to separate them: &amp;#34;[^1]:&#xA;         item!sub item&amp;#34;.&#xA;&#xA;      3.1.  References&#xA;&#xA;         References to section are created automatically by Pandoc and the&#xA;         normal Pandoc rules are followed.&#xA;&#xA;                    Reference conversions from Pandoc to &amp;#34;xml2rfc&amp;#34;.&#xA;&#xA;         +-------------------------+------------------------------+----------+&#xA;         | Pandoc                  | Converts to                  | Type     |&#xA;         +-------------------------+------------------------------+----------+&#xA;         | &amp;#34;[Click](URL)&amp;#34;          | &amp;#34;&amp;lt;eref                       | External |&#xA;         |                         | target=&amp;#34;URL&amp;#34;&amp;gt;Click...&amp;#34;       |          |&#xA;         | &amp;#34;[See](#local)&amp;#34;         | &amp;#34;&amp;lt;xref                       | Internal |&#xA;         |                         | target=&amp;#34;local&amp;#34;&amp;gt;See...&amp;#34;       |          |&#xA;         | &amp;#34;[](#RFC2119)&amp;#34;          | &amp;#34;&amp;lt;xref target=&amp;#34;RFC2119&amp;#34;/&amp;gt;&amp;#34;   | Citation |&#xA;         +-------------------------+------------------------------+----------+&#xA;&#xA;                                        Table 2&#xA;&#xA;         Internal references will add &amp;#34;Section:&amp;#34;, &amp;#34;Table:&amp;#34; or &amp;#34;Figure:&amp;#34;&#xA;         depending on where it points to (this is the default behavior of&#xA;         &amp;#34;xml2rfc&amp;#34;).  For the citations to work the reference anchor must be&#xA;         known (i.e. the RFC reference.xml must be included in the template).&#xA;&#xA;         References to tables and figures are not handled by Pandoc, this&#xA;         behavior is implemented in the XSLT stylesheets, therefor the rules&#xA;         are slightly different (and less flexible).  A figure and table only&#xA;         get a reference when they have a caption.  If a figure has a caption&#xA;         it is also centered on the page.&#xA;&#xA;         The reference anchor attribute will be: &amp;#34;fig:&amp;#34; + &amp;#34;first 10&#xA;         (normalized) characters from the caption&amp;#34; for figures and &amp;#34;tab:&amp;#34; +&#xA;         &amp;#34;first 10 (normalized) characters from the caption&amp;#34; for tables.&#xA;         Normalized is:&#xA;&#xA;         o  Take the first 10 characters of the caption (i.e. this is the text&#xA;            _after_ the string &amp;#34;Figure:&amp;#34; or &amp;#34;Table:&amp;#34;);&#xA;&#xA;         o  Spaces are translated to a minus &amp;#34;-&amp;#34;;&#xA;&#xA;         o  Uppercase letters translated to lowercase.&#xA;&#xA;         For example a figure with a caption &amp;#34;Figure: A minimal template&amp;#34; will&#xA;         get the anchor &amp;#34;fig:a-minimal-&amp;#34;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 7]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;      4.  Security Considerations&#xA;&#xA;         This memo raises no security issues.&#xA;&#xA;&#xA;      5.  IANA Considerations&#xA;&#xA;         This memo has no actions for IANA.&#xA;&#xA;&#xA;      6.  Acknowledgements&#xA;&#xA;         The following people have helped to make Pandoc2rfc what it is today:&#xA;         Benno Overeinder, Erlend Hamnaberg, Matthijs Mekking, and Trygve&#xA;         Laugstoel.&#xA;&#xA;         This document was prepared using Pandoc2rfc.&#xA;&#xA;&#xA;      7.  Normative References&#xA;&#xA;         [README#codeblocks]&#xA;                    MacFarlane, J., &amp;#34;PANDOC Documentation&amp;#34;, 2006, &amp;lt;http://&#xA;                    johnmacfarlane.net/pandoc/&#xA;                    README.html#indented-code-blocks&amp;gt;.&#xA;&#xA;         [README#deflists]&#xA;                    MacFarlane, J., &amp;#34;PANDOC Documentation&amp;#34;, 2006, &amp;lt;http://&#xA;                    johnmacfarlane.net/pandoc/README.html#definition-lists&amp;gt;.&#xA;&#xA;         [README#headers]&#xA;                    MacFarlane, J., &amp;#34;PANDOC Documentation&amp;#34;, 2006,&#xA;                    &amp;lt;http://johnmacfarlane.net/pandoc/README.html#headers&amp;gt;.&#xA;&#xA;         [README#tables]&#xA;                    MacFarlane, J., &amp;#34;PANDOC Documentation&amp;#34;, 2006,&#xA;                    &amp;lt;http://johnmacfarlane.net/pandoc/README.html#tables&amp;gt;.&#xA;&#xA;         [RFC2629]  Rose, M., &amp;#34;Writing I-Ds and RFCs using XML&amp;#34;, RFC 2629,&#xA;                    June 1999.&#xA;&#xA;         [pandoc2rfc]&#xA;                    Gieben, R., &amp;#34;Pandoc2rfc&amp;#34;, 2012,&#xA;                    &amp;lt;http://github.com/miekg/pandoc2rfc&amp;gt;.&#xA;&#xA;         [1]  &amp;lt;http://johnmacfarlane.net/pandoc/&amp;gt;&#xA;&#xA;         [2]  &amp;lt;http://daringfireball.net/projects/markdown/&amp;gt;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 8]&#xA;&#xA;      Internet-Draft           Pandoc for RFC creation              April 2012&#xA;&#xA;&#xA;         [3]  &amp;lt;http://xml.resource.org/&amp;gt;&#xA;&#xA;         [4]  &amp;lt;http://xmlsoft.org/xslt/xsltproc2.html&amp;gt;&#xA;&#xA;         [5]  &amp;lt;https://raw.github.com/miekg/pandoc2rfc/master/transform.xsl&amp;gt;&#xA;&#xA;&#xA;      Author&amp;#39;s Address&#xA;&#xA;         R. (Miek) Gieben&#xA;         SIDN&#xA;         Meander 501&#xA;         Arnhem,   6825 MD&#xA;         NL&#xA;&#xA;         Phone:&#xA;         Email: miek@miek.nl&#xA;         URI:&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;      Gieben                   Expires October 3, 2012                [Page 9]&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Super-short guide to getting q (Part II)</title>
      <link>https://miek.nl/2012/march/04/super-short-guide-to-getting-q-part-ii/</link>
      <pubDate>Sun, 04 Mar 2012 10:54:00 +0000</pubDate>
      <guid>https://miek.nl/2012/march/04/super-short-guide-to-getting-q-part-ii/</guid>
      <description>&lt;p&gt;The development of the language &lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt; is&#xA;going at a fast pace, hence an updated version of&#xA;&lt;a href=&#34;https://miek.nl/2012/january/23/super-short_guide_to_getting_q/index.html&#34;&gt;Super-short guide to gettinq q&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Get the latest version (called &lt;code&gt;weekly&lt;/code&gt;) of Go:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Get Go: &lt;code&gt;hg clone -u release https://go.googlecode.com/hg/ go&lt;/code&gt;&#xA;Note the directory you have downloaded it to and set add its &lt;code&gt;bin&lt;/code&gt;&#xA;directory to your PATH: &lt;code&gt;PATH=$PWD/go/bin&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Update Go to the latest weekly: &lt;code&gt;cd go; hg pull; hg update weekly&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Compile Go: &lt;code&gt;cd src&lt;/code&gt;, you should now sit in &lt;code&gt;go/src&lt;/code&gt;.&#xA;And compile: &lt;code&gt;./all.bash&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>godns is now dns</title>
      <link>https://miek.nl/2012/february/11/godns-is-now-dns/</link>
      <pubDate>Sat, 11 Feb 2012 23:09:00 +0000</pubDate>
      <guid>https://miek.nl/2012/february/11/godns-is-now-dns/</guid>
      <description>&lt;p&gt;Due to the new &lt;code&gt;go&lt;/code&gt; tool (long story), I&amp;rsquo;ve renamed &lt;code&gt;godns&lt;/code&gt; to &lt;code&gt;dns&lt;/code&gt;.&#xA;This means the &lt;a href=&#34;https://github.com/miekg/dns&#34;&gt;github repo is also somewhere else&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;godns&lt;/code&gt; installed itself as &lt;code&gt;dns&lt;/code&gt; so code using it does &lt;em&gt;not&lt;/em&gt; need to be changed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS Fingerprinting</title>
      <link>https://miek.nl/2012/january/28/dns-fingerprinting/</link>
      <pubDate>Sat, 28 Jan 2012 16:03:00 +0000</pubDate>
      <guid>https://miek.nl/2012/january/28/dns-fingerprinting/</guid>
      <description>&lt;h1 id=&#34;announcing-fp&#34;&gt;Announcing FP&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;The&lt;/em&gt; tool for DNS fingerprinting is &lt;a href=&#34;https://github.com/kirei/fpdns&#34;&gt;fpdns&lt;/a&gt;, which is Perl based.&#xA;In recent times development seems to have picked up, but a little competition never hurt&#xA;anyone, so I wrote &lt;code&gt;fp&lt;/code&gt; in Go. Fp is also a fingerprint program for DNS servers. Its aim is to&#xA;be more readable then &lt;code&gt;fpdns&lt;/code&gt; is (was?). And make it more easy to add new server types.&lt;/p&gt;&#xA;&lt;p&gt;Help needed!&lt;/p&gt;&#xA;&lt;p&gt;Do you have some old(er) nameserver laying around that can be queried? Does your (sick) mind&#xA;know of a few extra evil queries that can be sent to nameservers? If so, please contact&#xA;me: &lt;code&gt;query@evilquery.nl&lt;/code&gt;. I want to get to a point where &lt;code&gt;fp&lt;/code&gt; sends about 10 queries that&#xA;can be used to identify a server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Super-short guide to getting q</title>
      <link>https://miek.nl/2012/january/23/super-short-guide-to-getting-q/</link>
      <pubDate>Mon, 23 Jan 2012 18:07:00 +0000</pubDate>
      <guid>https://miek.nl/2012/january/23/super-short-guide-to-getting-q/</guid>
      <description>&lt;p&gt;Get the latest version (called &lt;code&gt;weekly&lt;/code&gt;) of Go:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Get Go: &lt;code&gt;hg clone -u release https://go.googlecode.com/hg/ go&lt;/code&gt;&#xA;Note the directory you have downloaded it to and set&#xA;$GOROOT to it: &lt;code&gt;export GOROOT=$PWD/go&lt;/code&gt;.&#xA;Add the GOROOT bin directory to your path: &lt;code&gt;PATH=$PATH:$GOROOT/bin&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Update Go to the latest weekly: &lt;code&gt;cd $GOROOT; hg pull; hg update weekly&lt;/code&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Compile Go: &lt;code&gt;cd $GOROOT/src ; ./all.bash&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Install missing commands (gcc, sed, bison, etc.) if needed.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The latest Go is now installed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>XSLT and sectN/section</title>
      <link>https://miek.nl/2012/january/08/xslt-and-sectn/section/</link>
      <pubDate>Sun, 08 Jan 2012 12:31:00 +0000</pubDate>
      <guid>https://miek.nl/2012/january/08/xslt-and-sectn/section/</guid>
      <description>&lt;p&gt;This &lt;a href=&#34;http://groups.google.com/group/pandoc-discuss/browse_thread/thread/90cc2ea23e3c93f3/880bb6e69274ec1d?show_docid=880bb6e69274ec1d&amp;amp;fwc=2&amp;amp;pli=1&#34;&gt;came up during a recent Pandoc&#xA;discussion&lt;/a&gt;.&#xA;The discussion was about outputting &lt;code&gt;&amp;lt;sectN&amp;gt;&lt;/code&gt; section styling when creating DocBook XML. Currently&#xA;Pandoc outputs nested &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;s.&lt;/p&gt;&#xA;&lt;p&gt;I argued you could easily change between the two formats and &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; is more flexible, so&#xA;just leave Pandoc as it is. But it allowed me to play with XSLT once more. With the following&#xA;results.&lt;/p&gt;&#xA;&lt;h1 id=&#34;translate-to-sectn&#34;&gt;Translate to sectN&lt;/h1&gt;&#xA;&lt;p&gt;This XSLT translates &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt; to &lt;code&gt;&amp;lt;sectN&amp;gt;&lt;/code&gt; where N is 5. If the sections are nested deeper&#xA;it switches to &lt;code&gt;&amp;lt;section&amp;gt;&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Pandoc to RFC</title>
      <link>https://miek.nl/2011/september/28/pandoc-to-rfc/</link>
      <pubDate>Wed, 28 Sep 2011 13:45:00 +0000</pubDate>
      <guid>https://miek.nl/2011/september/28/pandoc-to-rfc/</guid>
      <description>&lt;p&gt;This is an follow-up on &lt;a href=&#34;http://www.sidnlabs.nl/laatste-berichten/nieuwsdetail/article/van-pandoc-naar-rfc/&#34;&gt;this &lt;code&gt;pandoc&lt;/code&gt; item in Dutch&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;When writing &lt;a href=&#34;http://www.ietf.org/rfc/rfc4641.txt&#34;&gt;RFC 4641&lt;/a&gt; we directly wrote the&#xA;XML. Needless to say is was kinda tedious even thought the XML of &lt;a href=&#34;http://xml.resource.org/&#34;&gt;xml2rfc&lt;/a&gt;&#xA;is very &amp;ldquo;light&amp;rdquo;.&lt;/p&gt;&#xA;&lt;p&gt;Nowadays I&amp;rsquo;m a fan of the markdown syntax and especially the syntax as supported (created?)&#xA;by &lt;a href=&#34;http://johnmacfarlane.net/pandoc/&#34;&gt;Pandoc&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;So for my next RFC (if ever!) I decided I wanted to use Pandoc. As &lt;code&gt;xml2rfc&lt;/code&gt; uses XML&#xA;I thought the easiest way would be to create &lt;code&gt;docbook&lt;/code&gt; XML and transform that using&#xA;XSLT.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Learning Go for E-readers</title>
      <link>https://miek.nl/2011/august/28/learning-go-for-e-readers/</link>
      <pubDate>Sun, 28 Aug 2011 20:45:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/28/learning-go-for-e-readers/</guid>
      <description>&lt;p&gt;Thanks to a patch from Thomas Kappler I can now offer two types of PDFs,&#xA;one for A4 pages and one for E-readers, like the kindle.&lt;/p&gt;&#xA;&lt;p&gt;The E-reader variant is suffixed with &lt;code&gt;-kindle&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/files/go/20110828-go-kindle.pdf&#34;&gt;Learning Go for E-readers&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;files/go/20110828-go.pdf&#34;&gt;Learning Go A4 paper&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>VIM setup</title>
      <link>https://miek.nl/2011/august/12/vim-setup/</link>
      <pubDate>Fri, 12 Aug 2011 09:04:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/12/vim-setup/</guid>
      <description>&lt;p&gt;After several years I decided to use a different color scheme for VIM.&#xA;Also I&amp;rsquo;m going for force myself to use VIM&amp;rsquo;s folding abilities and use&#xA;&lt;code&gt;make&lt;/code&gt; from within VIM.&lt;/p&gt;&#xA;&lt;p&gt;For good measure I also want to use Omni-completion when writing Go&#xA;code:&lt;/p&gt;&#xA;&lt;img width=&#34;600&#34; src=&#34;https://miek.nl/images/2011/omni.jpg&#34; alt=&#34;omni completion screenshot&#34;/&gt; &#xA;&lt;p&gt;Btw, this screenshots also shows the &lt;code&gt;solarized&lt;/code&gt; (dark) colorscheme.&lt;/p&gt;&#xA;&lt;h1 id=&#34;coloring&#34;&gt;Coloring&lt;/h1&gt;&#xA;&lt;p&gt;Google for &lt;code&gt;solarized&lt;/code&gt;. In my &lt;code&gt;.vimrc&lt;/code&gt;:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;let g:solarized_termcolors=256&#xA;colorscheme solarized&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;make-from-vim&#34;&gt;Make from VIM&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;:make&lt;/code&gt; inside the editor and jump through the errors with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Chaining proxies</title>
      <link>https://miek.nl/2011/august/01/chaining-proxies/</link>
      <pubDate>Mon, 01 Aug 2011 20:38:00 +0000</pubDate>
      <guid>https://miek.nl/2011/august/01/chaining-proxies/</guid>
      <description>&lt;p&gt;Online signing is cool, but slow. Caching queries in a reverse proxy is&#xA;nice, but useless for something like NSD. But what&#xA;if you want to do online signing in a fast way?&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Enter: proxy chaining.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;I already showed &lt;a href=&#34;https://miek.nl/2011/january/24/funkensign/index.html&#34;&gt;FunkenSign&lt;/a&gt; (example code&#xA;is quite old though)&#xA;and yesterday &lt;a href=&#34;https://miek.nl/2011/july/31/reverse_dns_proxy/index.html&#34;&gt;FunkenShield&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;What if you combine the two? That gives the best of both worlds:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Online signing;&lt;/li&gt;&#xA;&lt;li&gt;Caching;&lt;/li&gt;&#xA;&lt;li&gt;And it adheres to the true Unix philosophy: do one thing,  and do one thing well.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;So lets get some figures again.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Reverse DNS proxy</title>
      <link>https://miek.nl/2011/july/31/reverse-dns-proxy/</link>
      <pubDate>Sun, 31 Jul 2011 16:09:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/31/reverse-dns-proxy/</guid>
      <description>&lt;p&gt;Have a slow nameserver and want to spice things up? How about a reverse DNS&#xA;proxy? For lack of a cool name I chose the name &lt;em&gt;FunkenShield&lt;/em&gt;. It&amp;rsquo;s (of course)&#xA;in the early stages, but it works quite nicely already.&lt;/p&gt;&#xA;&lt;p&gt;This is done with the framework of&#xA;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm_a_versatile_dns_proxy/index.html&#34;&gt;FunkenSturm&lt;/a&gt;.&#xA;Which is part of &lt;a href=&#34;http://github.com/miekg/godns&#34;&gt;GoDNS&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-it-works&#34;&gt;How it works:&lt;/h1&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You place FunkenShield in front of your nameserver and it will cache the binary packets&#xA;coming from your server in a local cache.&lt;/p&gt;</description>
    </item>
    <item>
      <title>On programming languages and programmers</title>
      <link>https://miek.nl/2011/july/18/on-programming-languages-and-programmers/</link>
      <pubDate>Mon, 18 Jul 2011 13:02:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/18/on-programming-languages-and-programmers/</guid>
      <description>&lt;p&gt;Very well written email message from Geoff Teale&#xA;on the &lt;a href=&#34;http://groups.google.com/group/golang-nuts/&#34;&gt;golang mailing list&lt;/a&gt; on programmers and&#xA;progamming languages&#xA;(&lt;a href=&#34;http://groups.google.com/group/golang-nuts/browse_thread/thread/350bf027bd803af1&#34;&gt;thread&lt;/a&gt;).&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;To summarise a long presentation I gave to non-programmers:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;There are 12 million programmers in the world&lt;/li&gt;&#xA;&lt;li&gt;The majority of those programmers are scarcely qualified&lt;/li&gt;&#xA;&lt;li&gt;Most technology decisions are made by a combination of following the crowd&#xA;and a false understanding of risk.&lt;/li&gt;&#xA;&lt;li&gt;The high cost and failure rate in software development is no coincidence.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Remember the Stevie Wonder rule - &amp;ldquo;When you believe in something you don&amp;rsquo;t&#xA;understand then you suffer&amp;rdquo;.   In this case that means &amp;ldquo;Perhaps making&#xA;programming language decisions based on what 12 million powerless idiots are&#xA;doing isn&amp;rsquo;t the golden road to glory and great hacks.&amp;rdquo;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Go DNS (update)</title>
      <link>https://miek.nl/2011/july/06/go-dns-update/</link>
      <pubDate>Wed, 06 Jul 2011 08:41:00 +0000</pubDate>
      <guid>https://miek.nl/2011/july/06/go-dns-update/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m finally back to coding Go DNS and making it work with&#xA;the latest Go releases. Also the API has changed quite significantly&#xA;since the last time I blogged about it.&lt;/p&gt;&#xA;&lt;p&gt;So this I will detail&#xA;&lt;a href=&#34;https://github.com/miekg/godns/blob/master/_examples/key2ds/key2ds.go&#34;&gt;key2ds&lt;/a&gt; which is small utility that queries&#xA;a zone and print any DNSKEY records as DS records on the fly, to show the new API and&#xA;some sample usage.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;% ./key2ds sidn.nl&#xA;sidn.nl.    0   IN  DS  42033 8 1 343F74674D36C9B5BE2CEB2C401AC4EDEB2A05B2&#xA;sidn.nl.    0   IN  DS  42033 8 2 BF985EC0738FACC89EE0B12FBD9261827C59191D9EA6A9BDFF55F9BDF3DBBFF3&#xA;sidn.nl.    0   IN  DS  39274 8 1 E79E031DFDE8E68EF1E2C6CA0943C2CC0DED1889&#xA;sidn.nl.    0   IN  DS  39274 8 2 8E8A8CFB40FD0C30BFA82E53752E1C257DAFB7B6206D12B9EDA43AF3EAB2157D&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;This util uses synchronous queries. I will explain the &lt;code&gt;main&lt;/code&gt;-function:&lt;/p&gt;</description>
    </item>
    <item>
      <title>DNS reflector server in GO</title>
      <link>https://miek.nl/2011/april/04/dns-reflector-server-in-go/</link>
      <pubDate>Mon, 04 Apr 2011 21:08:00 +0000</pubDate>
      <guid>https://miek.nl/2011/april/04/dns-reflector-server-in-go/</guid>
      <description>&lt;p&gt;I&amp;rsquo;m (again) rewriting the API of &lt;a href=&#34;https://github.com/miekg/godns&#34;&gt;godns&lt;/a&gt;. I&amp;rsquo;ve now&#xA;taking a cue from the &lt;a href=&#34;http://golang.org/pkg/http/&#34;&gt;http package in Go&lt;/a&gt;, the result&#xA;seems very nice. A reflector (returns your query in the answer) in Go becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;package main&#xA;&#xA;import (&#xA;        &amp;quot;dns&amp;quot;&#xA;        &amp;quot;log&amp;quot;&#xA;)&#xA;&#xA;func ReflectServer(w dns.ResponseWriter, req *dns.Msg) {&#xA;        m := new(dns.Msg)&#xA;        m.SetReply(req)&#xA;&#xA;        m.Extra = make([]dns.RR, 1)&#xA;        m.Extra[0] = &amp;amp;dns.RR_TXT{Hdr: dns.RR_Header{Name: m.Question[0].Name, Rrtype: dns.TypeTXT, &#xA;                Class: dns.ClassINET, Ttl: 0}, Txt: &amp;quot;Hello world&amp;quot;}&#xA;        buf, _ := m.Pack()&#xA;        w.Write(buf)&#xA;}&#xA;&#xA;func main() {&#xA;        dns.HandleFunc(&amp;quot;.&amp;quot;, ReflectServer)&#xA;        err := dns.ListenAndServe(&amp;quot;:8053&amp;quot;, &amp;quot;udp&amp;quot;, nil)&#xA;        if err != nil {&#xA;                log.Fatal(&amp;quot;ListenAndServe: &amp;quot;, err.String())&#xA;        }&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    <item>
      <title>Learning Go - version 0.3</title>
      <link>https://miek.nl/2011/february/28/learning-go-version-0.3/</link>
      <pubDate>Mon, 28 Feb 2011 20:54:00 +0000</pubDate>
      <guid>https://miek.nl/2011/february/28/learning-go-version-0.3/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve tagged a new version of &amp;ldquo;Learning Go&amp;rdquo;, version 0.3.&#xA;It&amp;rsquo;s more of a snapshot of the current development, than&#xA;an actual &amp;ldquo;release&amp;rdquo; release.&lt;/p&gt;&#xA;&lt;p&gt;There are lots of fixes, code updates and tweaks. Numerous&#xA;people send in fixes. Thank you all for the contributions!&lt;/p&gt;&#xA;&lt;p&gt;Get it:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2011/go-0.3.pdf&#34;&gt;PDF&lt;/a&gt; download;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/downloads/2011/go.pdf&#34;&gt;Latest daily build&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Feedback is welcome.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;To see the development version you can use:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/cgi-bin/gitweb.cgi?p=gobook.git;a=summary&#34;&gt;Gitweb repository&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/files/go/&#34;&gt;Daily builds&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Major stuff coming in 0.4:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensign</title>
      <link>https://miek.nl/2011/january/24/funkensign/</link>
      <pubDate>Mon, 24 Jan 2011 12:52:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/24/funkensign/</guid>
      <description>&lt;p&gt;How about on-the-fly signing? In this example we add a signature&#xA;to any packet dealing with &lt;code&gt;www.example.org.&lt;/code&gt; Again it is a&#xA;matter of defining the matching, action and setup functions.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching&#34;&gt;Matching&lt;/h1&gt;&#xA;&lt;p&gt;We don&amp;rsquo;t have to match anything coming in, we only need to sign&#xA;pkts on their way out. So the function becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;func match(m *dns.Msg, d int) (*dns.Msg, bool) {&#xA;        // Matching criteria&#xA;        switch d { &#xA;        case IN: &#xA;                // nothing&#xA;        case OUT:&#xA;                // nothing&#xA;        }   &#xA;        // Packet Mangling&#xA;        switch d { &#xA;        case IN: &#xA;                // nothing&#xA;        case OUT:&#xA;                if m.Question[0].Name == &amp;quot;www.example.org.&amp;quot; {&#xA;                        // On the way out sign the packet&#xA;                        m = sign(m) // keys are global&#xA;                }   &#xA;        }   &#xA;        return m, true&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;As you can see, it calls the &lt;code&gt;sign()&lt;/code&gt; function where the actual signing&#xA;takes place. We just sign the first RR in the answer section —&#xA;if there is one.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm</title>
      <link>https://miek.nl/2011/january/23/funkensturm/</link>
      <pubDate>Sun, 23 Jan 2011 20:59:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm/</guid>
      <description>&lt;p&gt;You need to install &lt;a href=&#34;http://www.golang.org&#34;&gt;Go&lt;/a&gt; and &lt;a href=&#34;https://github.com/miekg/godns&#34;&gt;Go DNS&lt;/a&gt;,&#xA;but then you can play with &lt;em&gt;Funkensturm&lt;/em&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/index.html&#34;&gt;Architecture and announcement&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/index.html&#34;&gt;Transparant proxy example&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/index.html&#34;&gt;Delaying proxy example&lt;/a&gt;;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://miek.nl/2011/january/24/funkensign/index.html&#34;&gt;Signing proxy example&lt;/a&gt;.&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
    </item>
    <item>
      <title>Funkensturm: delaying proxy example</title>
      <link>https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/</link>
      <pubDate>Sun, 23 Jan 2011 20:50:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-delaying-proxy-example/</guid>
      <description>&lt;p&gt;Another application for Funkensturm is: delaying packets.&#xA;Here we only delay packets with the recursion desired bit (RD)&#xA;set, but it can be easily be changed to check for other&#xA;properties of a packet, see &lt;code&gt;godoc dns&lt;/code&gt; for all elements of&#xA;DNS packets.&lt;/p&gt;&#xA;&lt;p&gt;The configuration is similar as described&#xA;&lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/index.html&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching-pkts-with-rd-bit-set&#34;&gt;Matching pkts with RD bit set&lt;/h1&gt;&#xA;&lt;p&gt;The matching function becomes:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;// the only matching we do is on the RD bit&#xA;// for incoming packets.&#xA;func match(m *dns.Msg, d int) (*dns.Msg, bool) {&#xA;        // Matching criteria&#xA;        var ok bool&#xA;        switch d {&#xA;        case IN:&#xA;                // only delay pkts with RD bit &#xA;                ok = m.MsgHdr.RecursionDesired == true&#xA;        case OUT:&#xA;                // nothing&#xA;        }&#xA;&#xA;        // Packet Mangling&#xA;        switch d {&#xA;        case IN:&#xA;                // nothing&#xA;        case OUT:&#xA;                // nothing&#xA;        }&#xA;        return m, ok&#xA;}&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;h1 id=&#34;action-function&#34;&gt;Action function&lt;/h1&gt;&#xA;&lt;p&gt;First a delay helper function. As shown here it returns &lt;code&gt;true&lt;/code&gt; if&#xA;the delay time isn&amp;rsquo;t reached, and &lt;code&gt;false&lt;/code&gt; if a something should be&#xA;delayed.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm: transparent proxy example</title>
      <link>https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/</link>
      <pubDate>Sun, 23 Jan 2011 19:00:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-transparent-proxy-example/</guid>
      <description>&lt;p&gt;A transparent proxy is a proxy that does nothing, but it&#xA;serves as a nice introduction into Funkensturm.&lt;/p&gt;&#xA;&lt;p&gt;See &lt;a href=&#34;https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/index.html&#34;&gt;this&#xA;post&lt;/a&gt;&#xA;for an architectural overview of Funkensturm.&lt;/p&gt;&#xA;&lt;p&gt;Currently a configuration is compiled into the Funkensturm binary. As such&#xA;it must look like a normal Go program.&lt;/p&gt;&#xA;&lt;h1 id=&#34;matching-function&#34;&gt;Matching function&lt;/h1&gt;&#xA;&lt;p&gt;The matching function checks a packet for features and can&#xA;optionally modify it.&lt;/p&gt;&#xA;&lt;p&gt;This is the prototype of a matching function:&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;func match(m *dns.Msg, d int) (*dns.Msg, bool)&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;It receives a &lt;code&gt;*dns.Msg&lt;/code&gt; which is a packet in Go DNS and a direction &lt;code&gt;d&lt;/code&gt;&#xA;which can be &lt;code&gt;IN&lt;/code&gt; (first incoming packet) or &lt;code&gt;OUT&lt;/code&gt; when the packet is&#xA;on its way back to the client. It returns a DNS packet and a boolean&#xA;value signaling a match.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Funkensturm: a versatile DNS proxy</title>
      <link>https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/</link>
      <pubDate>Sun, 23 Jan 2011 16:52:00 +0000</pubDate>
      <guid>https://miek.nl/2011/january/23/funkensturm-a-versatile-dns-proxy/</guid>
      <description>&lt;h1 id=&#34;whats-a-dns-proxy&#34;&gt;What&amp;rsquo;s a DNS proxy?&lt;/h1&gt;&#xA;&lt;p&gt;A proxy is something this sits between a client and a server and does something&#xA;with the data flowing through it. So a DNS proxy does this for DNS packets.&lt;/p&gt;&#xA;&lt;h1 id=&#34;how-does-funkensturm-work&#34;&gt;How does Funkensturm work?&lt;/h1&gt;&#xA;&lt;p&gt;&lt;em&gt;Funkensturm&lt;/em&gt; consists out of 3 configuration parts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A setup function for the initial setup.&lt;/li&gt;&#xA;&lt;li&gt;Match/Modify function(s) — This function checks the packet for configured&#xA;properties. If there is match &lt;code&gt;true&lt;/code&gt; is returned.&lt;/li&gt;&#xA;&lt;li&gt;Action function(s) — Taking the truth value from 2. (and the packet) as input, it&#xA;does something with it.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;With this setup you can change incoming packets before they are send through to the&#xA;server. And you can change packet coming from the server that are send back to the&#xA;client.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
