<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: sanskar arora</title>
    <description>The latest articles on DEV Community by sanskar arora (@snskarora).</description>
    <link>https://dev.to/snskarora</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2766323%2Fa4119da7-4968-4940-b789-a83923f36650.png</url>
      <title>DEV Community: sanskar arora</title>
      <link>https://dev.to/snskarora</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snskarora"/>
    <language>en</language>
    <item>
      <title>☠️ HomeLab Chronicles: Bash, Bootloaders and BooBoos</title>
      <dc:creator>sanskar arora</dc:creator>
      <pubDate>Sun, 08 Jun 2025 15:20:53 +0000</pubDate>
      <link>https://dev.to/snskarora/homelab-chronicles-booty-bash-and-bootloaders-4b3i</link>
      <guid>https://dev.to/snskarora/homelab-chronicles-booty-bash-and-bootloaders-4b3i</guid>
      <description>&lt;p&gt;Ahoy, me nerdy hearties! ⚓&lt;/p&gt;

&lt;p&gt;Today, we sail deeper into the digital abyss, where the seas are encrypted and the only map we follow is &lt;code&gt;man&lt;/code&gt; pages. Welcome to &lt;strong&gt;Part 1&lt;/strong&gt; of this chaos: &lt;strong&gt;Getting Arch Installed &amp;amp; Ready for SSH Shenanigans.&lt;/strong&gt; 🧑‍✈️💻&lt;/p&gt;

&lt;p&gt;Let the plundering begin.&lt;/p&gt;




&lt;h2&gt;
  
  
  🪓 Step 1: Flashin’ Be Plunderin’
&lt;/h2&gt;

&lt;p&gt;Get yerself a fresh Arch ISO (ye ol’ treasure map 🗺️) and flash it onto a thumb drive. Use whatever tool ye fancy — &lt;code&gt;dd&lt;/code&gt;, &lt;code&gt;balenaEtcher&lt;/code&gt;, or magic. Doesn’t matter. Just don’t &lt;em&gt;accidentally&lt;/em&gt; nuke your primary drive or the Kraken (a.k.a. your data) shall rise.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚰️ Step 2: Boot Ye Olde Rig
&lt;/h2&gt;

&lt;p&gt;Plug in yer USB, boot that dusty Dell (or whatever sea-worn vessel ye got), and sail straight into the BIOS. Change boot order like a rebellious pirate ignoring port law, and let the Arch ISO take the wheel. 🚢&lt;/p&gt;




&lt;h2&gt;
  
  
  📡 Step 3: Cast the Wi-Fi Net
&lt;/h2&gt;

&lt;p&gt;Time to connect to the seven signals. Enter the &lt;strong&gt;&lt;code&gt;iwctl&lt;/code&gt;&lt;/strong&gt; tavern and speak these sacred incantations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect wifi_name
station wlan0 show
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you're connected, exit like a ghost (&lt;code&gt;exit&lt;/code&gt;), and if you’re the suspicious type (which you &lt;em&gt;should&lt;/em&gt; be), test your signal with &lt;code&gt;ping archlinux.org -c 3&lt;/code&gt;, if the ping pings, the wind is in our sails. 🌬️🏴‍☠️&lt;/p&gt;




&lt;h2&gt;
  
  
  🔐 Step 4: SSH or Walk the Plank
&lt;/h2&gt;

&lt;p&gt;Install OpenSSH (if it’s not already on board — usually is) &lt;code&gt;pacman -S openssh&lt;/code&gt;.&lt;br&gt;
Set a password for the &lt;strong&gt;root&lt;/strong&gt; user (yes, ye be root now — absolute pirate king 🧑‍✈️). Let’s say: &lt;code&gt;passwd&lt;/code&gt;  choose something like "pass" if you're feeling lucky 🍀.&lt;/p&gt;

&lt;p&gt;Now SSH into the box from yer main ship:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh root@&amp;lt;ip_address&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your OS barks at ye, find an equivalent command or walk the plank.&lt;/p&gt;




&lt;h2&gt;
  
  
  🪚 Step 5: Slicing Up the Drive Like a Mango
&lt;/h2&gt;

&lt;p&gt;Time to swashbuckle that drive:  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;/boot&lt;/code&gt; — 1GB ⚓&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EFI&lt;/code&gt; — 1GB 🧭&lt;/li&gt;
&lt;li&gt;The rest? LVM party time. (But don’t forget to save a few gigs for future chaos.) Estimated ~125GB for LVM. ⚔️&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We use the old-school blade: &lt;code&gt;fdisk&lt;/code&gt;. Because &lt;strong&gt;real pirates don’t use fancy new TUIs.&lt;/strong&gt;&lt;br&gt;
We're encrypting the &lt;em&gt;big&lt;/em&gt; LVM partition, not the little ones — because we hate pain, but not &lt;em&gt;that&lt;/em&gt; much.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧙 Step 6: Manual Install? Aye, Because Pain is the Best Teacher
&lt;/h2&gt;

&lt;p&gt;Could we run &lt;code&gt;archinstall&lt;/code&gt; and be done? Sure.&lt;br&gt;
&lt;strong&gt;Do we want to?&lt;/strong&gt; HA. No. Where’s the fun in &lt;em&gt;that&lt;/em&gt;, matey?&lt;br&gt;
We do this the hard way. &lt;strong&gt;Because learning builds character (and for once, not craving trauma).&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🔗 Important Runes (You &lt;em&gt;Will&lt;/em&gt; Forget Otherwise)
&lt;/h2&gt;

&lt;p&gt;Trust me, sailor, these are hard-earned battle scars:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔩 &lt;strong&gt;Load Device Mapper&lt;/strong&gt; before formatting yer volumes:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  modprobe dm_mod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;🪛 &lt;strong&gt;Update mkinitcpio hooks&lt;/strong&gt; (or prepare to scream):
In &lt;code&gt;/etc/mkinitcpio.conf&lt;/code&gt;, modify:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  HOOKS=(base udev autodetect ... encrypt lvm2 filesystems)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;⚙️ &lt;strong&gt;Tweak GRUB so it speaks encryption&lt;/strong&gt;:
In &lt;code&gt;/etc/default/grub&lt;/code&gt;, update:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nv"&gt;GRUB_CMDLINE_LINUX_DEFAULT&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"... cryptdevice=/dev/&amp;lt;drive&amp;gt;:&amp;lt;volgroup&amp;gt; ..."&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;💣 MOST IMPORTANT:
Generate that GRUB config or the boot gods shall smite you:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  grub-mkconfig &lt;span class="nt"&gt;-o&lt;/span&gt; /boot/grub/grub.cfg
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you skip this, your bootloader will throw a tantrum and  “not find &lt;code&gt;vmlinuz&lt;/code&gt; or &lt;code&gt;initrd&lt;/code&gt;,” and you’ll be mounting USBs like a panicked sailor chasing his lost rum barrel.&lt;/p&gt;

&lt;p&gt;(Yes, I did that. Yes, it sucked. Yes, I survived. Barely. 🥲)&lt;/p&gt;




&lt;h2&gt;
  
  
  🐳 What’s Next?
&lt;/h2&gt;

&lt;p&gt;Now, Arch is alive and answering pings like a loyal parrot, we’ll move on to the Big Fish™: setting up Kubernetes.&lt;/p&gt;

&lt;p&gt;But for now… pour yourself a drink, pat your encrypted SSD, and take pride. You’ve sailed through the cursed waters of manual Arch install. 🍻💾&lt;/p&gt;

&lt;p&gt;Until next time, mateys.&lt;br&gt;
Keep your drives encrypted and your SSH keys close.&lt;/p&gt;

&lt;p&gt;And remember, the name is Captain Jack Sparrow 🏴‍☠️&lt;/p&gt;

&lt;h1&gt;
  
  
  EDIT (a day later)
&lt;/h1&gt;

&lt;p&gt;Today, while on the bus, I had a thought, To kubernetes I need at least two runners - 1 master and 1 worker node, and guess what, I only have 1 system to experiment with. &lt;br&gt;
I have three options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;buy another machine (Too expensive)&lt;/li&gt;
&lt;li&gt;setup a virtualisation solution to get around it (Considering Proxmox and HyperV for now, could move to another hypervisor as well)&lt;/li&gt;
&lt;li&gt;hybrid setup - with master node on my machine and workers on VMS in cloud (Azure/GCP)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I am going ahead with option 2 (Hypervisor) because option 1 is expensive, and option 3 will have too many components, and if something goes wrong, there would be multiple points to check on (n/w concerns me the most). So, for now, I will start with hypervisors and then, after successful deployments and testing on my assembled cluster, probably include hybrid nodes (Azure, GCP, etc).&lt;/p&gt;

</description>
      <category>homelab</category>
      <category>archlinux</category>
    </item>
    <item>
      <title>🏠 HomeLab Chronicles: Episode 1 - Arch-nemesis</title>
      <dc:creator>sanskar arora</dc:creator>
      <pubDate>Sat, 07 Jun 2025 21:26:41 +0000</pubDate>
      <link>https://dev.to/snskarora/homelab-chronicles-episode-1-arch-nemesis-f7n</link>
      <guid>https://dev.to/snskarora/homelab-chronicles-episode-1-arch-nemesis-f7n</guid>
      <description>&lt;p&gt;Hey all 👋&lt;/p&gt;

&lt;p&gt;So, I was &lt;em&gt;supposed&lt;/em&gt; to be working on my garbage collector project and the very &lt;em&gt;stoppable&lt;/em&gt; &lt;strong&gt;StopLang&lt;/strong&gt;, but... you know when your brain says &lt;strong&gt;C&lt;/strong&gt;, and your heart screams &lt;strong&gt;"Sea ya later!"&lt;/strong&gt;? Yeah. That.&lt;/p&gt;

&lt;p&gt;So instead, I’m kicking off a new project and a new series I’m calling:&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  🧪 HomeLab: Because what's better than chaos in your own home?
&lt;/h2&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  💻 The Plan: Frankensteining an Old Laptop
&lt;/h2&gt;

&lt;p&gt;The victim: a brave old &lt;strong&gt;Dell Inspiron&lt;/strong&gt; 🧟‍♂️&lt;br&gt;
Specs:   &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CPU:&lt;/strong&gt; 8thgen i5 processor (not the freshest fruit in the basket, but it'll do)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Memory:&lt;/strong&gt; 8GB of dreams&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disk Space:&lt;/strong&gt; 256GB of potential&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’m going to torch this machine 🔥 with a &lt;strong&gt;Linux distro (no GUI, because who needs fancy pixels?)&lt;/strong&gt; and then just vibe with it.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏴‍☠️ Why Arch? Because I hate myself (but in a fun way)
&lt;/h2&gt;

&lt;p&gt;Arch Linux is my pick for this culinary disaster of a home server. Here's why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;No bloatware. Just vibes.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Comes bare minimum out of the box (just like me on Mondays).&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Most importantly, &lt;strong&gt;PewDiePie&lt;/strong&gt; uses Arch.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;And honestly, it bruised my tech ego that while I’m here running Ubuntu, &lt;em&gt;he’s&lt;/em&gt; flexing with Arch. Not okay.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;🧠 Backstory:&lt;br&gt;
I was actually an Arch user until November 2024 (RIP). Then I got a shiny new laptop and realized I no longer had the time (or sanity) to fix bootloader issues for the 100th time or recompile audio drivers like it’s Groundhog Day. So I reluctantly joined the &lt;strong&gt;Ubuntu™ Easy Life Gang&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🏗️ The Mission: Milestone 1
&lt;/h2&gt;

&lt;p&gt;Here’s what I’ll be doing in Phase 1 of this HomeLab Madness™:&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Step 1: Install Arch (with just enough to not regret it instantly)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Barebones setup only. Think minimal. Think IKEA flat-pack with no manual.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ Step 2: Remote Control, Baby 🚀
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Get remote SSH access, because reaching across the room is &lt;em&gt;so&lt;/em&gt; 2020.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ Step 3: K8s or Bust 🐳
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up a &lt;strong&gt;Kubernetes cluster&lt;/strong&gt; from scratch.

&lt;ul&gt;
&lt;li&gt;No &lt;code&gt;kubeadm&lt;/code&gt;, no fancy tools.&lt;/li&gt;
&lt;li&gt;Just pure, uncut YAML &amp;amp; CLI pain.&lt;/li&gt;
&lt;li&gt;Because apparently I like suffering.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  ✅ Step 4: 🔥 Wall Building (Digital Only)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;strong&gt;firewalls&lt;/strong&gt; to protect this digital potato.&lt;/li&gt;
&lt;li&gt;But I want more than just &lt;code&gt;ufw&lt;/code&gt; incantations — I’ll aim to build something &lt;em&gt;slightly more usable&lt;/em&gt;, because who wants to memorize commands when you can just push a button?&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🚀 After That?
&lt;/h2&gt;

&lt;p&gt;Big plans, my friends.&lt;/p&gt;

&lt;p&gt;I’ll be building a platform where I can deploy workloads on this cluster using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Docker image URL (or a local name if I’m feeling nostalgic),&lt;/li&gt;
&lt;li&gt;A few config options to tweak runtime behaviour &amp;amp; exposure,&lt;/li&gt;
&lt;li&gt;And some classification magic to keep things sorted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Basically: &lt;strong&gt;"Give me a container, and I shall give it a home."&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This series is going to be weird, wild, and probably involve more swearing at YAML than anyone should legally be allowed to do. But hey — that’s (I guess) the HomeLab life.&lt;/p&gt;

&lt;p&gt;Stay tuned, grab popcorn 🍿, and wish my Dell laptop luck. It’s going to need it.&lt;/p&gt;

</description>
      <category>homelab</category>
      <category>archlinux</category>
    </item>
    <item>
      <title>Birth of StopLang – A Useless Language With a Very Specific Purpose</title>
      <dc:creator>sanskar arora</dc:creator>
      <pubDate>Thu, 05 Jun 2025 19:49:32 +0000</pubDate>
      <link>https://dev.to/snskarora/birth-of-stoplang-a-useless-language-with-a-very-specific-purpose-d2j</link>
      <guid>https://dev.to/snskarora/birth-of-stoplang-a-useless-language-with-a-very-specific-purpose-d2j</guid>
      <description>&lt;p&gt;So, I wanted to implement a &lt;strong&gt;garbage collector&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Cool idea, right? Memory management, pointer wizardry, existential dread—the whole buffet.&lt;/p&gt;

&lt;p&gt;But then came the &lt;em&gt;realization™️&lt;/em&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Uhhh, how the hell do I even &lt;strong&gt;test&lt;/strong&gt; this thing?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can’t really test a garbage collector in a vacuum (though that &lt;em&gt;would&lt;/em&gt; collect garbage nicely). I needed some code, some variables, some actual garbage. Something to allocate memory, throw things around, and see if the collector actually does its job—or rage quits.&lt;/p&gt;




&lt;h2&gt;
  
  
  Option A: Plug it into an existing language
&lt;/h2&gt;

&lt;p&gt;Like a &lt;em&gt;real&lt;/em&gt; adult. Take some interpreter written in C, rip out its memory management, and bolt mine in.&lt;/p&gt;

&lt;p&gt;But nah.&lt;br&gt;&lt;br&gt;
That way lies integration hell.&lt;br&gt;&lt;br&gt;
Do I look like someone who enjoys linker errors and segfaults from code I didn’t write? (No. No, I do not.)&lt;/p&gt;




&lt;h2&gt;
  
  
  Option B: Just build my own language
&lt;/h2&gt;

&lt;p&gt;Like an &lt;em&gt;unhinged&lt;/em&gt; adult.&lt;br&gt;&lt;br&gt;
So that’s what I did.&lt;/p&gt;




&lt;p&gt;Okay so here’s the tea:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🛠️ &lt;strong&gt;It’ll be compiled&lt;/strong&gt;, because I want my errors during dev time, not as jump scares during runtime.
&lt;/li&gt;
&lt;li&gt;⚙️ &lt;strong&gt;It’s in C&lt;/strong&gt;, because:

&lt;ul&gt;
&lt;li&gt;C++ is &lt;em&gt;too&lt;/em&gt; friendly (a little too comfy, not enough pain).&lt;/li&gt;
&lt;li&gt;Assembly is &lt;em&gt;too&lt;/em&gt; sadistic (I still like my sanity).&lt;/li&gt;
&lt;li&gt;C is that spicy sweet spot of power and pain.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;We're going full DIY on this one. Think of it as a language that’s just smart enough to test our GC, but dumb enough that we don’t have to spend years writing a parser.&lt;/p&gt;




&lt;p&gt;Now, we needed a name. Something iconic. Something that tells you what this language is &lt;em&gt;really&lt;/em&gt; about.&lt;/p&gt;

&lt;p&gt;And so, I give you:  &lt;/p&gt;

&lt;h3&gt;
  
  
  🛑 &lt;code&gt;StopLang&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It’s the &lt;strong&gt;opposite of Go&lt;/strong&gt;. It doesn’t want to “go” anywhere.
&lt;/li&gt;
&lt;li&gt;It’s &lt;strong&gt;useless&lt;/strong&gt;, and &lt;em&gt;proudly&lt;/em&gt; so.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s not fast.&lt;br&gt;&lt;br&gt;
It’s not smart.&lt;br&gt;&lt;br&gt;
It’s barely a language.&lt;br&gt;&lt;br&gt;
But it’s &lt;em&gt;ours&lt;/em&gt;, and it will be &lt;em&gt;just good enough&lt;/em&gt; to build and test garbage collectors.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Bonus: It will be easier to read than Brainfuck, and more coherent than Brainrot. (Which honestly sounds like medical conditions at this point.)&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  📌 What’s Coming Next?
&lt;/h2&gt;

&lt;p&gt;This blog would turn into a research paper if I tried to cover &lt;em&gt;everything&lt;/em&gt; here. So we’re breaking it down:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;This post:&lt;/strong&gt; Why StopLang exists and how I got here (hello chaos)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Next post(s):&lt;/strong&gt; Building the core of StopLang—basic syntax, data structures, compiler setup, maybe a sad little REPL
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Then:&lt;/strong&gt; Plugging in our garbage collectors and watching them either work… or work once and then segfault spectacularly&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;If you’ve read this far, bless your soul.&lt;br&gt;&lt;br&gt;
Thanks for bearing with the puns, the rambling, and the “what if I just wrote a language for no reason?” energy.&lt;/p&gt;

&lt;p&gt;Stay tuned, fellow code gremlins.&lt;br&gt;&lt;br&gt;
More nonsense incoming soon. 😈🧹&lt;/p&gt;

</description>
      <category>c</category>
      <category>newlanguage</category>
      <category>garbagecollector</category>
      <category>reinventthewheel</category>
    </item>
    <item>
      <title>Building a Garbage Collector in C: Because Who Needs Sleep Anyway?</title>
      <dc:creator>sanskar arora</dc:creator>
      <pubDate>Mon, 02 Jun 2025 22:12:34 +0000</pubDate>
      <link>https://dev.to/snskarora/building-a-garbage-collector-in-c-because-who-needs-sleep-anyway-mni</link>
      <guid>https://dev.to/snskarora/building-a-garbage-collector-in-c-because-who-needs-sleep-anyway-mni</guid>
      <description>&lt;p&gt;Let’s be honest: most people’s idea of a good time doesn’t involve poking around in the underbelly of C, trying to make memory management less… well, terrifying. But here I am, rolling up my sleeves and diving into the world of garbage collectors. Why? Because understanding how the engine works under the bonnet is way more fun than actually driving the car. (And also, I’m only a little cracked—not batshit crazy, so no assembly for now.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why C? Why Not?
&lt;/h2&gt;

&lt;p&gt;You might ask, “Why C? Why not something friendlier, like Python, or at least C++ with its fancy destructors?” Well, I want to keep things low-level. Real low. Like, “I can see the bits and bytes from here” low. Plus, C gives you the delightful opportunity to shoot yourself in the foot with malloc and free, which is basically a rite of passage for any programmer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Accept Your Fate
&lt;/h2&gt;

&lt;p&gt;Before you even write a line of code, accept that you will spend hours debugging segfaults, chasing dangling pointers, and questioning your life choices. This is normal. This is growth. This is C.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Plan Your Collector
&lt;/h2&gt;

&lt;p&gt;There are many flavours of garbage collectors—reference counting, mark-and-sweep, generational… I’ll probably start with something simple, like reference counting and end with mark-and-sweep, because I like the idea of pretending to be a janitor for my code. (“Sweep the heap, Daniel-san!”) And yes, I am only going to do 2 types.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Write Some Code, Break Some Code
&lt;/h2&gt;

&lt;p&gt;Here’s where the real fun begins. You’ll write a function to allocate memory, another to mark what’s still in use, and a third to sweep away the rest. Inevitably, you’ll forget to mark something, and your program will crash spectacularly. Don’t worry—it’s all part of the process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Document the Madness
&lt;/h2&gt;

&lt;p&gt;As I go, I’ll document every step, every bug, and every existential crisis. Because if you can’t laugh at your own memory leaks, what can you laugh at?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Journey Continues…
&lt;/h2&gt;

&lt;p&gt;So, join me as I attempt to tame the wild beast that is manual memory management in C. Will I succeed? Will I lose my mind? Will I finally understand how the engine works beneath the bonnet? Only time—and a lot of printf debugging—will tell.&lt;/p&gt;

&lt;p&gt;Stay tuned, and remember: in C, the real garbage collector… is you.&lt;/p&gt;

</description>
      <category>c</category>
      <category>garbagecollector</category>
      <category>reinventthewheel</category>
    </item>
  </channel>
</rss>
