<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>100daystooffload &amp;mdash; sagethesagesage</title>
    <link>https://sagethesagesage.writeas.com/tag:100daystooffload</link>
    <description></description>
    <pubDate>Thu, 11 Jun 2026 21:07:57 +0000</pubDate>
    <item>
      <title>Hugo? More like, No-Go</title>
      <link>https://sagethesagesage.writeas.com/hugo-more-like-no-go?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Driven largely by a staunch refusal to learn anything too new, I&#39;ve decided to try my foolish hand at writing one of these &#34;static site generators&#34;. That is to say, I&#39;ve decided to pretend a task is very very simple, and pray that my needs never outgrow my mediocre bash skills.&#xA;&#xA;Basically, I&#39;m itired/i of writing brackety tags everywhere, so I have a little converter from plain text to HTML. There&#39;s a template.html file and an index.template.html file. The first is the basis for individual posts, and the second is used to generate a list of links to each post.&#xA;&#xA;This script is incredibly naive. It more or less copy pastes the text in a given post file straight into the body of the template.html file. But it does use the first line of the file as both the header and the name of the link, which is kinda fun. And I can just add HTML tags wherever I want, if I do feel like adding some flair.&#xA;&#xA;At some point, I could try to convert this into a real project with my dear friend Rust, but for now that&#39;s 2 hard.&#xA;&#xA;The best part of this whole thing is that I don&#39;t even have a way to host it, yet. So for now, write.as, whoo!&#xA;&#xA;100DaysToOffload&#xA;&#xA;I wanted this post to be longer, but instead I added comments to my code. So here&#39;s the script so far:&#xA;&#xA;!/bin/bash&#xA;&#xA;Replace backticks with div&#xA;cat test | sed &#39;s/\(\w\)/div\1/g&#39; | sed &#39;s/\(\w\)/\1\/div/g&#39;&#xA;&#xA;Delete old versions of pages&#xA;rm pages/*&#xA;&#xA;Folder with plaintext posts&#xA;cd posts&#xA;&#xA;Accrue link text&#xA;links=&#34;&#34;&#xA;for f in ls -t; do&#xA;    # First line is the title&#xA;    title=$(head -n 1 $f)&#xA;&#xA;    # Stupidly replace newlines so sed can process them&#xA;    content=&#34;p$(tail -n +3 $f | tr &#39;\n&#39; &#39;~&#39; )&#34;&#xA;&#xA;    # Convert two once-newlines into paragraph tags&#xA;    content=&#34;$(echo &#34;$content&#34; | sed &#39;s//\/p\np/g&#39; | sed &#39;s/~/\n/g&#39; | sed &#39;$ d&#39;)&#34;&#xA;&#xA;    # Replace the #title and #content markers with the new strings&#xA;    template=$(cat ../template.html)&#xA;    output=$(echo &#34;${template/\#content/$content}&#34;)&#xA;    output=$(echo &#34;${output/\#title/$title}&#34;)&#xA;&#xA;    # Save this text into a new html file,&#xA;    # named after the original post text&#xA;    echo $output   &#34;../pages/${f}.html&#34;&#xA;&#xA;    # Append a link to the new page&#xA;    links=&#34;$linksa href=\&#34;pages/$f.html\&#34;$title/abr&#34;&#xA;done&#xA;cd ..&#xA;&#xA;Insert link text into index template&#xA;index=$(cat index.template.html)&#xA;index=$(echo &#34;${index/\#links/$links}&#34;)&#xA;&#xA;Create index file&#xA;echo $index   index.html&#xA;`]]&gt;</description>
      <content:encoded><![CDATA[<p>Driven largely by a staunch refusal to learn anything too new, I&#39;ve decided to try my foolish hand at writing one of these “static site generators”. That is to say, I&#39;ve decided to pretend a task is very very simple, and pray that my needs never outgrow my mediocre bash skills.</p>

<p>Basically, I&#39;m <i>tired</i> of writing brackety tags everywhere, so I have a little converter from plain text to HTML. There&#39;s a template.html file and an index.template.html file. The first is the basis for individual posts, and the second is used to generate a list of links to each post.</p>

<p>This script is incredibly naive. It more or less copy pastes the text in a given post file straight into the body of the template.html file. But it does use the first line of the file as both the header and the name of the link, which is kinda fun. And I can just add HTML tags wherever I want, if I do feel like adding some <em>flair</em>.</p>

<p>At some point, I could try to convert this into a real project with my dear friend Rust, but for now that&#39;s 2 hard.</p>

<p>The best part of this whole thing is that I don&#39;t even have a way to host it, yet. So for now, write.as, whoo!</p>

<p><a href="https://sagethesagesage.writeas.com/tag:100DaysToOffload" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p>I wanted this post to be longer, but instead I added comments to my code. So here&#39;s the script so far:</p>

<pre><code>#!/bin/bash

## Replace backticks with &lt;div&gt;
# cat test | sed &#39;s/`\(\w\)/&lt;div&gt;\1/g&#39; | sed &#39;s/\(\w\)`/\1&lt;\/div&gt;/g&#39;

# Delete old versions of pages
rm pages/*

# Folder with plaintext posts
cd posts

# Accrue link text
links=&#34;&#34;
for f in `ls -t`; do
    # First line is the title
    title=$(head -n 1 $f)

    # Stupidly replace newlines so sed can process them
    content=&#34;&lt;p&gt;$(tail -n +3 $f | tr &#39;\n&#39; &#39;~&#39; )&#34;

    # Convert two once-newlines into paragraph tags
    content=&#34;$(echo &#34;$content&#34; | sed &#39;s/~~/&lt;\/p&gt;\n&lt;p&gt;/g&#39; | sed &#39;s/~/\n/g&#39; | sed &#39;$ d&#39;)&#34;

    # Replace the #title and #content markers with the new strings
    template=$(cat ../template.html)
    output=$(echo &#34;${template/\#content/$content}&#34;)
    output=$(echo &#34;${output/\#title/$title}&#34;)

    # Save this text into a new html file,
    # named after the original post text
    echo $output &gt; &#34;../pages/${f}.html&#34;

    # Append a link to the new page
    links=&#34;$links&lt;a href=\&#34;pages/$f.html\&#34;&gt;$title&lt;/a&gt;&lt;br&gt;&#34;
done
cd ..

# Insert link text into index template
index=$(cat index.template.html)
index=$(echo &#34;${index/\#links/$links}&#34;)

# Create index file
echo $index &gt; index.html
</code></pre>
]]></content:encoded>
      <guid>https://sagethesagesage.writeas.com/hugo-more-like-no-go</guid>
      <pubDate>Thu, 17 Sep 2020 22:21:17 +0000</pubDate>
    </item>
    <item>
      <title>Buying someone a new laptop</title>
      <link>https://sagethesagesage.writeas.com/buying-someone-a-new-laptop?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[My partner&#39;s been running with a 2015 MacBook Air for a few years now,&#xA;but it&#39;s no longer doing what she needs. That is to say, it rapidly&#xA;converted from &#34;ok&#34; to &#34;very stinky&#34; over the last year-ish. YouTube&#xA;videos stutter. It&#39;s madness. We even re-installed MacOS, and no dice.&#xA;An upgrade was in order, and with all the remote work stuff, it needed&#xA;to be a sizeable one.&#xA;&#xA;Now, my current laptop is a Dell Precision M4700 from early 2013 (that&#xA;I bought in 2018). It&#39;s a fat boy. Nearly an inch and a half thick,&#xA;and not exactly chamfered. Priorities for that purchase include:&#xA;number of hard drive spots, number of RAM slots, can play Factorio.&#xA;&#xA;My partner did not want a Dell Precision M4700. She has frivolous&#xA;requirements like &#34;battery life more than an hour&#34;, &#34;un-terrible&#xA;webcam&#34;, and &#34;less than 6 pounds&#34;. This narrowed down the options&#xA;significantly. Of course, what narrowed it down more was that I&#xA;insisted on finding something with swappable RAM and storage, but I&#xA;stand by that.&#xA;&#xA;The search for new technology is kinda fun, but I spent way too much&#xA;time on it, and it got to be pretty draining. There exist far too many&#xA;devices with good specs and terrible trackpads. We also try to buy&#xA;used where possible for not-being-wasteful reasons, but her work uses&#xA;very poorly-optimized software, so we bit the bullet and found&#xA;something new.&#xA;&#xA;And when I say &#34;we&#34;, I mean &#34;she&#34;. I spent hours on the search (and&#xA;picked up plenty about the current laptop &#34;market&#34; or whatever) but&#xA;ultimately she found it, tucked away on a manufacturer&#39;s website. I&#xA;gave it the know-it-all computer-guy seal of approval, and we ordered.&#xA;It looks pretty cool, and should totally blow mine out of the water.&#xA;&#xA;But it hasn&#39;t arrived yet, so maybe it&#39;s terrible.&#xA;&#xA;100DaysToOffload&#xA;&#xA;PS: For those interested it&#39;s an Inspiron 15 5000 with the Ryzen 5 4500U.]]&gt;</description>
      <content:encoded><![CDATA[<p>My partner&#39;s been running with a 2015 MacBook Air for a few years now,
but it&#39;s no longer doing what she needs. That is to say, it rapidly
converted from “ok” to “very stinky” over the last year-ish. YouTube
videos stutter. It&#39;s madness. We even re-installed MacOS, and no dice.
An upgrade was in order, and with all the remote work stuff, it needed
to be a sizeable one.</p>

<p>Now, my current laptop is a Dell Precision M4700 from early 2013 (that
I bought in 2018). It&#39;s a fat boy. Nearly an inch and a half thick,
and not exactly <em>chamfered</em>. Priorities for that purchase include:
number of hard drive spots, number of RAM slots, can play Factorio.</p>

<p>My partner did not want a Dell Precision M4700. She has frivolous
requirements like “battery life more than an hour”, “un-terrible
webcam”, and “less than 6 pounds”. This narrowed down the options
significantly. Of course, what narrowed it down more was that I
insisted on finding something with swappable RAM and storage, but I
stand by that.</p>

<p>The search for new technology is kinda fun, but I spent way too much
time on it, and it got to be pretty draining. There exist far too many
devices with good specs and terrible trackpads. We also try to buy
used where possible for not-being-wasteful reasons, but her work uses
<em>very</em> poorly-optimized software, so we bit the bullet and found
something new.</p>

<p>And when I say “we”, I mean “she”. I spent hours on the search (and
picked up plenty about the current laptop “market” or whatever) but
ultimately she found it, tucked away on a manufacturer&#39;s website. I
gave it the know-it-all computer-guy seal of approval, and we ordered.
It looks pretty cool, and should totally blow mine out of the water.</p>

<p>But it hasn&#39;t arrived yet, so maybe it&#39;s terrible.</p>

<p><a href="https://sagethesagesage.writeas.com/tag:100DaysToOffload" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>

<p>PS: For those interested it&#39;s an Inspiron 15 5000 with the Ryzen 5 4500U.</p>
]]></content:encoded>
      <guid>https://sagethesagesage.writeas.com/buying-someone-a-new-laptop</guid>
      <pubDate>Wed, 09 Sep 2020 18:30:26 +0000</pubDate>
    </item>
    <item>
      <title>What is it with pointers?</title>
      <link>https://sagethesagesage.writeas.com/what-is-it-with-pointers?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[Listen, if I had to pick a language to write a decent program in, I&#39;d want to use something like Rust. It behaves in more or less all the sane ways I want a language to behave. Python&#39;s nice and quick for Python-y stuff, and Javascript is Javascript, etc. But for some reason, I just like C. &#xA;&#xA;I&#39;ve written something of an implementation of Lisp for my Pebble smartwatch, which I named PebbLisp. I&#39;d love to have written it in Rust, to get some more practice with it, but it was a real pain in the tookus to get compiling for the watch, and I gave up. So, C.&#xA;&#xA;I&#39;ll never act like C is a perfect language. Many, many, stupid memory leaks could&#39;ve been avoided with something smarter. For some reason, though, it&#39;s just fun to work with. PebbLisp involves some dancing about with pointers, and includes a homegrown tagged-union setup. There are parts that are probably very ugly to more practiced eyes, and correcting unexpected behavior is a nightmare, but coding it leaves me downright giggly sometimes.&#xA;&#xA;The Object struct in PebbLisp has three parts:&#xA;&#xA;struct Object {&#xA;    Type type;&#xA;    union {&#xA;        ...&#xA;    };&#xA;    Object forward;&#xA;}&#xA;The Tag&#xA;The first part is the Type of the Object. This is just an enumeration with all the possible types that a PebbLisp object can be. It&#39;s the tag of our tagged union. Already I like it far more than is warranted. One number is a front for every possible type? Incredible!&#xA;&#xA;The Union&#xA;The second part is, of course, the union itself. I&#39;ve cut it out here, but there are members of the union for integers, pointers to strings, function pointers, etc. Unions are also something I treasure. The famous issue with unions is trying to keep track of what state any given union is actually in, and god help you should it ever be interpreted incorrectly. That&#39;s why it&#39;s fun, though. Coding a consistent way to access a union feels like cracking open the secret door of programming.&#xA;&#xA;The Pointer&#xA;Finally, Object forward: something that traditionally might be named cdr (which I had to look up, because I&#39;m really not enough of a Lisp guy). In Lisp, everything is a list. An object with forward == NULL is a list of length 1. An object that points to another object is a list of length 1 + listLength(forward), aka itself plus the rest of the list.&#xA;&#xA;So much code in PebbLisp is dedicated to making sure that this value is never incorrect, duplicate, or useless. A cloneObject() function exists largely because copies of individual objects can&#39;t keep this address. I&#39;d love to use our friendly neighborhood assignment operator: =, but C doesn&#39;t allow operator overloading. But cloneObject() was fun to write, somehow!&#xA;&#xA;C&#xA;Anyway, this has already run too long. Point is, C doesn&#39;t care what you do with data. And for some reason, it&#39;s fun to redo decades of other people&#39;s work in a project no one asked for. I highly recommend it.&#xA;&#xA;100DaysToOffload]]&gt;</description>
      <content:encoded><![CDATA[<p>Listen, if I had to pick a language to write a decent program in, I&#39;d want to use something like Rust. It behaves in more or less all the sane ways I want a language to behave. Python&#39;s nice and quick for Python-y stuff, and Javascript is Javascript, etc. But for some reason, I just <em>like</em> C.</p>

<p>I&#39;ve written something of an implementation of Lisp for my Pebble smartwatch, which I named PebbLisp. I&#39;d love to have written it in Rust, to get some more practice with it, but it was a real pain in the tookus to get compiling for the watch, and I gave up. So, C.</p>

<p>I&#39;ll never act like C is a perfect language. Many, many, stupid memory leaks could&#39;ve been avoided with something smarter. For some reason, though, it&#39;s just fun to work with. PebbLisp involves some dancing about with pointers, and includes a homegrown tagged-union setup. There are parts that are probably very ugly to more practiced eyes, and correcting unexpected behavior is a nightmare, but coding it leaves me downright giggly sometimes.</p>

<p>The Object struct in PebbLisp has three parts:</p>

<pre><code>struct Object {
    Type type;
    union {
        ...
    };
    Object *forward;
}
</code></pre>

<h2 id="the-tag" id="the-tag">The Tag</h2>

<p>The first part is the <code>Type</code> of the <code>Object</code>. This is just an enumeration with all the possible types that a PebbLisp object can be. It&#39;s the tag of our tagged union. Already I like it far more than is warranted. One number is a front for every possible type? Incredible!</p>

<h2 id="the-union" id="the-union">The Union</h2>

<p>The second part is, of course, the union itself. I&#39;ve cut it out here, but there are members of the union for integers, pointers to strings, function pointers, etc. Unions are also something I treasure. The famous issue with unions is trying to keep track of what state any given union is actually in, and god help you should it ever be interpreted incorrectly. That&#39;s why it&#39;s fun, though. Coding a consistent way to access a union feels like cracking open the secret door of programming.</p>

<h2 id="the-pointer" id="the-pointer">The Pointer</h2>

<p>Finally, <code>Object *forward</code>: something that traditionally might be named <code>cdr</code> (which I had to look up, because I&#39;m really not enough of a Lisp guy). In Lisp, everything is a list. An object with <code>forward == NULL</code> is a list of length 1. An object that points to another object is a list of length <code>1 + listLength(forward)</code>, aka itself plus the rest of the list.</p>

<p>So much code in PebbLisp is dedicated to making sure that this value is never incorrect, duplicate, or useless. A <code>cloneObject()</code> function exists largely because copies of individual objects can&#39;t keep this address. I&#39;d love to use our friendly neighborhood assignment operator: <code>=</code>, but C doesn&#39;t allow operator overloading. But <code>cloneObject()</code> was fun to write, somehow!</p>

<h1 id="c" id="c">C</h1>

<p>Anyway, this has already run too long. Point is, C doesn&#39;t care what you do with data. And for some reason, it&#39;s fun to redo decades of other people&#39;s work in a project no one asked for. I highly recommend it.</p>

<p><a href="https://sagethesagesage.writeas.com/tag:100DaysToOffload" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>
]]></content:encoded>
      <guid>https://sagethesagesage.writeas.com/what-is-it-with-pointers</guid>
      <pubDate>Wed, 02 Sep 2020 03:55:04 +0000</pubDate>
    </item>
    <item>
      <title>The Worst Phone I Own</title>
      <link>https://sagethesagesage.writeas.com/the-worst-phone-i-own?pk_campaign=rss-feed</link>
      <description>&lt;![CDATA[I own far too many phones because I&#39;m a nostalgic nitwit and I never manage to get rid of the old ones. Some were broken and replaced, and some were lost to carrier-switching. Two phones I purchased just for fun. One was a Galaxy SII, for toying with PostmarketOS. The other is the worst smartphone I&#39;ve ever owned:  the Alcatel OneTouch Pixi Pulsar.&#xA;&#xA;The Pulsar is small, slow, has a locked bootloader, is stuck on Android 4.4.2 (3 years old when I bought it) and is locked to Tracfone. Why did I buy this piece of junk? Because it cost $4.83, after taxes, shipped overnight. I know carriers discount devices so you&#39;ll buy their service, and it&#39;s a piece of junk, but still.&#xA;&#xA;I tried a few of my main apps. Tusky is incompatible, but Fedilab runs okay. Slide for Reddit works alright but has some bizarre behavior when switching between activities (or fragments or whatever they are). The only camera is obviously hideous and rear-facing. During an unrelated nostalgia kick I read the entirety of two Goosebumps books using Librera Pro, which worked well.&#xA;&#xA;Anyway, it&#39;s pretty terrible. I had some fun experimenting with it, as a what&#39;s-the-worst-hardware-I-can-live-with test, but it&#39;s pretty rough. If it had a little more space and the software was a smidge newer, I might be able to get by.&#xA;&#xA;That said, consider giving this experiment a try. I wouldn&#39;t recommend going and buying something you don&#39;t need — it feels wasteful, now — but if you&#39;ve got an old phone in a drawer somewhere, pull it out. Boot it up and see how it compares to your current device.&#xA;&#xA;And then, if you&#39;re anything like me, sell the damn thing.&#xA;&#xA;Yeesh.&#xA;&#xA;100DaysToOffload]]&gt;</description>
      <content:encoded><![CDATA[<p>I own far too many phones because I&#39;m a nostalgic nitwit and I never manage to get rid of the old ones. Some were broken and replaced, and some were lost to carrier-switching. Two phones I purchased just for fun. One was a Galaxy SII, for toying with PostmarketOS. The other is the worst smartphone I&#39;ve ever owned:  the Alcatel OneTouch Pixi Pulsar.</p>

<p>The Pulsar is small, slow, has a locked bootloader, is stuck on Android 4.4.2 (3 years old when I bought it) and is locked to Tracfone. Why did I buy this piece of junk? Because it cost $4.83, after taxes, shipped overnight. I know carriers discount devices so you&#39;ll buy their service, and it&#39;s a piece of junk, but still.</p>

<p>I tried a few of my main apps. Tusky is incompatible, but Fedilab runs okay. Slide for Reddit works alright but has some bizarre behavior when switching between activities (or fragments or whatever they are). The only camera is obviously hideous and rear-facing. During an unrelated nostalgia kick I read the entirety of two Goosebumps books using Librera Pro, which worked well.</p>

<p>Anyway, it&#39;s pretty terrible. I had some fun experimenting with it, as a what&#39;s-the-worst-hardware-I-can-live-with test, but it&#39;s pretty rough. If it had a little more space and the software was a smidge newer, I might be able to get by.</p>

<p>That said, consider giving this experiment a try. I wouldn&#39;t recommend going and buying something you don&#39;t need — it feels wasteful, now — but if you&#39;ve got an old phone in a drawer somewhere, pull it out. Boot it up and see how it compares to your current device.</p>

<p>And then, if you&#39;re anything like me, sell the damn thing.</p>

<p>Yeesh.</p>

<p><a href="https://sagethesagesage.writeas.com/tag:100DaysToOffload" class="hashtag" rel="nofollow"><span>#</span><span class="p-category">100DaysToOffload</span></a></p>
]]></content:encoded>
      <guid>https://sagethesagesage.writeas.com/the-worst-phone-i-own</guid>
      <pubDate>Wed, 26 Aug 2020 03:10:03 +0000</pubDate>
    </item>
  </channel>
</rss>