<?xml version="1.0" encoding="utf-8"?>
    <feed xmlns="http://www.w3.org/2005/Atom">
      <id>https://wolfgirl.dev/blog/</id>
      <title>PolyWolf's Blog - #shell-scripting</title>
      <subtitle
        >all posts tagged "shell-scripting" on a blog written by PolyWolf</subtitle
      >
      <icon>/apple-touch-icon.png</icon>
      <link href="/tags/shell-scripting/rss.xml" rel="self" />
      <link href="https://wolfgirl.dev/blog/" />
      <updated>2025-09-28T00:58:43Z</updated>
      
    <entry>
      <title><![CDATA[Making Of: Yes-and-ism]]></title>
      <link rel="alternate" href="https://wolfgirl.dev/blog/2025-09-27-making-of-yes-and-ism/" />
      <id>https://wolfgirl.dev/blog/2025-09-27-making-of-yes-and-ism/</id>
      <published>2025-09-28T00:58:43Z</published>
      <updated>2025-09-28T00:58:43Z</updated>
      <summary><![CDATA[This is the "[long explanation]" part of the Yes-and-ism photography collection I put out yesterday. Hopefully this demystifies some of t...]]></summary>
      <content type="html"><![CDATA[<p>This is the "[long explanation]" part of the <a href=https://wolfgirl.dev/blog/2025-09-26-coho-photo-zine-yes-and-ism/>Yes-and-ism photography collection</a> I put out yesterday. Hopefully this demystifies some of the stuff I did and inspires some more "glitch art" too!</p><h2 id=heading-step-1-find-images>Step 1: Find Images<a aria-label="Link to heading 'Step 1: Find Images'" data-heading-content="Step 1: Find Images" class=anchor href=#step-1-find-images></a></h2><p>There's no getting around this: to start, I had to take a <em>lot</em> of photos just to sift through them all in order to come up with (only!) 9 final pieces. Each step is a whittling-down: from "everything" to "just stuff that immediately looks interesting" to "stuff that's probably going to work" to "stuff that actually does work". Let's see an image that made it all the way, image #1, <code>IMG_0540.HEIC</code><sup class=footnote-ref><a data-footnote-ref href=#fn-1 id=fnref-1>1</a></sup> ("antennae"):</p><p><img title="Stage 0" alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage0.png></p><h2 id=heading-step-2-look-for-interesting-encodings>Step 2: Look For Interesting Encodings<a aria-label="Link to heading 'Step 2: Look For Interesting Encodings'" data-heading-content="Step 2: Look For Interesting Encodings" class=anchor href=#step-2-look-for-interesting-encodings></a></h2><p>My goal for this project was "make something that looks good even after being run thru a <code>-quality 1</code> encoder". In order to make that happen, I first had to know how each encoder behaved. I had in mind 4 lossy image formats: <a href=https://en.wikipedia.org/wiki/AVIF>AVIF</a>, <a href=https://en.wikipedia.org/wiki/JPEG>JPEG</a>, <a href=https://en.wikipedia.org/wiki/JPEG_XL>JPEG XL</a>, and <a href=https://en.wikipedia.org/wiki/WebP>WebP</a>. There are other lossy formats out there, but these I already knew had "interesting" behavior at low quality levels & were readily understood by all my image manipulation tools.</p><p>To make these, I used <a href=https://imagemagick.org/>ImageMagick</a> (and a POSIX shell):</p><pre class=syntax-highlighting><code class=language-sh><span class=keyword>for</span> <span class=property>enc</span> <span class=keyword>in</span> avif jpeg jxl webp; <span class=keyword>do</span>
    <span class=function>magick</span> <span class=constant>-quality</span> 1 IMG_0540_stage0.png IMG_0540_stage1.<span class=embedded>${</span><span class=property>enc</span><span class=embedded>}</span>
    <span class=function>magick</span> IMG_0540_stage1.<span class=embedded>${</span><span class=property>enc</span><span class=embedded>}</span> IMG_0540_stage1_<span class=embedded>${</span><span class=property>enc</span><span class=embedded>}</span>.png
<span class=keyword>done</span></code></pre><div class=table-wrapper><table><tbody><tr><td><figure><p><img title="Stage 1 AVIF" alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1_avif.png></p><figcaption>AVIF</figcaption></figure></td><td><figure><p><img title="Stage 1 JPEG" alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1_jpeg.png></p><figcaption>JPEG</figcaption></figure></td></tr><tr><td><figure><p><img title="Stage 1 JPEG XL" alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1_jxl.png></p><figcaption>JPEG XL</figcaption></figure></td><td><figure><p><img title="Stage 1 WebP" alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1_webp.png></p><figcaption>WebP</figcaption></figure></td></tr></tbody></table></div><p>Right away, we see that JPEG (the oldest format) is a huge outlier; compared to the other formats, it's done <em>crazy</em> things to the colors & shapes, very limited palette & lots of hard edges. Quite distinctive, but maybe a bit <em>too</em> crazy... and also too recognizable, everyone & their mom knows what a deep fried JPEG looks like nowadays.</p><p>AVIF is second when it comes to aesthetics. It does a little bit of fun stuff with the colors still, especially with that prominent line down the middle, and generally makes things more blocky too. JPEG XL is third, making things look blockier if you zoom in but not from a distance. WebP is dead last, everything just gets blurrier in a boring way.</p><p>Here are the resulting filesizes<sup class=footnote-ref><a data-footnote-ref href=#fn-2 id=fnref-2>2</a></sup>:</p><pre class=syntax-highlighting><code>$ eza -la IMG_0540_stage*
.rw-rw-r-- 9.7M me 27 Sep 16:53 IMG_0540_stage0.png
.rw-rw-r--  22k me 27 Sep 16:55 IMG_0540_stage1.avif
.rw-rw-r--  96k me 27 Sep 16:55 IMG_0540_stage1.jpeg
.rw-rw-r--  68k me 27 Sep 16:55 IMG_0540_stage1.jxl
.rw-rw-r-- 107k me 27 Sep 16:55 IMG_0540_stage1.webp
.rw-rw-r--  24M me 27 Sep 16:57 IMG_0540_stage1_avif.png
.rw-rw-r--  12M me 27 Sep 16:57 IMG_0540_stage1_jpeg.png
.rw-rw-r--  28M me 27 Sep 16:57 IMG_0540_stage1_jxl.png
.rw-rw-r--  28M me 27 Sep 16:57 IMG_0540_stage1_webp.png
</code></pre><p>It's interesting to me that JPEG has the second largest filesize when it's also the most unnatural looking; I guess modern image formats really are improved huh :P. It's also interesting to see the filesizes of the resulting PNGs after the other compression passes. "Don't put a zip inside a zip" definitely applies to images, though some fault in the large size might also be due to ImageMagick's default settings. Anyways.</p><h2 id=heading-step-3-run-the-pipeline>Step 3: Run The Pipeline<a aria-label="Link to heading 'Step 3: Run The Pipeline'" data-heading-content="Step 3: Run The Pipeline" class=anchor href=#step-3-run-the-pipeline></a></h2><p>After seeing these encoding results on various images, I somewhat arbitrarily decided on the following pipeline:</p><ol><li>Encode as JPEG</li><li>Blend with 50% of step 1, 50% of original</li><li>Encode as AVIF</li><li>Blend with 75% of step 3, 25% of step 2</li><li>Encode a JPEG XL</li></ol><p>Expressing this as a Makefile:</p><pre class=syntax-highlighting><code class=language-make><span class=string>input_files</span> <span class=operator>:=</span> <span class=operator>$(</span><span class=function>shell</span> <span class=function>find</span> <span class=constant>-type</span> f <span class=constant>-name</span> <span class=string>"*.HEIC"</span>)
<span class=string>output_files</span> <span class=operator>:=</span> <span class=operator>$(</span>input_files:%.HEIC=%_stage3.png<span class=operator>)</span>
<span class=function>all</span><span class=operator>:</span> <span class=operator>$(</span><span class=string>output_files</span><span class=operator>)</span>
<span class=comment># (1)</span>
<span class=function>%_stage1.jpg</span><span class=operator>:</span> %.HEIC
	<span class=function>magick</span> <span class=constant>-quality</span> 1 <span class=operator>$</span><span class=string>&lt;</span> <span class=operator>$</span><span class=string>@</span>
<span class=comment># (2)</span>
<span class=function>%_stage1_blend.txt</span><span class=operator>:</span> %_stage1.jpg
	<span class=function>python3</span> <span class=constant>-c</span> <span class=string>'print(input(""),end="")'</span> <span class=operator>></span> <span class=operator>$</span><span class=string>@</span>
<span class=function>%_stage1.png</span><span class=operator>:</span> %_stage1_blend.txt %_stage1.jpg %.HEIC
	<span class=function>magick</span> composite <span class=constant>-blend</span> <span class=operator>$(</span><span class=function>shell</span> <span class=function>cat</span> <span class=operator>$</span><span class=string>&lt;</span>) <span class=operator>$(</span><span class=function>filter-out</span> <span class=operator>$</span><span class=string>&lt;</span>,<span class=operator>$</span><span class=string>^</span><span class=operator>)</span> <span class=operator>$</span><span class=string>@</span>
<span class=comment># (3)</span>
<span class=function>%_stage2.avif</span><span class=operator>:</span> %_stage1.png
	<span class=function>magick</span> <span class=constant>-quality</span> 1 <span class=operator>$</span><span class=string>&lt;</span> <span class=operator>$</span><span class=string>@</span>
<span class=comment># (4)</span>
<span class=function>%_stage2_blend.txt</span><span class=operator>:</span> %_stage2.avif
	<span class=function>python3</span> <span class=constant>-c</span> <span class=string>'print(input(""),end="")'</span> <span class=operator>></span> <span class=operator>$</span><span class=string>@</span>
<span class=function>%_stage2.png</span><span class=operator>:</span> %_stage2_blend.txt %_stage2.avif %_stage1.png
	<span class=function>magick</span> composite <span class=constant>-blend</span> <span class=operator>$(</span><span class=function>shell</span> <span class=function>cat</span> <span class=operator>$</span><span class=string>&lt;</span>) <span class=operator>$(</span><span class=function>filter-out</span> <span class=operator>$</span><span class=string>&lt;</span>,<span class=operator>$</span><span class=string>^</span><span class=operator>)</span> <span class=operator>$</span><span class=string>@</span>
<span class=comment># (5)</span>
<span class=function>%_stage3.jxl</span><span class=operator>:</span> %_stage2.png <span class=comment># (5)</span>
	<span class=function>magick</span> <span class=constant>-quality</span> 1 <span class=operator>$</span><span class=string>&lt;</span> <span class=operator>$</span><span class=string>@</span>
<span class=function>%_stage3.png</span><span class=operator>:</span> %_stage3.jxl
	<span class=function>magick</span> <span class=operator>$</span><span class=string>&lt;</span> <span class=operator>$</span><span class=string>@</span>
<span class=function>.SECONDARY</span><span class=operator>:</span> <span class=comment># Keep all intermediate files</span></code></pre><p>Each <code>*_blend.txt</code> step was so that I could interactively choose a blending amount for each image, because while 50% & 75% were pretty ok most the time, they were not universally good. As an example, <code>IMG_0540</code> needed 70% blend on the first stage, otherwise the blockiness didn't show up enough for my tastes. The benefit of using a Makefile like this is that, after seeing a result I didn't like at 50, I could always update it with <code>echo -n "70" > IMG_0540_stage1_blend.txt; make</code>.</p><p>I made sure to record all the values used to make every image, but it's too boring to reproduce them all here, so I'll show off just the one completed pipeline instead:</p><div class=table-wrapper><table><tbody><tr><td><figure><p><img alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1_jpeg.png></p><figcaption>Stage 1, no blend</figcaption></figure></td><td><figure><p><img alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage1.png></p><figcaption>Stage 1, <code>-blend 70</code></figcaption></figure></td></tr><tr><td><figure><p><img alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage2_avif.png></p><figcaption>Stage 2, no blend</figcaption></figure></td><td><figure><p><img alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage2.png></p><figcaption>Stage 2, <code>-blend 75</code></figcaption></figure></td></tr><tr><td colspan=2><figure><p><img alt src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/IMG_0540_stage3.png></p><figcaption>Stage 3</figcaption></figure></td></tr></tbody></table></div><h2 id=heading-step-4-postprocessing>Step 4: Postprocessing<a aria-label="Link to heading 'Step 4: Postprocessing'" data-heading-content="Step 4: Postprocessing" class=anchor href=#step-4-postprocessing></a></h2><p>Now, you'll notice that there are no super blocky artifacts in this stage 3 image like there are in the final result I posted elsewhere. This is because I fooled you!! I made things <em>look</em> similar to compression artifacats, when actually it's just a specifically placed HSV Saturation mask designed to blow out the colors in ways that interact strangely with existing HEIC compression artifacts :3</p><div style="grid-template-columns:3fr 7fr;gap:16px;display:grid"><p><img alt="Screenshot of the GIMP layer view confirming the above statement" title="ohoho what a fun prank i pulled" src=https://static.wolfgirl.dev/polywolf/blog/01998ce9-206a-722c-b373-ab8c750a467d/Screenshot_20250927_174704.png></p><p><img alt="Small cellular and radio antennae are blocked out in high saturation against a gray sky" src=https://static.wolfgirl.dev/polywolf/blog/0199890b-86f7-7336-8574-f85f9bdf76f0/IMG_0540-export.PNG title=antennae></p></div><p>I used postprocessing tricks on other images too, like the Colors > Desaturate > Mono Mixer tool, with "preserve luminosity" turned on & one of the channels having negative weight, for slightly wild effects on #3 ("split sky") & #5 ("undergrowth"). For the last one ("sunset"), I made it so there was a gradient mask smoothly transitioning between the original image in the bottom left to the compressed version in the upper right, following the overall gradient of the sky.</p><p>Overall!! There's a lot of fun to be had in messing around with images digitally, this really is just the tip of the iceberg if I want to <em>actually</em> start doing glitch art. I certainly enjoyed myself a lot with this and hope to do more as a part of <a href=https://coho.photo/>The Coho Photozine Club</a>!</p><section class=footnotes data-footnotes><ol><li id=fn-1><p>Yes, these are all Shot on iPhone™️, I have another, smaller backlog of things on a "proper" digital camera that I did not have enough time to edit for these unfortunately. Canon raws look pretty good but they always can use a <em>little</em> bit of tweaking, whereas iPhone photos always pop. "just shoot jpeg" i guess <a aria-label="Back to reference 1" class=footnote-backref data-footnote-backref data-footnote-backref-idx=1 href=#fnref-1>↩</a></p></li><li id=fn-2><p>In order to not destroy any devices that load this page with 28MB images near the top of the fold, my website pipeline automatically compresses them to <code>-quality 90</code> WebP at various sizes. If you click on any given image (left-click, not right-click), you'll be taken to the original for closer inspection. <a aria-label="Back to reference 2" class=footnote-backref data-footnote-backref data-footnote-backref-idx=2 href=#fnref-2>↩</a></p></li></ol></section>]]></content>
      <author>
        <name>PolyWolf</name>
        <uri>https://wolf.girl.technology/</uri>
      </author>
    </entry>
  
    <entry>
      <title><![CDATA[added this to my .zshrc]]></title>
      <link rel="alternate" href="https://wolfgirl.dev/blog/5425428/" />
      <id>https://wolfgirl.dev/blog/5425428/</id>
      <published>2024-04-04T22:35:35Z</published>
      <updated>2024-04-04T22:35:35Z</updated>
      <summary><![CDATA[In which I show off a pretty bizzare shell snippet & also explain it.]]></summary>
      <content type="html"><![CDATA[<p>Originally published on Cohost in 2 parts.</p><hr><pre class=syntax-highlighting><code class=language-zsh><span class=string>alias</span> <span class=string>prune</span>=<span class=string>"git remote prune origin | sed -n -E '/polywolf/ s/.*(polywolf.*)/\1/p' | xargs git branch -D"</span></code></pre><p>because i found myself typing it out <em>from memory</em> that often</p><p>oh no... I'm becoming one of Those girlies aren't i...</p><h2 id=heading-polywolf-what-does-this-do>"PolyWolf, What Does This Do?"<a aria-label="Link to heading '&#34;PolyWolf, What Does This Do?&#34;'" data-heading-content='"PolyWolf, What Does This Do?"' class=anchor href=#polywolf-what-does-this-do></a></h2><p>i'm glad you asked!! let's break it down:</p><blockquote><p><strong>NOTE</strong>: this assumes some familiarity with how git branches work. See <a href=https://wizardzines.com/comics/remote-branch-caching/>this</a> and potentially <a href=https://wizardzines.com/comics/branch-pointer-commit/>this</a> for quick explainer</p></blockquote><h2 id=heading-goals>Goals<a aria-label="Link to heading 'Goals'" class=anchor data-heading-content=Goals href=#goals></a></h2><p>in git, I like to use short-lived feature branches that I then rebase onto <code>main</code>, squash to a single commit, and delete<sup class=footnote-ref><a data-footnote-ref href=#fn-1 id=fnref-1>1</a></sup>. Turns out this style of git is so common that GitHub has a dedicated option for doing this with a single click on a pull request.</p><p>The problem with the GitHub click is that, while the branch is deleted in the remote repository, the branch you were working on locally is still around and clutters up <code>git branch</code> output and any tab-complete things you have set up. So! What we want to do, then, is have a command that you can run periodically to delete local branches that were deleted on the remote.</p><h2 id=heading-getting-a-list-of-branches-to-delete>Getting A List Of Branches To Delete<a aria-label="Link to heading 'Getting A List Of Branches To Delete'" data-heading-content="Getting A List Of Branches To Delete" class=anchor href=#getting-a-list-of-branches-to-delete></a></h2><p>This is actually a tricky UX question! How do you know the difference between a "deleted branch" and "a branch you haven't pushed yet"? The answer is, you don't! There is no way for git to know this information 🙂</p><p>But! We can still do something that's almost as good: getting a list of branches that have been deleted on the remote since the last time you did a prune. There is a command for this: <code>git remote prune origin</code>. This will look at all the locally-cached remote-tracking branches (the ones starting with <code>origin/</code>), and delete any that are no longer present on the remote.</p><p>This is <em>almost</em> exactly what we want. But as I said earlier, even if the branch <code>origin/polywolf/feature-branch</code> is deleted, <code>polywolf/feature-branch</code> will stick around. Fortunately, <code>git remote prune origin</code> prints out what it does. Unfortunately, there are no formatting options for its output, so we resort to Manually Parsing It.</p><h2 id=heading-editing-streams-with-the-stream-editor>Editing Streams With The Stream EDitor<a aria-label="Link to heading 'Editing Streams With The Stream EDitor'" data-heading-content="Editing Streams With The Stream EDitor" class=anchor href=#editing-streams-with-the-stream-editor></a></h2><p>this is in fact what <code>sed</code> is meant to do! Let's break down the specific invocation I use:</p><h3 id=heading-the-arguments>The Arguments<a aria-label="Link to heading 'The Arguments'" data-heading-content="The Arguments" class=anchor href=#the-arguments></a></h3><p>From <code>sed --help</code></p><ul><li><code>-n</code>: "suppress automatic printing of pattern space". Basically, only output lines when we tell it to</li><li><code>-E</code>: "use extended regular expressions in the script". Basically, allow for replacements by capture groups<sup class=footnote-ref><a data-footnote-ref href=#fn-3 id=fnref-3>2</a></sup>.</li><li>the last argument is interpreted as a sed script, which we will need to go to the manpage for</li></ul><h3 id=heading-the-script>The Script<a aria-label="Link to heading 'The Script'" data-heading-content="The Script" class=anchor href=#the-script></a></h3><p>From <del><code>man sed</code></del> (let's be real here) searching on Stack Overflow:</p><ul><li><code>/polywolf/</code>: only run on lines that have "polywolf" in them</li><li><code>s/.*(polywolf.*)/\1/p</code>:<sup class=footnote-ref><a data-footnote-ref href=#fn-3 id=fnref-3-2>2</a></sup> For every line that looks like <code>* [pruned] origin/polywolf/feature-branch</code>, print out just <code>polywolf/feature-branch</code>. I verified this regex experimentally :)</li></ul><p>Great! We've collected all the branches we need into a "list" (newline-separated strings), and now we just need to delete them. But how?</p><h2 id=heading-deleting-a-branch>Deleting A Branch<a aria-label="Link to heading 'Deleting A Branch'" data-heading-content="Deleting A Branch" class=anchor href=#deleting-a-branch></a></h2><p>The command to delete a branch is <code>git branch -d</code>. However, in this normal delete, git will complain the branch hasn't been merged. We don't care about this, because our feature branches have been effectively added as a commit on <code>main</code>, so we need to tell git "yes we really want to delete this branch", which we can do with <code>git branch -D</code>.</p><h3 id=heading-deleting-all-the-branches>Deleting ALL The Branches<a aria-label="Link to heading 'Deleting ALL The Branches'" data-heading-content="Deleting ALL The Branches" class=anchor href=#deleting-all-the-branches></a></h3><p>The typical way of iterating over a list in bash-likes is</p><pre class=syntax-highlighting><code class=language-bash><span class=keyword>for</span> <span class=property>branch</span> <span class=keyword>in</span> <span class=embedded>$(</span><span class=function>the-expression</span><span class=embedded>)</span>
<span class=keyword>do</span>
  <span class=function>git</span> branch <span class=constant>-D</span> <span class=string>"</span><span class=operator>$</span><span class=property>branch</span><span class=string>"</span>
<span class=keyword>done</span></code></pre><p>This is the same as running <code>git branch -D b1; git branch -D b2; git branch -D b3; ...</code>, which, while somewhat inefficient from starting so many processes, Just Works™️. But! As it turns out, <code>git branch -D b1 b2 b3 ...</code> has the same effect, so we can use <code>xargs</code> (I absolutely adore <code>xargs</code>, it is so useful in one-liners).</p><p><code>xargs</code> takes in a "list" on standard input, and then turns that into an argument list it appends to whatever command you give it. So, given the list of branches we have currently, <code>xargs git branch -D</code> does exactly what we want!</p><p>And there you have it! A comprehensive explanation of a 1-liner I wrote for my own purposes that will probably be useful to no one else. This is the power of custom aliases/scripts, u can really tailor your own shell experience. it's almost <em>too</em> powerful... i still have a lot to learn tho!</p><section class=footnotes data-footnotes><ol><li id=fn-1><p>I did a couple internships at a <a href=https://www.mercurial-scm.org/>Mercurial</a> shop and have sworn by this model ever since. You Will Never<sup class=footnote-ref><a data-footnote-ref href=#fn-2 id=fnref-2>3</a></sup> Convince Me Merge Commits Are Good <a aria-label="Back to reference 1" class=footnote-backref data-footnote-backref data-footnote-backref-idx=1 href=#fnref-1>↩</a></p></li><li id=fn-3><p>this is fancy Regex speak. don't worry about it kitten <a aria-label="Back to reference 2" class=footnote-backref data-footnote-backref data-footnote-backref-idx=2 href=#fnref-3>↩</a> <a aria-label="Back to reference 2-2" class=footnote-backref data-footnote-backref data-footnote-backref-idx=2-2 href=#fnref-3-2>↩<sup class=footnote-ref>2</sup></a></p></li><li id=fn-2><p>ok Never is a strong word but u get my point <a aria-label="Back to reference 3" class=footnote-backref data-footnote-backref data-footnote-backref-idx=3 href=#fnref-2>↩</a></p></li></ol></section>]]></content>
      <author>
        <name>PolyWolf</name>
        <uri>https://wolf.girl.technology/</uri>
      </author>
    </entry>
  
    <entry>
      <title><![CDATA[Assembly or Bash?]]></title>
      <link rel="alternate" href="https://wolfgirl.dev/blog/3982419/" />
      <id>https://wolfgirl.dev/blog/3982419/</id>
      <published>2023-12-26T05:18:07Z</published>
      <updated>2023-12-26T05:18:07Z</updated>
      <summary><![CDATA[In which I jokingly compare the relative merits of the Assembly and Bash programming languages.]]></summary>
      <content type="html"><![CDATA[<p>Originally published to Cohost with no title, as a response to an ask "assembly or bash?" from <a href=https://welltypedwit.ch>Alice</a></p><hr><p>a question with multiple interpretations! i'm going to have fun with this :3</p><h2 id=heading-which-would-i-rather-use>Which Would I Rather Use?<a aria-label="Link to heading 'Which Would I Rather Use?'" data-heading-content="Which Would I Rather Use?" class=anchor href=#which-would-i-rather-use></a></h2><p>It depends, obviously. I'd use assembly for file operations and bash for SIMD, obviously. Wait no I g-</p><h2 id=heading-which-would-i-rather-write>Which Would I Rather Write?<a aria-label="Link to heading 'Which Would I Rather Write?'" data-heading-content="Which Would I Rather Write?" class=anchor href=#which-would-i-rather-write></a></h2><p>Both can be a pain, and for similar reasons: some old white dudes made some technical decisions forever ago and those decisions may have been OK then but now we're stuck with them for backcompat purposes and honestly we should probably have moved on by now but oh well backcompat too stronk.</p><p>For me, though, the pain of assembly makes me feel like a wizard trying to find the right runes but a little demon pokes my brain with a pitchfork every time I get one wrong, while the pain of bash makes me feel like I'm talking to a senile grandpa who keeps extoling "back in my day" while changing his story every half hour but I can't really leave since I'm his assigned nurse this shift. So the answer to this one is assembly.</p><h2 id=heading-which-sounds-cooler-as-a-magic-spell>Which Sounds Cooler As A Magic Spell?<a aria-label="Link to heading 'Which Sounds Cooler As A Magic Spell?'" data-heading-content="Which Sounds Cooler As A Magic Spell?" class=anchor href=#which-sounds-cooler-as-a-magic-spell></a></h2><p>bash. assembly maybe constructs you a wooden table, but bash lets you create dents in anything proportional to the mana input, and some mages found that could include your opponent's heart, leading to a low-mana instakill spell that revolutionized the magical meta once that was discovered.</p><h2 id=heading-closing-thoughts>Closing Thoughts<a aria-label="Link to heading 'Closing Thoughts'" data-heading-content="Closing Thoughts" class=anchor href=#closing-thoughts></a></h2><p>it seems bash and assembly are tied here. oh well guess the question couldn't be answered after all sorry</p>]]></content>
      <author>
        <name>PolyWolf</name>
        <uri>https://wolf.girl.technology/</uri>
      </author>
    </entry>
  
    </feed>
  