<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Coding on Jonas&#39; Blog</title>
    <link>https://log.jnsmr.ch/categories/coding/</link>
    <description>Recent content in Coding on Jonas&#39; Blog</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 14 May 2024 10:00:00 +0000</lastBuildDate>
    <atom:link href="https://log.jnsmr.ch/categories/coding/feed.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>(Ab)using rust macros to create parametrized modules</title>
      <link>https://log.jnsmr.ch/post/2024-05-16-parametrized-modules/</link>
      <pubDate>Tue, 14 May 2024 10:00:00 +0000</pubDate>
      <guid>https://log.jnsmr.ch/post/2024-05-16-parametrized-modules/</guid>
      <description>&lt;h1 id=&#34;the-very-niche-problem&#34;&gt;The (very niche) Problem&lt;/h1&gt;&#xA;&lt;p&gt;Some time ago I came across &lt;a href=&#34;https://nullderef.com/blog/rust-async-sync/&#34;&gt;this blogpost&lt;/a&gt; which describes the agony the author went through to provide both a synchronous and an asynchronous version of their library.&lt;/p&gt;&#xA;&lt;p&gt;What the author opted for in the end is a library that either generated &lt;code&gt;async&lt;/code&gt; or normal code depending on the presence (or absence) of a feature flag.&#xA;Importantly however, this would not work to enable &lt;em&gt;both&lt;/em&gt; synchronous and asynchronous code generation at the same time (since synchronous code is emitted at the absence of the &amp;ldquo;asynchronous&amp;rdquo; flag).&lt;/p&gt;</description>
    </item>
    <item>
      <title>a little ssh trick</title>
      <link>https://log.jnsmr.ch/post/2023-06-04-ssh-configs/</link>
      <pubDate>Sun, 04 Jun 2023 10:00:00 +0000</pubDate>
      <guid>https://log.jnsmr.ch/post/2023-06-04-ssh-configs/</guid>
      <description>&lt;p&gt;I finally took time to set up my SSH properly.&#xA;Due to the nature of my setup, I needed to use non-default ssh ports.&lt;/p&gt;&#xA;&lt;p&gt;Kind of annoying, isn&amp;rsquo;t it?&#xA;You have to specify the port ever time you connect, like so:&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-txt&#34; data-lang=&#34;txt&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ssh user@host -p port&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#xA;&lt;p&gt;Worse even, if you have multiple ssh certificates, you need to specify that as well!&lt;/p&gt;&#xA;&lt;p&gt;Luckily this problem has a very easy solution :)&lt;/p&gt;&#xA;&lt;h3 id=&#34;ssh-configs&#34;&gt;SSH Configs&lt;/h3&gt;&#xA;&lt;p&gt;You can create a config file at ~/.ssh/config and save your frequent connected servers there.&lt;/p&gt;</description>
    </item>
    <item>
      <title>My Favourite Programming Language</title>
      <link>https://log.jnsmr.ch/post/2023-05-18-most-sane-language/</link>
      <pubDate>Thu, 18 May 2023 11:07:00 +0000</pubDate>
      <guid>https://log.jnsmr.ch/post/2023-05-18-most-sane-language/</guid>
      <description>&lt;p&gt;As hopefully many people are aware, C and C++ have a notion of &amp;ldquo;Undefined Behaviour&amp;rdquo;.&#xA;Few people seem to realize what that means though, so I wanted to write a funny program to illustrate it.&lt;/p&gt;&#xA;&lt;p&gt;Most people just seem to think that if Undefined Behaviour happens, then just some values might be random.&#xA;However, I think it&amp;rsquo;s much worse than that.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;At the moment I am using gcc version 13.1.1 20230429, so if you want to reproduce results I would recommend sticking to that (or very similar) compiler versions.&lt;/em&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Self Hosting Gitea</title>
      <link>https://log.jnsmr.ch/post/2023-03-19-self-hosting-gitea/</link>
      <pubDate>Sun, 19 Mar 2023 22:13:00 +0000</pubDate>
      <guid>https://log.jnsmr.ch/post/2023-03-19-self-hosting-gitea/</guid>
      <description>&lt;p&gt;Some time ago I decided I want to take matters into my own hands and host my own code.&#xA;I was aware of a few git hosting services: GitHub, GitLab, BitBucket, and Gitea.&lt;/p&gt;&#xA;&lt;p&gt;GitHub was no option, as you can&amp;rsquo;t self-host that.&lt;/p&gt;&#xA;&lt;p&gt;I was not very familiar with GitLab, and it looked clunky, big, and slow to me.&lt;/p&gt;&#xA;&lt;p&gt;BitBucket I was not a fan of due to it being product of an Australian company. &lt;a href=&#34;https://fee.org/articles/australia-s-unprecedented-encryption-law-is-a-threat-to-global-privacy/&#34;&gt;See here why that might not be a good thing&lt;/a&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
