Home on vulpine solutions https://blog.vulpine.solutions/ Recent content in Home on vulpine solutions Hugo en-gb sam, CC-BY-SA 4.0 Mon, 02 Dec 2024 00:00:00 +0000 rust is good, just not for me https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/ Mon, 02 Dec 2024 00:00:00 +0000 https://blog.vulpine.solutions/blog/rust-is-good-just-not-for-me/ <p>Rust is the big new<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> thing in just about every programming niche. web frameworks? of course there&rsquo;s a Rust one! in fact, there&rsquo;s dozens of them. command line tools? good luck finding one that <em>isn&rsquo;t</em> written in Rust these days. databases? oops, all Rust!</p> <p>all of this carcinisation<sup id="fnref:2"><a href="#fn:2" class="footnote-ref" role="doc-noteref">2</a></sup> has me feeling kind of left out, though. you see, i&rsquo;ve never really vibed with Rust: i have tried it multiple times, even building a handful of (unfinished, naturally) projects with it, but i always bounce off of it eventually. for a long time, i attributed this to Rust just not being what it&rsquo;s hyped up to be, that it&rsquo;s actually a lot worse than everyone says it is, but&hellip; it really isn&rsquo;t. it <em>is</em> a good programming language. a great one, in fact! i want to dig a little deeper into <em>why</em> i, personally, don&rsquo;t vibe with it. (not very deep, mind you, because self-reflection is difficult as <em>hell</em>)</p> go's panics are fundamentally flawed https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/ Tue, 05 Nov 2024 00:00:00 +0000 https://blog.vulpine.solutions/blog/go-panics-are-fundamentally-flawed/ <p><em>(alternative title: <code>panic()</code> considered harmful)</em></p> <h2 id="errors-how-do-they-work-anyway">errors, how do they work anyway?</h2> <p>errors in Go programs are represented by values. when calling a function that may return an error, it&rsquo;ll return <code>(T, error)</code>, and you can handle the error the same way you would any other value.</p> <p>(note: the <code>(T, error)</code> syntax doesn&rsquo;t imply Go has tuples, because it doesn&rsquo;t. functions can just return multiple values.)</p> <p>now, this approach does have some problems. Go lets you ignore the error very easily, by using the discard operator <code>_</code> rather than assigning it to a variable. it&rsquo;s also extremely verbose&ndash;anyone who has used Go a substantial amount has written <code>if err != nil { return err }</code> a thousand times. both of these issues are fixable, though: the compiler could emit a warning or an error (heh) when discarding an error value, and new syntax could be introduced to bubble errors up more easily.</p> hello world! https://blog.vulpine.solutions/blog/hello-world/ Mon, 04 Nov 2024 00:00:00 +0000 https://blog.vulpine.solutions/blog/hello-world/ <p>oh hey, it&rsquo;s the stereotypical &ldquo;hello world&rdquo; post. look at me! i copy pasted a hugo tutorial!</p> <p>turns out making a blog is really difficult, and not for technical reasons. it&rsquo;s just really hard to actually write things consistently. i can&rsquo;t promise anything in that regard&ndash;expect this site to get about one post a year, and that&rsquo;s <em>if</em> i actually remember it exists.</p> <p>until then though, have fun reading the one rant i&rsquo;ve already written. hope you like go because if not, it probably isn&rsquo;t for you!</p>