<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>What could possibly go wrong? on What could possibly go wrong?</title>
		<link>https://kihlander.net/</link>
		<description>Recent content in What could possibly go wrong? </description>
		<generator>Hugo -- gohugo.io</generator>
		
  		<language>en</language>
		
		<managingEditor>/</managingEditor>
    	
  		<lastBuildDate>Sat, 15 Feb 2025 15:10:55 +0100</lastBuildDate>
		
		<atom:link href="/" rel="self" type="application/rss+xml" />
		
		<item>
			<title>c&#43;&#43; errors... a rant</title>
			<link>https://kihlander.net/post/cpp-errors-a-rant/</link>
			<pubDate>Sat, 15 Feb 2025 15:10:55 +0100</pubDate>
			<guid>https://kihlander.net/post/cpp-errors-a-rant/</guid>
			<description>&lt;p&gt;Today a small rant&amp;hellip; with a bit of an unexpected conclusion!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;In the beginning someone decided to use &lt;code&gt;std::variant&lt;/code&gt;. This has made a lot of people very angry and been widely regarded as a bad move.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;So at work this week I had to look at code written with &lt;code&gt;std::variant&lt;/code&gt;&amp;hellip; a lot can be said about &lt;code&gt;std::variant&lt;/code&gt; but this time it is about compile errors!&lt;/p&gt;
&lt;p&gt;Someone had decided to use an &lt;code&gt;std::variant&amp;lt;x, y, z&amp;gt;&lt;/code&gt;, probably got a really bad error-message when they tried to extract a value out of it with the type &lt;code&gt;w&lt;/code&gt;, i.e. a type that is not part of the variant. Something like this, but simplified.&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Link Dump Vol1</title>
			<link>https://kihlander.net/post/link-dump-vol1/</link>
			<pubDate>Sun, 12 Jan 2025 18:44:54 +0100</pubDate>
			<guid>https://kihlander.net/post/link-dump-vol1/</guid>
			<description>&lt;p&gt;During my time of work this christmas I had lots of plans to work on some of my hobby-projects or maybe just check out some new stuff&amp;hellip; none of that happened :D But I can at least write something, something low effort that is!&lt;/p&gt;
&lt;p&gt;I have had this document (and an ever growing youtube &amp;ldquo;watch later&amp;rdquo;-list!) where I have just dumped links to blog-posts, presentations and videos that I have found in one way or another interesting.&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>It&#39;s Healthy to Look Outside Your Own Tribe!</title>
			<link>https://kihlander.net/post/its-healthy-to-look-outside-your-own-tribe/</link>
			<pubDate>Thu, 19 Dec 2024 18:35:57 +0100</pubDate>
			<guid>https://kihlander.net/post/its-healthy-to-look-outside-your-own-tribe/</guid>
			<description>&lt;p&gt;It&amp;rsquo;s time for me to interrupt the ordinary programming on this little part of the interwebs that I call my blog and not do the usual schtick with numbers, code and c++-bashing and be a bit more philosophical instead.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;&#34;&gt;&lt;img src=&#34;https://kihlander.net/images/its-healthy-to-look-outside-your-own-tribe/great-philosopher.webp&#34; alt=&#34;&#34; title=&#34;combo with custom option&#34;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One of my favorite philosophers!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I think most of us working in tech, especially if we have been doing it for a while, know quite well what we like, what we think is &amp;ldquo;good engineering&amp;rdquo; or dare I say it &amp;ldquo;clean code&amp;rdquo;! We have found our bunch of people, our &amp;ldquo;tribe&amp;rdquo;, where we tackle similar problems, like the same kind of solutions and feel at home! Unfortunatly we also tend like to fling poop over the fences towards the other &amp;ldquo;tribes&amp;rdquo; and not really care where or on who it may land. Im unfortunatly not free of sin here, and you are probably not either!&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Extending an Enum in Zig</title>
			<link>https://kihlander.net/post/extending-an-enum-in-zig/</link>
			<pubDate>Sun, 01 Sep 2024 08:33:59 +0200</pubDate>
			<guid>https://kihlander.net/post/extending-an-enum-in-zig/</guid>
			<description>&lt;p&gt;For a while now I have been dabbling with &lt;a href=&#34;https://ziglang.org/&#34;&gt;zig&lt;/a&gt; and as a small test writing a NES-emulator (everyone should have written an 8-bit emulator in their life right?).
While doing this I stumbled upon a kind of neat trick that you can do in zig that I thought was worth sharing&amp;hellip; with kind of a &amp;ldquo;anti-climactic&amp;rdquo; end!&lt;/p&gt;
&lt;h1 id=&#34;some-background&#34;&gt;Some background&lt;/h1&gt;
&lt;p&gt;While writing some debug-tools I decided that I wanted to switch between ppu-palettes when displaying some data. At this time the available palettes were all described with an enum.&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Compile Time Hashes in C - Revisied</title>
			<link>https://kihlander.net/post/compile-time-hashes-in-c-revisied/</link>
			<pubDate>Sat, 13 Apr 2024 00:00:00 +0000</pubDate>
			<guid>https://kihlander.net/post/compile-time-hashes-in-c-revisied/</guid>
			<description>&lt;p&gt;Hashing strings in c++ at compile time has been possible since c++11 but is it worth doing? Me and a few colleagues was discussed this over a few beers and it reminded me that I have already written about it &lt;a href=&#34;../compile-time-hashes-in-c-im-not-convinced&#34;&gt;here&lt;/a&gt; (8 years ago&amp;hellip; ARGH I&amp;rsquo;m getting old!).&lt;/p&gt;
&lt;p&gt;But a lot of time has passed since I wrote that&amp;hellip; and I didn&amp;rsquo;t make any measurements in that article! &lt;em&gt;shame!&lt;/em&gt; &lt;em&gt;SHAME I SAY!&lt;/em&gt;&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Software I Like</title>
			<link>https://kihlander.net/post/software-i-like/</link>
			<pubDate>Sun, 10 Mar 2024 00:00:00 +0000</pubDate>
			<guid>https://kihlander.net/post/software-i-like/</guid>
			<description>&lt;p&gt;I&amp;rsquo;m not the one that tinkers a lot with my dev-environment but there are some tools and software that I need and find that they help a lot day to day.
And since I like to read about what others use I might as well share some tips on tools that you might also like.&lt;/p&gt;
&lt;p&gt;My day-to-day OS of choice at home is &lt;a href=&#34;https://xubuntu.org/&#34;&gt;xubuntu&lt;/a&gt; and at work Windows.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;I hope to make this post a living document so it might be updated from time to time.&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Looking at c for better closures in c&#43;&#43;</title>
			<link>https://kihlander.net/post/looking-at-c-for-better-closures-in-cpp/</link>
			<pubDate>Sun, 07 Jan 2024 00:00:00 +0000</pubDate>
			<guid>https://kihlander.net/post/looking-at-c-for-better-closures-in-cpp/</guid>
			<description>&lt;blockquote&gt;
&lt;p&gt;Note: before we begin, finding a name for this post was really hard!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;In this post I&amp;rsquo;m going to touch on a c++-technique to handle callbacks that I have not seen written about before and that many of my colleagues hadn&amp;rsquo;t seen before either. Probably it&amp;rsquo;s not something new and some of you will probably just say &amp;ldquo;yeah yeah, nothing new under the sun&amp;rdquo; but it&amp;rsquo;s probably worth a few words!&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>Swapping memory and compiler optimizations</title>
			<link>https://kihlander.net/post/swapping-memory-and-compiler-optimizations/</link>
			<pubDate>Sat, 11 Mar 2023 00:00:00 +0000</pubDate>
			<guid>https://kihlander.net/post/swapping-memory-and-compiler-optimizations/</guid>
			<description>&lt;p&gt;During my vacation for the holidays I thought that maybe I wanted some smaller project that you could fit in together with &amp;ldquo;family life&amp;rdquo; (not the easiest of endeavour!) and I got to think about some old code that I had laying about in my own little game-engine that I have thought about making public for a while.
I thought it might be useful for someone else and maybe just doing some optimization work on it might be a fun little distraction!&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>A Zig Diary</title>
			<link>https://kihlander.net/post/a-zig-diary/</link>
			<pubDate>Sun, 08 Jan 2023 19:34:19 +0100</pubDate>
			<guid>https://kihlander.net/post/a-zig-diary/</guid>
			<description>&lt;p&gt;As it turned out I happened to help out with fixing a space to host a &lt;a href=&#34;https://www.meetup.com/zig-stockholm/&#34;&gt;zig meetup&lt;/a&gt; here in Stockholm at the place where I work. However I haven&amp;rsquo;t written a single line of zig in my life&amp;hellip; I felt that it might be worth doing something about that :D&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;If you don&amp;rsquo;t know, &lt;a href=&#34;https://ziglang.org/&#34;&gt;zig&lt;/a&gt; is a new systems programming language!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I have found zig quite intriguing for a while now but I haven&amp;rsquo;t had the time to look into it so this sounded like an as good excuse as any!
I&amp;rsquo;ll try something new with this post and just write as I go and document my success/failure/reflections, this might make it a bit &amp;ldquo;rambly&amp;rdquo; :)&lt;/p&gt;</description>
		</item>
      	
		<item>
			<title>When memcpy() change!</title>
			<link>https://kihlander.net/post/when-memcpy-change/</link>
			<pubDate>Sun, 23 Oct 2022 09:38:33 +0200</pubDate>
			<guid>https://kihlander.net/post/when-memcpy-change/</guid>
			<description>&lt;blockquote&gt;
&lt;p&gt;To start of, yes, I know that this article touch undefined behavior and that all bets are off!&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I am currently working on a bigger post on swapping memory that is THIS close to being done&amp;hellip; any day now (he has been saying the last year!).&lt;/p&gt;
&lt;p&gt;However this topic popped up and I was wondering if it was worth making the other post longer or just make a small one about it. As the other post is already quite big I opted for a shorter one here.&lt;/p&gt;</description>
		</item>
      	
	</channel>
</rss>
