<?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">
    <channel>
        <title><![CDATA[Márcio Sobel - Blog]]></title>
        <description><![CDATA[yapping about stuff online]]></description>
        <link>https://blog.marciosobel.dev</link>
        <image>
            <url>https://blog.marciosobel.dev/rss_icon.png</url>
            <title>Márcio Sobel - Blog</title>
            <link>https://blog.marciosobel.dev</link>
        </image>
        <generator>RSS for Node</generator>
        <lastBuildDate>Mon, 30 Mar 2026 10:59:22 GMT</lastBuildDate>
        <atom:link href="https://blog.marciosobel.dev/feed" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[Why I switched to NixOS (And why you should, too)]]></title>
            <description><![CDATA[Recently, I've switched to NixOS, making all my system declarative. In this post, I'll explain the pros, the cons, and if switching might be a good option for you.]]></description>
            <link>https://blog.marciosobel.dev/switching-to-nixos</link>
            <guid isPermaLink="true">https://blog.marciosobel.dev/switching-to-nixos</guid>
            <dc:creator><![CDATA[Márcio Sobel]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[Hello! Recently, I've switched to <a href="https://nixos.org">NixOS</a>, and <em>oh boy</em> it was one of the best things I've done. My system has never been so stable, while so freeing at the same time. I also have a lot more control over it: what's installed, where each config is, enabled services, daemons and so on. The <code>nixpkgs</code> repository is <strong><em>huge.<strong><em> And I do mean it: <a href="https://repology.org/repositories/graphs">it's bigger than the AUR</em></strong></em></strong></a>!<br />I will dive in why is it good, it's cons, and whether or not you should use it.
First, i'll talk about what even <em>is</em> NixOS and how does it stand out from other Linux distros.<h2>What is Nix?</h2>Before talking about NixOS, let me introduce you to <code>nix</code>. <code>nix</code> is a <em>functional package manager</em>. This means that it treats packages like values in a purely functional programming language (like Haskell). The packages aren't installed where you would expect (like <code>/usr/bin</code>); instead, they are installed in <code>/nix/store</code>. And each package has its own unique subdirectory. Take Firefox for example:
<pre class="code "><code>/nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/</code></pre>
This hash (<code>b6gvzjyb...</code>) is the unique identifier that will capture all the dependencies of this package. Thanks to the hashing, you are allowed to have multiple versions of the same package <em>at the same time,</em> without having to deal with dependencies conflicting or breaking.<br />Also, due to the unique identifier, <code>nix</code> is able to remove unused packages using a <em>garbage collector</em>. This means your system always have only what you want!<h2>What is NixOS?</h2>NixOS takes the <code>nix</code> package manager to the fullest, applying it's philosophy to a whole operating system. This means your kernel, drivers, monitor resolution, apps and configuration are all described in a functional, declarative manner.<br />The system does not follow the <a href="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html">FHS standards</a>, meaning there is no <code>/bin</code>, <code>/lib</code> or <code>/usr</code>. Everything it contains is in the nix store.<br />The system configuration can be found at <code>/etc/nixos/</code>, where you'll find two files:<ul><li><code>hardware-configuration.nix</code>: Auto-generated by the operating system. You will probably never have to touch here (at least I hope so!)</li><li><code>configuration.nix</code>: Where your system configuration actually lives. Here's where you tell nix what packages should be installed, what services or daemons should be running, what desktop environment it should use, etc.</li></ul><br />Here's an example on how to install <code>git</code>:
<pre class="code nix"><code class="language-nix"># configuration.nix
{
    # ...
	environment.systemPackages = [pkgs.git];
}</code></pre>
...And that's it. If you ever want to uninstall it, you just have to remove the <code>pkgs.git</code> from the list. It's that simple!<br />But, saving the file won't install <code>git</code> by itself. This would be a nightmare. You have to <em>rebuild</em> your system. And I mean it literally. Running <code>nixos-rebuild</code> will rebuild your whole system, from the ground up, installing or uninstalling any package you added or removed from the configuration, stopping or starting services you've enabled, and so on.<br />This might be a bit worrying to you, but fear not! Thanks to the nix store, your system is fully backed up before you perform any rebuild. So if you ever, let's say, delete your video driver, you can just select your previous build from the boot manager. To rebuild your system, run:
<pre class="code "><code>nixos-rebuild switch</code></pre>
This will rebuild your system, and then change to it immediately (without needing to reboot your machine). You can also easily roll back to the previous configuration using the <code>--rollback</code> argument.<br />If you want to just see how your changes affect your system without creating a backup (almost like a "throaway" rebuild), you can simply run:
<pre class="code "><code>nixos-rebuild test</code></pre>
There are many other ways to rebuild your system, including building a VM, but I will not cover those here. Also, those two are probably the commands you'll run the most, anyway.<br />Well, that's a simple explanation of how <code>nix</code> and NixOS works. You will probably want to dive deeper, and for that I can't recommend <a href="https://www.youtube.com/@vimjoyer">Vimjoyer's channel</a> enough. There, you'll find more about the <code>nix</code> language, how to create modules, how to organize them and everything.<h2>Should you migrate to NixOS?</h2><h3>Pros</h3>First, let me funnel down to who I think NixOS suits best:<h4>Developers</h4>NixOS gives you such an amazing DX. It supports isolated, reproducible development environments, meaning that the argument "it works on my machine" actually means it works. You can think of this as Docker containers, but better! Also, you can use NixOS to declare a server structure, meaning that if you ever change architecture (maybe by switching hosts), you can have all your hosting settings and services up in seconds by copying the old machine <code>configuration.nix</code> file!<h4>Enthusiasts</h4>If you enjoy exploring stuff in tech, such as ricing, creating your own configs, or just tickling around in general, NixOS is a great fit! It's familiar enough to make you feel comfortable, while being different enough to keep things interesting and fun to mess with.<h3>Cons</h3>Now, I think NixOS is <strong>not</strong> a good option for you if you:<h4>Just want things to work fast</h4>If you just want to download VSCode and want it to work, or if you only use a browser, or even if you find that setting Neovim by yourself "too much work", then I think NixOS is not for you. Setting up NixOS is tedious and takes time. While you can just copy someone else's file to have a solid starting point, I believe that not making the system suit your own needs is not only a waste of it's potential and will only be a frustating experience if you ever want to change something.<h4>Are new to Linux</h4>If you're new to the Linux world, I think NixOS is too much to take. Go explore Ubuntu, Mint, or even Fedora. Then you can dive down into Arch, Void or NixOS. Get a feeling of how Linux works, how it's built to then be able to see how lower-level systems bends it to get the most out of it.<h2>Conclusion</h2>That's it! Maybe I'll make more posts sharing the stuff I find on the system. Meanwhile, you can find my current dotfiles <a href="https://github.com/marciosobel/dotfiles">here</a>. See you next time!]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Rust is the BEST programming language]]></title>
            <description><![CDATA[And I can prove it.]]></description>
            <link>https://blog.marciosobel.dev/rust-is-the-best-programming-language-ever</link>
            <guid isPermaLink="true">https://blog.marciosobel.dev/rust-is-the-best-programming-language-ever</guid>
            <dc:creator><![CDATA[Márcio Sobel]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[You’re probably already tired of hearing that “Rust is safe”, “Rust is the most loved programming language in the world,” “Rust is the future.”<br />Even though these claims are based on solid foundations, very little is said about the <em>real</em> positive aspects of Rust. I’m going to list a few positive factors beyond the language’s safety, robustness, and speed.<h2>Clear Domain Modeling</h2>Rust allows you to model a domain in a clear and concise way. Enums with superpowers make it possible to define rules that, in other languages, would require much more boilerplate.<br />Let me give you an example:
<pre class="code rust"><code class="language-rust">enum DownloadStatus {
    Inactive,
    Processing { progress: u32 },
    Error(String)
    Done,
}</code></pre>
Here we have an enum that can give us metadata about a download. In other languages, you’d probably need to create a class with all the necessary metadata (which could be <code>null</code>), and then implement several <em>workarounds</em> to validate things correctly. With Rust, not only is it impossible for metadata to be <code>null</code>, but it’s also very easy to access it, with the guarantee that it’s always valid.<h2>Extremely Powerful Switch Statements</h2>In the programming universe, <code>switch</code> is used to check for equal values. In modern programming, the use of <code>match</code> has become more and more common: a new kind of <code>switch</code> that allows you to use patterns for validation.<br />Here’s an example of a <code>match</code> in Rust:
<pre class="code rust"><code class="language-rust">let value = 5;
match value {
    0..=10 =&gt; println!(&quot;Number is between 0 and 10!&quot;),
    11 | 13 | 17 | 19 =&gt; println!(&quot;Prime number!&quot;),
    n if n % 2 == 0 =&gt; println!(&quot;Even number!&quot;),
    n =&gt; println!(&quot;I don't know what to do with {n}&quot;),
}</code></pre>
It’s also possible to do <em>pattern matching</em> in an <code>if</code>. Using the previous <code>DownloadStatus</code> example:
<pre class="code rust"><code class="language-rust">let status = DownloadStatus::Error(&quot;Failed to download&quot;.into());
if let DownloadStatus::Error(error) = status {
    eprintln!(&quot;Download error: {}&quot;, error);
}</code></pre>
It may look like just more <em>boilerplate</em>, but <code>enum</code>s combined with this kind of <em>pattern matching</em> make the code much more robust and safe as the codebase grows!<h2>Explicit Mutability</h2>Another very positive aspect of Rust is its explicit mutability. Everything is immutable by default:
<pre class="code rust"><code class="language-rust">let x = 10;
x = x * 2; // Code fails here</code></pre>
The code fails because <code>x</code> is immutable. To make it mutable, we need to add the <code>mut</code> keyword:
<pre class="code rust"><code class="language-rust">let mut x = 10;
x = x * 2;</code></pre>
In this example, it doesn’t look like a big deal. But this becomes extremely useful when we’re talking about function arguments:
<pre class="code rust"><code class="language-rust">let mut myText = String::from(&quot;Hello, world&quot;);
printText(&myText);
changeText(&mut myText);</code></pre>
It’s immediately clear whether a function is going to mutate a variable or not. In C or Go, passing the address of a variable leaves its mutability up to the function’s implementation, forcing the developer to read the documentation or inspect the code.<h2>Macros!</h2>It’s possible to do <em>metaprogramming</em> in Rust — that is, code that writes Rust code. Macros in Rust are practically a whole new language, but the crates <a href="https://crates.io/crates/syn"><code>syn</code></a> and <a href="https://crates.io/crates/quote"><code>quote</code></a> make the process much more intuitive and fluid. I highly recommend watching <a href="https://youtu.be/SMCRQj9Hbx8">this video</a> to understand it better. I won’t go too deep into macros here, I could write an entire post just about them (maybe someday).<h2>Configuration in TOML</h2>I’ll admit it: I <em>love</em> <code>TOML</code>. More than <code>YAML</code>, and infinitely more than <code>JSON</code>. It’s a clear, minimal language, and you can read the entire <a href="https://toml.io/en/v1.1.0">spec</a> in about 15 minutes. Rust uses TOML to define versions, dependencies, features, formatter configuration... It’s great!<h2>Not everything is sunshine and rainbows</h2>Of course, Rust isn’t perfect. Especially at the beginning, when you have to fight against your own habits to program in Rust. It has several DX issues, like verbosity, long compile times (even in debug), and don’t even get me started on lifetimes. I won't be covering the bads here, only the pros. Perhaps I could make a evil version of this post only talking about the bad side of Rust.<h2>Conclusion</h2>Rust has great fundamentals, a wonderful macro system, and <code>cargo</code> rocks. It’s definitely a modern, robust, fast, and safe language. Winning the title of the most loved programming language in the world for several consecutive years is no surprise. I hope I managed to clearly cover some of the aspects of the language that I like the most, beyond the obvious points from many other posts on the internet (safety, <em>blazingly fast</em>, etc.).<br />If you’re starting to use Rust in a project, remember to make it very clear that you use it — just like an Arch user (btw). The cult must grow. 🦀]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My first blog post]]></title>
            <description><![CDATA[Welcome to my blog!]]></description>
            <link>https://blog.marciosobel.dev/my-first-blog-post</link>
            <guid isPermaLink="true">https://blog.marciosobel.dev/my-first-blog-post</guid>
            <dc:creator><![CDATA[Márcio Sobel]]></dc:creator>
            <pubDate>Sun, 11 Jan 2026 00:00:00 GMT</pubDate>
            <content:encoded><![CDATA[Hello, welcome to my blog. I'm still starting, so my writting skills won't be that high lol. Although, I'm happy to finally have my own place to post my silly stuff.<br />As for a first post, I've tried to come up with a cool topic to stick to, but it would only make me get stuck on an infinite loop of ideas, so I will start with...<h2>How did I make this blog</h2>The first challenge was <em>how to write.</em> I've ended up sticking with markdown, since I'm already familiar with it's syntax.<br />Next step was picking <em>were to write</em>. There's lots of options (I thought a lot about using Astro or Hugo), but, since I wanted to have more control on the site itself, I've chosen Nuxt.<br />Nuxt allows me to not only have control over the site appearence, but this <a href="https://content.nuxt.com/">amazing module</a> let me place all of my posts in one directory as well, exatcly what I wanted!<br />Another really good thing Nuxt allows me to do is group my posts by language. I want to create posts in english and portuguese (depending on my will power).<br />Also, I remembered that I use Linux (Arch, btw.) and I've created a symlink in my Obsidian vault to the posts directory. This means I can write my posts directly on it!<br />Well, creating the blog in itself was quite simple, turns out that what was blocking me to create one was only... myself. Now I only need to decide...<h2>What am I gonna do over here?</h2>A blog is not like Twitter (currently X), Bluesky, Threads or any other social media where people post updates; it's a unique, personal corner that does not have any algorithms or content restrictions.<br />I've always had those moments where I see something cool, or I make something that I think it's cool, that I end up keeping to myself, because I have really extensive tastes that sometimes does not overlap with my social circle. So writting a blog would be a place where I can just yap about anything, put it in a box and let it be. Maybe someone likes it!]]></content:encoded>
        </item>
    </channel>
</rss>