<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet href="/feed_style.xsl" type="text/xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="https://www.rssboard.org/media-rss"><channel><title>Charon</title><link>https://charon.konekopi.com/</link><description>Recent content on Charon</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>charon@konekopi.com (Evans Jahja)</managingEditor><webMaster>charon@konekopi.com (Evans Jahja)</webMaster><copyright>Charon. All Rights Reserved</copyright><lastBuildDate>Sun, 03 May 2026 22:11:52 +0900</lastBuildDate><atom:link href="https://charon.konekopi.com/index.xml" rel="self" type="application/rss+xml"/><icon>https://charon.konekopi.com/logo.svg</icon><item><title>Boolean logic operators are not intuitive. Let's do better</title><link>https://charon.konekopi.com/posts/boolean_logic_naming/</link><pubDate>Sun, 03 May 2026 22:11:52 +0900</pubDate><author>charon@konekopi.com (Evans Jahja)</author><guid>https://charon.konekopi.com/posts/boolean_logic_naming/</guid><description><![CDATA[<h2 id="quick-whats-the-truth-table-of-xnor">Quick! What&rsquo;s the truth table of XNOR?</h2>
<p>If you don&rsquo;t catch that, don&rsquo;t worry. Hopefully by the end of the post you&rsquo;ll have an intuitive understanding on the operation of all the other logic gates as well.</p>
<p>Logical operations such as AND, OR, XOR have weird and non-intuitive names. &ldquo;Do you want apple or banana?&rdquo; means you can either take <strong>either</strong> just the apple or just the banana (but not both). Yet on boolean logic, this would be written as apple XOR banana. Could we do better?</p>
<p>This question has been boiling in my head (and probably others). It&rsquo;s been a running joke, how logical &ldquo;A OR B&rdquo; means &ldquo;true if A is true <em>or</em> B is true&rdquo;. But I find the naming breaks horribly when we step further. What&rsquo;s the output of A XOR B XOR C?</p>
<p>I &ldquo;discovered&rdquo; that there&rsquo;s actually an intuitive way of understanding all of these operation. It&rsquo;s just that we need to rethink the name of all of the operations. I said &ldquo;discovered&rdquo; because I&rsquo;m probably not the first one, there <em>may</em> be a literature about this, but this is how I was taught at school, and I presume many others as well, so I would like to build on this.</p>
<p>Let&rsquo;s start simple. AND gate outputs true if <em>all</em> the inputs to it are true. On the other hand, OR gate will output true if <em>some</em> of the inputs are true. So let&rsquo;s just call them that, <em>all</em> gate and <em>some</em> gate. This is also true for any number of inputs, so that <code>all(true, false, true) = false</code> because one of them is not true, whereas <code>some(true, false, true) = true</code> because some of them are true!</p>
<p>Next comes the negation gates. What&rsquo;s a NAND gate? Well, it&rsquo;s a gate that turns on when <em>not-all</em> of the inputs are true. So <code>not-all(true, false, true) = true</code> because not all of them are true. In contrast, <code>not-all(true, true, true) = false</code> because all of them are true. By the same logic, A NOR gate is <code>not-some</code>, which is <em>technically</em> correct but awkward to say. In some programming languages with <code>Option</code> type, the two variants are <code>Some</code> and <code>None</code>, so let&rsquo;s just call NOR as the <em>none</em> gate: <code>none(true, false, true) = false</code> because it is only true if <em>none</em> of them are true: <code>none(false, false, false) = true</code>.</p>
<p>Lastly, let&rsquo;s talk about the exclusive gates. XOR is commonly taught as checking if only one of the input is true, so for 2-input XOR, the output is true when A is true or B is true, but not both. It is also commonly taught that XOR outputs true if A is <strong>different</strong> from B. However, none of these explanations generalize. What about 3-input XOR? <code>XOR(A,B,C)</code> is the same as <code>(A XOR (B XOR C))</code>. Actually all of the logic gates can be chained associatively this way. If A is true, then in order to output true, <code>B XOR C</code> must be false by setting B=false, C=false or by setting B=true, C=true. A, B, and C here are actually interchangable (commutative) and this generalize to larger input XOR. In a sense, XOR is true when the number of true input is odd, letting me call XOR as <code>odd</code> gate. So <code>odd(true, false, true, true, false) = true</code> because the number of <code>true</code> is 3 (odd). Similarly, an XNOR gate is just a negation of <code>odd</code> gate, unsurprisingly called the <code>even</code> gate. It returns true when the number of <code>true</code> inputs are even. For 2-input XNOR, it outputs true when both A and B are false or true.</p>
<p>So to summarize: we now have <em>all</em>, <em>some</em>, <em>not-all</em>, <em>none</em>, <em>odd</em>, and <em>even</em> gates. Hopefully that makes more sense over the traditional namings!</p>]]></description></item><item><title>Running official Arch Linux on Arm (not to be confused ArchLinuxARM)</title><link>https://charon.konekopi.com/posts/archlinux_on_arm/</link><pubDate>Sun, 03 May 2026 16:52:28 +0900</pubDate><author>charon@konekopi.com (Evans Jahja)</author><guid>https://charon.konekopi.com/posts/archlinux_on_arm/</guid><description><![CDATA[<p>There is an ongoing community project brewing right now to finally use official Arch Linux directly on ARM.</p>
<p>The project allows <em>the</em> upstream Arch Linux PKGBUILDs to be compiled and ran on ARM devices. This contrasts to fork projects which maintain their own modifications.</p>
<p>For years, ArchLinuxARM (alarm) has been the go-to distribution for running the project on ARM devices. While it has served the community well, it operates as a separate project and requires significant number of modifications compared to upstream Archlinux project. These differences may even manifested as packages being out-of-date or even broken packages, such as the infamous chromium package not building on alarm project.</p>
<p>On the other hand, the ongoing effort has been to run mostly unmodified Archlinux PKGBUILD files with minimal modifications. This is supported as part of a recent effort <a href="https://rfc.archlinux.page/0032-arch-linux-ports/">RFC!32</a> which allows non x86_64 architecture to also be targeted by the Archlinux packages.</p>
<p>The project is currently usable with around 99% projects able to be built from upstream Arch Linux project, because a lot of the ARM-specific modifications have been merged to upstream PKGBUILD, so at least there&rsquo;s a &ldquo;legitimacy&rdquo; aspect of the project. That said, the binary distribution is still entirely community-maintained.</p>
<p>Discussions are being done to know which ARM architecture to (eventually) officially support. The concensus between the community maintainers is to support at least ARMv8-a architecture with no interest in ARMv7 or lower because of the need of aarch64 instruction set. One of the member and myself are working on ARMv8-a itself, but the main efforts are currently targetting ARMv8.2-a, mainly because of package build failure that happened in the past. That issue has been resolved and there doesn&rsquo;t seem to be any blocker in targetting ARMv8-a, other than the fact that significant efforts have been made on ARMv8.2-a.</p>
<p>More information on the project can be found on #archlinux-ports on liberachat IRC with documents written on <a href="https://ports.archlinux.page/aarch64/">Arch Linux Ports: AArch64</a>.</p>]]></description></item><item><title>Hello</title><link>https://charon.konekopi.com/posts/hello/</link><pubDate>Sat, 02 May 2026 16:59:37 +0900</pubDate><author>charon@konekopi.com (Evans Jahja)</author><guid>https://charon.konekopi.com/posts/hello/</guid><description><![CDATA[<p>I&rsquo;m Charon, also known as PlasmaGrass in some circles. I work on various projects from retro hardware emulation, reverse engineering.</p>
<p>I&rsquo;ll try to write down the projects I&rsquo;ve been working on here, so I can practice writing down things. I&rsquo;m not sure how often I&rsquo;ll write but
this blog has an RSS if you want to keep in touch.</p>
]]></description></item></channel></rss>