<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[bugthe0ry]]></title><description><![CDATA[debugging software and the ideas around it]]></description><link>https://bugthe0ry.com</link><image><url>https://substackcdn.com/image/fetch/$s_!hypI!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c80472f-29d8-4313-83ec-4ee9cd45c821_1280x1280.png</url><title>bugthe0ry</title><link>https://bugthe0ry.com</link></image><generator>Substack</generator><lastBuildDate>Fri, 17 Apr 2026 12:54:30 GMT</lastBuildDate><atom:link href="https://bugthe0ry.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Ali Mahouk]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[bugthe0ry@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[bugthe0ry@substack.com]]></itunes:email><itunes:name><![CDATA[Ali Mahouk]]></itunes:name></itunes:owner><itunes:author><![CDATA[Ali Mahouk]]></itunes:author><googleplay:owner><![CDATA[bugthe0ry@substack.com]]></googleplay:owner><googleplay:email><![CDATA[bugthe0ry@substack.com]]></googleplay:email><googleplay:author><![CDATA[Ali Mahouk]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[7 Useful macOS/Linux Commands]]></title><description><![CDATA[A practical guide to 8 macOS and Linux CLI commands every developer should know &#8211; including wc, ls, head, cut, grep, sort, uniq, and sha256sum &#8211; with real examples and the most useful flags for each.]]></description><link>https://bugthe0ry.com/p/7-useful-macoslinux-commands</link><guid isPermaLink="false">https://bugthe0ry.com/p/7-useful-macoslinux-commands</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Thu, 26 Feb 2026 05:14:39 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/ecd75969-0af8-4d1b-85e9-21889e57134b_1200x630.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>1. <code>wc</code></h2><p>Counting lines, words, and characters respectively. Character counting includes invisible chars.</p><h4>Useful Flags</h4><ul><li><p><code>-l</code>: count lines only.</p></li><li><p><code>-w</code>: count words only.</p></li><li><p><code>-c</code>: count characters only.</p></li></ul><h2>2. <code>ls</code></h2><p>Listing files and directories. <code>ls</code> automatically prints its output as a single column when its output is redirected.</p><p>e.g. to count the number of files in a directory:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;8bc6f9ec-f5e0-4b49-9280-65ea00beba82&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">ls | wc -l</code></pre></div><h4>Useful Flags</h4><ul><li><p><code>-l</code>: print output in a single column. This will also include other file attributes per file in the output.</p></li><li><p><code>-C</code>: print output in multiple columns. Pay attention &#8211; this flag name is uppercase!</p></li><li><p><code>-a</code>: include hidden files.</p></li></ul><h3>3. <code>head</code></h3><p>Peeking at the top of a file. Can be used to truncate long output from other commands.</p><p>e.g. list the first five files in a directory:</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;bash&quot;,&quot;nodeId&quot;:&quot;594e5171-ef38-45e4-8d1b-15d77094240d&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-bash">ls | head -n5</code></pre></div><h4>Useful Flags</h4><ul><li><p><code>-n</code>: specify how many lines to print. Defaults to 10.</p></li></ul><h2>4. <code>cut</code></h2><p>Prints specific columns from a text file.</p><h4>Useful Flags</h4><ul><li><p><code>-f</code>: the number of columns to print. This flag can accept a comma-separated string to print specific columns, <code>-f1,3</code>, or a dash-separated range, e.g. <code>-f2-4</code>.</p></li><li><p><code>-d</code>: specify the delimiter character, which is <code>\t</code> by default.</p></li><li><p><code>-c</code>: defines the character position of what constitutes a column. This flag can accept a comma-separated string to print specific columns or a dash-separated range.</p></li></ul><h2>5. <code>grep</code></h2><p>Finds patterns in files.</p><h4>Useful Flags</h4><ul><li><p><code>-v</code>: find matches that <em>don&#8217;t</em> contain this argument.</p></li><li><p><code>-w</code>: match full words only, not parts of words.</p></li></ul><h2>6. <code>sort</code></h2><p>Reorders the lines in a file (ascending order by default).</p><h4>Useful Flags</h4><ul><li><p><code>-r</code>: order in descending order.</p></li></ul><h2>7. <code>uniq</code></h2><p>Detects repeated <em>adjacent</em> lines in a file and removes the duplicates.</p><h4>Useful Flags</h4><ul><li><p><code>-c</code>: count occurrences.</p></li></ul><h2>8. <code>sha256sum</code></h2><p>I know the title said 7 commands but here&#8217;s an extra one on the house &#8211; outputs the SHA-256 checksum of a file.</p><h4>Useful Flags</h4><ul><li><p><code>-b</code>: treat the input as binary.</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading bugthe0ry! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Bimaps]]></title><description><![CDATA[TIL about bidirectional maps (bimaps) &#8212; like a regular key-value map, but with built-in reverse lookups baked in.]]></description><link>https://bugthe0ry.com/p/bimaps</link><guid isPermaLink="false">https://bugthe0ry.com/p/bimaps</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Sat, 21 Feb 2026 13:44:32 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hypI!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c80472f-29d8-4313-83ec-4ee9cd45c821_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was already aware of a type of data structure called &#8220;map&#8221;. Some programming languages refer to it as a &#8220;dictionary&#8221;. This type of structure allows me to perform speedy lookups on values using keys. On more than a few occasions, I found myself needing to look up the dictionary&#8217;s keys by value. I&#8217;d end up creating another dictionary just to act as a reverse-lookup where I stored the values as keys and the keys as values.</p><p>Turns out there&#8217;s another data structure that accomplishes just that. It&#8217;s called a &#8220;bimap&#8221;. In Python, it&#8217;s called <code>bidict</code>.</p><div class="highlighted_code_block" data-attrs="{&quot;language&quot;:&quot;python&quot;,&quot;nodeId&quot;:&quot;e3a36294-4c97-481b-8a88-692b5eba2340&quot;}" data-component-name="HighlightedCodeBlockToDOM"><pre class="shiki"><code class="language-python">from bidict import bidict

bimap = bidict({&#8221;a&#8221;: 1, &#8220;b&#8221;: 2, &#8220;c&#8221;: 3})

# Lookup by key.
print(bimap[&#8221;a&#8221;])  # Output: 1

# Lookup by value.
print(bimap.inverse[1])  # Output: a

bimap[&#8221;d&#8221;] = 4

print(bimap)  # Output: bidict({&#8221;a&#8221;: 1, &#8220;b&#8221;: 2, &#8220;c&#8221;: 3, &#8220;d&#8221;: 4})
print(bimap.inverse)  # Output: bidict({1: &#8220;a&#8221;, 2: &#8220;b&#8221;, 3: &#8220;c&#8221;, 4: &#8220;d&#8221;})</code></pre></div><p>It does require installation, though, of a package called <a href="https://github.com/jab/bidict">bidict</a>.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading bugthe0ry! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[The OWASP Top 10 for LLMs you haven't read yet]]></title><description><![CDATA[If you&#8217;re building with LLMs, you&#8217;re probably creating vulnerabilities you don&#8217;t even know about.]]></description><link>https://bugthe0ry.com/p/the-owasp-top-10-for-llms-you-havent</link><guid isPermaLink="false">https://bugthe0ry.com/p/the-owasp-top-10-for-llms-you-havent</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Fri, 13 Feb 2026 07:47:30 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hypI!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c80472f-29d8-4313-83ec-4ee9cd45c821_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you&#8217;re building with LLMs, you&#8217;re probably creating vulnerabilities you don&#8217;t even know about.</p><p>OWASP (you might be familiar with their <a href="https://owasp.org/Top10/2025/">Top 10 list of web app vulnerabilities</a>) has a Top 10 list of LLM vulnerabilities one should be aware of. They have a &#8220;<a href="https://owasp.org/www-project-promptme/">PromptMe</a>&#8221; open source project that anyone can download and run (it just requires you to have <a href="https://ollama.com">Ollama</a> installed and running). The project contains ten different security issues that you can try out. I found it enlightening to see things like a prompt injection attack demoed live.</p><p>Web developers might be used to ensuring safeguards against more traditional vulnerabilities like SQL injections or XSS attacks. Over the past two years, people have started plugging LLMs into more and more use cases &#8211; the use cases are only growing each year &#8211; and this has opened up a whole new attack surface for malicious actors to try and exploit. This makes it imperative that developers are armed with knowledge that is equally as valuable as the traditional OWASP Top 10.</p><p>The PromptMe examples really drive this home. I was already aware of the typical &#8220;don&#8217;t listen to or obey anything a user instructs you to do&#8221; safeguard in system instructions. One example shows the LLM correctly refusing when you directly ask for secrets. But introduce a &#8220;fetch and summarize URL&#8221; feature, and suddenly a specially crafted prompt gets the LLM to spill everything. The attack vector isn&#8217;t the direct ask&#8212;it&#8217;s the side door you didn&#8217;t think about. Admittedly, it was a very naive example, but the risk and threat are very real.</p><p>I highly recommend familiarizing yourself with the Top 10 LLM vulnerabilities, as much as the traditional Top 10 of web app security. Check out the PromptMe project on GitHub, download it and play with it (shouldn&#8217;t take you more than a minute to get it running). Another interesting read I stumbled upon is <a href="https://agentic-patterns.com">Awesome Agentic Patterns</a>. This site contains an entire textbook&#8217;s worth of knowledge that&#8217;s useful for anyone who builds agents. Among the topics covered are some measures you can take to guard against the LLM being steered by an attacker to exfiltrate sensitive data.</p><p>The LLM features you&#8217;re shipping today could be tomorrow&#8217;s exploit. Better to learn these attack patterns now than discover them in production.</p><h2>Exfil via GET</h2><p>OpenAI also published a <a href="https://openai.com/index/ai-agent-link-safety/">blog post</a> (and a corresponding <a href="https://cdn.openai.com/pdf/dd8e7875-e606-42b4-80a1-f824e4e11cf4/prevent-url-data-exfil.pdf">paper</a>) on how prompt injections can be used to trick agents to exfiltrate data to an attacker-controlled server. With recent projects gaining public popularity like <a href="https://openclaw.ai">OpenClaw</a>, users are right to be worried about their data being siphoned off without their knowledge should they let any agents loose on their computers. Some people confidently declare how they&#8217;re instead running agents in sandboxed Docker containers, but if the agent(s) are <strong>creating</strong> valuable/sensitive data as part of their operations while running, that&#8217;s still at risk of being exfiltrated unless the sandbox is completely air-gapped, but then you&#8217;re taking a heavy quality/usability hit as a result.</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading <strong>bugthe0ry</strong>! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[Download of the Week]]></title><description><![CDATA[GNU CoreUtils]]></description><link>https://bugthe0ry.com/p/download-of-the-week</link><guid isPermaLink="false">https://bugthe0ry.com/p/download-of-the-week</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Fri, 01 Aug 2025 05:31:04 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/68feceb4-04c8-475a-97ba-c836f6f1b8ee_1024x1024.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>GNU CoreUtils</h2><p>Adds a <a href="https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands">whole suite of useful commands</a> to your Mac.</p><h3>Installation on macOS</h3><p>Simply paste this command (requires having <a href="https://brew.sh">Homebrew</a> installed):</p><pre><code>brew install coreutils</code></pre><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading bugthe0ry! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[What is this "[" binary in /bin?]]></title><description><![CDATA[I was looking at the /bin directory on my Mac when I noticed this peculiar executable.]]></description><link>https://bugthe0ry.com/p/what-is-this-binary-in-bin</link><guid isPermaLink="false">https://bugthe0ry.com/p/what-is-this-binary-in-bin</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Wed, 09 Apr 2025 04:37:13 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/4e64cb62-128b-4fd2-ba86-58c8fe4ac456_960x268.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was looking at the <code>/bin</code> directory on my Mac when I noticed this peculiar executable:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!E1ZH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!E1ZH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 424w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 848w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 1272w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!E1ZH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic" width="960" height="268" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:268,&quot;width&quot;:960,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:11755,&quot;alt&quot;:&quot;An executable binary named \&quot;[\&quot;.&quot;,&quot;title&quot;:null,&quot;type&quot;:&quot;image/heic&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:&quot;https://mahouk.substack.com/i/160915654?img=https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic&quot;,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="An executable binary named &quot;[&quot;." title="An executable binary named &quot;[&quot;." srcset="https://substackcdn.com/image/fetch/$s_!E1ZH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 424w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 848w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 1272w, https://substackcdn.com/image/fetch/$s_!E1ZH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8f0f18e0-d71c-4ac2-8485-0507b918c57a_960x268.heic 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Some Background</h2><p><code>/bin</code> on Unix-like systems contains executable system binaries ("<em>commands</em>"). In this directory, you'll find files like <code>cat</code>, <code>chmod</code>, and <code>mkdir</code> which are the actual files that get invoked when you type the commands of the same names into your terminal.</p><p>I had never seen an executable named <code>[</code> before (I'm not really a command line junkie). Typing the name of this executable in various ways into Google yielded no relevant results. Thankfully, ChatGPT exists now and here's what it said:</p><blockquote><p>The <code>[</code> executable found in <code>/bin</code> is essentially the same as the <code>test</code> command in Unix and Unix-like operating systems. It's used to evaluate conditional expressions. When you use <code>[</code> in a shell script or in the command line, you are actually invoking this executable.</p></blockquote><p>Basically, when you use a conditional statement in your shell code, e.g.:</p><pre><code>if [ -f some_file.pdf ]; then
    echo "The file exists."
else
    echo "The file does not exist."
fi</code></pre><p>The <code>[</code> in the <code>if</code> statement is actually invoking the <code>[</code> binary in <code>/bin</code> and then using its output to evaluate the condition. The closing <code>]</code> doesn't actually invoke any command (there is no <code>]</code> binary) but it's required in shell syntax in order to close the conditional statement.</p><h3>Try It</h3><p>Just type the following into your terminal:</p><pre><code>% [ "hello" = "world" ]</code></pre><p>Nothing gets output. That's because this command returns its output as an exit status code, which the shell doesn't print to the screen. We can tell it to print the exit status code after running the command:</p><pre><code>% [ "hello" = "world" ]; echo $?
1</code></pre><p>You should get <code>1</code>; the exit status code of this condition. An exit code of <code>1</code> means the condition is false (which is contrary to what you might be used to in programming where a non-zero value means *true*).</p><pre><code>% [ "hello" = "hello" ]; echo $?
0</code></pre><p>You should get <code>0</code>, meaning the condition is true.</p><p>Just another little nook in the interesting Unix way of doing things!</p><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading <em>bugthe0ry</em>! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item><item><title><![CDATA[I think I got an idea]]></title><description><![CDATA[I've been trying to come up with a good project idea around business intelligence (BI) - something that can tie into some newfound knowledge-ingesting knowledge I gained.]]></description><link>https://bugthe0ry.com/p/i-think-i-got-an-idea</link><guid isPermaLink="false">https://bugthe0ry.com/p/i-think-i-got-an-idea</guid><dc:creator><![CDATA[Ali Mahouk]]></dc:creator><pubDate>Mon, 31 Mar 2025 08:23:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0c80472f-29d8-4313-83ec-4ee9cd45c821_1280x1280.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I've been trying to come up with a good project idea around business intelligence (BI) &#8211; something that can tie into some newfound knowledge-ingesting knowledge I gained (sorry, that was confusing. Basically, I learned how to create knowledge bases out of structured and unstructured data). After going for a long walk-and-smoke yesterday, I came out blank despite my best cognitive efforts.</p><p>Today, I think I've come up with something. Rather than BI, it's "personal intelligence" but not in the commonly used sense, i.e. I'm not referring to this definition:</p><div class="pullquote"><p>Personal intelligence has been defined as the capacity to reason about personalities, both one&#8217;s own and others&#8217;, and to use personality-based information to influence one&#8217;s plans and actions [1] [2].</p></div><p>I mean it in a sense similar to BI but applied on a personal level to individuals. I was inspired by my observations of how people use WhatsApp. Their usage goes beyond messaging - it's the hub of their life. Documents, photos, videos, contacts, locations&#8230; All things that WhatsApp was never really designed for managing. What if I use my newfound skills in knowledge base ingestion to build something tailored towards helping individuals efficiently log and manage these aspects of their life? We can use all kinds of magic to contextually ingest data, manage it, and retrieve it on demand. It would have to be a phone app though - to be available on these devices that are in our pockets and hands 24/7, that we've come to rely on to run our lives.</p><p>I already have a name for this thing: <em>"Arcsecond"</em>. I also like the sound of this as the tagline: <em>"Personal intelligence."</em></p><div><hr></div><ol><li><p><em>Mayer, J. D. (2008). Personal intelligence. Imagination, Cognition, and Personality, 27, 209&#8211;232.</em></p></li><li><p><em>Mayer, J. D. (2009). Personal intelligence expressed: A theoretical analysis. Review of General Psychology, 13, 46&#8211;58.</em></p><div><hr></div></li></ol><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://bugthe0ry.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">Thanks for reading <em>bugthe0ry</em>! Subscribe for free to receive new posts and support my work.</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div>]]></content:encoded></item></channel></rss>